x_ite 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/components/annotation.js +2 -2
- package/dist/assets/components/annotation.min.js +1 -1
- package/dist/assets/components/cad-geometry.js +2 -2
- package/dist/assets/components/cad-geometry.min.js +1 -1
- package/dist/assets/components/cube-map-texturing.js +2 -2
- package/dist/assets/components/cube-map-texturing.min.js +1 -1
- package/dist/assets/components/dis.js +2 -2
- package/dist/assets/components/dis.min.js +1 -1
- package/dist/assets/components/event-utilities.js +2 -2
- package/dist/assets/components/event-utilities.min.js +1 -1
- package/dist/assets/components/geometry2d.js +2 -2
- package/dist/assets/components/geometry2d.min.js +1 -1
- package/dist/assets/components/geospatial.js +2 -2
- package/dist/assets/components/geospatial.min.js +1 -1
- package/dist/assets/components/h-anim.js +2 -2
- package/dist/assets/components/h-anim.min.js +1 -1
- package/dist/assets/components/key-device-sensor.js +2 -2
- package/dist/assets/components/key-device-sensor.min.js +1 -1
- package/dist/assets/components/layout.js +2 -2
- package/dist/assets/components/layout.min.js +1 -1
- package/dist/assets/components/nurbs.js +277 -194
- package/dist/assets/components/nurbs.min.js +1 -1
- package/dist/assets/components/particle-systems.js +2 -2
- package/dist/assets/components/particle-systems.min.js +1 -1
- package/dist/assets/components/picking.js +2 -2
- package/dist/assets/components/picking.min.js +1 -1
- package/dist/assets/components/projective-texture-mapping.js +2 -2
- package/dist/assets/components/projective-texture-mapping.min.js +1 -1
- package/dist/assets/components/rigid-body-physics.js +2 -2
- package/dist/assets/components/rigid-body-physics.min.js +1 -1
- package/dist/assets/components/scripting.js +2 -2
- package/dist/assets/components/scripting.min.js +1 -1
- package/dist/assets/components/texturing-3d.js +2 -2
- package/dist/assets/components/texturing-3d.min.js +1 -1
- package/dist/assets/components/volume-rendering.js +2 -2
- package/dist/assets/components/volume-rendering.min.js +1 -1
- package/dist/assets/components/x_ite.js +2 -2
- package/dist/assets/components/x_ite.min.js +1 -1
- package/dist/example.html +2 -2
- package/dist/x_ite.css +3 -2
- package/dist/x_ite.js +28 -30
- package/dist/x_ite.min.js +4 -4
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/index.md +2 -2
- package/package.json +2 -2
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite.css +1 -0
package/dist/x_ite.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE X3D v5.0.
|
|
1
|
+
/* X_ITE X3D v5.0.3-1148
|
|
2
2
|
* See LICENSE.txt for a detailed listing of used licences. */
|
|
3
3
|
!function(e,t){"object"==typeof module&&"function"==typeof require?t(module,require):t()}(0,(function(__global_module__,__global_require__){var module,exports,process,requirejs,require,define,factory;
|
|
4
4
|
/** vim: et:ts=4:sw=4:sts=4
|
|
@@ -29,7 +29,7 @@ function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.expo
|
|
|
29
29
|
*
|
|
30
30
|
* Date: 2021-02-16
|
|
31
31
|
*/
|
|
32
|
-
function(e){var t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w="sizzle"+1*new Date,b=e.document,v=0,S=0,T=ue(),C=ue(),N=ue(),F=ue(),O=function(e,t){return e===t&&(h=!0),0},E={}.hasOwnProperty,D=[],M=D.pop,I=D.push,V=D.push,B=D.slice,A=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",L="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",k="\\[[\\x20\\t\\r\\n\\f]*("+L+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+R+"*\\]",U=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+k+")*)|.*)\\)|)",X=new RegExp(R+"+","g"),z=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),j=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),G=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),q=new RegExp(R+"|>"),H=new RegExp(U),W=new RegExp("^"+L+"$"),Y={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},$=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ie=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},se=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{V.apply(D=B.call(b.childNodes),b.childNodes),D[b.childNodes.length].nodeType}catch(e){V={apply:D.length?function(e,t){I.apply(e,B.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}function ae(e,t,n,r){var o,a,l,c,h,f,_,y=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!r&&(d(t),t=t||p,g)){if(11!==b&&(h=J.exec(e)))if(o=h[1]){if(9===b){if(!(l=t.getElementById(o)))return n;if(l.id===o)return n.push(l),n}else if(y&&(l=y.getElementById(o))&&x(t,l)&&l.id===o)return n.push(l),n}else{if(h[2])return V.apply(n,t.getElementsByTagName(e)),n;if((o=h[3])&&i.getElementsByClassName&&t.getElementsByClassName)return V.apply(n,t.getElementsByClassName(o)),n}if(i.qsa&&!F[e+" "]&&(!m||!m.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(_=e,y=t,1===b&&(q.test(e)||G.test(e))){for((y=ee.test(e)&&_e(t.parentNode)||t)===t&&i.scope||((c=t.getAttribute("id"))?c=c.replace(ne,re):t.setAttribute("id",c=w)),a=(f=s(e)).length;a--;)f[a]=(c?"#"+c:":scope")+" "+xe(f[a]);_=f.join(",")}try{return V.apply(n,y.querySelectorAll(_)),n}catch(t){F(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return u(e.replace(z,"$1"),t,n,r)}function ue(){var e=[];return function t(i,r){return e.push(i+" ")>n.cacheLength&&delete t[e.shift()],t[i+" "]=r}}function le(e){return e[w]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function he(e,t){for(var i=e.split("|"),r=i.length;r--;)n.attrHandle[i[r]]=t}function de(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le((function(t){return t=+t,le((function(i,n){for(var r,o=e([],i.length,t),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))}))}))}function _e(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in i=ae.support={},o=ae.isXML=function(e){var t=e&&e.namespaceURI,i=e&&(e.ownerDocument||e).documentElement;return!$.test(t||i&&i.nodeName||"HTML")},d=ae.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:b;return s!=p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,g=!o(p),b!=p&&(r=p.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),i.scope=ce((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),i.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),i.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),i.getElementsByClassName=Q.test(p.getElementsByClassName),i.getById=ce((function(e){return f.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),i.getById?(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var i=t.getElementById(e);return i?[i]:[]}}):(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var i,n,r,o=t.getElementById(e);if(o){if((i=o.getAttributeNode("id"))&&i.value===e)return[o];for(r=t.getElementsByName(e),n=0;o=r[n++];)if((i=o.getAttributeNode("id"))&&i.value===e)return[o]}return[]}}),n.find.TAG=i.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):i.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},_=[],m=[],(i.qsa=Q.test(p.querySelectorAll))&&(ce((function(e){var t;f.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+P+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(i.matchesSelector=Q.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce((function(e){i.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),_.push("!=",U)})),m=m.length&&new RegExp(m.join("|")),_=_.length&&new RegExp(_.join("|")),t=Q.test(f.compareDocumentPosition),x=t||Q.test(f.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},O=t?function(e,t){if(e===t)return h=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!i.sortDetached&&t.compareDocumentPosition(e)===n?e==p||e.ownerDocument==b&&x(b,e)?-1:t==p||t.ownerDocument==b&&x(b,t)?1:c?A(c,e)-A(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return h=!0,0;var i,n=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e==p?-1:t==p?1:r?-1:o?1:c?A(c,e)-A(c,t):0;if(r===o)return de(e,t);for(i=e;i=i.parentNode;)s.unshift(i);for(i=t;i=i.parentNode;)a.unshift(i);for(;s[n]===a[n];)n++;return n?de(s[n],a[n]):s[n]==b?-1:a[n]==b?1:0},p):p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(d(e),i.matchesSelector&&g&&!F[t+" "]&&(!_||!_.test(t))&&(!m||!m.test(t)))try{var n=y.call(e,t);if(n||i.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){F(t,!0)}return ae(t,p,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&d(e),x(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var r=n.attrHandle[t.toLowerCase()],o=r&&E.call(n.attrHandle,t.toLowerCase())?r(e,t,!g):void 0;return void 0!==o?o:i.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(ne,re)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,n=[],r=0,o=0;if(h=!i.detectDuplicates,c=!i.sortStable&&e.slice(0),e.sort(O),h){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return c=null,e},r=ae.getText=function(e){var t,i="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)i+=r(t);return i},n=ae.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ie),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ie),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&H.test(i)&&(t=s(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ie).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+R+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var r=ae.attr(n,e);return null==r?"!="===t:!t||(r+="","="===t?r===i:"!="===t?r!==i:"^="===t?i&&0===r.indexOf(i):"*="===t?i&&r.indexOf(i)>-1:"$="===t?i&&r.slice(-i.length)===i:"~="===t?(" "+r.replace(X," ")+" ").indexOf(i)>-1:"|="===t&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,u){var l,c,h,d,p,f,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,_=a&&t.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===_:1===d.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(x=(p=(l=(c=(h=(d=m)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===v&&l[1])&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||f.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[v,p,x];break}}else if(y&&(x=p=(l=(c=(h=(d=t)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===v&&l[1]),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==_:1!==d.nodeType)||!++x||(y&&((c=(h=d[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]=[v,x]),d!==t)););return(x-=r)===n||x%n==0&&x/n>=0}}},PSEUDO:function(e,t){var i,r=n.pseudos[e]||n.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return r[w]?r(t):r.length>1?(i=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,i){for(var n,o=r(e,t),s=o.length;s--;)e[n=A(e,o[s])]=!(i[n]=o[s])})):function(e){return r(e,0,i)}):r}},pseudos:{not:le((function(e){var t=[],i=[],n=a(e.replace(z,"$1"));return n[w]?le((function(e,t,i,r){for(var o,s=n(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,r,o){return t[0]=e,n(t,null,o,i),t[0]=null,!i.pop()}})),has:le((function(e){return function(t){return ae(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ie),function(t){return(t.textContent||r(t)).indexOf(e)>-1}})),lang:le((function(e){return W.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ie).toLowerCase(),function(t){var i;do{if(i=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,i){return[i<0?i+t:i]})),even:me((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:me((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:me((function(e,t,i){for(var n=i<0?i+t:i>t?t:i;--n>=0;)e.push(n);return e})),gt:me((function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e}))}},n.pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=fe(t);function ye(){}function xe(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function we(e,t,i){var n=t.dir,r=t.next,o=r||n,s=i&&"parentNode"===o,a=S++;return t.first?function(t,i,r){for(;t=t[n];)if(1===t.nodeType||s)return e(t,i,r);return!1}:function(t,i,u){var l,c,h,d=[v,a];if(u){for(;t=t[n];)if((1===t.nodeType||s)&&e(t,i,u))return!0}else for(;t=t[n];)if(1===t.nodeType||s)if(c=(h=t[w]||(t[w]={}))[t.uniqueID]||(h[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[n]||t;else{if((l=c[o])&&l[0]===v&&l[1]===a)return d[2]=l[2];if(c[o]=d,d[2]=e(t,i,u))return!0}return!1}}function be(e){return e.length>1?function(t,i,n){for(var r=e.length;r--;)if(!e[r](t,i,n))return!1;return!0}:e[0]}function ve(e,t,i,n,r){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(i&&!i(o,n,r)||(s.push(o),l&&t.push(a)));return s}function Se(e,t,i,n,r,o){return n&&!n[w]&&(n=Se(n)),r&&!r[w]&&(r=Se(r,o)),le((function(o,s,a,u){var l,c,h,d=[],p=[],f=s.length,g=o||function(e,t,i){for(var n=0,r=t.length;n<r;n++)ae(e,t[n],i);return i}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:ve(g,d,e,a,u),_=i?r||(o?e:f||n)?[]:s:m;if(i&&i(m,_,a,u),n)for(l=ve(_,p),n(l,[],a,u),c=l.length;c--;)(h=l[c])&&(_[p[c]]=!(m[p[c]]=h));if(o){if(r||e){if(r){for(l=[],c=_.length;c--;)(h=_[c])&&l.push(m[c]=h);r(null,_=[],l,u)}for(c=_.length;c--;)(h=_[c])&&(l=r?A(o,h):d[c])>-1&&(o[l]=!(s[l]=h))}}else _=ve(_===s?_.splice(f,_.length):_),r?r(null,s,_,u):V.apply(s,_)}))}function Te(e){for(var t,i,r,o=e.length,s=n.relative[e[0].type],a=s||n.relative[" "],u=s?1:0,c=we((function(e){return e===t}),a,!0),h=we((function(e){return A(t,e)>-1}),a,!0),d=[function(e,i,n){var r=!s&&(n||i!==l)||((t=i).nodeType?c(e,i,n):h(e,i,n));return t=null,r}];u<o;u++)if(i=n.relative[e[u].type])d=[we(be(d),i)];else{if((i=n.filter[e[u].type].apply(null,e[u].matches))[w]){for(r=++u;r<o&&!n.relative[e[r].type];r++);return Se(u>1&&be(d),u>1&&xe(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(z,"$1"),i,u<r&&Te(e.slice(u,r)),r<o&&Te(e=e.slice(r)),r<o&&xe(e))}d.push(i)}return be(d)}return ye.prototype=n.filters=n.pseudos,n.setFilters=new ye,s=ae.tokenize=function(e,t){var i,r,o,s,a,u,l,c=C[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],l=n.preFilter;a;){for(s in i&&!(r=j.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),i=!1,(r=G.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(z," ")}),a=a.slice(i.length)),n.filter)!(r=Y[s].exec(a))||l[s]&&!(r=l[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return t?a.length:a?ae.error(e):C(e,u).slice(0)},a=ae.compile=function(e,t){var i,r=[],o=[],a=N[e+" "];if(!a){for(t||(t=s(e)),i=t.length;i--;)(a=Te(t[i]))[w]?r.push(a):o.push(a);a=N(e,function(e,t){var i=t.length>0,r=e.length>0,o=function(o,s,a,u,c){var h,f,m,_=0,y="0",x=o&&[],w=[],b=l,S=o||r&&n.find.TAG("*",c),T=v+=null==b?1:Math.random()||.1,C=S.length;for(c&&(l=s==p||s||c);y!==C&&null!=(h=S[y]);y++){if(r&&h){for(f=0,s||h.ownerDocument==p||(d(h),a=!g);m=e[f++];)if(m(h,s||p,a)){u.push(h);break}c&&(v=T)}i&&((h=!m&&h)&&_--,o&&x.push(h))}if(_+=y,i&&y!==_){for(f=0;m=t[f++];)m(x,w,s,a);if(o){if(_>0)for(;y--;)x[y]||w[y]||(w[y]=M.call(u));w=ve(w)}V.apply(u,w),c&&!o&&w.length>0&&_+t.length>1&&ae.uniqueSort(u)}return c&&(v=T,l=b),x};return i?le(o):o}(o,r)),a.selector=e}return a},u=ae.select=function(e,t,i,r){var o,u,l,c,h,d="function"==typeof e&&e,p=!r&&s(e=d.selector||e);if(i=i||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&n.relative[u[1].type]){if(!(t=(n.find.ID(l.matches[0].replace(te,ie),t)||[])[0]))return i;d&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=Y.needsContext.test(e)?0:u.length;o--&&(l=u[o],!n.relative[c=l.type]);)if((h=n.find[c])&&(r=h(l.matches[0].replace(te,ie),ee.test(u[0].type)&&_e(t.parentNode)||t))){if(u.splice(o,1),!(e=r.length&&xe(u)))return V.apply(i,r),i;break}}return(d||a(e,p))(r,t,!g,i,!t||ee.test(e)&&_e(t.parentNode)||t),i},i.sortStable=w.split("").sort(O).join("")===w,i.detectDuplicates=!!h,d(),i.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),i.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||he(P,(function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),ae}(e);b.find=S,b.expr=S.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=S.uniqueSort,b.text=S.getText,b.isXMLDoc=S.isXML,b.contains=S.contains,b.escapeSelector=S.escape;var T=function(e,t,i){for(var n=[],r=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&b(e).is(i))break;n.push(e)}return n},C=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},N=b.expr.match.needsContext;function F(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(e,t,i){return f(t)?b.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?b.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?b.grep(e,(function(e){return a.call(t,e)>-1!==i})):b.filter(t,e,i)}b.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?b.find.matchesSelector(n,e)?[n]:[]:b.find.matches(e,b.grep(t,(function(e){return 1===e.nodeType})))},b.fn.extend({find:function(e){var t,i,n=this.length,r=this;if("string"!=typeof e)return this.pushStack(b(e).filter((function(){for(t=0;t<n;t++)if(b.contains(r[t],this))return!0})));for(i=this.pushStack([]),t=0;t<n;t++)b.find(e,r[t],i);return n>1?b.uniqueSort(i):i},filter:function(e){return this.pushStack(E(this,e||[],!1))},not:function(e){return this.pushStack(E(this,e||[],!0))},is:function(e){return!!E(this,"string"==typeof e&&N.test(e)?b(e):e||[],!1).length}});var D,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,i){var n,r;if(!e)return this;if(i=i||D,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof b?t[0]:t,b.merge(this,b.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),O.test(n[1])&&b.isPlainObject(t))for(n in t)f(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(r=m.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==i.ready?i.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,D=b(m);var I=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function B(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),i=t.length;return this.filter((function(){for(var e=0;e<i;e++)if(b.contains(this,t[e]))return!0}))},closest:function(e,t){var i,n=0,r=this.length,o=[],s="string"!=typeof e&&b(e);if(!N.test(e))for(;n<r;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&b.find.matchesSelector(i,e))){o.push(i);break}return this.pushStack(o.length>1?b.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?a.call(b(e),this[0]):a.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,i){return T(e,"parentNode",i)},next:function(e){return B(e,"nextSibling")},prev:function(e){return B(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,i){return T(e,"nextSibling",i)},prevUntil:function(e,t,i){return T(e,"previousSibling",i)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&n(e.contentDocument)?e.contentDocument:(F(e,"template")&&(e=e.content||e),b.merge([],e.childNodes))}},(function(e,t){b.fn[e]=function(i,n){var r=b.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=b.filter(n,r)),this.length>1&&(V[e]||b.uniqueSort(r),I.test(e)&&r.reverse()),this.pushStack(r)}}));var A=/[^\x20\t\r\n\f]+/g;function P(e){return e}function R(e){throw e}function L(e,t,i,n){var r;try{e&&f(r=e.promise)?r.call(e).done(t).fail(i):e&&f(r=e.then)?r.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}b.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return b.each(e.match(A)||[],(function(e,i){t[i]=!0})),t}(e):b.extend({},e);var t,i,n,r,o=[],s=[],a=-1,u=function(){for(r=r||e.once,n=t=!0;s.length;a=-1)for(i=s.shift();++a<o.length;)!1===o[a].apply(i[0],i[1])&&e.stopOnFalse&&(a=o.length,i=!1);e.memory||(i=!1),t=!1,r&&(o=i?[]:"")},l={add:function(){return o&&(i&&!t&&(a=o.length-1,s.push(i)),function t(i){b.each(i,(function(i,n){f(n)?e.unique&&l.has(n)||o.push(n):n&&n.length&&"string"!==x(n)&&t(n)}))}(arguments),i&&!t&&u()),this},remove:function(){return b.each(arguments,(function(e,t){for(var i;(i=b.inArray(t,o,i))>-1;)o.splice(i,1),i<=a&&a--})),this},has:function(e){return e?b.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=i="",this},disabled:function(){return!o},lock:function(){return r=s=[],i||t||(o=i=""),this},locked:function(){return!!r},fireWith:function(e,i){return r||(i=[e,(i=i||[]).slice?i.slice():i],s.push(i),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},b.extend({Deferred:function(t){var i=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return b.Deferred((function(t){b.each(i,(function(i,n){var r=f(e[n[4]])&&e[n[4]];o[n[1]]((function(){var e=r&&r.apply(this,arguments);e&&f(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[n[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(t,n,r){var o=0;function s(t,i,n,r){return function(){var a=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=n.apply(a,u))===i.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,f(l)?r?l.call(e,s(o,i,P,r),s(o,i,R,r)):(o++,l.call(e,s(o,i,P,r),s(o,i,R,r),s(o,i,P,i.notifyWith))):(n!==P&&(a=void 0,u=[e]),(r||i.resolveWith)(a,u))}},c=r?l:function(){try{l()}catch(e){b.Deferred.exceptionHook&&b.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(n!==R&&(a=void 0,u=[e]),i.rejectWith(a,u))}};t?c():(b.Deferred.getStackHook&&(c.stackTrace=b.Deferred.getStackHook()),e.setTimeout(c))}}return b.Deferred((function(e){i[0][3].add(s(0,e,f(r)?r:P,e.notifyWith)),i[1][3].add(s(0,e,f(t)?t:P)),i[2][3].add(s(0,e,f(n)?n:R))})).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},o={};return b.each(i,(function(e,t){var s=t[2],a=t[5];r[t[1]]=s.add,a&&s.add((function(){n=a}),i[3-e][2].disable,i[3-e][3].disable,i[0][2].lock,i[0][3].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,i=t,n=Array(i),o=r.call(arguments),s=b.Deferred(),a=function(e){return function(i){n[e]=this,o[e]=arguments.length>1?r.call(arguments):i,--t||s.resolveWith(n,o)}};if(t<=1&&(L(e,s.done(a(i)).resolve,s.reject,!t),"pending"===s.state()||f(o[i]&&o[i].then)))return s.then();for(;i--;)L(o[i],a(i),s.reject);return s.promise()}});var k=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(t,i){e.console&&e.console.warn&&t&&k.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)},b.readyException=function(t){e.setTimeout((function(){throw t}))};var U=b.Deferred();function X(){m.removeEventListener("DOMContentLoaded",X),e.removeEventListener("load",X),b.ready()}b.fn.ready=function(e){return U.then(e).catch((function(e){b.readyException(e)})),this},b.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==e&&--b.readyWait>0||U.resolveWith(m,[b]))}}),b.ready.then=U.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?e.setTimeout(b.ready):(m.addEventListener("DOMContentLoaded",X),e.addEventListener("load",X));var z=function(e,t,i,n,r,o,s){var a=0,u=e.length,l=null==i;if("object"===x(i))for(a in r=!0,i)z(e,t,a,i[a],!0,o,s);else if(void 0!==n&&(r=!0,f(n)||(s=!0),l&&(s?(t.call(e,n),t=null):(l=t,t=function(e,t,i){return l.call(b(e),i)})),t))for(;a<u;a++)t(e[a],i,s?n:n.call(e[a],a,t(e[a],i)));return r?e:l?t.call(e):u?t(e[0],i):o},j=/^-ms-/,G=/-([a-z])/g;function q(e,t){return t.toUpperCase()}function H(e){return e.replace(j,"ms-").replace(G,q)}var W=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=b.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},W(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,r=this.cache(e);if("string"==typeof t)r[H(t)]=i;else for(n in t)r[H(n)]=t[n];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][H(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){i=(t=Array.isArray(t)?t.map(H):(t=H(t))in n?[t]:t.match(A)||[]).length;for(;i--;)delete n[t[i]]}(void 0===t||b.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!b.isEmptyObject(t)}};var $=new Y,Z=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function J(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(Q,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:K.test(e)?JSON.parse(e):e)}(i)}catch(e){}Z.set(e,t,i)}else i=void 0;return i}b.extend({hasData:function(e){return Z.hasData(e)||$.hasData(e)},data:function(e,t,i){return Z.access(e,t,i)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,i){return $.access(e,t,i)},_removeData:function(e,t){$.remove(e,t)}}),b.fn.extend({data:function(e,t){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=Z.get(o),1===o.nodeType&&!$.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&0===(n=s[i].name).indexOf("data-")&&(n=H(n.slice(5)),J(o,n,r[n]));$.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each((function(){Z.set(this,e)})):z(this,(function(t){var i;if(o&&void 0===t)return void 0!==(i=Z.get(o,e))||void 0!==(i=J(o,e))?i:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),b.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=$.get(e,t),i&&(!n||Array.isArray(i)?n=$.access(e,t,b.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=b.queue(e,t),n=i.length,r=i.shift(),o=b._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete o.stop,r.call(e,(function(){b.dequeue(e,t)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return $.get(e,i)||$.access(e,i,{empty:b.Callbacks("once memory").add((function(){$.remove(e,[t+"queue",i])}))})}}),b.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?b.queue(this[0],e):void 0===t?this:this.each((function(){var i=b.queue(this,e,t);b._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&b.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){b.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=b.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(i=$.get(o[s],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],ne=m.documentElement,re=function(e){return b.contains(e.ownerDocument,e)},oe={composed:!0};ne.getRootNode&&(re=function(e){return b.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&re(e)&&"none"===b.css(e,"display")};function ae(e,t,i,n){var r,o,s=20,a=n?function(){return n.cur()}:function(){return b.css(e,t,"")},u=a(),l=i&&i[3]||(b.cssNumber[t]?"":"px"),c=e.nodeType&&(b.cssNumber[t]||"px"!==l&&+u)&&te.exec(b.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)b.style(e,t,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;c*=2,b.style(e,t,c+l),i=i||[]}return i&&(c=+c||+u||0,r=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=l,n.start=c,n.end=r)),r}var ue={};function le(e){var t,i=e.ownerDocument,n=e.nodeName,r=ue[n];return r||(t=i.body.appendChild(i.createElement(n)),r=b.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),ue[n]=r,r)}function ce(e,t){for(var i,n,r=[],o=0,s=e.length;o<s;o++)(n=e[o]).style&&(i=n.style.display,t?("none"===i&&(r[o]=$.get(n,"display")||null,r[o]||(n.style.display="")),""===n.style.display&&se(n)&&(r[o]=le(n))):"none"!==i&&(r[o]="none",$.set(n,"display",i)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}b.fn.extend({show:function(){return ce(this,!0)},hide:function(){return ce(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){se(this)?b(this).show():b(this).hide()}))}});var he,de,pe=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i;he=m.createDocumentFragment().appendChild(m.createElement("div")),(de=m.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),he.appendChild(de),p.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="<option></option>",p.option=!!he.lastChild;var me={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function _e(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&F(e,t)?b.merge([e],i):i}function ye(e,t){for(var i=0,n=e.length;i<n;i++)$.set(e[i],"globalEval",!t||$.get(t[i],"globalEval"))}me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td,p.option||(me.optgroup=me.option=[1,"<select multiple='multiple'>","</select>"]);var xe=/<|&#?\w+;/;function we(e,t,i,n,r){for(var o,s,a,u,l,c,h=t.createDocumentFragment(),d=[],p=0,f=e.length;p<f;p++)if((o=e[p])||0===o)if("object"===x(o))b.merge(d,o.nodeType?[o]:o);else if(xe.test(o)){for(s=s||h.appendChild(t.createElement("div")),a=(fe.exec(o)||["",""])[1].toLowerCase(),u=me[a]||me._default,s.innerHTML=u[1]+b.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;b.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(t.createTextNode(o));for(h.textContent="",p=0;o=d[p++];)if(n&&b.inArray(o,n)>-1)r&&r.push(o);else if(l=re(o),s=_e(h.appendChild(o),"script"),l&&ye(s),i)for(c=0;o=s[c++];)ge.test(o.type||"")&&i.push(o);return h}var be=/^([^.]*)(?:\.(.+)|)/;function ve(){return!0}function Se(){return!1}function Te(e,t){return e===function(){try{return m.activeElement}catch(e){}}()==("focus"===t)}function Ce(e,t,i,n,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof i&&(n=n||i,i=void 0),t)Ce(e,a,i,n,t[a],o);return e}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=Se;else if(!r)return e;return 1===o&&(s=r,r=function(e){return b().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=b.guid++)),e.each((function(){b.event.add(this,t,r,n,i)}))}function Ne(e,t,i){i?($.set(e,t,!1),b.event.add(e,t,{namespace:!1,handler:function(e){var n,o,s=$.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(b.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=r.call(arguments),$.set(this,t,s),n=i(this,t),this[t](),s!==(o=$.get(this,t))||n?$.set(this,t,!1):o={},s!==o)return e.stopImmediatePropagation(),e.preventDefault(),o&&o.value}else s.length&&($.set(this,t,{value:b.event.trigger(b.extend(s[0],b.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===$.get(e,t)&&b.event.add(e,t,ve)}b.event={global:{},add:function(e,t,i,n,r){var o,s,a,u,l,c,h,d,p,f,g,m=$.get(e);if(W(e))for(i.handler&&(i=(o=i).handler,r=o.selector),r&&b.find.matchesSelector(ne,r),i.guid||(i.guid=b.guid++),(u=m.events)||(u=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(A)||[""]).length;l--;)p=g=(a=be.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=b.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,h=b.event.special[p]||{},c=b.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&b.expr.match.needsContext.test(r),namespace:f.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,n,f,s)||e.addEventListener&&e.addEventListener(p,s)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),b.event.global[p]=!0)},remove:function(e,t,i,n,r){var o,s,a,u,l,c,h,d,p,f,g,m=$.hasData(e)&&$.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(A)||[""]).length;l--;)if(p=g=(a=be.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=b.event.special[p]||{},d=u[p=(n?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!r&&g!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(e,c));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,f,m.handle)||b.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)b.event.remove(e,p+t[l],i,n,!0);b.isEmptyObject(u)&&$.remove(e,"handle events")}},dispatch:function(e){var t,i,n,r,o,s,a=new Array(arguments.length),u=b.event.fix(e),l=($.get(this,"events")||Object.create(null))[u.type]||[],c=b.event.special[u.type]||{};for(a[0]=u,t=1;t<arguments.length;t++)a[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(s=b.event.handlers.call(this,u,l),t=0;(r=s[t++])&&!u.isPropagationStopped();)for(u.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(n=((b.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(u.result=n)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var i,n,r,o,s,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},i=0;i<u;i++)void 0===s[r=(n=t[i]).selector+" "]&&(s[r]=n.needsContext?b(r,this).index(l)>-1:b.find(r,this,null,[l]).length),s[r]&&o.push(n);o.length&&a.push({elem:l,handlers:o})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(e,t){Object.defineProperty(b.Event.prototype,e,{enumerable:!0,configurable:!0,get:f(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[b.expando]?e:new b.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&F(t,"input")&&Ne(t,"click",ve),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&F(t,"input")&&Ne(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&F(t,"input")&&$.get(t,"click")||F(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},b.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},b.Event=function(e,t){if(!(this instanceof b.Event))return new b.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ve:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&b.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[b.expando]=!0},b.Event.prototype={constructor:b.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ve,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ve,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ve,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},b.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},b.event.addProp),b.each({focus:"focusin",blur:"focusout"},(function(e,t){b.event.special[e]={setup:function(){return Ne(this,e,Te),!1},trigger:function(){return Ne(this,e),!0},_default:function(){return!0},delegateType:t}})),b.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===n||b.contains(n,r))||(e.type=o.origType,i=o.handler.apply(this,arguments),e.type=t),i}}})),b.fn.extend({on:function(e,t,i,n){return Ce(this,e,t,i,n)},one:function(e,t,i,n){return Ce(this,e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,b(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=Se),this.each((function(){b.event.remove(this,e,i,t)}))}});var Fe=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ee=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function De(e,t){return F(e,"table")&&F(11!==t.nodeType?t:t.firstChild,"tr")&&b(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ve(e,t){var i,n,r,o,s,a;if(1===t.nodeType){if($.hasData(e)&&(a=$.get(e).events))for(r in $.remove(t,"handle events"),a)for(i=0,n=a[r].length;i<n;i++)b.event.add(t,r,a[r][i]);Z.hasData(e)&&(o=Z.access(e),s=b.extend({},o),Z.set(t,s))}}function Be(e,t){var i=t.nodeName.toLowerCase();"input"===i&&pe.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function Ae(e,t,i,n){t=o(t);var r,s,a,u,l,c,h=0,d=e.length,g=d-1,m=t[0],_=f(m);if(_||d>1&&"string"==typeof m&&!p.checkClone&&Oe.test(m))return e.each((function(r){var o=e.eq(r);_&&(t[0]=m.call(this,r,o.html())),Ae(o,t,i,n)}));if(d&&(s=(r=we(t,e[0].ownerDocument,!1,e,n)).firstChild,1===r.childNodes.length&&(r=s),s||n)){for(u=(a=b.map(_e(r,"script"),Me)).length;h<d;h++)l=r,h!==g&&(l=b.clone(l,!0,!0),u&&b.merge(a,_e(l,"script"))),i.call(e[h],l,h);if(u)for(c=a[a.length-1].ownerDocument,b.map(a,Ie),h=0;h<u;h++)l=a[h],ge.test(l.type||"")&&!$.access(l,"globalEval")&&b.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?b._evalUrl&&!l.noModule&&b._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):y(l.textContent.replace(Ee,""),l,c))}return e}function Pe(e,t,i){for(var n,r=t?b.filter(t,e):e,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||b.cleanData(_e(n)),n.parentNode&&(i&&re(n)&&ye(_e(n,"script")),n.parentNode.removeChild(n));return e}b.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,r,o,s,a=e.cloneNode(!0),u=re(e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(s=_e(a),n=0,r=(o=_e(e)).length;n<r;n++)Be(o[n],s[n]);if(t)if(i)for(o=o||_e(e),s=s||_e(a),n=0,r=o.length;n<r;n++)Ve(o[n],s[n]);else Ve(e,a);return(s=_e(a,"script")).length>0&&ye(s,!u&&_e(e,"script")),a},cleanData:function(e){for(var t,i,n,r=b.event.special,o=0;void 0!==(i=e[o]);o++)if(W(i)){if(t=i[$.expando]){if(t.events)for(n in t.events)r[n]?b.event.remove(i,n):b.removeEvent(i,n,t.handle);i[$.expando]=void 0}i[Z.expando]&&(i[Z.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Pe(this,e,!0)},remove:function(e){return Pe(this,e)},text:function(e){return z(this,(function(e){return void 0===e?b.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ae(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||De(this,e).appendChild(e)}))},prepend:function(){return Ae(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=De(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ae(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ae(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(_e(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return z(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Fe.test(e)&&!me[(fe.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(b.cleanData(_e(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ae(this,arguments,(function(t){var i=this.parentNode;b.inArray(this,e)<0&&(b.cleanData(_e(this)),i&&i.replaceChild(t,this))}),e)}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){b.fn[e]=function(e){for(var i,n=[],r=b(e),o=r.length-1,a=0;a<=o;a++)i=a===o?this:this.clone(!0),b(r[a])[t](i),s.apply(n,i.get());return this.pushStack(n)}}));var Re=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Le=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=e),i.getComputedStyle(t)},ke=function(e,t,i){var n,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in n=i.call(e),t)e.style[r]=o[r];return n},Ue=new RegExp(ie.join("|"),"i");function Xe(e,t,i){var n,r,o,s,a=e.style;return(i=i||Le(e))&&(""!==(s=i.getPropertyValue(t)||i[t])||re(e)||(s=b.style(e,t)),!p.pixelBoxStyles()&&Re.test(s)&&Ue.test(t)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ne.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);n="1%"!==t.top,u=12===i(t.marginLeft),c.style.right="60%",s=36===i(t.right),r=36===i(t.width),c.style.position="absolute",o=12===i(c.offsetWidth/3),ne.removeChild(l),c=null}}function i(e){return Math.round(parseFloat(e))}var n,r,o,s,a,u,l=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===c.style.backgroundClip,b.extend(p,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,i,n,r;return null==a&&(t=m.createElement("table"),i=m.createElement("tr"),n=m.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="border:1px solid",i.style.height="1px",n.style.height="9px",n.style.display="block",ne.appendChild(t).appendChild(i).appendChild(n),r=e.getComputedStyle(i),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===i.offsetHeight,ne.removeChild(t)),a}}))}();var je=["Webkit","Moz","ms"],Ge=m.createElement("div").style,qe={};function He(e){var t=b.cssProps[e]||qe[e];return t||(e in Ge?e:qe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),i=je.length;i--;)if((e=je[i]+t)in Ge)return e}(e)||e)}var We=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,$e={position:"absolute",visibility:"hidden",display:"block"},Ze={letterSpacing:"0",fontWeight:"400"};function Ke(e,t,i){var n=te.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function Qe(e,t,i,n,r,o){var s="width"===t?1:0,a=0,u=0;if(i===(n?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(u+=b.css(e,i+ie[s],!0,r)),n?("content"===i&&(u-=b.css(e,"padding"+ie[s],!0,r)),"margin"!==i&&(u-=b.css(e,"border"+ie[s]+"Width",!0,r))):(u+=b.css(e,"padding"+ie[s],!0,r),"padding"!==i?u+=b.css(e,"border"+ie[s]+"Width",!0,r):a+=b.css(e,"border"+ie[s]+"Width",!0,r));return!n&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))||0),u}function Je(e,t,i){var n=Le(e),r=(!p.boxSizingReliable()||i)&&"border-box"===b.css(e,"boxSizing",!1,n),o=r,s=Xe(e,t,n),a="offset"+t[0].toUpperCase()+t.slice(1);if(Re.test(s)){if(!i)return s;s="auto"}return(!p.boxSizingReliable()&&r||!p.reliableTrDimensions()&&F(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===b.css(e,"display",!1,n))&&e.getClientRects().length&&(r="border-box"===b.css(e,"boxSizing",!1,n),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+Qe(e,t,i||(r?"border":"content"),o,n,s)+"px"}function et(e,t,i,n,r){return new et.prototype.init(e,t,i,n,r)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=Xe(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=H(t),u=Ye.test(t),l=e.style;if(u||(t=He(a)),s=b.cssHooks[t]||b.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(e,!1,n))?r:l[t];"string"===(o=typeof i)&&(r=te.exec(i))&&r[1]&&(i=ae(e,t,r),o="number"),null!=i&&i==i&&("number"!==o||u||(i+=r&&r[3]||(b.cssNumber[a]?"":"px")),p.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(i=s.set(e,i,n))||(u?l.setProperty(t,i):l[t]=i))}},css:function(e,t,i,n){var r,o,s,a=H(t);return Ye.test(t)||(t=He(a)),(s=b.cssHooks[t]||b.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,i)),void 0===r&&(r=Xe(e,t,n)),"normal"===r&&t in Ze&&(r=Ze[t]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),b.each(["height","width"],(function(e,t){b.cssHooks[t]={get:function(e,i,n){if(i)return!We.test(b.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,t,n):ke(e,$e,(function(){return Je(e,t,n)}))},set:function(e,i,n){var r,o=Le(e),s=!p.scrollboxSize()&&"absolute"===o.position,a=(s||n)&&"border-box"===b.css(e,"boxSizing",!1,o),u=n?Qe(e,t,n,a,o):0;return a&&s&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Qe(e,t,"border",!1,o)-.5)),u&&(r=te.exec(i))&&"px"!==(r[3]||"px")&&(e.style[t]=i,i=b.css(e,t)),Ke(0,i,u)}}})),b.cssHooks.marginLeft=ze(p.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Xe(e,"marginLeft"))||e.getBoundingClientRect().left-ke(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),b.each({margin:"",padding:"",border:"Width"},(function(e,t){b.cssHooks[e+t]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[e+ie[n]+t]=o[n]||o[n-2]||o[0];return r}},"margin"!==e&&(b.cssHooks[e+t].set=Ke)})),b.fn.extend({css:function(e,t){return z(this,(function(e,t,i){var n,r,o={},s=0;if(Array.isArray(t)){for(n=Le(e),r=t.length;s<r;s++)o[t[s]]=b.css(e,t[s],!1,n);return o}return void 0!==i?b.style(e,t,i):b.css(e,t)}),e,t,arguments.length>1)}}),b.Tween=et,et.prototype={constructor:et,init:function(e,t,i,n,r,o){this.elem=e,this.prop=i,this.easing=r||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(b.cssNumber[i]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,i=et.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):et.propHooks._default.set(this),this}},et.prototype.init.prototype=et.prototype,et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[He(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},et.propHooks.scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=et.prototype.init,b.fx.step={};var tt,it,nt=/^(?:toggle|show|hide)$/,rt=/queueHooks$/;function ot(){it&&(!1===m.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ot):e.setTimeout(ot,b.fx.interval),b.fx.tick())}function st(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function at(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)r["margin"+(i=ie[n])]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function ut(e,t,i){for(var n,r=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,s=r.length;o<s;o++)if(n=r[o].call(i,t,e))return n}function lt(e,t,i){var n,r,o=0,s=lt.prefilters.length,a=b.Deferred().always((function(){delete u.elem})),u=function(){if(r)return!1;for(var t=tt||st(),i=Math.max(0,l.startTime+l.duration-t),n=1-(i/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(n);return a.notifyWith(e,[l,n,i]),n<1&&s?i:(s||a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{},easing:b.easing._default},i),originalProperties:t,originalOptions:i,startTime:tt||st(),duration:i.duration,tweens:[],createTween:function(t,i){var n=b.Tween(e,l.opts,t,i,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(n),n},stop:function(t){var i=0,n=t?l.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)l.tweens[i].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var i,n,r,o,s;for(i in e)if(r=t[n=H(i)],o=e[i],Array.isArray(o)&&(r=o[1],o=e[i]=o[0]),i!==n&&(e[n]=o,delete e[i]),(s=b.cssHooks[n])&&"expand"in s)for(i in o=s.expand(o),delete e[n],o)i in e||(e[i]=o[i],t[i]=r);else t[n]=r}(c,l.opts.specialEasing);o<s;o++)if(n=lt.prefilters[o].call(l,e,c,l.opts))return f(n.stop)&&(b._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return b.map(c,ut,l),f(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}b.Animation=b.extend(lt,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return ae(i.elem,e,te.exec(t),i),i}]},tweener:function(e,t){f(e)?(t=e,e=["*"]):e=e.match(A);for(var i,n=0,r=e.length;n<r;n++)i=e[n],lt.tweeners[i]=lt.tweeners[i]||[],lt.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var n,r,o,s,a,u,l,c,h="width"in t||"height"in t,d=this,p={},f=e.style,g=e.nodeType&&se(e),m=$.get(e,"fxshow");for(n in i.queue||(null==(s=b._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,b.queue(e,"fx").length||s.empty.fire()}))}))),t)if(r=t[n],nt.test(r)){if(delete t[n],o=o||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[n])continue;g=!0}p[n]=m&&m[n]||b.style(e,n)}if((u=!b.isEmptyObject(t))||!b.isEmptyObject(p))for(n in h&&1===e.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=m&&m.display)&&(l=$.get(e,"display")),"none"===(c=b.css(e,"display"))&&(l?c=l:(ce([e],!0),l=e.style.display||l,c=b.css(e,"display"),ce([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===b.css(e,"float")&&(u||(d.done((function(){f.display=l})),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]}))),u=!1,p)u||(m?"hidden"in m&&(g=m.hidden):m=$.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&ce([e],!0),d.done((function(){for(n in g||ce([e]),$.remove(e,"fxshow"),p)b.style(e,n,p[n])}))),u=ut(g?m[n]:0,n,d),n in m||(m[n]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),b.speed=function(e,t,i){var n=e&&"object"==typeof e?b.extend({},e):{complete:i||!i&&t||f(e)&&e,duration:e,easing:i&&t||t&&!f(t)&&t};return b.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in b.fx.speeds?n.duration=b.fx.speeds[n.duration]:n.duration=b.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){f(n.old)&&n.old.call(this),n.queue&&b.dequeue(this,n.queue)},n},b.fn.extend({fadeTo:function(e,t,i,n){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var r=b.isEmptyObject(e),o=b.speed(t,i,n),s=function(){var t=lt(this,b.extend({},e),o);(r||$.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",o=b.timers,s=$.get(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&rt.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(i),t=!1,o.splice(r,1));!t&&i||b.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=$.get(this),n=i[e+"queue"],r=i[e+"queueHooks"],o=b.timers,s=n?n.length:0;for(i.finish=!0,b.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish}))}}),b.each(["toggle","show","hide"],(function(e,t){var i=b.fn[t];b.fn[t]=function(e,n,r){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(at(t,!0),e,n,r)}})),b.each({slideDown:at("show"),slideUp:at("hide"),slideToggle:at("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){b.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}})),b.timers=[],b.fx.tick=function(){var e,t=0,i=b.timers;for(tt=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||b.fx.stop(),tt=void 0},b.fx.timer=function(e){b.timers.push(e),b.fx.start()},b.fx.interval=13,b.fx.start=function(){it||(it=!0,ot())},b.fx.stop=function(){it=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fn.delay=function(t,i){return t=b.fx&&b.fx.speeds[t]||t,i=i||"fx",this.queue(i,(function(i,n){var r=e.setTimeout(i,t);n.stop=function(){e.clearTimeout(r)}}))},function(){var e=m.createElement("input"),t=m.createElement("select").appendChild(m.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=t.selected,(e=m.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var ct,ht=b.expr.attrHandle;b.fn.extend({attr:function(e,t){return z(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))}}),b.extend({attr:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?b.prop(e,t,i):(1===o&&b.isXMLDoc(e)||(r=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?ct:void 0)),void 0!==i?null===i?void b.removeAttr(e,t):r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:(e.setAttribute(t,i+""),i):r&&"get"in r&&null!==(n=r.get(e,t))?n:null==(n=b.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&F(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,r=t&&t.match(A);if(r&&1===e.nodeType)for(;i=r[n++];)e.removeAttribute(i)}}),ct={set:function(e,t,i){return!1===t?b.removeAttr(e,i):e.setAttribute(i,i),i}},b.each(b.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=ht[t]||b.find.attr;ht[t]=function(e,t,n){var r,o,s=t.toLowerCase();return n||(o=ht[s],ht[s]=r,r=null!=i(e,t,n)?s:null,ht[s]=o),r}}));var dt=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function ft(e){return(e.match(A)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(A)||[]}b.fn.extend({prop:function(e,t){return z(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[b.propFix[e]||e]}))}}),b.extend({prop:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&b.isXMLDoc(e)||(t=b.propFix[t]||t,r=b.propHooks[t]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,"tabindex");return t?parseInt(t,10):dt.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){b.propFix[this.toLowerCase()]=this})),b.fn.extend({addClass:function(e){var t,i,n,r,o,s,a,u=0;if(f(e))return this.each((function(t){b(this).addClass(e.call(this,t,gt(this)))}));if((t=mt(e)).length)for(;i=this[u++];)if(r=gt(i),n=1===i.nodeType&&" "+ft(r)+" "){for(s=0;o=t[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r!==(a=ft(n))&&i.setAttribute("class",a)}return this},removeClass:function(e){var t,i,n,r,o,s,a,u=0;if(f(e))return this.each((function(t){b(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=mt(e)).length)for(;i=this[u++];)if(r=gt(i),n=1===i.nodeType&&" "+ft(r)+" "){for(s=0;o=t[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r!==(a=ft(n))&&i.setAttribute("class",a)}return this},toggleClass:function(e,t){var i=typeof e,n="string"===i||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):f(e)?this.each((function(i){b(this).toggleClass(e.call(this,i,gt(this),t),t)})):this.each((function(){var t,r,o,s;if(n)for(r=0,o=b(this),s=mt(e);t=s[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==i||((t=gt(this))&&$.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":$.get(this,"__className__")||""))}))},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+ft(gt(i))+" ").indexOf(t)>-1)return!0;return!1}});var _t=/\r/g;b.fn.extend({val:function(e){var t,i,n,r=this[0];return arguments.length?(n=f(e),this.each((function(i){var r;1===this.nodeType&&(null==(r=n?e.call(this,i,b(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=b.map(r,(function(e){return null==e?"":e+""}))),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=b.valHooks[r.type]||b.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(_t,""):null==i?"":i:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:ft(b.text(e))}},select:{get:function(e){var t,i,n,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:r.length;for(n=o<0?u:s?o:0;n<u;n++)if(((i=r[n]).selected||n===o)&&!i.disabled&&(!i.parentNode.disabled||!F(i.parentNode,"optgroup"))){if(t=b(i).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var i,n,r=e.options,o=b.makeArray(t),s=r.length;s--;)((n=r[s]).selected=b.inArray(b.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(e.selectedIndex=-1),o}}}}),b.each(["radio","checkbox"],(function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},p.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),p.focusin="onfocusin"in e;var yt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(t,i,n,r){var o,s,a,u,l,h,d,p,_=[n||m],y=c.call(t,"type")?t.type:t,x=c.call(t,"namespace")?t.namespace.split("."):[];if(s=p=a=n=n||m,3!==n.nodeType&&8!==n.nodeType&&!yt.test(y+b.event.triggered)&&(y.indexOf(".")>-1&&(x=y.split("."),y=x.shift(),x.sort()),l=y.indexOf(":")<0&&"on"+y,(t=t[b.expando]?t:new b.Event(y,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:b.makeArray(i,[t]),d=b.event.special[y]||{},r||!d.trigger||!1!==d.trigger.apply(n,i))){if(!r&&!d.noBubble&&!g(n)){for(u=d.delegateType||y,yt.test(u+y)||(s=s.parentNode);s;s=s.parentNode)_.push(s),a=s;a===(n.ownerDocument||m)&&_.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=_[o++])&&!t.isPropagationStopped();)p=s,t.type=o>1?u:d.bindType||y,(h=($.get(s,"events")||Object.create(null))[t.type]&&$.get(s,"handle"))&&h.apply(s,i),(h=l&&s[l])&&h.apply&&W(s)&&(t.result=h.apply(s,i),!1===t.result&&t.preventDefault());return t.type=y,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(_.pop(),i)||!W(n)||l&&f(n[y])&&!g(n)&&((a=n[l])&&(n[l]=null),b.event.triggered=y,t.isPropagationStopped()&&p.addEventListener(y,xt),n[y](),t.isPropagationStopped()&&p.removeEventListener(y,xt),b.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(e,t,i){var n=b.extend(new b.Event,i,{type:e,isSimulated:!0});b.event.trigger(n,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return b.event.trigger(e,t,i,!0)}}),p.focusin||b.each({focus:"focusin",blur:"focusout"},(function(e,t){var i=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,r=$.access(n,t);r||n.addEventListener(e,i,!0),$.access(n,t,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,r=$.access(n,t)-1;r?$.access(n,t,r):(n.removeEventListener(e,i,!0),$.remove(n,t))}}}));var wt=e.location,bt={guid:Date.now()},vt=/\?/;b.parseXML=function(t){var i,n;if(!t||"string"!=typeof t)return null;try{i=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return n=i&&i.getElementsByTagName("parsererror")[0],i&&!n||b.error("Invalid XML: "+(n?b.map(n.childNodes,(function(e){return e.textContent})).join("\n"):t)),i};var St=/\[\]$/,Tt=/\r?\n/g,Ct=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Ft(e,t,i,n){var r;if(Array.isArray(t))b.each(t,(function(t,r){i||St.test(e)?n(e,r):Ft(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,i,n)}));else if(i||"object"!==x(t))n(e,t);else for(r in t)Ft(e+"["+r+"]",t[r],i,n)}b.param=function(e,t){var i,n=[],r=function(e,t){var i=f(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,(function(){r(this.name,this.value)}));else for(i in e)Ft(i,e[i],t,r);return n.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&Nt.test(this.nodeName)&&!Ct.test(e)&&(this.checked||!pe.test(e))})).map((function(e,t){var i=b(this).val();return null==i?null:Array.isArray(i)?b.map(i,(function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}})):{name:t.name,value:i.replace(Tt,"\r\n")}})).get()}});var Ot=/%20/g,Et=/#.*$/,Dt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,Vt=/^\/\//,Bt={},At={},Pt="*/".concat("*"),Rt=m.createElement("a");function Lt(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,r=0,o=t.toLowerCase().match(A)||[];if(f(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function kt(e,t,i,n){var r={},o=e===At;function s(a){var u;return r[a]=!0,b.each(e[a]||[],(function(e,a){var l=a(t,i,n);return"string"!=typeof l||o||r[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),s(l),!1)})),u}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Ut(e,t){var i,n,r=b.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&b.extend(!0,e,n),e}Rt.href=wt.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,b.ajaxSettings),t):Ut(b.ajaxSettings,e)},ajaxPrefilter:Lt(Bt),ajaxTransport:Lt(At),ajax:function(t,i){"object"==typeof t&&(i=t,t=void 0),i=i||{};var n,r,o,s,a,u,l,c,h,d,p=b.ajaxSetup({},i),f=p.context||p,g=p.context&&(f.nodeType||f.jquery)?b(f):b.event,_=b.Deferred(),y=b.Callbacks("once memory"),x=p.statusCode||{},w={},v={},S="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(l){if(!s)for(s={};t=Mt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=v[e.toLowerCase()]=v[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)T.always(e[T.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||S;return n&&n.abort(t),C(0,t),this}};if(_.promise(T),p.url=((t||p.url||wt.href)+"").replace(Vt,wt.protocol+"//"),p.type=i.method||i.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(A)||[""],null==p.crossDomain){u=m.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Rt.protocol+"//"+Rt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),kt(Bt,p,i,T),l)return T;for(h in(c=b.event&&p.global)&&0==b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!It.test(p.type),r=p.url.replace(Et,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ot,"+")):(d=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(vt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Dt,"$1"),d=(vt.test(r)?"&":"?")+"_="+bt.guid+++d),p.url=r+d),p.ifModified&&(b.lastModified[r]&&T.setRequestHeader("If-Modified-Since",b.lastModified[r]),b.etag[r]&&T.setRequestHeader("If-None-Match",b.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||i.contentType)&&T.setRequestHeader("Content-Type",p.contentType),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Pt+"; q=0.01":""):p.accepts["*"]),p.headers)T.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,T,p)||l))return T.abort();if(S="abort",y.add(p.complete),T.done(p.success),T.fail(p.error),n=kt(At,p,i,T)){if(T.readyState=1,c&&g.trigger("ajaxSend",[T,p]),l)return T;p.async&&p.timeout>0&&(a=e.setTimeout((function(){T.abort("timeout")}),p.timeout));try{l=!1,n.send(w,C)}catch(e){if(l)throw e;C(-1,e)}}else C(-1,"No Transport");function C(t,i,s,u){var h,d,m,w,v,S=i;l||(l=!0,a&&e.clearTimeout(a),n=void 0,o=u||"",T.readyState=t>0?4:0,h=t>=200&&t<300||304===t,s&&(w=function(e,t,i){for(var n,r,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){u.unshift(r);break}if(u[0]in i)o=u[0];else{for(r in i){if(!u[0]||e.converters[r+" "+u[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),i[o]}(p,T,s)),!h&&b.inArray("script",p.dataTypes)>-1&&b.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(e,t,i,n){var r,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!u&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(r in l)if((a=r.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[r]:!0!==l[r]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,w,T,h),h?(p.ifModified&&((v=T.getResponseHeader("Last-Modified"))&&(b.lastModified[r]=v),(v=T.getResponseHeader("etag"))&&(b.etag[r]=v)),204===t||"HEAD"===p.type?S="nocontent":304===t?S="notmodified":(S=w.state,d=w.data,h=!(m=w.error))):(m=S,!t&&S||(S="error",t<0&&(t=0))),T.status=t,T.statusText=(i||S)+"",h?_.resolveWith(f,[d,S,T]):_.rejectWith(f,[T,S,m]),T.statusCode(x),x=void 0,c&&g.trigger(h?"ajaxSuccess":"ajaxError",[T,p,h?d:m]),y.fireWith(f,[T,S]),c&&(g.trigger("ajaxComplete",[T,p]),--b.active||b.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,i){return b.get(e,t,i,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],(function(e,t){b[t]=function(e,i,n,r){return f(i)&&(r=r||n,n=i,i=void 0),b.ajax(b.extend({url:e,type:t,dataType:r,data:i,success:n},b.isPlainObject(e)&&e))}})),b.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),b._evalUrl=function(e,t,i){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){b.globalEval(e,t,i)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(f(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return f(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=f(e);return this.each((function(i){b(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){b(this).replaceWith(this.childNodes)})),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Xt={0:200,1223:204},zt=b.ajaxSettings.xhr();p.cors=!!zt&&"withCredentials"in zt,p.ajax=zt=!!zt,b.ajaxTransport((function(t){var i,n;if(p.cors||zt&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);i=function(e){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Xt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=a.ontimeout=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){i&&n()}))},i=i("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(i)throw e}},abort:function(){i&&i()}}})),b.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),b.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,r){t=b("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&r("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){i&&i()}}}));var jt,Gt=[],qt=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||b.expando+"_"+bt.guid++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",(function(t,i,n){var r,o,s,a=!1!==t.jsonp&&(qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&qt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=f(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(qt,"$1"+r):!1!==t.jsonp&&(t.url+=(vt.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||b.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},n.always((function(){void 0===o?b(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=i.jsonpCallback,Gt.push(r)),s&&f(o)&&o(s[0]),s=o=void 0})),"script"})),p.createHTMLDocument=((jt=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===jt.childNodes.length),b.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(p.createHTMLDocument?((n=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(n)):t=m),o=!i&&[],(r=O.exec(e))?[t.createElement(r[1])]:(r=we([e],t,o),o&&o.length&&b(o).remove(),b.merge([],r.childNodes)));var n,r,o},b.fn.load=function(e,t,i){var n,r,o,s=this,a=e.indexOf(" ");return a>-1&&(n=ft(e.slice(a)),e=e.slice(0,a)),f(t)?(i=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&b.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(n?b("<div>").append(b.parseHTML(e)).find(n):e)})).always(i&&function(e,t){s.each((function(){i.apply(this,o||[e.responseText,t,e])}))}),this},b.expr.pseudos.animated=function(e){return b.grep(b.timers,(function(t){return e===t.elem})).length},b.offset={setOffset:function(e,t,i){var n,r,o,s,a,u,l=b.css(e,"position"),c=b(e),h={};"static"===l&&(e.style.position="relative"),a=c.offset(),o=b.css(e,"top"),u=b.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(s=(n=c.position()).top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(u)||0),f(t)&&(t=t.call(e,i,b.extend({},a))),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+r),"using"in t?t.using.call(e,h):c.css(h)}},b.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){b.offset.setOffset(this,e,t)}));var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,n=this[0],r={top:0,left:0};if("fixed"===b.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===b.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((r=b(e).offset()).top+=b.css(e,"borderTopWidth",!0),r.left+=b.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-b.css(n,"marginTop",!0),left:t.left-r.left-b.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===b.css(e,"position");)e=e.offsetParent;return e||ne}))}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i="pageYOffset"===t;b.fn[e]=function(n){return z(this,(function(e,n,r){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[n];o?o.scrollTo(i?o.pageXOffset:r,i?r:o.pageYOffset):e[n]=r}),e,n,arguments.length)}})),b.each(["top","left"],(function(e,t){b.cssHooks[t]=ze(p.pixelPosition,(function(e,i){if(i)return i=Xe(e,t),Re.test(i)?b(e).position()[t]+"px":i}))})),b.each({Height:"height",Width:"width"},(function(e,t){b.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,n){b.fn[n]=function(r,o){var s=arguments.length&&(i||"boolean"!=typeof r),a=i||(!0===r||!0===o?"margin":"border");return z(this,(function(t,i,r){var o;return g(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?b.css(t,i,a):b.style(t,i,r,a)}),t,s?r:void 0,s)}}))})),b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){b.fn[t]=function(e){return this.on(t,e)}})),b.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),b.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){b.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}));var Ht=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;b.proxy=function(e,t){var i,n,o;if("string"==typeof t&&(i=e[t],t=e,e=i),f(e))return n=r.call(arguments,2),o=function(){return e.apply(t||this,n.concat(r.call(arguments)))},o.guid=e.guid=e.guid||b.guid++,o},b.holdReady=function(e){e?b.readyWait++:b.ready(!0)},b.isArray=Array.isArray,b.parseJSON=JSON.parse,b.nodeName=F,b.isFunction=f,b.isWindow=g,b.camelCase=H,b.type=x,b.now=Date.now,b.isNumeric=function(e){var t=b.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},b.trim=function(e){return null==e?"":(e+"").replace(Ht,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return b}));var Wt=e.jQuery,Yt=e.$;return b.noConflict=function(t){return e.$===b&&(e.$=Yt),t&&e.jQuery===b&&(e.jQuery=Wt),b},void 0===t&&(e.jQuery=e.$=b),b})),define("jquery/dist/jquery",(function(){})),define("x_ite/Base/X3DConstants",[],(function(){"use strict";let e=0,t=0,i=0;return{CONNECTION_ERROR:e++,BROWSER_EVENT:e++,INITIALIZED_EVENT:e++,SHUTDOWN_EVENT:e++,INITIALIZED_ERROR:e++,NOT_STARTED_STATE:t++,IN_PROGRESS_STATE:t++,COMPLETE_STATE:t++,FAILED_STATE:t++,initializeOnly:1,inputOnly:2,outputOnly:4,inputOutput:7,SFBool:i++,SFColor:i++,SFColorRGBA:i++,SFDouble:i++,SFFloat:i++,SFImage:i++,SFInt32:i++,SFMatrix3d:i++,SFMatrix3f:i++,SFMatrix4d:i++,SFMatrix4f:i++,SFNode:i++,SFRotation:i++,SFString:i++,SFTime:i++,SFVec2d:i++,SFVec2f:i++,SFVec3d:i++,SFVec3f:i++,SFVec4d:i++,SFVec4f:i++,VrmlMatrix:i++,MFBool:i++,MFColor:i++,MFColorRGBA:i++,MFDouble:i++,MFFloat:i++,MFImage:i++,MFInt32:i++,MFMatrix3d:i++,MFMatrix3f:i++,MFMatrix4d:i++,MFMatrix4f:i++,MFNode:i++,MFRotation:i++,MFString:i++,MFTime:i++,MFVec2d:i++,MFVec2f:i++,MFVec3d:i++,MFVec3f:i++,MFVec4d:i++,MFVec4f:i++,X3DBaseNode:0}})),define("x_ite/InputOutput/Generator",["x_ite/Base/X3DConstants"],(function(e){"use strict";function t(){this.indent="",this.indentChar=" ",this.precision=6,this.doublePrecision=14,this.removeTrailingZeros=/\.?0*(?=$|[eE])/,this.executionContextStack=[null],this.importedNodesIndex=new Map,this.exportedNodesIndex=new Map,this.nodes=new Set,this.names=new Map,this.namesByNode=new Map,this.importedNames=new Map,this.routeNodes=new Set,this.level=0,this.newName=0,this.containerFields=[],this.units=!0,this.unitCategories=[],this.names.set(null,new Map)}t.prototype={constructor:t,Indent:function(){return this.indent},IncIndent:function(){this.indent+=this.indentChar},DecIndent:function(){this.indent=this.indent.substr(0,this.indent.length-this.indentChar.length)},PadRight:function(e,t){for(let i=0,n=t-e.length;i<n;++i)e+=" ";return e},Precision:function(e){return Math.fround(e).toPrecision(this.precision).replace(this.removeTrailingZeros,"")},DoublePrecision:function(e){return e.toPrecision(this.doublePrecision).replace(this.removeTrailingZeros,"")},PushExecutionContext:function(e){this.executionContextStack.push(e),this.names.has(e)||this.names.set(e,new Map),this.importedNodesIndex.has(e)||this.importedNodesIndex.set(e,new Set),this.exportedNodesIndex.has(e)||this.exportedNodesIndex.set(e,new Set)},PopExecutionContext:function(){this.executionContextStack.pop(),this.ExecutionContext()||(this.importedNodesIndex.clear(),this.exportedNodesIndex.clear())},ExecutionContext:function(){return this.executionContextStack.at(-1)},EnterScope:function(){0===this.level&&(this.newName=0),++this.level},LeaveScope:function(){--this.level,0===this.level&&(this.nodes.clear(),this.namesByNode.clear(),this.importedNames.clear())},ExportedNodes:function(e){const t=this.exportedNodesIndex.get(this.ExecutionContext());e.forEach((function(e){try{t.add(e.getLocalNode())}catch(e){}}))},ImportedNodes:function(e){const t=this.importedNodesIndex.get(this.ExecutionContext());e.forEach((function(e){try{t.add(e.getInlineNode())}catch(e){}}))},AddImportedNode:function(e,t){this.importedNames.set(e,t)},AddRouteNode:function(e){this.routeNodes.add(e)},ExistsRouteNode:function(e){return this.routeNodes.has(e)},IsSharedNode:function(e){return this.ExecutionContext()!==e.getExecutionContext()},AddNode:function(e){this.nodes.add(e),this.AddRouteNode(e)},ExistsNode:function(e){return this.nodes.has(e)},Name:function(){const e=/_\d+$/;return function(t){const i=this.namesByNode.get(t);if(void 0!==i)return i;{const i=this.names.get(this.ExecutionContext());if(0===t.getName().length){if(this.NeedsName(t)){const e=this.UniqueName();return i.set(e,t),this.namesByNode.set(t,e),e}return t.getName()}let n=t.getName();const r=null!==n.match(e);if(n=n.replace(e,""),0===n.length){if(!this.NeedsName(t))return"";n=this.UniqueName()}else{let e=0,t=r?n+"_"+ ++e:n;for(;i.has(t);)t=n+"_"+ ++e;n=t}return i.set(n,t),this.namesByNode.set(t,n),n}}}(),NeedsName:function(e){if(e.getCloneCount()>1)return!0;if(e.hasRoutes())return!0;const t=e.getExecutionContext(),i=this.importedNodesIndex.get(t);if(!i){const i=this.exportedNodesIndex.get(t);return!(!i||!i.has(e))}return!!i.has(e)||void 0},UniqueName:function(){const e=this.names.get(this.ExecutionContext());for(;;){const t="_"+ ++this.newName;if(!e.has(t))return t}},LocalName:function(e){const t=this.importedNames.get(e);if(void 0!==t)return t;if(this.ExistsNode(e))return this.Name(e);throw new Error("Couldn't get local name for node '"+e.getTypeName()+"'.")},PushContainerField:function(e){this.containerFields.push(e)},PopContainerField:function(){this.containerFields.pop()},ContainerField:function(){return this.containerFields.length?this.containerFields[this.containerFields.length-1]:null},AccessType:function(t){switch(t){case e.initializeOnly:return"initializeOnly";case e.inputOnly:return"inputOnly";case e.outputOnly:return"outputOnly";case e.inputOutput:return"inputOutput"}},SetUnits:function(e){this.units=e},GetUnits:function(){return this.units},PushUnitCategory:function(e){this.unitCategories.push(e)},PopUnitCategory:function(){this.unitCategories.pop()},Unit:function(e){return 0==this.unitCategories.length?e:this.unitCategories.at(-1)},ToUnit:function(e,t){if(this.units){const i=this.ExecutionContext();if(i)return i.toUnit(e,t)}return t},XMLEncode:function(e){return e.replace(/&/g,"&").replace(/\\/g,"\").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,'\\"')},escapeCDATA:function(e){return e.replace(/\]\]\>/g,"\\]\\]\\>")}};for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t.Get=function(e){return e.generator||(e.generator=new t),e.generator},t})),define("standard/Utility/MapUtilities",["require"],(function(e){"use strict";return{assign:function(e,t){return e.clear(),t.forEach((function(t,i){e.set(i,t)})),e},values:function(e,t){let i=0;return t.forEach((function(t){e[i++]=t})),e.length=t.size,e}}})),define("x_ite/Base/X3DObject",["x_ite/InputOutput/Generator","standard/Utility/MapUtilities"],(function(e,t){"use strict";const i=Symbol(),n=Symbol(),r=Symbol();function o(){}o.prototype={constructor:o,[i]:"",[n]:new Map,[r]:[],getId:function(){return o.getId(this)},getTypeName:function(){return"X3DObject"},setName:function(e){this[i]=e},getName:function(){return this[i]},getDisplayName:function(){return this[i]},getInterestId:function(e,t){return o.getId(t)+"."+String(e)},hasInterest:function(e,t){return this[n].has(this.getInterestId(e,t))},addInterest:function(e,t){this[n]===o.prototype[n]&&(this[n]=new Map,this[r]=[]);const i=this.getInterestId(e,t),s=t[e];if(arguments.length>2){const e=Array.prototype.slice.call(arguments,2);e.unshift(t),e.push(this),this[n].set(i,Function.prototype.bind.apply(s,e))}else this[n].set(i,s.bind(t,this))},removeInterest:function(e,t){this[n].delete(this.getInterestId(e,t))},getInterests:function(){return this[n]},processInterests:function(){if(this[n].size)for(const e of t.values(this[r],this[n]))e()},toString:function(t){const i={string:""};return t&&e.Get(i).PushExecutionContext(t),this.toStream(i),i.string},toVRMLString:function(){const e={string:""};return this.toVRMLStream(e),e.string},toXMLString:function(){const e={string:""};return this.toXMLStream(e),e.string},toJSONString:function(){const e={string:""};return this.toVRMLStream(e),e.string},toStream:function(e){e.string="[object "+this.getTypeName()+"]"},dispose:function(){}};for(const e of Reflect.ownKeys(o.prototype))Object.defineProperty(o.prototype,e,{enumerable:!1});return o.getId=function(){const e=new WeakMap;let t=0;return function(i){const n=e.get(i);return void 0!==n?n:(e.set(i,++t),t)}}(),o})),define("x_ite/Base/X3DChildObject",["x_ite/Base/X3DObject"],(function(e){"use strict";const t=Symbol(),i=Symbol(),n=Symbol();function r(){e.call(this)}r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,[t]:0,[i]:!1,[n]:new Set,setModificationTime:function(e){this[t]=e},getModificationTime:function(){return this[t]},setTainted:function(e){this[i]=e},isTainted:function(){return this[i]},addEvent:function(){this.setModificationTime(performance.now());for(const e of this[n])e.addEvent(this)},addEventObject:function(e,t){this.setModificationTime(performance.now());for(const e of this[n])e.addEventObject(this,t)},addParent:function(e){this[n]===r.prototype[n]&&(this[n]=new Set),this[n].add(e)},removeParent:function(e){this[n].delete(e)},getParents:function(){return this[n]},dispose:function(){this[n].clear(),e.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});return r})),define("x_ite/Base/Events",[],(function(){"use strict";const e=Symbol();function t(){this[e]=[]}t.prototype={create:function(t){if(this[e].length){const i=this[e].pop();return i.field=t,i.clear(),i}const i=new Set;return i.field=t,i},copy:function(t){if(this[e].length){const i=this[e].pop();i.field=t.field,i.clear();for(const e of t)i.add(e);return i}const i=new Set(t);return i.field=t.field,i},push:function(t){this[e].push(t)},clear:function(){this[e].length=0}};for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return new t})),define("x_ite/Base/X3DEventObject",["x_ite/Base/X3DChildObject","x_ite/Base/Events"],(function(e,t){"use strict";const i=Symbol.for("X3DEventObject.browser");function n(t){e.call(this),this[i]=t}n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,getBrowser:function(){return this[i]},getExtendedEventHandling:function(){return!0},addEvent:function(e){e.isTainted()||(e.setTainted(!0),this.addEventObject(e,t.create(e)))},addEventObject:function(e,t){const i=this.getBrowser();i.addBrowserEvent(),i.addTaintedField(e,t),this.isTainted()||(e.isInput()||this.getExtendedEventHandling()&&!e.isOutput())&&this.addNodeEvent()},addNodeEvent:function(){if(this.isTainted())return;const e=this.getBrowser();this.setTainted(!0),e.addTaintedNode(this),e.addBrowserEvent()},processEvents:function(){this.setTainted(!1),this.processInterests()}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Base/X3DFieldDefinition",["x_ite/Base/X3DObject"],(function(e){"use strict";function t(e,t,i){this.accessType=e,this.dataType=i.getType(),this.name=t,this.value=i}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"X3DFieldDefinition"}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/X3DInfoArray",["x_ite/Base/X3DBaseNode"],(function(){"use strict";const e=Symbol(),t=Symbol(),i={get:function(t,i){const n=t[i];if(void 0!==n)return n;if("string"==typeof i){const n=+i;return Number.isInteger(n)?t[e][n]:void 0}},set:function(e,t,i){return void 0!==e[t]&&(e[t]=i,!0)},has:function(t,i){return Number.isInteger(+i)?i<t[e].length:i in t},ownKeys:function(t){return Object.keys(t[e])},getOwnPropertyDescriptor:function(t,i){if("string"!=typeof i)return;const n=+i;if(Number.isInteger(n)&&n<t[e].length){const n=Object.getOwnPropertyDescriptor(t[e],i);return n&&(n.writable=!1),n}}};function n(n){if(this[e]=[],this[t]=new Map,this[Symbol.iterator]=this[e][Symbol.iterator],n)for(const e of n)this.add(e.name,e);return new Proxy(this,i)}n.prototype={constructor:n,equals:function(t){const i=this[e],n=t[e]||t,r=i.length;if(i===n)return!0;if(r!==n.length)return!1;for(let e=0;e<r;++e)if(i[e]!==n[e])return!1;return!0},has:function(e){return this[t].has(e)},get:function(e){return this[t].get(e)},add:function(i,n){this[e].push(n),this[t].set(i,n)},addAlias:function(e,i){this[t].set(e,this[t].get(i))},update:function(i,n,r){const o=this[t].get(i);if(i!==n&&this.remove(n),this[t].delete(i),this[t].set(n,r),void 0!==o){const t=this[e].indexOf(o);t>-1&&(this[e][t]=r)}else this[e].push(r)},remove:function(i){const n=this[t].get(i);if(void 0===n)return;const r=this[e].indexOf(n);this[t].delete(i),r>-1&&this[e].splice(r,1)},at:Array.prototype.at,concat:Array.prototype.concat,every:Array.prototype.every,fill:Array.prototype.fill,filter:Array.prototype.filter,find:Array.prototype.find,findIndex:Array.prototype.findIndex,forEach:Array.prototype.forEach,includes:Array.prototype.includes,indexOf:Array.prototype.indexOf,join:Array.prototype.join,keys:function(){return Array(this.length).keys()},lastIndexOf:Array.prototype.lastIndexOf,map:Array.prototype.map,reduce:Array.prototype.reduce,reduceRight:Array.prototype.reduceRight,slice:Array.prototype.slice,some:Array.prototype.some,values:function(){return this[Symbol.iterator]},toString:function(e){const t={string:""};return e&&Generator.Get(t).PushExecutionContext(e),this.toStream(t),t.string},toVRMLStream:function(t){const i=require("x_ite/Base/X3DBaseNode");for(const n of this[e])try{n.toVRMLStream(t),t.string+="\n",n instanceof i&&(t.string+="\n")}catch(e){console.error(e)}},toXMLStream:function(t){for(const i of this[e])try{i.toXMLStream(t),t.string+="\n"}catch(e){console.error(e)}},toStream:function(e){e.string="[object "+this.getTypeName()+"]"}};for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return Object.defineProperty(n.prototype,"length",{get:function(){return this[e].length},enumerable:!1,configurable:!1}),n})),define("x_ite/Base/FieldDefinitionArray",["x_ite/Base/X3DInfoArray"],(function(e){"use strict";function t(t){return e.call(this,t)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"FieldDefinitionArray"}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/FieldArray",["x_ite/Base/X3DInfoArray"],(function(e){"use strict";function t(){return e.call(this)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"FieldArray"}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/X3DField",["jquery","x_ite/Base/X3DChildObject","x_ite/Base/X3DConstants","x_ite/Base/Events","standard/Utility/MapUtilities"],(function(e,t,i,n,r){"use strict";const o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol.for("X3DField.uniformLocation");function m(e){return t.call(this),this[o]=e,this}m.prototype=Object.assign(Object.create(t.prototype),{constructor:m,[o]:null,[s]:i.initializeOnly,[a]:null,[g]:null,[u]:new Set,[l]:new Map,[c]:new Set,[h]:new Map,[d]:new Set,[p]:new Set,[f]:new Map,create:function(){return new this.constructor},equals:function(e){return this[o]===e.valueOf()},assign:function(e){this.set(e.getValue()),this.addEvent()},set:function(e){this[o]=e},setValue:function(e){this.set(e instanceof this.constructor?e.getValue():e),this.addEvent()},getValue:function(){return this[o]},setAccessType:function(e){this[s]=e},getAccessType:function(){return this[s]},isInitializable:function(){return this[s]&i.initializeOnly},isInput:function(){return this[s]&i.inputOnly},isOutput:function(){return this[s]&i.outputOnly},isReadable:function(){return this[s]!==i.inputOnly},isWritable:function(){return this[s]!==i.initializeOnly},setUnit:function(e){this[a]=e},getUnit:function(){return this[a]},hasReferences:function(){return 0!==this[u].size},isReference:function(e){return e===this[s]||e===i.inputOutput},addReference:function(e){const t=this.getReferences();if(!t.has(e)){switch(t.add(e),this.getAccessType()&e.getAccessType()){case i.initializeOnly:e.addFieldInterest(this),this.assign(e);break;case i.inputOnly:e.addFieldInterest(this);break;case i.outputOnly:this.addFieldInterest(e);break;case i.inputOutput:e.addFieldInterest(this),this.addFieldInterest(e),this.assign(e)}this.processReferencesCallbacks()}},removeReference:function(e){switch(this.getReferences().delete(e),this.getAccessType()&e.getAccessType()){case i.initializeOnly:case i.inputOnly:e.removeFieldInterest(this);break;case i.outputOnly:this.removeFieldInterest(e);break;case i.inputOutput:e.removeFieldInterest(this),this.removeFieldInterest(e)}this.processReferencesCallbacks()},getReferences:function(){return this[u]===m.prototype[u]&&(this[u]=new Set),this[u]},addReferencesCallback:function(e,t){this[l]===m.prototype[l]&&(this[l]=new Map),this[l].set(e,t)},removeReferencesCallback:function(e){this[l].delete(e)},getReferencesCallbacks:function(){return this[l]},processReferencesCallbacks:function(){const e=[];return function(){if(this[l].size)for(const t of r.values(e,this[l]))t()}}(),addFieldInterest:function(e){this[c]===m.prototype[c]&&(this[c]=new Set),this[c].add(e)},removeFieldInterest:function(e){this[c].delete(e)},getFieldInterests:function(){return this[c]},addFieldCallback:function(e,t){this[h]===m.prototype[h]&&(this[h]=new Map),this[h].set(e,t)},removeFieldCallback:function(e){this[h].delete(e)},getFieldCallbacks:function(){return this[h]},addInputRoute:function(e){this[d]===m.prototype[d]&&(this[d]=new Set),this[d].add(e),this.processRouteCallbacks()},removeInputRoute:function(e){this[d].delete(e),this.processRouteCallbacks()},getInputRoutes:function(){return this[d]},addOutputRoute:function(e){this[p]===m.prototype[p]&&(this[p]=new Set),this[p].add(e),this.processRouteCallbacks()},removeOutputRoute:function(e){this[p].delete(e),this.processRouteCallbacks()},getOutputRoutes:function(){return this[p]},addRouteCallback:function(e,t){this[f]===m.prototype[f]&&(this[f]=new Map),this[f].set(e,t)},removeRouteCallback:function(e){this[f].delete(e)},getRouteCallbacks:function(){return this[f]},processRouteCallbacks:function(){const e=[];return function(){if(this[f].size)for(const t of r.values(e,this[f]))t()}}(),processEvent:function(){const e=[];return function(t=n.create(this)){if(t.has(this))return;t.add(this),this.setTainted(!1);const i=t.field;i!==this&&this.set(i.getValue(),i.length),this.processInterests();let o=!0;if(this[c].size)for(const e of this[c].values())o?(o=!1,e.addEventObject(this,t)):e.addEventObject(this,n.copy(t));if(o&&n.push(t),this[h].size)for(const t of r.values(e,this[h]))t(this.valueOf())}}(),addCloneCount:Function.prototype,removeCloneCount:Function.prototype,valueOf:function(){return this},fromString:function(e,t){const i=new(require("x_ite/Parser/VRMLParser"))(t);if(i.setUnits(!!t),i.setInput(e),!i.fieldValue(this))throw new Error("Couldn't read value for field '"+this.getName()+"'.")},dispose:function(){for(const e of new Set(this[d]))e.dispose();for(const e of new Set(this[p]))e.dispose();t.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(m.prototype))Object.defineProperty(m.prototype,e,{enumerable:!1});return m})),define("x_ite/Fields/SFBool",["x_ite/Base/X3DField","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(t){return e.call(this,!!t)}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,copy:function(){return new i(this.getValue())},isDefaultValue:function(){return!1===this.getValue()},set:function(t){e.prototype.set.call(this,!!t)},getTypeName:function(){return"SFBool"},getType:function(){return t.SFBool},valueOf:function(){return this.getValue()},toStream:function(e){e.string+=this.getValue()?"TRUE":"FALSE"},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){e.string+=this.getValue()?"true":"false"}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("standard/Math/Algorithm",[],(function(){"use strict";function e(){}return e.prototype={constructor:e,radians:function(e){return e*(Math.PI/180)},degrees:function(e){return e*(180/Math.PI)},random:function(e,t){return e+Math.random()*(t-e)},fract:function(e){return e>0?e-Math.floor(e):e-Math.ceil(e)},clamp:function(e,t,i){return Math.min(Math.max(e,t),i)},interval:function(e,t,i){return e>=i?(e-t)%(i-t)+t:e<t?(e-i)%(i-t)+i:e},lerp:function(e,t,i){return e+i*(t-e)},slerp:function(e,t,i){let n=e.dot(t);if(n<=-1)throw new Error("slerp is not possible: vectors are inverse collinear.");if(n>=1)return e;n<0&&(n=-n,t.negate());const r=Math.acos(n),o=Math.sin(r),s=Math.sin((1-i)*r)/o,a=Math.sin(i*r)/o;return e.x=e.x*s+t.x*a,e.y=e.y*s+t.y*a,e.z=e.z*s+t.z*a,e.w=e.w*s+t.w*a,e},simpleSlerp:function(e,t,i){const n=e.dot(t);if(n<=-1)throw new Error("slerp is not possible: vectors are inverse collinear.");if(n>=1)return e;const r=Math.acos(n),o=Math.sin(r),s=Math.sin((1-i)*r)/o,a=Math.sin(i*r)/o;return e.x=e.x*s+t.x*a,e.y=e.y*s+t.y*a,e.z=e.z*s+t.z*a,e.w=e.w*s+t.w*a,e},isPowerOfTwo:function(e){return 0==(e-1&e)},nextPowerOfTwo:function(e){return this.isPowerOfTwo(e)?e:1<<32-Math.clz32(e)},cmp:function(e,t){return e>t?1:e<t?-1:0},less:function(e,t){return e<t},greater:function(e,t){return e>t},lowerBound:function(e,t,i,n,r){let o=0,s=0,a=i-t;for(;a>0;)s=a>>>1,o=t+s,r(e[o],n)?(t=++o,a-=s+1):a=s;return t},upperBound:function(e,t,i,n,r){let o=0,s=0,a=i-t;for(;a>0;)s=a>>>1,o=t+s,r(n,e[o])?a=s:(t=++o,a-=s+1);return t},set_difference:function(e,t,i){for(const n of e)t.has(n)||i.add(n);return i},map_difference:function(e,t,i){for(const[n,r]of e)t.has(n)||i.set(n,r);return i}},new e})),define("standard/Math/Numbers/Color3",["standard/Math/Algorithm"],(function(e){"use strict";const t=e.clamp,i=Symbol.for("X_ITE.Color3.r"),n=Symbol.for("X_ITE.Color3.g"),r=Symbol.for("X_ITE.Color3.b");function o(e,o,s){arguments.length?(this[i]=t(e,0,1),this[n]=t(o,0,1),this[r]=t(s,0,1)):(this[i]=0,this[n]=0,this[r]=0)}o.prototype={constructor:o,length:3,copy:function(){const e=Object.create(o.prototype);return e[i]=this[i],e[n]=this[n],e[r]=this[r],e},assign:function(e){this[i]=e[i],this[n]=e[n],this[r]=e[r]},set:function(e,o,s){this[i]=t(e,0,1),this[n]=t(o,0,1),this[r]=t(s,0,1)},equals:function(e){return this[i]===e[i]&&this[n]===e[n]&&this[r]===e[r]},getHSV:function(e){let t,o,s;const a=Math.min(this[i],this[n],this[r]),u=Math.max(this[i],this[n],this[r]);s=u;const l=u-a;return 0!==u&&0!==l?(o=l/u,t=this[i]===u?(this[n]-this[r])/l:this[n]===u?2+(this[r]-this[i])/l:4+(this[i]-this[n])/l,t*=Math.PI/3,t<0&&(t+=2*Math.PI)):o=t=0,e[0]=t,e[1]=o,e[2]=s,e},setHSV:function(o,s,a){if(s=t(s,0,1),a=t(a,0,1),0===s)this[i]=this[n]=this[r]=a;else{const t=e.degrees(e.interval(o,0,2*Math.PI))/60,u=Math.floor(t),l=t-u,c=a*(1-s),h=a*(1-s*l),d=a*(1-s*(1-l));switch(u%6){case 0:this[i]=a,this[n]=d,this[r]=c;break;case 1:this[i]=h,this[n]=a,this[r]=c;break;case 2:this[i]=c,this[n]=a,this[r]=d;break;case 3:this[i]=c,this[n]=h,this[r]=a;break;case 4:this[i]=d,this[n]=c,this[r]=a;break;default:this[i]=a,this[n]=c,this[r]=h}}},toString:function(){return this[i]+" "+this[n]+" "+this[r]}};const s={get:function(){return this[i]},set:function(e){this[i]=t(e,0,1)},enumerable:!0,configurable:!1},a={get:function(){return this[n]},set:function(e){this[n]=t(e,0,1)},enumerable:!0,configurable:!1},u={get:function(){return this[r]},set:function(e){this[r]=t(e,0,1)},enumerable:!0,configurable:!1};return Object.defineProperty(o.prototype,"r",s),Object.defineProperty(o.prototype,"g",a),Object.defineProperty(o.prototype,"b",u),s.enumerable=!1,a.enumerable=!1,u.enumerable=!1,Object.defineProperty(o.prototype,"0",s),Object.defineProperty(o.prototype,"1",a),Object.defineProperty(o.prototype,"2",u),Object.assign(o,{HSV:function(e,t,i){const n=Object.create(this.prototype);return n.setHSV(e,t,i),n},lerp:function(e,t,i,n){let r=e[0],o=t[0];const s=e[1],a=t[1],u=e[2],l=t[2];0===s&&(r=o),0===a&&(o=r);const c=Math.abs(o-r);if(c<=Math.PI)return n[0]=r+i*(o-r),n[1]=s+i*(a-s),n[2]=u+i*(l-u),n;const h=2*Math.PI,d=(h-c)*i;let p=r<o?r-d:r+d;return p<0?p+=h:p>h&&(p-=h),n[0]=p,n[1]=s+i*(a-s),n[2]=u+i*(l-u),n}}),o})),define("x_ite/Fields/SFColor",["standard/Math/Numbers/Color3","x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i,n){"use strict";function r(i,n,r){switch(arguments.length){case 0:return t.call(this,new e);case 1:return t.call(this,arguments[0]);case 3:return t.call(this,new e(+i,+n,+r))}throw new Error("Invalid arguments.")}r.prototype=Object.assign(Object.create(t.prototype),{constructor:r,copy:function(){return new r(this.getValue().copy())},getTypeName:function(){return"SFColor"},getType:function(){return i.SFColor},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return 0===this.getValue().r&&0===this.getValue().g&&0===this.getValue().b},set:function(e){this.getValue().assign(e)},getHSV:function(){return this.getValue().getHSV([])},setHSV:function(e,t,i){this.getValue().setHSV(e,t,i),this.addEvent()},lerp:function(){const t=[],i=[],n=[];return function(o,s){const a=new r;return this.getValue().getHSV(t),o.getValue().getHSV(i),e.lerp(t,i,s,n),a.setHSV(n[0],n[1],n[2],n[3]),a}}(),toStream:function(e){const t=n.Get(e),i=this.getValue(),r=i.length-1;for(let n=0;n<r;++n)e.string+=t.Precision(i[n]),e.string+=" ";e.string+=t.Precision(i[r])},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});const o={get:function(){return this.getValue().r},set:function(e){this.getValue().r=+e,this.addEvent()},enumerable:!0,configurable:!1},s={get:function(){return this.getValue().g},set:function(e){this.getValue().g=+e,this.addEvent()},enumerable:!0,configurable:!1},a={get:function(){return this.getValue().b},set:function(e){this.getValue().b=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(r.prototype,"r",o),Object.defineProperty(r.prototype,"g",s),Object.defineProperty(r.prototype,"b",a),o.enumerable=!1,s.enumerable=!1,a.enumerable=!1,Object.defineProperty(r.prototype,"0",o),Object.defineProperty(r.prototype,"1",s),Object.defineProperty(r.prototype,"2",a),r})),define("standard/Math/Numbers/Color4",["standard/Math/Numbers/Color3","standard/Math/Algorithm"],(function(e,t){"use strict";const i=t.clamp,n=Symbol.for("X_ITE.Color3.r"),r=Symbol.for("X_ITE.Color3.g"),o=Symbol.for("X_ITE.Color3.b"),s=Symbol();function a(e,t,a,u){arguments.length?(this[n]=i(e,0,1),this[r]=i(t,0,1),this[o]=i(a,0,1),this[s]=i(u,0,1)):(this[n]=0,this[r]=0,this[o]=0,this[s]=0)}a.prototype={constructor:a,length:4,copy:function(){const e=Object.create(a.prototype);return e[n]=this[n],e[r]=this[r],e[o]=this[o],e[s]=this[s],e},assign:function(e){this[n]=e[n],this[r]=e[r],this[o]=e[o],this[s]=e[s]},set:function(e,t,a,u){this[n]=i(e,0,1),this[r]=i(t,0,1),this[o]=i(a,0,1),this[s]=i(u,0,1)},equals:function(e){return this[n]===e[n]&&this[r]===e[r]&&this[o]===e[o]&&this[s]===e[s]},getHSVA:function(t){return e.prototype.getHSV.call(this,t),t[3]=this[s],t},setHSVA:function(t,n,r,o){e.prototype.setHSV.call(this,t,n,r),this[s]=i(o,0,1)},toString:function(){return this[n]+" "+this[r]+" "+this[o]+" "+this[s]}};const u={get:function(){return this[n]},set:function(e){this[n]=i(e,0,1)},enumerable:!0,configurable:!1},l={get:function(){return this[r]},set:function(e){this[r]=i(e,0,1)},enumerable:!0,configurable:!1},c={get:function(){return this[o]},set:function(e){this[o]=i(e,0,1)},enumerable:!0,configurable:!1},h={get:function(){return this[s]},set:function(e){this[s]=i(e,0,1)},enumerable:!0,configurable:!1};return Object.defineProperty(a.prototype,"r",u),Object.defineProperty(a.prototype,"g",l),Object.defineProperty(a.prototype,"b",c),Object.defineProperty(a.prototype,"a",h),u.enumerable=!1,l.enumerable=!1,c.enumerable=!1,h.enumerable=!1,Object.defineProperty(a.prototype,"0",u),Object.defineProperty(a.prototype,"1",l),Object.defineProperty(a.prototype,"2",c),Object.defineProperty(a.prototype,"3",h),Object.assign(a,{HSVA:function(e,t,i,n){const r=Object.create(this.prototype);return r.setHSVA(e,t,i,n),r},lerp:function(t,i,n,r){const o=t[3];return e.lerp(t,i,n,r),r[3]=o+n*(i[3]-o),r}}),a})),define("x_ite/Fields/SFColorRGBA",["x_ite/Base/X3DField","x_ite/Fields/SFColor","x_ite/Base/X3DConstants","standard/Math/Numbers/Color4"],(function(e,t,i,n){"use strict";function r(t,i,r,o){switch(arguments.length){case 0:return e.call(this,new n);case 1:return e.call(this,arguments[0]);case 4:return e.call(this,new n(+t,+i,+r,+o))}throw new Error("Invalid arguments.")}r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,copy:function(){return new r(this.getValue().copy())},getTypeName:function(){return"SFColorRGBA"},getType:function(){return i.SFColorRGBA},equals:t.prototype.equals,isDefaultValue:function(){return 0===this.getValue().r&&0===this.getValue().g&&0===this.getValue().b&&0===this.getValue().a},set:t.prototype.set,getHSVA:function(){return this.getValue().getHSVA([])},setHSVA:function(e,t,i,n){this.getValue().setHSVA(e,t,i,n),this.addEvent()},lerp:function(){const e=[],t=[],i=[];return function(o,s){const a=new r;return this.getValue().getHSVA(e),o.getValue().getHSVA(t),n.lerp(e,t,s,i),a.setHSVA(i[0],i[1],i[2],i[3]),a}}(),toStream:t.prototype.toStream,toVRMLStream:t.prototype.toVRMLStream,toXMLStream:t.prototype.toXMLStream});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});const o={get:function(){return this.getValue().r},set:function(e){this.getValue().r=+e,this.addEvent()},enumerable:!0,configurable:!1},s={get:function(){return this.getValue().g},set:function(e){this.getValue().g=+e,this.addEvent()},enumerable:!0,configurable:!1},a={get:function(){return this.getValue().b},set:function(e){this.getValue().b=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().a},set:function(e){this.getValue().a=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(r.prototype,"r",o),Object.defineProperty(r.prototype,"g",s),Object.defineProperty(r.prototype,"b",a),Object.defineProperty(r.prototype,"a",u),o.enumerable=!1,s.enumerable=!1,a.enumerable=!1,u.enumerable=!1,Object.defineProperty(r.prototype,"0",o),Object.defineProperty(r.prototype,"1",s),Object.defineProperty(r.prototype,"2",a),Object.defineProperty(r.prototype,"3",u),r})),define("x_ite/Fields/SFDouble",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i){"use strict";function n(t){return e.call(this,arguments.length?+t:0)}n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,copy:function(){return new n(this.getValue())},getTypeName:function(){return"SFDouble"},getType:function(){return t.SFDouble},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,+t)},valueOf:e.prototype.getValue,toStream:function(e){const t=i.Get(e),n=t.Unit(this.getUnit());e.string+=t.DoublePrecision(t.ToUnit(n,this.getValue()))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Fields/SFFloat",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i){"use strict";function n(t){return e.call(this,arguments.length?+t:0)}n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,copy:function(){return new n(this.getValue())},getTypeName:function(){return"SFFloat"},getType:function(){return t.SFFloat},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,+t)},valueOf:e.prototype.getValue,toStream:function(e){const t=i.Get(e),n=t.Unit(this.getUnit());e.string+=t.Precision(t.ToUnit(n,this.getValue()))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Fields/SFInt32",["x_ite/Base/X3DField","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(t){return e.call(this,~~t)}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,copy:function(){return new i(this.getValue())},getTypeName:function(){return"SFInt32"},getType:function(){return t.SFInt32},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,~~t)},valueOf:e.prototype.getValue,toStream:function(e,t){e.string+=this.getValue().toString(t)},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){e.string+=this.getValue().toString()}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("x_ite/Fields/SFImage",["x_ite/Base/X3DField","x_ite/Fields/SFInt32","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(e,t,i,n){const r=require("x_ite/Fields/ArrayFields").MFInt32;this.width=~~e,this.height=~~t,this.comp=~~i,this.array=new r,this.array.setValue(n),this.array.length=this.width*this.height}function r(t,i,r,o){const s=require("x_ite/Fields/ArrayFields").MFInt32;return arguments[0]instanceof n?e.call(this,arguments[0]):4===arguments.length?e.call(this,new n(t,i,r,o)):e.call(this,new n(0,0,0,new s)),this.getValue().getArray().addParent(this),this.addInterest("set_size__",this),this}n.prototype={constructor:n,copy:function(){return new n(this.width,this.height,this.comp,this.array)},equals:function(e){return this.width===e.width&&this.height===e.height&&this.comp===e.comp&&this.array.equals(e.array)},assign:function(e){this.width=e.width,this.height=e.height,this.comp=e.comp,this.array.assign(e.array)},set:function(e,t,i,n){this.width=~~e,this.height=~~t,this.comp=~~i,this.array.assign(n)},setWidth:function(e){this.width=~~e,this.array.length=this.width*this.height},getWidth:function(){return this.width},setHeight:function(e){this.height=~~e,this.array.length=this.width*this.height},getHeight:function(){return this.height},setComp:function(e){this.comp=~~e},getComp:function(){return this.comp},setArray:function(e){this.array.assign(e),this.array.length=this.width*this.height},getArray:function(){return this.array}},r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,set_size__:function(){this.getValue().getArray().length=this.width*this.height},copy:function(){return new r(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return 0===this.width&&0===this.height&&0===this.comp},set:function(e){this.getValue().assign(e)},getTypeName:function(){return"SFImage"},getType:function(){return i.SFImage},toStream:function(e){const i=this.array,n=new t;e.string+=this.width+" "+this.height+" "+this.comp;for(let t=0,r=this.width*this.height;t<r;++t)e.string+=" 0x",n.set(i[t]),n.toXMLStream(e)},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});const o={get:function(){return this.getValue().getWidth()},set:function(e){this.getValue().setWidth(e),this.addEvent()},enumerable:!0,configurable:!1},s={get:function(){return this.getValue().getHeight()},set:function(e){this.getValue().setHeight(e),this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(r.prototype,"width",o),Object.defineProperty(r.prototype,"height",s),Object.defineProperty(r.prototype,"comp",{get:function(){return this.getValue().getComp()},set:function(e){this.getValue().setComp(e),this.addEvent()},enumerable:!0,configurable:!1}),Object.defineProperty(r.prototype,"array",{get:function(){return this.getValue().getArray()},set:function(e){this.getValue().setArray(e),this.addEvent()},enumerable:!0,configurable:!1}),o.enumerable=!1,s.enumerable=!1,Object.defineProperty(r.prototype,"x",o),Object.defineProperty(r.prototype,"y",s),r})),define("x_ite/Fields/SFMatrixPrototypeTemplate",["x_ite/Base/X3DField"],(function(e){"use strict";return function(t,i,n){return Object.assign(Object.create(e.prototype),{copy:function(){return new this.constructor(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return this.getValue().equals(t.Identity)},set:function(e){this.getValue().assign(e)},setTransform:function(e,t,i,n,r){e=e?e.getValue():null,t=t?t.getValue():null,i=i?i.getValue():null,n=n?n.getValue():null,r=r?r.getValue():null,this.getValue().set(e,t,i,n,r)},getTransform:function(e,t,i,n,r){e=e?e.getValue():null,t=t?t.getValue():null,i=i?i.getValue():null,n=n?n.getValue():null,r=r?r.getValue():null,this.getValue().get(e,t,i,n,r)},determinant:function(){return this.getValue().determinant()},transpose:function(){return new this.constructor(t.transpose(this.getValue()))},inverse:function(){return new this.constructor(t.inverse(this.getValue()))},multLeft:function(e){return new this.constructor(t.multLeft(this.getValue(),e.getValue()))},multRight:function(e){return new this.constructor(t.multRight(this.getValue(),e.getValue()))},multVecMatrix:function(e){return new i(this.getValue().multVecMatrix(e.getValue().copy()))},multMatrixVec:function(e){return new i(this.getValue().multMatrixVec(e.getValue().copy()))},multDirMatrix:function(e){return new i(this.getValue().multDirMatrix(e.getValue().copy()))},multMatrixDir:function(e){return new i(this.getValue().multMatrixDir(e.getValue().copy()))},toStream:function(e){const t=Generator.Get(e),i=this.getValue(),r=i.length-1;for(let o=0;o<r;++o)e.string+=n?t.DoublePrecision(i[o]):t.Precision(i[o]),e.string+=" ";e.string+=n?t.DoublePrecision(i[r]):t.Precision(i[r])},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}})}})),define("x_ite/Fields/SFVecPrototypeTemplate",["x_ite/Base/X3DField","x_ite/InputOutput/Generator"],(function(e,t){"use strict";return function(i,n){return Object.assign(Object.create(e.prototype),{copy:function(){return new this.constructor(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return this.getValue().equals(i.Zero)},set:function(e){this.getValue().assign(e)},add:function(e){return new this.constructor(i.add(this.getValue(),e.getValue()))},distance:function(e){return this.getValue().distance(e.getValue())},divide:function(e){return new this.constructor(i.divide(this.getValue(),e))},divVec:function(e){return new this.constructor(i.divVec(this.getValue(),e.getValue()))},dot:function(e){return this.getValue().dot(e.getValue())},length:function(){return this.getValue().abs()},lerp:function(e,t){return new this.constructor(i.lerp(this.getValue(),e,t))},multiply:function(e){return new this.constructor(i.multiply(this.getValue(),e))},multVec:function(e){return new this.constructor(i.multVec(this.getValue(),e.getValue()))},negate:function(){return new this.constructor(i.negate(this.getValue().copy()))},normalize:function(e){return new this.constructor(i.normalize(this.getValue()))},subtract:function(e){return new this.constructor(i.subtract(this.getValue(),e.getValue()))},toStream:function(e){const i=t.Get(e),r=this.getValue(),o=i.Unit(this.getUnit()),s=r.length-1;for(let t=0;t<s;++t)e.string+=n?i.DoublePrecision(i.ToUnit(o,r[t])):i.Precision(i.ToUnit(o,r[t])),e.string+=" ";e.string+=n?i.DoublePrecision(i.ToUnit(o,r[s])):i.Precision(i.ToUnit(o,r[s]))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}})}})),define("standard/Math/Numbers/Vector2",["standard/Math/Algorithm"],(function(e){"use strict";function t(e,t){this.x=e,this.y=t}return t.prototype={constructor:t,length:2,copy:function(){const e=Object.create(t.prototype);return e.x=this.x,e.y=this.y,e},assign:function(e){return this.x=e.x,this.y=e.y,this},set:function(e,t){return this.x=e,this.y=t,this},equals:function(e){return this.x===e.x&&this.y===e.y},negate:function(){return this.x=-this.x,this.y=-this.y,this},add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this},multiply:function(e){return this.x*=e,this.y*=e,this},multVec:function(e){return this.x*=e.x,this.y*=e.y,this},divide:function(e){return this.x/=e,this.y/=e,this},divVec:function(e){return this.x/=e.x,this.y/=e.y,this},normalize:function(){let e=Math.hypot(this.x,this.y);return e&&(e=1/e,this.x*=e,this.y*=e),this},dot:function(e){return this.x*e.x+this.y*e.y},norm:function(){const e=this.x,t=this.y;return e*e+t*t},abs:function(){return Math.hypot(this.x,this.y)},distance:function(e){return Math.hypot(this.x-e.x,this.y-e.y)},lerp:function(e,t){const i=this.x,n=this.y;return this.x=i+t*(e.x-i),this.y=n+t*(e.y-n),this},min:function(e){let t=this.x,i=this.y;for(const e of arguments)t=Math.min(t,e.x),i=Math.min(i,e.y);return this.x=t,this.y=i,this},max:function(e){let t=this.x,i=this.y;for(const e of arguments)t=Math.max(t,e.x),i=Math.max(i,e.y);return this.x=t,this.y=i,this},toString:function(){return this.x+" "+this.y}},Object.defineProperty(t.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.assign(t,{Zero:new t(0,0),One:new t(1,1),negate:function(e){return e.copy().negate()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multVec:function(e,t){return e.copy().multVec(t)},divide:function(e,t){return e.copy().divide(t)},divVec:function(e,t){return e.copy().divVec(t)},normalize:function(e){return e.copy().normalize()},dot:function(e,t){return e.copy().dot(t)},lerp:function(e,t,i){return e.copy().lerp(t,i)},min:function(e,i){return t.prototype.min.apply(e.copy(),arguments)},max:function(e,i){return t.prototype.max.apply(e.copy(),arguments)}}),t})),define("x_ite/Fields/SFVec2",["x_ite/Base/X3DField","x_ite/Fields/SFVecPrototypeTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n){"use strict";function r(i,r,o){function s(t,i){switch(arguments.length){case 0:return e.call(this,new n(0,0));case 1:return e.call(this,arguments[0]);case 2:return e.call(this,new n(+t,+i))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(e.prototype),t(n,o),{constructor:s,getTypeName:function(){return i},getType:function(){return r}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),a.enumerable=!1,u.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),s}return{SFVec2d:r("SFVec2d",i.SFVec2d,!0),SFVec2f:r("SFVec2f",i.SFVec2f,!1)}})),define("standard/Math/Numbers/Vector3",["standard/Math/Algorithm"],(function(e){"use strict";function t(e,t,i){this.x=e,this.y=t,this.z=i}return t.prototype={constructor:t,length:3,copy:function(){const e=Object.create(t.prototype);return e.x=this.x,e.y=this.y,e.z=this.z,e},assign:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},equals:function(e){return this.x===e.x&&this.y===e.y&&this.z===e.z},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},add:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this},multiply:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multVec:function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this},divide:function(e){return this.x/=e,this.y/=e,this.z/=e,this},divVec:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},cross:function(e){const t=this.x,i=this.y,n=this.z;return this.x=i*e.z-n*e.y,this.y=n*e.x-t*e.z,this.z=t*e.y-i*e.x,this},normalize:function(){let e=Math.hypot(this.x,this.y,this.z);return e&&(e=1/e,this.x*=e,this.y*=e,this.z*=e),this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},norm:function(){let e=this.x,t=this.y,i=this.z;return e*e+t*t+i*i},abs:function(){return Math.hypot(this.x,this.y,this.z)},distance:function(e){return Math.hypot(this.x-e.x,this.y-e.y,this.z-e.z)},lerp:function(e,t){const i=this.x,n=this.y,r=this.z;return this.x=i+t*(e.x-i),this.y=n+t*(e.y-n),this.z=r+t*(e.z-r),this},slerp:function(){const i=new t(0,0,0);return function(t,n){return e.simpleSlerp(this,i.assign(t),n)}}(),min:function(e){let t=this.x,i=this.y,n=this.z;for(const e of arguments)t=Math.min(t,e.x),i=Math.min(i,e.y),n=Math.min(n,e.z);return this.x=t,this.y=i,this.z=n,this},max:function(e){let t=this.x,i=this.y,n=this.z;for(const e of arguments)t=Math.max(t,e.x),i=Math.max(i,e.y),n=Math.max(n,e.z);return this.x=t,this.y=i,this.z=n,this},toString:function(){return this.x+" "+this.y+" "+this.z}},Object.defineProperty(t.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"2",{get:function(){return this.z},set:function(e){this.z=e},enumerable:!1,configurable:!1}),Object.assign(t,{Zero:new t(0,0,0),One:new t(1,1,1),xAxis:new t(1,0,0),yAxis:new t(0,1,0),zAxis:new t(0,0,1),negate:function(e){return e.copy().negate()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multVec:function(e,t){return e.copy().multVec(t)},divide:function(e,t){return e.copy().divide(t)},divVec:function(e,t){return e.copy().divVec(t)},cross:function(e,t){return e.copy().cross(t)},normalize:function(e){return e.copy().normalize()},dot:function(e,t){return e.copy().dot(t)},lerp:function(e,t,i){return e.copy().lerp(t,i)},slerp:function(e,t,i){return e.copy().slerp(t,i)},min:function(e,i){return t.prototype.min.apply(e.copy(),arguments)},max:function(e,i){return t.prototype.max.apply(e.copy(),arguments)}}),t})),define("standard/Math/Numbers/Matrix2",["standard/Math/Numbers/Vector2","standard/Math/Algorithm"],(function(e,t){"use strict";function i(){arguments.length?(this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3]):this.identity()}return i.prototype={constructor:i,order:2,length:4,copy:function(){const e=Object.create(i.prototype);return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[3],e},assign:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this},equals:function(e){return this[0]===e[0]&&this[1]===e[1]&&this[2]===e[2]&&this[3]===e[3]},set1:function(e,t,i){this[e*this.order+t]=i},get1:function(e,t){return this[e*this.order+t]},set:function(){switch(arguments.length){case 0:this.identity();break;case 4:this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3]}},determinant1:function(){return this[0]},determinant:function(){return this[0]*this[3]-this[1]*this[2]},transpose:function(){const e=this[1];return this[1]=this[2],this[2]=e,this},inverse:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=e*n-t*i;if(0===r)throw new Error("Matrix2 .inverse: determinant is 0.");return this[0]=n/r,this[1]=-t/r,this[2]=-i/r,this[3]=e/r,this},multLeft:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=e[0],s=e[1],a=e[2],u=e[3];return this[0]=t*o+n*s,this[1]=i*o+r*s,this[2]=t*a+n*u,this[3]=i*a+r*u,this},multRight:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=e[0],s=e[1],a=e[2],u=e[3];return this[0]=o*t+a*i,this[1]=s*t+u*i,this[2]=o*n+a*r,this[3]=s*n+u*r,this},identity:function(){this[0]=1,this[1]=0,this[2]=0,this[3]=1},toString:function(){return this[0]+" "+this[1]+" "+this[2]+" "+this[3]}},Object.defineProperty(i.prototype,"x",{get:function(){const t=new e(0,0);return function(){return t.set(this[0],this[1])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(i.prototype,"xAxis",{get:function(){return this[0]},enumerable:!1,configurable:!1}),Object.defineProperty(i.prototype,"origin",{get:function(){return this[2]},enumerable:!1,configurable:!1}),Object.defineProperty(i.prototype,"submatrix",{get:function(){return this[0]},enumerable:!1,configurable:!1}),Object.assign(i,{Identity:new i}),i})),define("standard/Math/Algorithms/eigendecomposition",[],(function(){"use strict";const e=[],t=[],i=[];return function(n,r){const o=n.order,s=r.values,a=r.vectors;let u,l,c,h,d,p,f,g,m,_,y,x,w,b=n.length;for(x=0;x<o;++x)for(e[x]=e[x]||new Array(o),t[x]=s[x]=n.get1(x,x),i[x]=0,w=0;w<o;++w)a[x][w]=x===w?1:0,e[x][w]=n.get1(w,x);for(x=0;x<50;++x){for(u=0,_=0;_<o-1;++_)for(y=_+1;y<o;++y)u+=Math.abs(e[_][y]);if(0===u)break;for(m=x<3?.2*u/b:0,_=0;_<o-1;++_)for(y=_+1;y<o;++y)if(g=100*Math.abs(e[_][y]),x>3&&Math.abs(s[_])+g===Math.abs(s[_])&&Math.abs(s[y])+g===Math.abs(s[y]))e[_][y]=0;else if(Math.abs(e[_][y])>m){for(f=s[y]-s[_],Math.abs(f)+g===Math.abs(f)?d=e[_][y]/f:(l=.5*f/e[_][y],d=1/(Math.abs(l)+Math.sqrt(1+l*l)),l<0&&(d=-d)),c=1/Math.sqrt(1+d*d),h=d*c,p=h/(1+c),f=d*e[_][y],i[_]-=f,i[y]+=f,s[_]-=f,s[y]+=f,e[_][y]=0,w=0;w<_;++w)g=e[w][_],f=e[w][y],e[w][_]=g-h*(f+g*p),e[w][y]=f+h*(g-f*p);for(w=_+1;w<y;++w)g=e[_][w],f=e[w][y],e[_][w]=g-h*(f+g*p),e[w][y]=f+h*(g-f*p);for(w=y+1;w<o;++w)g=e[_][w],f=e[y][w],e[_][w]=g-h*(f+g*p),e[y][w]=f+h*(g-f*p);for(w=0;w<o;++w)g=a[w][_],f=a[w][y],a[w][_]=g-h*(f+g*p),a[w][y]=f+h*(g-f*p)}for(_=0;_<o;++_)s[_]=t[_]+=i[_],i[_]=0}return r}})),define("standard/Math/Numbers/Matrix3",["standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix2","standard/Math/Algorithms/eigendecomposition"],(function(e,t,i,n){"use strict";function r(){arguments.length?(this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8]):this.identity()}return r.prototype={constructor:r,order:3,length:9,copy:function(){const e=Object.create(r.prototype);return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[3],e[4]=this[4],e[5]=this[5],e[6]=this[6],e[7]=this[7],e[8]=this[8],e},assign:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this},equals:function(e){return this[0]===e[0]&&this[1]===e[1]&&this[2]===e[2]&&this[3]===e[3]&&this[4]===e[4]&&this[5]===e[5]&&this[6]===e[6]&&this[7]===e[7]&&this[8]===e[8]},rotation:function(){return math.atan2(this[1],this[0])},set1:function(e,t,i){return this[e*this.order+t]=i,this},get1:function(e,t){return this[e*this.order+t]},set:function(t,i,n,r,o){switch(arguments.length){case 0:this.identity();break;case 1:null===t&&(t=e.Zero),this.identity(),this.translate(t);break;case 2:null===t&&(t=e.Zero),null===i&&(i=0),this.identity(),this.translate(t),0!==i&&this.rotate(i);break;case 3:null===t&&(t=e.Zero),null===i&&(i=0),null===n&&(n=e.One),this.identity(),this.translate(t),0!==i&&this.rotate(i),n.equals(e.One)||this.scale(n);break;case 4:if(null===t&&(t=e.Zero),null===i&&(i=0),null===n&&(n=e.One),null===r&&(r=0),this.identity(),this.translate(t),0!==i&&this.rotate(i),!n.equals(e.One)){0!==r?(this.rotate(r),this.scale(n),this.rotate(-r)):this.scale(n)}break;case 5:{null===t&&(t=e.Zero),null===i&&(i=0),null===n&&(n=e.One),null===r&&(r=0),null===o&&(o=e.Zero),this.identity(),this.translate(t);const s=!o.equals(e.Zero);s&&this.translate(o),0!==i&&this.rotate(i),n.equals(e.One)||(0!==r?(this.rotate(r),this.scale(n),this.rotate(-r)):this.scale(n)),s&&this.translate(e.negate(o));break}case 9:this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8]}return this},get:function(){const n=new e(0,0),o=new t(0,0,0),s=new e(0,0),a=new t(0,0,0),u=new e(0,0),l=new i,c=new i,h=new e(0,0);return function(e,t,i,d,p){switch(null===e&&(e=n),null===t&&(t=o),null===i&&(i=s),null===d&&(d=a),null===p&&(p=u),arguments.length){case 1:e.set(this[6],this[7]);break;case 2:this.factor(e,l,s,c),t[0]=l[0],t[1]=l[1],t[2]=Math.atan2(l[1],l[0]);break;case 3:this.factor(e,l,i,c),t[0]=l[0],t[1]=l[1],t[2]=Math.atan2(l[1],l[0]);break;case 4:this.factor(e,l,i,c),t[0]=l[0],t[1]=l[1],t[2]=Math.atan2(l[1],l[0]),d[0]=c[0],d[1]=c[1],d[2]=Math.atan2(c[1],c[0]);break;case 5:{const n=new r;n.set(h.assign(p).negate()),n.multLeft(this),n.translate(p),n.get(e,t,i,d);break}}}}(),factor:function(){const e=new i,t=new i,r=new i,o={values:[],vectors:[[],[]]};return function(i,s,a,u){i.set(this[6],this[7]);const l=this.submatrix,c=l.determinant(),h=c<0?-1:1;if(0===c)throw new Error("Matrix3 .factor: determinant is 0.");r.assign(l).transpose().multLeft(l);const d=n(r,o);u.set(d.vectors[0][0],d.vectors[1][0],d.vectors[0][1],d.vectors[1][1]),a.x=h*Math.sqrt(d.values[0]),a.y=h*Math.sqrt(d.values[1]),e[0]=1/a.x,e[3]=1/a.y,s.assign(t.assign(u).transpose().multRight(e).multRight(u).multRight(l))}}(),determinant2:function(){return this[0]*this[4]-this[1]*this[3]},determinant:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8];return e*(r*u-o*a)-t*(n*u-o*s)+i*(n*a-r*s)},transpose:function(){let e;return e=this[1],this[1]=this[3],this[3]=e,e=this[2],this[2]=this[6],this[6]=e,e=this[5],this[5]=this[7],this[7]=e,this},inverse:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8],l=e*r,c=e*a,h=n*t,d=n*a,p=s*t,f=s*r;let g=l*u-c*o-h*u+d*i+p*o-f*i;if(0===g)throw new Error("Matrix3 .inverse: determinant is 0.");g=1/g;const m=(r*u-a*o)*g,_=-(t*u-a*i)*g,y=(t*o-r*i)*g,x=-(n*u-s*o)*g,w=(e*u-s*i)*g,b=-(e*o-n*i)*g;return this[0]=m,this[1]=_,this[2]=y,this[3]=x,this[4]=w,this[5]=b,this[6]=(d-f)*g,this[7]=-(c-p)*g,this[8]=(l-h)*g,this},multLeft:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=e[0],h=e[1],d=e[2],p=e[3],f=e[4],g=e[5],m=e[6],_=e[7],y=e[8];return this[0]=t*c+r*h+a*d,this[1]=i*c+o*h+u*d,this[2]=n*c+s*h+l*d,this[3]=t*p+r*f+a*g,this[4]=i*p+o*f+u*g,this[5]=n*p+s*f+l*g,this[6]=t*m+r*_+a*y,this[7]=i*m+o*_+u*y,this[8]=n*m+s*_+l*y,this},multRight:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=e[0],h=e[1],d=e[2],p=e[3],f=e[4],g=e[5],m=e[6],_=e[7],y=e[8];return this[0]=t*c+i*p+n*m,this[1]=t*h+i*f+n*_,this[2]=t*d+i*g+n*y,this[3]=r*c+o*p+s*m,this[4]=r*h+o*f+s*_,this[5]=r*d+o*g+s*y,this[6]=a*c+u*p+l*m,this[7]=a*h+u*f+l*_,this[8]=a*d+u*g+l*y,this},multVecMatrix:function(e){if(2===e.length){const t=e.x,i=e.y,n=t*this[2]+i*this[5]+this[8];return e.x=(t*this[0]+i*this[3]+this[6])/n,e.y=(t*this[1]+i*this[4]+this[7])/n,e}const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[3]+n*this[6],e.y=t*this[1]+i*this[4]+n*this[7],e.z=t*this[2]+i*this[5]+n*this[8],e},multMatrixVec:function(e){if(2===e.length){const t=e.x,i=e.y,n=t*this[6]+i*this[7]+this[8];return e.x=(t*this[0]+i*this[1]+this[2])/n,e.y=(t*this[3]+i*this[4]+this[5])/n,e}const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[1]+n*this[2],e.y=t*this[3]+i*this[4]+n*this[5],e.z=t*this[6]+i*this[7]+n*this[8],e},multDirMatrix:function(e){const t=e.x,i=e.y;return e.x=t*this[0]+i*this[3],e.y=t*this[1]+i*this[4],e},multMatrixDir:function(e){const t=e.x,i=e.y;return e.x=t*this[0]+i*this[1],e.y=t*this[3]+i*this[4],e},identity:function(){this[0]=1,this[1]=0,this[2]=0,this[3]=0,this[4]=1,this[5]=0,this[6]=0,this[7]=0,this[8]=1},translate:function(e){const t=e.x,i=e.y;return this[6]+=this[0]*t+this[3]*i,this[7]+=this[1]*t+this[4]*i,this},rotate:function(e){return this.multLeft(r.Rotation(e)),this},scale:function(e){const t=e.x,i=e.y;return this[0]*=t,this[3]*=i,this[1]*=t,this[4]*=i,this},toString:function(){return this[0]+" "+this[1]+" "+this[2]+" "+this[3]+" "+this[4]+" "+this[5]+" "+this[6]+" "+this[7]+" "+this[8]}},Object.defineProperty(r.prototype,"x",{get:function(){const e=new t(0,0,0);return function(){return e.set(this[0],this[1],this[2])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"y",{get:function(){const e=new t(0,0,0);return function(){return e.set(this[3],this[4],this[5])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"xAxis",{get:function(){const t=new e(0,0);return function(){return t.set(this[0],this[1])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"yAxis",{get:function(){const t=new e(0,0);return function(){return t.set(this[3],this[4])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"origin",{get:function(){const t=new e(0,0);return function(){return t.set(this[6],this[7])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"submatrix",{get:function(){const e=new i;return function(){return e[0]=this[0],e[1]=this[1],e[2]=this[3],e[3]=this[4],e}}(),enumerable:!1,configurable:!1}),Object.assign(r,{Identity:new r,Rotation:function(e){const t=Math.sin(e),i=Math.cos(e);return new r(i,t,0,-t,i,0,0,0,1)},Matrix2:function(e){return new r(e[0],e[1],0,e[2],e[3],0,0,0,1)},transpose:function(e){return e.copy().transpose()},inverse:function(e){return e.copy().inverse()},multLeft:function(e,t){return e.copy().multLeft(t)},multRight:function(e,t){return e.copy().multRight(t)}}),r})),define("x_ite/Fields/SFMatrix3",["x_ite/Base/X3DField","x_ite/Fields/SFMatrixPrototypeTemplate","x_ite/Fields/SFVec2","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix3"],(function(e,t,i,n,r){"use strict";function o(i,n,o,s){function a(t,i,n,o,s,a,u,l,c){switch(arguments.length){case 0:return e.call(this,new r);case 1:return e.call(this,arguments[0]);case 9:return e.call(this,new r(+t,+i,+n,+o,+s,+a,+u,+l,+c))}throw new Error("Invalid arguments.")}a.prototype=Object.assign(Object.create(e.prototype),t(r,o,s),{constructor:a,getTypeName:function(){return i},getType:function(){return n},setTransform:function(e,t,i,n,r){e=e?e.getValue():null,t=t||0,i=i?i.getValue():null,n=n||0,r=r?r.getValue():null,this.getValue().set(e,t,i,n,r)}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});function u(e){Object.defineProperty(a.prototype,e,{get:function(){return this.getValue()[e]},set:function(t){this.getValue()[e]=+t,this.addEvent()},enumerable:!0,configurable:!1})}for(let e=0,t=r.prototype.length;e<t;++e)u(e);return a}return{SFMatrix3d:o("SFMatrix3d",n.SFMatrix3d,i.SFVec2d,!0),SFMatrix3f:o("SFMatrix3f",n.SFMatrix3f,i.SFVec2f,!1)}})),define("x_ite/Fields/SFVec3",["x_ite/Base/X3DField","x_ite/Fields/SFVecPrototypeTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n){"use strict";function r(i,r,o){function s(t,i,r){switch(arguments.length){case 0:return e.call(this,new n(0,0,0));case 1:return e.call(this,arguments[0]);case 3:return e.call(this,new n(+t,+i,+r))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(e.prototype),t(n,o),{constructor:s,getTypeName:function(){return i},getType:function(){return r},cross:function(e){return new this.constructor(n.cross(this.getValue(),e.getValue()))}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1},l={get:function(){return this.getValue().z},set:function(e){this.getValue().z=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),Object.defineProperty(s.prototype,"z",l),a.enumerable=!1,u.enumerable=!1,l.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),Object.defineProperty(s.prototype,"2",l),s}return{SFVec3d:r("SFVec3d",i.SFVec3d,!0),SFVec3f:r("SFVec3f",i.SFVec3f,!1)}})),define("standard/Math/Numbers/Vector4",["standard/Math/Algorithm"],(function(e){"use strict";function t(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}return t.prototype={constructor:t,length:4,copy:function(){const e=Object.create(t.prototype);return e.x=this.x,e.y=this.y,e.z=this.z,e.w=this.w,e},assign:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},set:function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},equals:function(e){return this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},getReal:function(e){e.x=this.x/this.w,e.y=this.y/this.w,e.z=this.z/this.w},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},add:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},multiply:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},multVec:function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},divide:function(e){return this.x/=e,this.y/=e,this.z/=e,this.w/=e,this},divVec:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this},normalize:function(){let e=Math.hypot(this.x,this.y,this.z,this.w);return e&&(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},norm:function(){const e=this.x,t=this.y,i=this.z,n=this.w;return e*e+t*t+i*i+n*n},abs:function(){return Math.hypot(this.x,this.y,this.z,this.w)},distance:function(e){return Math.hypot(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},lerp:function(e,t){const i=this.x,n=this.y,r=this.z,o=this.w;return this.x=i+t*(e.x-i),this.y=n+t*(e.y-n),this.z=r+t*(e.z-r),this.w=o+t*(e.w-o),this},min:function(e){let t=this.x,i=this.y,n=this.z,r=this.w;for(const e of arguments)t=Math.min(t,e.x),i=Math.min(i,e.y),n=Math.min(n,e.z),r=Math.min(r,e.w);return this.x=t,this.y=i,this.z=n,this.w=r,this},max:function(e){let t=this.x,i=this.y,n=this.z,r=this.w;for(const e of arguments)t=Math.max(t,e.x),i=Math.max(i,e.y),n=Math.max(n,e.z),r=Math.max(r,e.w);return this.x=t,this.y=i,this.z=n,this.w=r,this},toString:function(){return this.x+" "+this.y+" "+this.z+" "+this.w}},Object.defineProperty(t.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"2",{get:function(){return this.z},set:function(e){this.z=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"3",{get:function(){return this.w},set:function(e){this.w=e},enumerable:!1,configurable:!1}),Object.assign(t,{Zero:new t(0,0,0,0),One:new t(1,1,1,1),xAxis:new t(1,0,0,0),yAxis:new t(0,1,0,0),zAxis:new t(0,0,1,0),wAxis:new t(0,0,0,1),negate:function(e){return e.copy().negate()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multVec:function(e,t){return e.copy().multVec(t)},divide:function(e,t){return e.copy().divide(t)},divVec:function(e,t){return e.copy().divVec(t)},normalize:function(e){return e.copy().normalize()},dot:function(e,t){return e.copy().dot(t)},lerp:function(e,t,i){return e.copy().lerp(t,i)},min:function(e,i){return t.prototype.min.apply(e.copy(),arguments)},max:function(e,i){return t.prototype.max.apply(e.copy(),arguments)}}),t})),define("standard/Math/Numbers/Quaternion",["standard/Math/Numbers/Vector3","standard/Math/Algorithm"],(function(t,i){"use strict";function n(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}n.prototype={constructor:n,length:4,copy:function(){const e=Object.create(n.prototype);return e.x=this.x,e.y=this.y,e.z=this.z,e.w=this.w,e},assign:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},set:function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},setMatrix:function(e){let t;t=e[0]>e[4]?e[0]>e[8]?0:2:e[4]>e[8]?1:2;const i=e[0]+e[4]+e[8];if(i>e[3*t+t]){this[3]=Math.sqrt(i+1)/2;const t=4*this[3];this[0]=(e[5]-e[7])/t,this[1]=(e[6]-e[2])/t,this[2]=(e[1]-e[3])/t}else{const i=(t+1)%3,n=(t+2)%3;this[t]=Math.sqrt(e[3*t+t]-e[3*i+i]-e[3*n+n]+1)/2;const r=4*this[t];this[i]=(e[3*t+i]+e[3*i+t])/r,this[n]=(e[3*t+n]+e[3*n+t])/r,this[3]=(e[3*i+n]-e[3*n+i])/r}return this},getMatrix:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=t*t,s=t*i,a=i*i,u=i*n,l=n*t,c=n*n,h=r*t,d=r*i,p=r*n;return e[0]=1-2*(a+c),e[1]=2*(s+p),e[2]=2*(l-d),e[3]=2*(s-p),e[4]=1-2*(c+o),e[5]=2*(u+h),e[6]=2*(l+d),e[7]=2*(u-h),e[8]=1-2*(a+o),e},isReal:function(){return!(this.x||this.y||this.z)},isImag:function(){return!this.w},equals:function(e){return this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},inverse:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},add:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},multiply:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},multLeft:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=e.w;return this.x=r*o+t*u+i*a-n*s,this.y=r*s+i*u+n*o-t*a,this.z=r*a+n*u+t*s-i*o,this.w=r*u-t*o-i*s-n*a,this},multRight:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=e.w;return this.x=u*t+o*r+s*n-a*i,this.y=u*i+s*r+a*t-o*n,this.z=u*n+a*r+o*i-s*t,this.w=u*r-o*t-s*i-a*n,this},divide:function(e){return this.x/=e,this.y/=e,this.z/=e,this.w/=e,this},multVecQuat:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=r*r-t*t-i*i-n*n,l=2*(o*t+s*i+a*n),c=2*r;return e.x=u*o+l*t+c*(i*a-n*s),e.y=u*s+l*i+c*(n*o-t*a),e.z=u*a+l*n+c*(t*s-i*o),e},multQuatVec:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=r*r-t*t-i*i-n*n,l=2*(o*t+s*i+a*n),c=2*r;return e.x=u*o+l*t-c*(i*a-n*s),e.y=u*s+l*i-c*(n*o-t*a),e.z=u*a+l*n-c*(t*s-i*o),e},normalize:function(){let e=Math.hypot(this.x,this.y,this.z,this.w);return e&&(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},norm:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},abs:function(){return Math.hypot(this.x,this.y,this.z,this.w)},pow:function(t){if(t instanceof n)return this.assign(e.assign(t).multRight(this.log()).exp());if(this.isReal())return this.set(0,0,0,Math.pow(this.w,t));const i=this.abs(),r=Math.acos(this.w/i),o=this.imag.abs(),s=Math.pow(i,t),a=t*r,u=s/o*Math.sin(a);return this.x*=u,this.y*=u,this.z*=u,this.w=s*Math.cos(a),this},log:function(){if(this.isReal())return this.w>0?this.set(0,0,0,Math.log(this.w)):this.set(Math.PI,0,0,Math.log(-this.w));const e=this.abs(),t=this.imag.normalize().multiply(Math.acos(this.w/e)),i=Math.log(e);return this.x=t.x,this.y=t.y,this.z=t.z,this.w=i,this},exp:function(){if(this.isReal())return this.set(0,0,0,Math.exp(this.w));const e=this.imag,t=e.abs(),i=Math.exp(this.w),n=i*Math.cos(t),r=e.multiply(i*Math.sin(t)/t);return this.x=r.x,this.y=r.y,this.z=r.z,this.w=n,this},slerp:function(e,t){return i.slerp(this,r.assign(e),t)},squad:function(e,t,n,a){return i.slerp(i.slerp(this,r.assign(n),a),i.slerp(o.assign(e),s.assign(t),a),2*a*(1-a))},toString:function(){return this.x+" "+this.y+" "+this.z+" "+this.w}},Object.defineProperty(n.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"2",{get:function(){return this.z},set:function(e){this.z=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"3",{get:function(){return this.w},set:function(e){this.w=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"real",{get:function(){return this.w},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"imag",{get:function(){const e=new t(0,0,0);return function(){return e.set(this.x,this.y,this.z)}}(),enumerable:!1,configurable:!1}),Object.assign(n,{negate:function(e){return e.copy().negate()},inverse:function(e){return e.copy().inverse()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multLeft:function(e,t){return e.copy().multLeft(t)},multRight:function(e,t){return e.copy().multRight(t)},divide:function(e,t){return e.copy().divide(t)},normalize:function(e){return e.copy().normalize()},slerp:function(e,t,i){return e.copy().slerp(t,i)},squad:function(e,t,i,n,r){return e.copy().squad(t,i,n,r)},spline:function(e,t,i){return a.assign(e),u.assign(t),l.assign(i),a.dot(u)<0&&a.negate(),l.dot(u)<0&&l.negate(),c.assign(u).inverse(),u.multRight(r.assign(c).multRight(a).log().add(o.assign(c).multRight(l).log()).divide(-4).exp()).normalize().copy()}});const r=new n(0,0,0,1),o=new n(0,0,0,1),s=new n(0,0,0,1),a=new n(0,0,0,1),u=new n(0,0,0,1),l=new n(0,0,0,1),c=new n(0,0,0,1);return n})),define("standard/Math/Numbers/Rotation4",["standard/Math/Numbers/Quaternion","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Algorithm"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s=Symbol(),a=Symbol();function u(i,n,u,l){switch(this[r]=0,this[o]=0,this[s]=1,this[a]=0,arguments.length){case 0:return void(this.value=new e(0,0,0,1));case 1:return this.value=arguments[0],void this.update();case 2:{const i=arguments[0],n=arguments[1];return this.value=new e(0,0,0,1),n instanceof t?this.setFromToVec(i,n):void this.set(i.x,i.y,i.z,n)}case 4:return this.value=new e(0,0,0,1),void this.set(i,n,u,l)}}u.prototype={constructor:u,length:4,update:function(){const e=this.get();return this[r]=e.x,this[o]=e.y,this[s]=e.z,this[a]=e.w,this},copy:function(){const e=Object.create(u.prototype);return e[r]=this[r],e[o]=this[o],e[s]=this[s],e[a]=this[a],e.value=this.value.copy(),e},assign:function(e){return this[r]=e[r],this[o]=e[o],this[s]=e[s],this[a]=e[a],this.value.assign(e.value),this},set:function(e,t,i,u){this[r]=e,this[o]=t,this[s]=i,this[a]=u;const l=Math.hypot(e,t,i);if(0===l)return this.value.set(0,0,0,1),this;const c=n.interval(u/2,0,Math.PI),h=Math.sin(c)/l;return this.value.set(e*h,t*h,i*h,Math.cos(c)),this},get:function(){const e=new i(0,0,0,0);return function(){const t=this.value;if(Math.abs(t.w)>1)return i.zAxis;{const n=2*Math.acos(t.w),r=Math.sin(n/2);if(0===r)return i.zAxis;{const i=t.imag.divide(r);return e.set(i.x,i.y,i.z,n)}}}}(),setAxisAngle:function(e,t){return this.set(e.x,e.y,e.z,t)},setFromToVec:function(){const e=new t(0,0,0),i=new t(0,0,0),r=new t(0,0,0),o=new t(0,0,0);return function(s,a){e.assign(s).normalize(),i.assign(a).normalize();const u=n.clamp(e.dot(i),-1,1),l=r.assign(e).cross(i).normalize();return 0===l.abs()?u>0?this.value.set(0,0,0,1):(o.assign(e).cross(t.xAxis),0===o.norm()&&o.assign(e).cross(t.yAxis),o.normalize(),this.value.set(o.x,o.y,o.z,0)):(l.multiply(Math.sqrt(Math.abs(1-u)/2)),this.value.set(l.x,l.y,l.z,Math.sqrt(Math.abs(1+u)/2))),this.update(),this}}(),setAxis:function(e){this.set(e.x,e.y,e.z,this[a])},getAxis:function(){const e=new t(0,0,0);return function(){return e.set(this[r],this[o],this[s])}}(),setMatrix:function(e){return this.value.setMatrix(e).normalize(),this.update(),this},getMatrix:function(e){return this.value.getMatrix(e)},equals:function(e){return this.value.equals(e.value)},inverse:function(){return this.value.inverse(),this.update(),this},multLeft:function(e){return this.value.multLeft(e.value).normalize(),this.update(),this},multRight:function(e){return this.value.multRight(e.value).normalize(),this.update(),this},multVecRot:function(e){return this.value.multVecQuat(e)},multRotVec:function(e){return this.value.multQuatVec(e)},normalize:function(){return this.value.normalize(),this.update(),this},pow:function(e){return this.value.pow(e),this.update(),this},slerp:function(e,t){return this.value.slerp(e.value,t),this.update(),this},squad:function(e,t,i,n){return this.value.squad(e.value,t.value,i.value,n),this.update(),this},toString:function(){return this[r]+" "+this[o]+" "+this[s]+" "+this[a]}};const l={get:function(){return this[r]},set:function(e){this[r]=e,this.set(e,this[o],this[s],this[a])},enumerable:!0,configurable:!1},c={get:function(){return this[o]},set:function(e){this[o]=e,this.set(this[r],e,this[s],this[a])},enumerable:!0,configurable:!1},h={get:function(){return this[s]},set:function(e){this[s]=e,this.set(this[r],this[o],e,this[a])},enumerable:!0,configurable:!1},d={get:function(){return this[a]},set:function(e){this[a]=e,this.set(this[r],this[o],this[s],e)},enumerable:!0,configurable:!1};return Object.defineProperty(u.prototype,"x",l),Object.defineProperty(u.prototype,"y",c),Object.defineProperty(u.prototype,"z",h),Object.defineProperty(u.prototype,"angle",d),l.enumerable=!1,c.enumerable=!1,h.enumerable=!1,d.enumerable=!1,Object.defineProperty(u.prototype,"0",l),Object.defineProperty(u.prototype,"1",c),Object.defineProperty(u.prototype,"2",h),Object.defineProperty(u.prototype,"3",d),Object.assign(u,{Identity:new u,inverse:function(e){return e.copy().inverse()},multRight:function(e,t){return e.copy().multRight(t)},normalize:function(e){return e.copy().normalize()},slerp:function(e,t,i){return e.copy().slerp(t,i)},squad:function(e,t,i,n,r){return e.copy().squad(t,i,n,r)},spline:function(t,i,n){const r=Object.create(this.prototype);return r.value=e.spline(t.value,i.value,n.value),r.update(),r}}),u})),define("standard/Math/Numbers/Matrix4",["standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix3","standard/Math/Algorithms/eigendecomposition"],(function(e,t,i,n,r){"use strict";function o(){arguments.length?(this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8],this[9]=arguments[9],this[10]=arguments[10],this[11]=arguments[11],this[12]=arguments[12],this[13]=arguments[13],this[14]=arguments[14],this[15]=arguments[15]):this.identity()}o.prototype={constructor:o,order:4,length:16,copy:function(){const e=Object.create(o.prototype);return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[3],e[4]=this[4],e[5]=this[5],e[6]=this[6],e[7]=this[7],e[8]=this[8],e[9]=this[9],e[10]=this[10],e[11]=this[11],e[12]=this[12],e[13]=this[13],e[14]=this[14],e[15]=this[15],e},assign:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this},equals:function(e){return this[0]===e[0]&&this[1]===e[1]&&this[2]===e[2]&&this[3]===e[3]&&this[4]===e[4]&&this[5]===e[5]&&this[6]===e[6]&&this[7]===e[7]&&this[8]===e[8]&&this[9]===e[9]&&this[10]===e[10]&&this[11]===e[11]&&this[12]===e[12]&&this[13]===e[13]&&this[14]===e[14]&&this[15]===e[15]},set1:function(e,t,i){return this[e*this.order+t]=i,this},get1:function(e,t){return this[e*this.order+t]},set:function(t,n,r,o,s){switch(arguments.length){case 0:this.identity();break;case 1:null===t&&(t=e.Zero),this.identity(),this.translate(t);break;case 2:null===t&&(t=e.Zero),null===n&&(n=i.Identity),this.identity(),this.translate(t),n.equals(i.Identity)||this.rotate(n);break;case 3:null===t&&(t=e.Zero),null===n&&(n=i.Identity),null===r&&(r=e.One),this.identity(),this.translate(t),n.equals(i.Identity)||this.rotate(n),r.equals(e.One)||this.scale(r);break;case 4:if(null===t&&(t=e.Zero),null===n&&(n=i.Identity),null===r&&(r=e.One),null===o&&(o=i.Identity),this.identity(),this.translate(t),n.equals(i.Identity)||this.rotate(n),!r.equals(e.One)){!o.equals(i.Identity)?(this.rotate(o),this.scale(r),this.rotate(i.inverse(o))):this.scale(r)}break;case 5:{null===t&&(t=e.Zero),null===n&&(n=i.Identity),null===r&&(r=e.One),null===o&&(o=i.Identity),null===s&&(s=e.Zero),this.identity(),this.translate(t);const a=!s.equals(e.Zero);a&&this.translate(s),n.equals(i.Identity)||this.rotate(n),r.equals(e.One)||(o.equals(i.Identity)?this.scale(r):(this.rotate(o),this.scale(r),this.rotate(i.inverse(o)))),a&&this.translate(e.negate(s));break}case 16:this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8],this[9]=arguments[9],this[10]=arguments[10],this[11]=arguments[11],this[12]=arguments[12],this[13]=arguments[13],this[14]=arguments[14],this[15]=arguments[15]}return this},get:function(){const t=new e(0,0,0),r=new i,s=new e(0,0,0),a=new i,u=new e(0,0,0),l=new n,c=new n,h=new e(0,0,0);return function(e,i,n,d,p){switch(null===e&&(e=t),null===i&&(i=r),null===n&&(n=s),null===d&&(d=a),null===p&&(p=u),arguments.length){case 1:e.set(this[12],this[13],this[14]);break;case 2:this.factor(e,l,s,c),i.setMatrix(l);break;case 3:this.factor(e,l,n,c),i.setMatrix(l);break;case 4:this.factor(e,l,n,c),i.setMatrix(l),d.setMatrix(c);break;case 5:{const t=new o;t.set(h.assign(p).negate()),t.multLeft(this),t.translate(p),t.get(e,i,n,d);break}}}}(),setRotation:function(e){return this.setQuaternion(e.value)},setQuaternion:function(e){const t=e.x,i=e.y,n=e.z,r=e.w,o=i*i,s=n*n,a=t*i,u=n*r,l=n*t,c=i*r,h=t*t,d=i*n,p=t*r;return this[0]=1-2*(o+s),this[1]=2*(a+u),this[2]=2*(l-c),this[3]=0,this[4]=2*(a-u),this[5]=1-2*(s+h),this[6]=2*(d+p),this[7]=0,this[8]=2*(l+c),this[9]=2*(d-p),this[10]=1-2*(o+h),this[11]=0,this[12]=0,this[13]=0,this[14]=0,this[15]=1,this},factor:function(){const e=new n,t=new n,i=new n,o={values:[],vectors:[[],[],[]]};return function(n,s,a,u){n.set(this[12],this[13],this[14]);const l=this.submatrix,c=l.determinant(),h=c<0?-1:1;if(0===c)throw new Error("Matrix4 .factor: determinant is 0.");i.assign(l).transpose().multLeft(l);const d=r(i,o);u.set(d.vectors[0][0],d.vectors[1][0],d.vectors[2][0],d.vectors[0][1],d.vectors[1][1],d.vectors[2][1],d.vectors[0][2],d.vectors[1][2],d.vectors[2][2]),a.x=h*Math.sqrt(d.values[0]),a.y=h*Math.sqrt(d.values[1]),a.z=h*Math.sqrt(d.values[2]),e[0]=1/a.x,e[4]=1/a.y,e[8]=1/a.z,s.assign(t.assign(u).transpose().multRight(e).multRight(u).multRight(l))}}(),determinant3:function(){const e=this[0],t=this[1],i=this[2],n=this[4],r=this[5],o=this[6],s=this[8],a=this[9],u=this[10];return e*(r*u-o*a)-t*(n*u-o*s)+i*(n*a-r*s)},determinant:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8],l=this[9],c=this[10],h=this[11],d=this[12],p=this[13],f=this[14],g=this[15],m=c*g,_=f*h,y=s*g,x=f*a,w=s*h,b=c*a,v=i*g,S=f*n,T=i*h,C=c*n,N=i*a,F=s*n;return e*(m*o+x*l+w*p-_*o-y*l-b*p)+r*(_*t+v*l+C*p-m*t-S*l-T*p)+u*(y*t+S*o+N*p-x*t-v*o-F*p)+d*(b*t+T*o+F*l-w*t-C*o-N*l)},transpose:function(){let e;return e=this[1],this[1]=this[4],this[4]=e,e=this[2],this[2]=this[8],this[8]=e,e=this[3],this[3]=this[12],this[12]=e,e=this[6],this[6]=this[9],this[9]=e,e=this[7],this[7]=this[13],this[13]=e,e=this[11],this[11]=this[14],this[14]=e,this},inverse:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8],l=this[9],c=this[10],h=this[11],d=this[12],p=this[13],f=this[14],g=this[15],m=c*g,_=f*h,y=s*g,x=f*a,w=s*h,b=c*a,v=i*g,S=f*n,T=i*h,C=c*n,N=i*a,F=s*n,O=u*p,E=d*l,D=r*p,M=d*o,I=r*l,V=u*o,B=e*p,A=d*t,P=e*l,R=u*t,L=e*o,k=r*t,U=m*o+x*l+w*p-(_*o+y*l+b*p),X=_*t+v*l+C*p-(m*t+S*l+T*p),z=y*t+S*o+N*p-(x*t+v*o+F*p),j=b*t+T*o+F*l-(w*t+C*o+N*l);let G=e*U+r*X+u*z+d*j;if(0===G)throw new Error("Matrix4 .inverse: determinant is 0.");return G=1/G,this[0]=G*U,this[1]=G*X,this[2]=G*z,this[3]=G*j,this[4]=G*(_*r+y*u+b*d-m*r-x*u-w*d),this[5]=G*(m*e+S*u+T*d-_*e-v*u-C*d),this[6]=G*(x*e+v*r+F*d-y*e-S*r-N*d),this[7]=G*(w*e+C*r+N*u-b*e-T*r-F*u),this[8]=G*(O*a+M*h+I*g-E*a-D*h-V*g),this[9]=G*(E*n+B*h+R*g-O*n-A*h-P*g),this[10]=G*(D*n+A*a+L*g-M*n-B*a-k*g),this[11]=G*(V*n+P*a+k*h-I*n-R*a-L*h),this[12]=G*(D*c+V*f+E*s-I*f-O*s-M*c),this[13]=G*(P*f+O*i+A*c-B*c-R*f-E*i),this[14]=G*(B*s+k*f+M*i-L*f-D*i-A*s),this[15]=G*(L*c+I*i+R*s-P*s-k*c-V*i),this},multLeft:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=this[9],h=this[10],d=this[11],p=this[12],f=this[13],g=this[14],m=this[15],_=e[0],y=e[1],x=e[2],w=e[3],b=e[4],v=e[5],S=e[6],T=e[7],C=e[8],N=e[9],F=e[10],O=e[11],E=e[12],D=e[13],M=e[14],I=e[15];return this[0]=t*_+o*y+l*x+p*w,this[1]=i*_+s*y+c*x+f*w,this[2]=n*_+a*y+h*x+g*w,this[3]=r*_+u*y+d*x+m*w,this[4]=t*b+o*v+l*S+p*T,this[5]=i*b+s*v+c*S+f*T,this[6]=n*b+a*v+h*S+g*T,this[7]=r*b+u*v+d*S+m*T,this[8]=t*C+o*N+l*F+p*O,this[9]=i*C+s*N+c*F+f*O,this[10]=n*C+a*N+h*F+g*O,this[11]=r*C+u*N+d*F+m*O,this[12]=t*E+o*D+l*M+p*I,this[13]=i*E+s*D+c*M+f*I,this[14]=n*E+a*D+h*M+g*I,this[15]=r*E+u*D+d*M+m*I,this},multRight:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=this[9],h=this[10],d=this[11],p=this[12],f=this[13],g=this[14],m=this[15],_=e[0],y=e[1],x=e[2],w=e[3],b=e[4],v=e[5],S=e[6],T=e[7],C=e[8],N=e[9],F=e[10],O=e[11],E=e[12],D=e[13],M=e[14],I=e[15];return this[0]=t*_+i*b+n*C+r*E,this[1]=t*y+i*v+n*N+r*D,this[2]=t*x+i*S+n*F+r*M,this[3]=t*w+i*T+n*O+r*I,this[4]=o*_+s*b+a*C+u*E,this[5]=o*y+s*v+a*N+u*D,this[6]=o*x+s*S+a*F+u*M,this[7]=o*w+s*T+a*O+u*I,this[8]=l*_+c*b+h*C+d*E,this[9]=l*y+c*v+h*N+d*D,this[10]=l*x+c*S+h*F+d*M,this[11]=l*w+c*T+h*O+d*I,this[12]=p*_+f*b+g*C+m*E,this[13]=p*y+f*v+g*N+m*D,this[14]=p*x+f*S+g*F+m*M,this[15]=p*w+f*T+g*O+m*I,this},multVecMatrix:function(e){if(3===e.length){const t=e.x,i=e.y,n=e.z,r=1/(t*this[3]+i*this[7]+n*this[11]+this[15]);return e.x=(t*this[0]+i*this[4]+n*this[8]+this[12])*r,e.y=(t*this[1]+i*this[5]+n*this[9]+this[13])*r,e.z=(t*this[2]+i*this[6]+n*this[10]+this[14])*r,e}const t=e.x,i=e.y,n=e.z,r=e.w;return e.x=t*this[0]+i*this[4]+n*this[8]+r*this[12],e.y=t*this[1]+i*this[5]+n*this[9]+r*this[13],e.z=t*this[2]+i*this[6]+n*this[10]+r*this[14],e.w=t*this[3]+i*this[7]+n*this[11]+r*this[15],e},multMatrixVec:function(e){if(3===e.length){const t=e.x,i=e.y,n=e.z,r=1/(t*this[12]+i*this[13]+n*this[14]+this[15]);return e.x=(t*this[0]+i*this[1]+n*this[2]+this[3])*r,e.y=(t*this[4]+i*this[5]+n*this[6]+this[7])*r,e.z=(t*this[8]+i*this[9]+n*this[10]+this[11])*r,e}const t=e.x,i=e.y,n=e.z,r=e.w;return e.x=t*this[0]+i*this[1]+n*this[2]+r*this[3],e.y=t*this[4]+i*this[5]+n*this[6]+r*this[7],e.z=t*this[8]+i*this[9]+n*this[10]+r*this[11],e.w=t*this[12]+i*this[13]+n*this[14]+r*this[15],e},multDirMatrix:function(e){const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[4]+n*this[8],e.y=t*this[1]+i*this[5]+n*this[9],e.z=t*this[2]+i*this[6]+n*this[10],e},multMatrixDir:function(e){const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[1]+n*this[2],e.y=t*this[4]+i*this[5]+n*this[6],e.z=t*this[8]+i*this[9]+n*this[10],e},identity:function(){this[0]=1,this[1]=0,this[2]=0,this[3]=0,this[4]=0,this[5]=1,this[6]=0,this[7]=0,this[8]=0,this[9]=0,this[10]=1,this[11]=0,this[12]=0,this[13]=0,this[14]=0,this[15]=1},translate:function(e){const t=e.x,i=e.y,n=e.z;return this[12]+=this[0]*t+this[4]*i+this[8]*n,this[13]+=this[1]*t+this[5]*i+this[9]*n,this[14]+=this[2]*t+this[6]*i+this[10]*n,this},rotate:function(e){return this.multLeft(s.setQuaternion(e.value)),this},scale:function(e){const t=e.x,i=e.y,n=e.z;return this[0]*=t,this[4]*=i,this[8]*=n,this[1]*=t,this[5]*=i,this[9]*=n,this[2]*=t,this[6]*=i,this[10]*=n,this},getDepth:function(e){const t=e.x,i=e.y,n=e.z,r=1/(t*this[3]+i*this[7]+n*this[11]+this[15]);return(t*this[2]+i*this[6]+n*this[10]+this[14])*r},toString:function(){return this[0]+" "+this[1]+" "+this[2]+" "+this[3]+" "+this[4]+" "+this[5]+" "+this[6]+" "+this[7]+" "+this[8]+" "+this[9]+" "+this[10]+" "+this[11]+" "+this[12]+" "+this[13]+" "+this[14]+" "+this[15]}},Object.defineProperty(o.prototype,"x",{get:function(){const e=new t(0,0,0,0);return function(){return e.set(this[0],this[1],this[2],this[3])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"y",{get:function(){const e=new t(0,0,0,0);return function(){return e.set(this[4],this[5],this[6],this[7])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"z",{get:function(){const e=new t(0,0,0,0);return function(){return e.set(this[8],this[9],this[10],this[11])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"xAxis",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[0],this[1],this[2])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"yAxis",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[4],this[5],this[6])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"zAxis",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[8],this[9],this[10])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"origin",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[12],this[13],this[14])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"submatrix",{get:function(){const e=new n;return function(){return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[4],e[4]=this[5],e[5]=this[6],e[6]=this[8],e[7]=this[9],e[8]=this[10],e}}(),enumerable:!1,configurable:!1}),Object.assign(o,{Identity:new o,Rotation:function(e){return Object.create(this.prototype).setQuaternion(e.value)},Quaternion:function(e){return Object.create(this.prototype).setQuaternion(e)},Matrix3:function(e){return new o(e[0],e[1],e[2],0,e[3],e[4],e[5],0,e[6],e[7],e[8],0,0,0,0,1)},transpose:function(e){return e.copy().transpose()},inverse:function(e){return e.copy().inverse()},multLeft:function(e,t){return e.copy().multLeft(t)},multRight:function(e,t){return e.copy().multRight(t)}});const s=new o;return o})),define("x_ite/Fields/SFMatrix4",["x_ite/Base/X3DField","x_ite/Fields/SFMatrixPrototypeTemplate","x_ite/Fields/SFVec3","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r){"use strict";function o(i,n,o,s){function a(t,i,n,o,s,a,u,l,c,h,d,p,f,g,m,_){switch(arguments.length){case 0:return e.call(this,new r);case 1:return e.call(this,arguments[0]);case 16:return e.call(this,new r(+t,+i,+n,+o,+s,+a,+u,+l,+c,+h,+d,+p,+f,+g,+m,+_))}throw new Error("Invalid arguments.")}a.prototype=Object.assign(Object.create(e.prototype),t(r,o,s),{constructor:a,getTypeName:function(){return i},getType:function(){return n}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});function u(e){Object.defineProperty(a.prototype,e,{get:function(){return this.getValue()[e]},set:function(t){this.getValue()[e]=t,this.addEvent()},enumerable:!0,configurable:!1})}for(let e=0,t=r.prototype.length;e<t;++e)u(e);return a}return{SFMatrix4d:o("SFMatrix4d",n.SFMatrix4d,i.SFVec3d,!0),SFMatrix4f:o("SFMatrix4f",n.SFMatrix4f,i.SFVec3f,!1),VrmlMatrix:o("VrmlMatrix",n.VrmlMatrix,i.SFVec3f,!1)}})),define("x_ite/Fields/SFNodeCache",["x_ite/Fields/SFNode"],(function(){"use strict";const e=new WeakMap;function t(){}return t.prototype={get:function(t){const i=e.get(t);if(i)return i;{const i=new(require("x_ite/Fields/SFNode"))(t);return e.set(t,i),i}}},new t})),define("x_ite/Fields/SFNode",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator","x_ite/Fields/SFNodeCache"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s=Symbol(),a={get:function(e,i){try{const n=e[i];if(void 0!==n)return n;const r=e.getValue().getField(i);if(r.getAccessType()===t.inputOnly)return;return r.valueOf()}catch(e){return}},set:function(e,i,n){if(i in e)return e[i]=n,!0;try{const r=e.getValue().getField(i);return r.getAccessType()!==t.outputOnly&&r.setValue(n),!0}catch(t){return console.error(e,i,t),!1}},has:function(e,t){try{return Boolean(e.getValue().getField(t))}catch(i){return t in e}},ownKeys:function(e){const t=e.getValue(),i=[];if(t)for(const e of t.getFieldDefinitions())i.push(e.name);return i},getOwnPropertyDescriptor:function(e,i){const n=e.getValue();if(n){const r=n.getFieldDefinitions().get(i);if(r)return{value:this.get(e,i),writable:r.accessType!==t.outputOnly,enumerable:!0,configurable:!0}}}};function u(t){const i=new Proxy(this,a);return this[r]=this,this[o]=i,t?(t.addParent(i),e.call(this,t)):e.call(this,null),i}u.prototype=Object.assign(Object.create(e.prototype),{constructor:u,[r]:null,[o]:null,[s]:0,copy:function(e){const t=this[r].getValue();return t?new u(e?t.copy(e):t):new u},getTypeName:function(){return"SFNode"},getType:function(){return t.SFNode},equals:function(e){const t=this[r];return e?t.getValue()===e.getValue():null===t.getValue()},isDefaultValue:function(){return null===this[r].getValue()},set:function(t){const i=this[r],n=i.getValue();n&&(n.removeCloneCount(i[s]),n.removeParent(i[o])),t?(t.addParent(i[o]),t.addCloneCount(i[s]),e.prototype.set.call(i,t)):e.prototype.set.call(i,null)},getNodeTypeName:function(){const e=this[r].getValue();if(e)return e.getTypeName();throw new Error("SFNode.getNodeTypeName: node is null.")},getNodeName:function(){const e=this[r].getValue();if(e)return e.getName();throw new Error("SFNode.getNodeName: node is null.")},getNodeDisplayName:function(){const e=this[r].getValue();if(e)return e.getDisplayName();throw new Error("SFNode.getNodeDisplayName: node is null.")},getNodeType:function(){const e=this[r].getValue();if(e)return e.getType().slice();throw new Error("SFNode.getNodeType: node is null.")},getFieldDefinitions:function(){const e=this[r].getValue();if(e)return e.getFieldDefinitions();throw new Error("SFNode.getFieldDefinitions: node is null.")},addFieldCallback:function(t,i,n){const o=this[r];switch(arguments.length){case 2:return e.prototype.addFieldCallback.apply(o,arguments);case 3:{const e=o.getValue();if(e)return e.getField(t).addFieldCallback(i,n);throw new Error("SFNode.addFieldCallback: node is null.")}}},removeFieldCallback:function(t,i){const n=this[r];switch(arguments.length){case 1:return e.prototype.removeFieldCallback.apply(n,arguments);case 2:{const e=n.getValue();if(e)return e.getField(t).removeFieldCallback(i);throw new Error("SFNode.removeFieldCallback: node is null.")}}},addCloneCount:function(e){const t=this[r],i=t.getValue();t[s]+=e,i&&i.addCloneCount(e)},removeCloneCount:function(e){const t=this[r],i=t.getValue();t[s]-=e,i&&i.removeCloneCount(e)},valueOf:function(){const e=this[r].getValue();return e?n.get(e):null},toStream:function(e){const t=this[r].getValue();t?t.toStream(e):e.string+="NULL"},toVRMLStream:function(e){const t=this[r].getValue();t?t.toVRMLStream(e):e.string+="NULL"},toXMLString:function(){const e=this[r],t={string:""},n=i.Get(t),o=e.getValue();return n.PushExecutionContext(o.getExecutionContext()),e.toXMLStream(t),n.PopExecutionContext(),t.string},toXMLStream:function(e){const t=this[r].getValue();t?t.toXMLStream(e):e.string+="\x3c!-- NULL --\x3e"},dispose:function(){const t=this[r],i=t.getValue();i&&i.dispose(),e.prototype.dispose.call(t)}});for(const e of Reflect.ownKeys(u.prototype))Object.defineProperty(u.prototype,e,{enumerable:!1});return u})),define("x_ite/Fields/SFRotation",["x_ite/Fields/SFVec3","x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r){"use strict";const o=e.SFVec3f;function s(e,i,n,s){switch(arguments.length){case 0:return t.call(this,new r);case 1:return t.call(this,arguments[0]);case 2:return arguments[1]instanceof o?t.call(this,new r(arguments[0].getValue(),arguments[1].getValue())):t.call(this,new r(arguments[0].getValue(),+arguments[1]));case 4:return t.call(this,new r(+e,+i,+n,+s))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(t.prototype),{constructor:s,copy:function(){return new s(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return this.getValue().equals(r.Identity)},getTypeName:function(){return"SFRotation"},getType:function(){return i.SFRotation},set:function(e){this.getValue().assign(e)},setAxis:function(e){this.getValue().setAxis(e.getValue()),this.addEvent()},getAxis:function(){return new o(this.getValue().getAxis().copy())},inverse:function(){return new s(r.inverse(this.getValue()))},multiply:function(e){return new s(r.multRight(this.getValue(),e.getValue()))},multVec:function(e){return new o(this.getValue().multVecRot(e.getValue().copy()))},slerp:function(e,t){return new s(r.slerp(this.getValue(),e.getValue(),t))},toStream:function(e){const t=n.Get(e),i=this.getValue();e.string+=t.DoublePrecision(i.x)+" "+t.DoublePrecision(i.y)+" "+t.DoublePrecision(i.z)+" "+t.DoublePrecision(t.ToUnit("angle",i.angle))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1},l={get:function(){return this.getValue().z},set:function(e){this.getValue().z=+e,this.addEvent()},enumerable:!0,configurable:!1},c={get:function(){return this.getValue().angle},set:function(e){this.getValue().angle=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),Object.defineProperty(s.prototype,"z",l),Object.defineProperty(s.prototype,"angle",c),a.enumerable=!1,u.enumerable=!1,l.enumerable=!1,c.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),Object.defineProperty(s.prototype,"2",l),Object.defineProperty(s.prototype,"3",c),s})),define("x_ite/Fields/SFString",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i){"use strict";const n=/\\(.)/g,r=/([\\"])/g;function o(t){return e.call(this,arguments.length?""+t:"")}Object.assign(o,{unescape:function(e){return e.replace(n,"$1")},escape:function(e){return e.replace(r,"\\$1")}}),o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,copy:function(){return new o(this.getValue())},getTypeName:function(){return"SFString"},getType:function(){return t.SFString},isDefaultValue:function(){return""===this.getValue()},set:function(t){e.prototype.set.call(this,""+t)},valueOf:e.prototype.getValue,toStream:function(e){e.string+='"'+o.escape(this.getValue())+'"'},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){e.string+=i.Get(e).XMLEncode(this.getValue())}});for(const e of Reflect.ownKeys(o.prototype))Object.defineProperty(o.prototype,e,{enumerable:!1});return Object.defineProperty(o.prototype,"length",{get:function(){return this.getValue().length},enumerable:!0,configurable:!1}),o})),define("x_ite/Fields/SFTime",["x_ite/Base/X3DField","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(t){return e.call(this,arguments.length?+t:0)}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,copy:function(){return new i(this.getValue())},getTypeName:function(){return"SFTime"},getType:function(){return t.SFTime},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,+t)},valueOf:e.prototype.getValue,toStream:function(e){e.string+=this.getValue()},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("x_ite/Fields/SFVec4",["x_ite/Base/X3DField","x_ite/Fields/SFVecPrototypeTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector4"],(function(e,t,i,n){"use strict";function r(i,r,o){function s(t,i,r,o){switch(arguments.length){case 0:return e.call(this,new n(0,0,0,0));case 1:return e.call(this,arguments[0]);case 4:return e.call(this,new n(+t,+i,+r,+o))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(e.prototype),t(n,o),{constructor:s,getTypeName:function(){return i},getType:function(){return r}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1},l={get:function(){return this.getValue().z},set:function(e){this.getValue().z=+e,this.addEvent()},enumerable:!0,configurable:!1},c={get:function(){return this.getValue().w},set:function(e){this.getValue().w=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),Object.defineProperty(s.prototype,"z",l),Object.defineProperty(s.prototype,"w",c),a.enumerable=!1,u.enumerable=!1,l.enumerable=!1,c.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),Object.defineProperty(s.prototype,"2",l),Object.defineProperty(s.prototype,"3",c),s}return{SFVec4d:r("SFVec4d",i.SFVec4d,!0),SFVec4f:r("SFVec4f",i.SFVec4f,!1)}})),define("x_ite/Base/X3DArrayField",["x_ite/Base/X3DField"],(function(e){"use strict";function t(t){e.call(this,t)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,at:Array.prototype.at,concat:Array.prototype.concat,every:Array.prototype.every,fill:Array.prototype.fill,filter:Array.prototype.filter,find:Array.prototype.find,findIndex:Array.prototype.findIndex,forEach:Array.prototype.forEach,includes:Array.prototype.includes,indexOf:Array.prototype.indexOf,join:Array.prototype.join,keys:function(){return Array(this.length).keys()},lastIndexOf:Array.prototype.lastIndexOf,map:Array.prototype.map,reduce:Array.prototype.reduce,reduceRight:Array.prototype.reduceRight,slice:Array.prototype.slice,some:Array.prototype.some,values:function(){return this[Symbol.iterator]}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/X3DObjectArrayField",["jquery","x_ite/Base/X3DField","x_ite/Base/X3DArrayField","x_ite/InputOutput/Generator"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s={get:function(e,t){const i=e[t];if(void 0!==i)return i;if("string"==typeof t){const i=e.getValue(),n=+t;return Number.isInteger(n)?(n>=i.length&&e.resize(n+1),i[n].valueOf()):e[t]}},set:function(e,t,i){if(t in e)return e[t]=i,!0;const n=e.getValue(),r=+t;return r>=n.length&&e.resize(r+1),n[r].setValue(i),!0},has:function(e,t){return Number.isInteger(+t)?t<e.getValue().length:t in e},ownKeys:function(e){return Object.keys(e.getValue())},getOwnPropertyDescriptor:function(e,t){if("string"!=typeof t)return;const i=+t;return Number.isInteger(i)&&i<e.getValue().length?Object.getOwnPropertyDescriptor(e.getValue(),t):void 0}};function a(e){const t=new Proxy(this,s);return i.call(this,[]),this[r]=this,this[o]=t,e[0]instanceof Array&&(e=e[0]),a.prototype.push.apply(this,e),t}a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,[r]:null,[o]:null,[Symbol.iterator]:function*(){const e=this[r].getValue();for(const t of e)yield t.valueOf()},getTarget:function(){return this[r]},copy:function(){const e=this[r],t=e.create(),i=e.getValue();return a.prototype.push.apply(t,i),t.setModificationTime(0),t},equals:function(e){const t=this[r].getValue(),i=e.getValue(),n=t.length;if(t===i)return!0;if(n!==i.length)return!1;for(let e=0;e<n;++e)if(!t[e].equals(i[e]))return!1;return!0},set:function(e){const i=this[r];i.resize(e.length,void 0,!0);const n=i.getValue();for(let i=0,r=e.length;i<r;++i)n[i].set(e[i]instanceof t?e[i].getValue():e[i])},isDefaultValue:function(){return 0===this.length},setValue:function(e){const t=this[r];t.set(e instanceof a?e.getValue():e),t.addEvent()},unshift:function(e){const t=this[r],i=t.getValue();for(let e=arguments.length-1;e>=0;--e){const n=new(t.getSingleType());n.setValue(arguments[e]),t.addChildObject(n),i.unshift(n)}return t.addEvent(),i.length},shift:function(){const e=this[r],t=e.getValue();if(t.length){const i=t.shift();return e.removeChildObject(i),e.addEvent(),i.valueOf()}},push:function(e){const t=this[r],i=t.getValue();for(const e of arguments){const n=new(t.getSingleType());n.setValue(e),t.addChildObject(n),i.push(n)}return t.addEvent(),i.length},pop:function(){const e=this[r],t=e.getValue();if(t.length){const i=t.pop();return e.removeChildObject(i),e.addEvent(),i.valueOf()}},splice:function(e,t){const i=this[r],n=i.getValue();e>n.length&&(e=n.length),e+t>n.length&&(t=n.length-e);const o=i.erase(e,e+t);return arguments.length>2&&i.insert(e,arguments,2,arguments.length),o},insert:function(e,t,i,n){const o=this[r],s=[e,0];for(let e=i;e<n;++e){const i=new(o.getSingleType());i.setValue(t[e]),o.addChildObject(i),s.push(i)}Array.prototype.splice.apply(o.getValue(),s),o.addEvent()},find:function(t,i,n){const o=this[r].getValue();if(e.isFunction(n)){for(let e=t;e<i;++e)if(n(o[e].valueOf()))return e;return i}for(let e=t;e<i;++e)if(o[e].equals(n))return e;return i},remove:function(t,i,n){const o=this[r],s=o.getValue();if(e.isFunction(n)){if((t=o.find(t,i,n))!==i)for(let e=t;++e<i;){const i=s[e];if(!n(i.valueOf())){const n=s[t];s[t++]=i,s[e]=n}}return t!==i&&o.addEvent(),t}if((t=o.find(t,i,n))!==i)for(let e=t;++e<i;){const i=s[e];if(!i.equals(n)){const n=s[t];s[t++]=i,s[e]=n}}return t!==i&&o.addEvent(),t},erase:function(e,t){const i=this[r],n=i.getValue().splice(e,t-e);for(const e of n)i.removeChildObject(e);return i.addEvent(),n.map((function(e){return e.valueOf()}))},resize:function(e,t,i){const n=this[r],o=n.getValue();if(e<o.length){for(let t=e,i=o.length;t<i;++t)n.removeChildObject(o[t]);o.length=e,i||n.addEvent()}else if(e>o.length){for(let i=o.length;i<e;++i){const e=new(n.getSingleType());void 0!==t&&e.setValue(t),n.addChildObject(e),o.push(e)}i||n.addEvent()}},addChildObject:function(e){e.addParent(this[o])},removeChildObject:function(e){e.removeParent(this[o])},toStream:function(e){const t=this[r],i=t.getValue(),o=n.Get(e);switch(i.length){case 0:e.string+="[ ]";break;case 1:o.PushUnitCategory(t.getUnit()),i[0].toStream(e),o.PopUnitCategory();break;default:o.PushUnitCategory(t.getUnit()),e.string+="[\n",o.IncIndent();for(let t=0,n=i.length-1;t<n;++t)e.string+=o.Indent(),i[t].toStream(e),e.string+=",\n";e.string+=o.Indent(),i.at(-1).toStream(e),e.string+="\n",o.DecIndent(),e.string+=o.Indent(),e.string+="]",o.PopUnitCategory()}},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){const t=this[r];if(t.length){const i=n.Get(e),r=t.getValue();i.PushUnitCategory(t.getUnit());for(const t of r)t.toXMLStream(e),e.string+=", ";r.at(-1).toXMLStream(e),i.PopUnitCategory()}},dispose:function(){const e=this[r],t=e.getValue();for(const i of t)e.removeChildObject(i);t.length=0,i.prototype.dispose.call(e)}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});return Object.defineProperty(a.prototype,"length",{get:function(){return this[r].getValue().length},set:function(e){this[r].resize(e)},enumerable:!1,configurable:!1}),a})),define("x_ite/Base/X3DTypedArrayField",["x_ite/Base/X3DArrayField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator","standard/Math/Algorithm"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s=Symbol(),a={get:function(e,t){const i=e[t];if(void 0!==i)return i;if("string"==typeof t){const i=+t;if(Number.isInteger(i)){const t=e.getComponents(),n=e.getValueType();let r=e.getValue();if(i>=e[s]&&(r=e.resize(i+1)),1===t)return n(r[i]);{const r=new n,o=r.getValue(),s=i*t;return r.addEvent=c.bind(e,s,o,t),r.getValue=l.bind(e,s,o,t),r}}return e[t]}},set:function(e,t,i){if(t in e)return e[t]=i,!0;const n=e.getComponents();let r=+t,o=e.getValue();if(r>=e[s]&&(o=e.resize(r+1)),1===n)o[r]=i;else{r*=n;for(let e=0;e<n;++e,++r)o[r]=i[e]}return e.addEvent(),!0},has:function(e,t){return Number.isInteger(+t)?t<e[s]:t in e},ownKeys:function(e){const t=[];for(let i=0,n=e[s];i<n;++i)t.push(String(i));return t},getOwnPropertyDescriptor:function(e,t){if("string"!=typeof t)return;const i=+t;return Number.isInteger(i)&&i<e[s]?Object.getOwnPropertyDescriptor(e.getValue(),t):void 0}};function u(t){return e.call(this,new(this.getArrayType())(2)),this[r]=this,this[o]=[],t[0]instanceof Array&&(t=t[0]),u.prototype.push.apply(this,t),new Proxy(this,a)}u.prototype=Object.assign(Object.create(e.prototype),{constructor:u,[r]:null,[o]:null,[s]:0,[Symbol.iterator]:function*(){const e=this[r],t=e.getValue(),i=e.getComponents(),n=e.getValueType(),o=e[s];if(1===i)for(let e=0;e<o;++e)yield n(t[e]);else for(let t=0;t<o;++t){const r=new n,o=r.getValue(),s=t*i;r.addEvent=c.bind(e,s,o,i),r.getValue=l.bind(e,s,o,i),yield r}},getTarget:function(){return this[r]},copy:function(){const t=this[r],i=t.getValue(),n=t.create(),o=new(t.getArrayType())(i);return n[s]=t[s],e.prototype.set.call(n,o,t[s]),n.setModificationTime(0),n},equals:function(e){if(this===e)return!0;const t=this[r],i=t[s];if(i!==e[s])return!1;const n=t.getValue(),o=e.getValue();for(let e=0,r=i*t.getComponents();e<r;++e)if(n[e]!==o[e])return!1;return!0},assign:function(e){const t=this[r];t.set(e.getValue(),e.length),t.addEvent()},set:function(e,t){const i=this[r],n=i.getComponents(),o=i[s];let a=i.getValue(),u=void 0!==t?t*n:e.length;const l=u%n;l&&(u-=l,console.warn("Array length must be multiple of components size, which is "+n+".")),u/=n,a.length<e.length?(a=i.grow(e.length),a.set(e),l&&a.fill(0,u*n,u*n+l)):(a.set(e),u<o&&a.fill(0,u*n,o*n)),i[s]=u},isDefaultValue:function(){return 0===this[s]},setValue:function(e){const t=this[r];e instanceof t.constructor?t.assign(e):(t.set(e),t.addEvent())},unshift:function(e){const t=this[r],i=t.getComponents(),n=t[s],o=arguments.length,a=t.grow((n+o)*i);if(a.copyWithin(o*i,0,n*i),1===i)a.set(arguments,0);else for(let e=0,t=0;t<o;++t){const n=arguments[t];for(let t=0;t<i;++t,++e)a[e]=n[t]}return t[s]+=o,t.addEvent(),a.length},shift:function(){const e=this[r],t=e[s];if(t){const n=e.getValue(),r=e.getComponents(),a=e.getValueType(),u=t-1;if(1===r)var i=a(n[0]);else{const t=e[o];for(let e=0;e<r;++e)t[e]=n[e];i=Object.create(a.prototype);a.apply(i,t)}return n.copyWithin(0,r,t*r),n.fill(0,r*u,t*r),e[s]=u,e.addEvent(),i}},push:function(e){const t=this[r],i=t.getComponents(),n=t[s],o=arguments.length,a=t.grow((n+o)*i);if(1===i)a.set(arguments,n);else for(let e=n*i,t=0;t<o;++t){const n=arguments[t];for(let t=0;t<i;++t,++e)a[e]=n[t]}return t[s]+=o,t.addEvent(),t[s]},pop:function(){const e=this[r],t=e[s];if(t){const n=e.getValue(),r=e.getComponents(),a=e.getValueType(),u=t-1;if(1===r)var i=a(n[t-1]);else{const t=e[o];for(let e=0,i=u*r;e<r;++e,++i)t[e]=n[i];i=Object.create(a.prototype);a.apply(i,t)}return n.fill(0,u*r,t*r),e[s]=u,e.addEvent(),i}},splice:function(e,t){const i=this[r],n=i[s];e>n&&(e=n),e+t>n&&(t=n-e);const o=i.erase(e,e+t);return arguments.length>2&&i.spliceInsert(e,Array.prototype.splice.call(arguments,2)),i.addEvent(),o},spliceInsert:function(e,t){const i=this[r],n=i.getComponents(),o=i[s],a=t.length,u=i.grow((o+a)*n);if(e*=n,u.copyWithin(e+a*n,e,o*n),1===n)u.set(t,e);else for(let i=0,r=e;i<a;++i){const e=t[i];for(let t=0;t<n;++t,++r)u[r]=e[t]}i[s]+=a},insert:function(e,t,i,n){const o=this[r],a=o[s],u=t.getValue(),l=o.getComponents(),c=n-i,h=o.grow((a+c)*l);for(e*=l,i*=l,n*=l,h.copyWithin(e+c*l,e,a*l);i<n;++e,++i)h[e]=u[i];o[s]+=c,o.addEvent()},erase:function(e,t){const i=this[r],n=i.getValue(),o=i.getComponents(),a=t-e,u=i[s],l=u-a,c=i.create(),h=c.grow(a*o);t*=o;for(let i=0,r=e*=o;r<t;++i,++r)h[i]=n[r];return n.copyWithin(e,t,u*o),n.fill(0,l*o,u*o),i[s]=l,c[s]=a,i.addEvent(),c.slice()},resize:function(e,t,i){const n=this[r],o=n[s],a=n.getComponents();let u=n.getValue();if(e<o)u.fill(0,e*a,o*a),i||n.addEvent();else if(e>o){if(u=n.grow(e*a),void 0!==t)if(1===a)u.fill(t,o*a,e*a);else for(let i=o*a,n=e*a;i<n;)for(let e=0;e<a;++e,++i)u[i]=t[e];i||n.addEvent()}return n[s]=e,u},grow:function(t){const i=this[r],o=i.getValue();if(t<o.length)return o;const s=n.nextPowerOfTwo(t),a=new(i.getArrayType())(s);return a.set(o),e.prototype.set.call(i,a),a},shrinkToFit:function(){const t=this[r],i=t.getValue(),n=t[s]*t.getComponents();if(i.length==n)return i;const o=i.subarray(0,n);return e.prototype.set.call(t,o),o},toStream:function(e){const t=this[r],n=i.Get(e),o=t.getValue(),a=t[s],u=t.getComponents(),l=new(t.getSingleType());switch(a){case 0:e.string+="[ ]";break;case 1:if(n.PushUnitCategory(t.getUnit()),1===u)l.set(o[0]),l.toStream(e);else{for(let e=0,t=0;e<u;++e,++t)l[e]=o[t];l.toStream(e)}n.PopUnitCategory();break;default:if(n.PushUnitCategory(t.getUnit()),e.string+="[\n",n.IncIndent(),1===u){for(let t=0,i=a-1;t<i;++t)e.string+=n.Indent(),l.set(o[t*u]),l.toStream(e),e.string+=",\n";e.string+=n.Indent(),l.set(o[(a-1)*u]),l.toStream(e),e.string+="\n"}else{for(let t=0,i=a-1;t<i;++t){e.string+=n.Indent();for(let e=0,i=t*u;e<u;++e,++i)l[e]=o[i];l.toStream(e),e.string+=",\n"}e.string+=n.Indent();for(let e=0,t=(a-1)*u;e<u;++e,++t)l[e]=o[t];l.toStream(e),e.string+="\n"}n.DecIndent(),e.string+=n.Indent(),e.string+="]",n.PopUnitCategory()}},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){const t=this[r],n=t[s];if(n){const r=i.Get(e),o=t.getValue(),s=t.getComponents(),a=new(t.getSingleType());if(r.PushUnitCategory(t.getUnit()),1===s){for(let t=0,i=n-1;t<i;++t)a.set(o[t*s]),a.toXMLStream(e),e.string+=", ";a.set(o[(n-1)*s]),a.toXMLStream(e)}else{for(let t=0,i=n-1;t<i;++t){for(let e=0,i=t*s;e<s;++e,++i)a[e]=o[i];a.toXMLStream(e),e.string+=", "}for(let e=0,t=(n-1)*s;e<s;++e,++t)a[e]=o[t];a.toXMLStream(e)}r.PopUnitCategory()}},dispose:function(){e.prototype.dispose.call(this[r])}});for(const e of Reflect.ownKeys(u.prototype))Object.defineProperty(u.prototype,e,{enumerable:!1});function l(e,t,i){const n=this.getValue(),r=this[o];for(let t=0;t<i;++t,++e)r[t]=n[e];return t.set.apply(t,r),t}function c(e,t,i){const n=this.getValue();for(let r=0;r<i;++r,++e)n[e]=t[r];this.addEvent()}return Object.defineProperty(u.prototype,"length",{get:function(){return this[s]},set:function(e){this[r].resize(e)},enumerable:!1,configurable:!1}),u})),define("x_ite/Fields/ArrayFields",["x_ite/Fields/SFBool","x_ite/Fields/SFColor","x_ite/Fields/SFColorRGBA","x_ite/Fields/SFDouble","x_ite/Fields/SFFloat","x_ite/Fields/SFImage","x_ite/Fields/SFInt32","x_ite/Fields/SFMatrix3","x_ite/Fields/SFMatrix4","x_ite/Fields/SFNode","x_ite/Fields/SFRotation","x_ite/Fields/SFString","x_ite/Fields/SFTime","x_ite/Fields/SFVec2","x_ite/Fields/SFVec3","x_ite/Fields/SFVec4","x_ite/Base/X3DObjectArrayField","x_ite/Base/X3DTypedArrayField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x){"use strict";const w=a.SFMatrix3d,b=a.SFMatrix3f,v=u.SFMatrix4d,S=u.SFMatrix4f,T=p.SFVec2d,C=p.SFVec2f,N=f.SFVec3d,F=f.SFVec3f,O=g.SFVec4d,E=g.SFVec4f,D=Symbol();function M(e){return m.call(this,arguments)}M.prototype=Object.assign(Object.create(m.prototype),{constructor:M,[D]:0,getSingleType:function(){return l},getValueType:function(){return l},getArrayType:function(){return Array},getComponents:function(){return 1},getTypeName:function(){return"MFNode"},getType:function(){return y.MFNode},copy:function(e){if(e){const t=new M;for(const i of this.getValue())t.push(i.copy(e));return t.setModificationTime(0),t}return m.prototype.copy.call(this)},addCloneCount:function(e){this[D]+=e;for(const t of this.getValue())t.addCloneCount(e)},removeCloneCount:function(e){this[D]-=e;for(const t of this.getValue())t.removeCloneCount(e)},addChildObject:function(e){m.prototype.addChildObject.call(this,e),e.addCloneCount(this[D])},removeChildObject:function(e){m.prototype.removeChildObject.call(this,e),e.removeCloneCount(this[D])},toStream:function(e){const t=this.getTarget(),i=t.getValue(),n=x.Get(e);switch(i.length){case 0:e.string+="[ ]";break;case 1:n.PushUnitCategory(t.getUnit()),i[0].toStream(e),n.PopUnitCategory();break;default:n.PushUnitCategory(t.getUnit()),e.string+="[\n",n.IncIndent();for(let t=0,r=i.length;t<r;++t)e.string+=n.Indent(),i[t].toStream(e),e.string+="\n";n.DecIndent(),e.string+=n.Indent(),e.string+="]",n.PopUnitCategory()}},toVRMLString:function(){this.addCloneCount(1);const e=m.prototype.toVRMLString.call(this);return this.removeCloneCount(1),e},toVRMLStream:function(e){const t=this.getTarget().getValue(),i=x.Get(e);switch(t.length){case 0:e.string+="[ ]";break;case 1:i.EnterScope(),t[0].toVRMLStream(e),i.LeaveScope();break;default:i.EnterScope(),e.string+="[\n",i.IncIndent();for(const n of t)e.string+=i.Indent(),n.toVRMLStream(e),e.string+="\n";i.DecIndent(),e.string+=i.Indent(),e.string+="]",i.LeaveScope()}},toXMLString:function(){this.addCloneCount(1);const e=m.prototype.toXMLString.call(this);return this.removeCloneCount(1),e},toXMLStream:function(e){const t=x.Get(e),i=this.length;if(i){t.EnterScope();const n=this.getValue();for(let r=0,o=i-1;r<o;++r){const i=n[r].getValue();if(i)i.toXMLStream(e),e.string+="\n";else{e.string+=t.Indent(),e.string+="<",e.string+="NULL";const i=t.ContainerField();i&&(e.string+=" ",e.string+="containerField='",e.string+=t.XMLEncode(i.getName()),e.string+="'"),e.string+="/>"}}const r=n.at(-1).getValue();if(r)r.toXMLStream(e);else{e.string+=t.Indent(),e.string+="<",e.string+="NULL";const i=t.ContainerField();i&&(e.string+=" ",e.string+="containerField='",e.string+=t.XMLEncode(i.getName()),e.string+="'")}t.LeaveScope()}},dispose:function(){this.resize(0),m.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(M.prototype))Object.defineProperty(M.prototype,e,{enumerable:!1});function I(e){return m.call(this,arguments)}I.prototype=Object.assign(Object.create(m.prototype),{constructor:I,getValueType:function(){return String},getSingleType:function(){return h},getArrayType:function(){return Array},getComponents:function(){return 1},getTypeName:function(){return"MFString"},getType:function(){return y.MFString},toXMLStream:function(e){const t=this.length;if(t){const i=this.getValue();for(let n=0,r=t-1;n<r;++n)e.string+='"',i[n].toXMLStream(e),e.string+='"',e.string+=", ";e.string+='"',i.at(-1).toXMLStream(e),e.string+='"'}}});for(const e of Reflect.ownKeys(I.prototype))Object.defineProperty(I.prototype,e,{enumerable:!1});function V(e,t,i,n,r,o){function s(e){return _.call(this,arguments)}s.prototype=Object.assign(Object.create(_.prototype),{constructor:s,getSingleType:function(){return i},getValueType:function(){return n},getArrayType:function(){return r},getComponents:function(){return o},getTypeName:function(){return e},getType:function(){return t}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});return s}function B(e){return e}const A={MFBool:V("MFBool",y.MFBool,e,Boolean,Uint8Array,1),MFColor:V("MFColor",y.MFColor,t,t,Float32Array,3),MFColorRGBA:V("MFColorRGBA",y.MFColorRGBA,i,i,Float32Array,4),MFDouble:V("MFDouble",y.MFDouble,n,B,Float64Array,1),MFFloat:V("MFFloat",y.MFFloat,r,B,Float32Array,1),MFImage:function(e,t,i,n,r,o){function s(e){return m.call(this,arguments)}s.prototype=Object.assign(Object.create(m.prototype),{constructor:s,getSingleType:function(){return i},getValueType:function(){return n},getArrayType:function(){return r},getComponents:function(){return o},getTypeName:function(){return e},getType:function(){return t}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});return s}("MFImage",y.MFImage,o,o,Array,1),MFInt32:V("MFInt32",y.MFInt32,s,B,Int32Array,1),MFMatrix3d:V("MFMatrix3d",y.MFMatrix3d,w,w,Float64Array,9),MFMatrix3f:V("MFMatrix3f",y.MFMatrix3f,b,b,Float32Array,9),MFMatrix4d:V("MFMatrix4d",y.MFMatrix4d,v,v,Float64Array,16),MFMatrix4f:V("MFMatrix4f",y.MFMatrix4f,S,S,Float32Array,16),MFNode:M,MFRotation:V("MFRotation",y.MFRotation,c,c,Float64Array,4),MFString:I,MFTime:V("MFTime",y.MFTime,d,B,Float64Array,1),MFVec2d:V("MFVec2d",y.MFVec2d,T,T,Float64Array,2),MFVec2f:V("MFVec2f",y.MFVec2f,C,C,Float32Array,2),MFVec3d:V("MFVec3d",y.MFVec3d,N,N,Float64Array,3),MFVec3f:V("MFVec3f",y.MFVec3f,F,F,Float32Array,3),MFVec4d:V("MFVec4d",y.MFVec4d,O,O,Float64Array,4),MFVec4f:V("MFVec4f",y.MFVec4f,E,E,Float32Array,4)};return A})),define("x_ite/Fields",["x_ite/Fields/SFBool","x_ite/Fields/SFColor","x_ite/Fields/SFColorRGBA","x_ite/Fields/SFDouble","x_ite/Fields/SFFloat","x_ite/Fields/SFImage","x_ite/Fields/SFInt32","x_ite/Fields/SFMatrix3","x_ite/Fields/SFMatrix4","x_ite/Fields/SFNode","x_ite/Fields/SFRotation","x_ite/Fields/SFString","x_ite/Fields/SFTime","x_ite/Fields/SFVec2","x_ite/Fields/SFVec3","x_ite/Fields/SFVec4","x_ite/Fields/ArrayFields"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m){"use strict";return Object.assign({SFBool:e,SFColor:t,SFColorRGBA:i,SFDouble:n,SFFloat:r,SFImage:o,SFInt32:s,SFMatrix3d:a.SFMatrix3d,SFMatrix3f:a.SFMatrix3f,SFMatrix4d:u.SFMatrix4d,SFMatrix4f:u.SFMatrix4f,SFNode:l,SFRotation:c,SFString:h,SFTime:d,SFVec2d:p.SFVec2d,SFVec2f:p.SFVec2f,SFVec3d:f.SFVec3d,SFVec3f:f.SFVec3f,SFVec4d:g.SFVec4d,SFVec4f:g.SFVec4f,VrmlMatrix:u.VrmlMatrix},m)})),define("x_ite/Base/X3DBaseNode",["x_ite/Base/X3DEventObject","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/FieldArray","x_ite/Fields","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";const s=Symbol(),a=Symbol(),u=Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions"),l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol("X3DBaseNode.set_live__"),m=Symbol(),_=Symbol();function y(t){if(!this[s]){e.call(this,t.getBrowser()),this[s]=t,this[a]=[o.X3DBaseNode],this[l]=new n,this[c]=new n,this[h]=new Map,this[d]=new n,this[f]=!0,this[p]=!1,this[m]=!1,this[_]=0,this.canUserDefinedFields()&&(this[u]=new i(this[u]));for(const e of this[u])this.addField(e);this.addChildObjects("name_changed",new r.SFTime,"typeName_changed",new r.SFTime,"fields_changed",new r.SFTime,"cloneCount_changed",new r.SFTime)}}y.prototype=Object.assign(Object.create(e.prototype),{constructor:y,[u]:new i([]),setName:function(t){e.prototype.setName.call(this,t),this._name_changed=this.getBrowser().getCurrentTime()},getMainScene:function(){let e=this[s].getScene();for(;!e.isMainScene();)e=e.getScene();return e},getScene:function(){let e=this[s];for(;!e.isScene();)e=e.getExecutionContext();return e},getExecutionContext:function(){return this[s]},setExecutionContext:function(e){this[s]=e},addType:function(e){this[a].push(e)},getType:function(){return this[a]},getInnerNode:function(){return this},isLive:function(){function e(){return this._isLive}return function(){return Object.defineProperty(this,"isLive",{value:e,enumerable:!1,configurable:!0}),this.addChildObjects("isLive",new r.SFBool(this.getLiveState())),this._isLive.removeParent(this),this[s]!==this&&this[s].isLive().addInterest(g,this),this.getOuterNode&&this.getOuterNode()&&this.getOuterNode().isLive().addInterest(g,this),this.isLive()}}(),setLive:function(e){this[f]=e.valueOf(),this[g]()},getLive:function(){return this[f]},getLiveState:function(){let e=this.getLive(),t=!0;return this!==this[s]&&(t=this[s].isLive().getValue()),this.getOuterNode&&this.getOuterNode()&&(t=t||this.getOuterNode().isLive().getValue()),e&&t},[g]:function(){const e=this.getLiveState(),t=this.isLive();if(e){if(t.getValue())return;t.set(!0),t.processEvent()}else t.getValue()&&(t.set(!1),t.processEvent())},create:function(e){return new this.constructor(e||this[s])},copy:function(e){const t=this.create(e);if(this.canUserDefinedFields())for(const e of this[u])t.getFields().has(e.name)||t.addUserDefinedField(e.accessType,e.name,e.value.copy());for(const e of this[l])t.getFields().get(e.getName()).assign(e);return t.setup(),t},setup:function(){if(!this[p]){this[p]=!0;for(const e of this[l])e.setTainted(!1);this.initialize()}},isInitialized:function(){return this[p]},initialize:function(){},addChildObjects:function(e,t){for(let e=0,t=arguments.length;e<t;e+=2)this.addChildObject(arguments[e],arguments[e+1])},addChildObject:function(e,t){t.addParent(this),t.setName(e),Object.defineProperty(this,"_"+e,{get:function(){return t},set:function(e){t.setValue(e)},enumerable:!1,configurable:!1})},getFieldDefinitions:function(){return this[u]},getFieldsAreEnumerable:function(){return!1},addField:function(e){const t=e.accessType,i=e.name,n=e.value.copy();n.setTainted(!this[p]),n.addParent(this),n.setName(i),n.setAccessType(t),this[l].add(i,n),this[c].add(i,n),Object.defineProperty(this,"_"+i,{get:function(){return n},set:function(e){n.setValue(e)},enumerable:this.getFieldsAreEnumerable(),configurable:!0}),this.getPrivate()||n.addCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime()},getField:function(){const e=/^set_(.*?)$/,t=/^(.*?)_changed$/;return function(i){const n=this[l].get(i)||this[h].get(i);if(n)return n;const r=i.match(e);if(r){const e=this[l].get(r[1])||this[h].get(r[1]);if(e&&e.getAccessType()===o.inputOutput)return e}else{const e=i.match(t);if(e){const t=this[l].get(e[1])||this[h].get(e[1]);if(t&&t.getAccessType()===o.inputOutput)return t}}throw new Error("Unknown field '"+i+"' in node class "+this.getTypeName()+".")}}(),addAlias:function(e,t){this[h].set(e,t),Object.defineProperty(this,"_"+e,{get:function(){return t},set:function(e){t.setValue(e)},enumerable:!0,configurable:!1})},removeField:function(e){const t=this[c].get(e);t&&(t.removeParent(this),this[l].remove(e),this[c].remove(e),delete this["_"+t.getName()],this.getPrivate()||t.removeCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime())},canUserDefinedFields:function(){return!1},addUserDefinedField:function(e,i,n){this[d].has(i)&&this.removeUserDefinedField(i),n.setTainted(!this[p]),n.addParent(this),n.setName(i),n.setAccessType(e),this[u].add(i,new t(e,i,n)),this[l].add(i,n),this[d].add(i,n),this.getPrivate()||n.addCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime()},removeUserDefinedField:function(e){const t=this[d].get(e);t&&(t.removeParent(this),this[l].remove(e),this[d].remove(e),this[u].remove(e),this.getPrivate()||t.removeCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime())},getUserDefinedFields:function(){return this[d]},getPredefinedFields:function(){return this[c]},getChangedFields:function(e){const t=[];if(e)for(const e of this[d])t.push(e);for(const i of this[c])if(e&&(i.getInputRoutes().size||i.getOutputRoutes().size))t.push(i);else{if(0===i.getReferences().size){if(!i.isInitializable())continue;if(this.isDefaultValue(i))continue}t.push(i)}return t},isDefaultValue:function(e){const t=this.getFieldDefinitions().get(e.getName());return t?t.value.equals(e):!e.getModificationTime()},getFields:function(){return this[l]},getSourceText:function(){return null},hasRoutes:function(){for(const e of this[l]){if(e.getInputRoutes().size)return!0;if(e.getOutputRoutes().size)return!0}return!1},getPrivate:function(){return this[m]},setPrivate:function(e){if(this[m]=e,e)for(const e of this[l])e.removeCloneCount(1);else for(const e of this[l])e.addCloneCount(1)},getCloneCount:function(){return this[_]},addCloneCount:function(e){0!==e&&(this[_]+=e,this._cloneCount_changed=this.getBrowser().getCurrentTime(),this[s]._sceneGraph_changed=this.getBrowser().getCurrentTime())},removeCloneCount:function(e){0!==e&&(this[_]-=e,this._cloneCount_changed=this.getBrowser().getCurrentTime(),this[s]._sceneGraph_changed=this.getBrowser().getCurrentTime())},dispose:function(){for(const e of this.getFields())e.dispose();e.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(y.prototype))Object.defineProperty(y.prototype,e,{enumerable:!1});return y})),define("x_ite/Browser/VERSION",[],(function(){return"5.0.2"})),define("x_ite/DEBUG",[],(function(){"use strict";return!1})),
|
|
32
|
+
function(e){var t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w="sizzle"+1*new Date,b=e.document,v=0,S=0,T=ue(),C=ue(),N=ue(),F=ue(),O=function(e,t){return e===t&&(h=!0),0},E={}.hasOwnProperty,D=[],M=D.pop,I=D.push,V=D.push,B=D.slice,A=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",L="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",k="\\[[\\x20\\t\\r\\n\\f]*("+L+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+R+"*\\]",U=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+k+")*)|.*)\\)|)",X=new RegExp(R+"+","g"),z=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),j=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),G=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),q=new RegExp(R+"|>"),H=new RegExp(U),W=new RegExp("^"+L+"$"),Y={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+k),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},$=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ie=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},se=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{V.apply(D=B.call(b.childNodes),b.childNodes),D[b.childNodes.length].nodeType}catch(e){V={apply:D.length?function(e,t){I.apply(e,B.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}function ae(e,t,n,r){var o,a,l,c,h,f,_,y=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!r&&(d(t),t=t||p,g)){if(11!==b&&(h=J.exec(e)))if(o=h[1]){if(9===b){if(!(l=t.getElementById(o)))return n;if(l.id===o)return n.push(l),n}else if(y&&(l=y.getElementById(o))&&x(t,l)&&l.id===o)return n.push(l),n}else{if(h[2])return V.apply(n,t.getElementsByTagName(e)),n;if((o=h[3])&&i.getElementsByClassName&&t.getElementsByClassName)return V.apply(n,t.getElementsByClassName(o)),n}if(i.qsa&&!F[e+" "]&&(!m||!m.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(_=e,y=t,1===b&&(q.test(e)||G.test(e))){for((y=ee.test(e)&&_e(t.parentNode)||t)===t&&i.scope||((c=t.getAttribute("id"))?c=c.replace(ne,re):t.setAttribute("id",c=w)),a=(f=s(e)).length;a--;)f[a]=(c?"#"+c:":scope")+" "+xe(f[a]);_=f.join(",")}try{return V.apply(n,y.querySelectorAll(_)),n}catch(t){F(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return u(e.replace(z,"$1"),t,n,r)}function ue(){var e=[];return function t(i,r){return e.push(i+" ")>n.cacheLength&&delete t[e.shift()],t[i+" "]=r}}function le(e){return e[w]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function he(e,t){for(var i=e.split("|"),r=i.length;r--;)n.attrHandle[i[r]]=t}function de(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le((function(t){return t=+t,le((function(i,n){for(var r,o=e([],i.length,t),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))}))}))}function _e(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in i=ae.support={},o=ae.isXML=function(e){var t=e&&e.namespaceURI,i=e&&(e.ownerDocument||e).documentElement;return!$.test(t||i&&i.nodeName||"HTML")},d=ae.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:b;return s!=p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,g=!o(p),b!=p&&(r=p.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),i.scope=ce((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),i.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),i.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),i.getElementsByClassName=Q.test(p.getElementsByClassName),i.getById=ce((function(e){return f.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),i.getById?(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var i=t.getElementById(e);return i?[i]:[]}}):(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var i,n,r,o=t.getElementById(e);if(o){if((i=o.getAttributeNode("id"))&&i.value===e)return[o];for(r=t.getElementsByName(e),n=0;o=r[n++];)if((i=o.getAttributeNode("id"))&&i.value===e)return[o]}return[]}}),n.find.TAG=i.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):i.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},_=[],m=[],(i.qsa=Q.test(p.querySelectorAll))&&(ce((function(e){var t;f.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+P+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(i.matchesSelector=Q.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce((function(e){i.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),_.push("!=",U)})),m=m.length&&new RegExp(m.join("|")),_=_.length&&new RegExp(_.join("|")),t=Q.test(f.compareDocumentPosition),x=t||Q.test(f.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},O=t?function(e,t){if(e===t)return h=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!i.sortDetached&&t.compareDocumentPosition(e)===n?e==p||e.ownerDocument==b&&x(b,e)?-1:t==p||t.ownerDocument==b&&x(b,t)?1:c?A(c,e)-A(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return h=!0,0;var i,n=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e==p?-1:t==p?1:r?-1:o?1:c?A(c,e)-A(c,t):0;if(r===o)return de(e,t);for(i=e;i=i.parentNode;)s.unshift(i);for(i=t;i=i.parentNode;)a.unshift(i);for(;s[n]===a[n];)n++;return n?de(s[n],a[n]):s[n]==b?-1:a[n]==b?1:0},p):p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(d(e),i.matchesSelector&&g&&!F[t+" "]&&(!_||!_.test(t))&&(!m||!m.test(t)))try{var n=y.call(e,t);if(n||i.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){F(t,!0)}return ae(t,p,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&d(e),x(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var r=n.attrHandle[t.toLowerCase()],o=r&&E.call(n.attrHandle,t.toLowerCase())?r(e,t,!g):void 0;return void 0!==o?o:i.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(ne,re)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,n=[],r=0,o=0;if(h=!i.detectDuplicates,c=!i.sortStable&&e.slice(0),e.sort(O),h){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return c=null,e},r=ae.getText=function(e){var t,i="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)i+=r(t);return i},n=ae.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ie),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ie),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&H.test(i)&&(t=s(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ie).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+R+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var r=ae.attr(n,e);return null==r?"!="===t:!t||(r+="","="===t?r===i:"!="===t?r!==i:"^="===t?i&&0===r.indexOf(i):"*="===t?i&&r.indexOf(i)>-1:"$="===t?i&&r.slice(-i.length)===i:"~="===t?(" "+r.replace(X," ")+" ").indexOf(i)>-1:"|="===t&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,u){var l,c,h,d,p,f,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,_=a&&t.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===_:1===d.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(x=(p=(l=(c=(h=(d=m)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===v&&l[1])&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||f.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[v,p,x];break}}else if(y&&(x=p=(l=(c=(h=(d=t)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===v&&l[1]),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==_:1!==d.nodeType)||!++x||(y&&((c=(h=d[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]=[v,x]),d!==t)););return(x-=r)===n||x%n==0&&x/n>=0}}},PSEUDO:function(e,t){var i,r=n.pseudos[e]||n.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return r[w]?r(t):r.length>1?(i=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,i){for(var n,o=r(e,t),s=o.length;s--;)e[n=A(e,o[s])]=!(i[n]=o[s])})):function(e){return r(e,0,i)}):r}},pseudos:{not:le((function(e){var t=[],i=[],n=a(e.replace(z,"$1"));return n[w]?le((function(e,t,i,r){for(var o,s=n(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,r,o){return t[0]=e,n(t,null,o,i),t[0]=null,!i.pop()}})),has:le((function(e){return function(t){return ae(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ie),function(t){return(t.textContent||r(t)).indexOf(e)>-1}})),lang:le((function(e){return W.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ie).toLowerCase(),function(t){var i;do{if(i=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,i){return[i<0?i+t:i]})),even:me((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:me((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:me((function(e,t,i){for(var n=i<0?i+t:i>t?t:i;--n>=0;)e.push(n);return e})),gt:me((function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e}))}},n.pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=fe(t);function ye(){}function xe(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function we(e,t,i){var n=t.dir,r=t.next,o=r||n,s=i&&"parentNode"===o,a=S++;return t.first?function(t,i,r){for(;t=t[n];)if(1===t.nodeType||s)return e(t,i,r);return!1}:function(t,i,u){var l,c,h,d=[v,a];if(u){for(;t=t[n];)if((1===t.nodeType||s)&&e(t,i,u))return!0}else for(;t=t[n];)if(1===t.nodeType||s)if(c=(h=t[w]||(t[w]={}))[t.uniqueID]||(h[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[n]||t;else{if((l=c[o])&&l[0]===v&&l[1]===a)return d[2]=l[2];if(c[o]=d,d[2]=e(t,i,u))return!0}return!1}}function be(e){return e.length>1?function(t,i,n){for(var r=e.length;r--;)if(!e[r](t,i,n))return!1;return!0}:e[0]}function ve(e,t,i,n,r){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(i&&!i(o,n,r)||(s.push(o),l&&t.push(a)));return s}function Se(e,t,i,n,r,o){return n&&!n[w]&&(n=Se(n)),r&&!r[w]&&(r=Se(r,o)),le((function(o,s,a,u){var l,c,h,d=[],p=[],f=s.length,g=o||function(e,t,i){for(var n=0,r=t.length;n<r;n++)ae(e,t[n],i);return i}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:ve(g,d,e,a,u),_=i?r||(o?e:f||n)?[]:s:m;if(i&&i(m,_,a,u),n)for(l=ve(_,p),n(l,[],a,u),c=l.length;c--;)(h=l[c])&&(_[p[c]]=!(m[p[c]]=h));if(o){if(r||e){if(r){for(l=[],c=_.length;c--;)(h=_[c])&&l.push(m[c]=h);r(null,_=[],l,u)}for(c=_.length;c--;)(h=_[c])&&(l=r?A(o,h):d[c])>-1&&(o[l]=!(s[l]=h))}}else _=ve(_===s?_.splice(f,_.length):_),r?r(null,s,_,u):V.apply(s,_)}))}function Te(e){for(var t,i,r,o=e.length,s=n.relative[e[0].type],a=s||n.relative[" "],u=s?1:0,c=we((function(e){return e===t}),a,!0),h=we((function(e){return A(t,e)>-1}),a,!0),d=[function(e,i,n){var r=!s&&(n||i!==l)||((t=i).nodeType?c(e,i,n):h(e,i,n));return t=null,r}];u<o;u++)if(i=n.relative[e[u].type])d=[we(be(d),i)];else{if((i=n.filter[e[u].type].apply(null,e[u].matches))[w]){for(r=++u;r<o&&!n.relative[e[r].type];r++);return Se(u>1&&be(d),u>1&&xe(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(z,"$1"),i,u<r&&Te(e.slice(u,r)),r<o&&Te(e=e.slice(r)),r<o&&xe(e))}d.push(i)}return be(d)}return ye.prototype=n.filters=n.pseudos,n.setFilters=new ye,s=ae.tokenize=function(e,t){var i,r,o,s,a,u,l,c=C[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],l=n.preFilter;a;){for(s in i&&!(r=j.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),i=!1,(r=G.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(z," ")}),a=a.slice(i.length)),n.filter)!(r=Y[s].exec(a))||l[s]&&!(r=l[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return t?a.length:a?ae.error(e):C(e,u).slice(0)},a=ae.compile=function(e,t){var i,r=[],o=[],a=N[e+" "];if(!a){for(t||(t=s(e)),i=t.length;i--;)(a=Te(t[i]))[w]?r.push(a):o.push(a);a=N(e,function(e,t){var i=t.length>0,r=e.length>0,o=function(o,s,a,u,c){var h,f,m,_=0,y="0",x=o&&[],w=[],b=l,S=o||r&&n.find.TAG("*",c),T=v+=null==b?1:Math.random()||.1,C=S.length;for(c&&(l=s==p||s||c);y!==C&&null!=(h=S[y]);y++){if(r&&h){for(f=0,s||h.ownerDocument==p||(d(h),a=!g);m=e[f++];)if(m(h,s||p,a)){u.push(h);break}c&&(v=T)}i&&((h=!m&&h)&&_--,o&&x.push(h))}if(_+=y,i&&y!==_){for(f=0;m=t[f++];)m(x,w,s,a);if(o){if(_>0)for(;y--;)x[y]||w[y]||(w[y]=M.call(u));w=ve(w)}V.apply(u,w),c&&!o&&w.length>0&&_+t.length>1&&ae.uniqueSort(u)}return c&&(v=T,l=b),x};return i?le(o):o}(o,r)),a.selector=e}return a},u=ae.select=function(e,t,i,r){var o,u,l,c,h,d="function"==typeof e&&e,p=!r&&s(e=d.selector||e);if(i=i||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&n.relative[u[1].type]){if(!(t=(n.find.ID(l.matches[0].replace(te,ie),t)||[])[0]))return i;d&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=Y.needsContext.test(e)?0:u.length;o--&&(l=u[o],!n.relative[c=l.type]);)if((h=n.find[c])&&(r=h(l.matches[0].replace(te,ie),ee.test(u[0].type)&&_e(t.parentNode)||t))){if(u.splice(o,1),!(e=r.length&&xe(u)))return V.apply(i,r),i;break}}return(d||a(e,p))(r,t,!g,i,!t||ee.test(e)&&_e(t.parentNode)||t),i},i.sortStable=w.split("").sort(O).join("")===w,i.detectDuplicates=!!h,d(),i.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),i.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||he(P,(function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),ae}(e);b.find=S,b.expr=S.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=S.uniqueSort,b.text=S.getText,b.isXMLDoc=S.isXML,b.contains=S.contains,b.escapeSelector=S.escape;var T=function(e,t,i){for(var n=[],r=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&b(e).is(i))break;n.push(e)}return n},C=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},N=b.expr.match.needsContext;function F(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(e,t,i){return f(t)?b.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?b.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?b.grep(e,(function(e){return a.call(t,e)>-1!==i})):b.filter(t,e,i)}b.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?b.find.matchesSelector(n,e)?[n]:[]:b.find.matches(e,b.grep(t,(function(e){return 1===e.nodeType})))},b.fn.extend({find:function(e){var t,i,n=this.length,r=this;if("string"!=typeof e)return this.pushStack(b(e).filter((function(){for(t=0;t<n;t++)if(b.contains(r[t],this))return!0})));for(i=this.pushStack([]),t=0;t<n;t++)b.find(e,r[t],i);return n>1?b.uniqueSort(i):i},filter:function(e){return this.pushStack(E(this,e||[],!1))},not:function(e){return this.pushStack(E(this,e||[],!0))},is:function(e){return!!E(this,"string"==typeof e&&N.test(e)?b(e):e||[],!1).length}});var D,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,i){var n,r;if(!e)return this;if(i=i||D,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof b?t[0]:t,b.merge(this,b.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),O.test(n[1])&&b.isPlainObject(t))for(n in t)f(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(r=m.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==i.ready?i.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,D=b(m);var I=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function B(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),i=t.length;return this.filter((function(){for(var e=0;e<i;e++)if(b.contains(this,t[e]))return!0}))},closest:function(e,t){var i,n=0,r=this.length,o=[],s="string"!=typeof e&&b(e);if(!N.test(e))for(;n<r;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&b.find.matchesSelector(i,e))){o.push(i);break}return this.pushStack(o.length>1?b.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?a.call(b(e),this[0]):a.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,i){return T(e,"parentNode",i)},next:function(e){return B(e,"nextSibling")},prev:function(e){return B(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,i){return T(e,"nextSibling",i)},prevUntil:function(e,t,i){return T(e,"previousSibling",i)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&n(e.contentDocument)?e.contentDocument:(F(e,"template")&&(e=e.content||e),b.merge([],e.childNodes))}},(function(e,t){b.fn[e]=function(i,n){var r=b.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=b.filter(n,r)),this.length>1&&(V[e]||b.uniqueSort(r),I.test(e)&&r.reverse()),this.pushStack(r)}}));var A=/[^\x20\t\r\n\f]+/g;function P(e){return e}function R(e){throw e}function L(e,t,i,n){var r;try{e&&f(r=e.promise)?r.call(e).done(t).fail(i):e&&f(r=e.then)?r.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}b.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return b.each(e.match(A)||[],(function(e,i){t[i]=!0})),t}(e):b.extend({},e);var t,i,n,r,o=[],s=[],a=-1,u=function(){for(r=r||e.once,n=t=!0;s.length;a=-1)for(i=s.shift();++a<o.length;)!1===o[a].apply(i[0],i[1])&&e.stopOnFalse&&(a=o.length,i=!1);e.memory||(i=!1),t=!1,r&&(o=i?[]:"")},l={add:function(){return o&&(i&&!t&&(a=o.length-1,s.push(i)),function t(i){b.each(i,(function(i,n){f(n)?e.unique&&l.has(n)||o.push(n):n&&n.length&&"string"!==x(n)&&t(n)}))}(arguments),i&&!t&&u()),this},remove:function(){return b.each(arguments,(function(e,t){for(var i;(i=b.inArray(t,o,i))>-1;)o.splice(i,1),i<=a&&a--})),this},has:function(e){return e?b.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=i="",this},disabled:function(){return!o},lock:function(){return r=s=[],i||t||(o=i=""),this},locked:function(){return!!r},fireWith:function(e,i){return r||(i=[e,(i=i||[]).slice?i.slice():i],s.push(i),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},b.extend({Deferred:function(t){var i=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return b.Deferred((function(t){b.each(i,(function(i,n){var r=f(e[n[4]])&&e[n[4]];o[n[1]]((function(){var e=r&&r.apply(this,arguments);e&&f(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[n[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(t,n,r){var o=0;function s(t,i,n,r){return function(){var a=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=n.apply(a,u))===i.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,f(l)?r?l.call(e,s(o,i,P,r),s(o,i,R,r)):(o++,l.call(e,s(o,i,P,r),s(o,i,R,r),s(o,i,P,i.notifyWith))):(n!==P&&(a=void 0,u=[e]),(r||i.resolveWith)(a,u))}},c=r?l:function(){try{l()}catch(e){b.Deferred.exceptionHook&&b.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(n!==R&&(a=void 0,u=[e]),i.rejectWith(a,u))}};t?c():(b.Deferred.getStackHook&&(c.stackTrace=b.Deferred.getStackHook()),e.setTimeout(c))}}return b.Deferred((function(e){i[0][3].add(s(0,e,f(r)?r:P,e.notifyWith)),i[1][3].add(s(0,e,f(t)?t:P)),i[2][3].add(s(0,e,f(n)?n:R))})).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},o={};return b.each(i,(function(e,t){var s=t[2],a=t[5];r[t[1]]=s.add,a&&s.add((function(){n=a}),i[3-e][2].disable,i[3-e][3].disable,i[0][2].lock,i[0][3].lock),s.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=s.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,i=t,n=Array(i),o=r.call(arguments),s=b.Deferred(),a=function(e){return function(i){n[e]=this,o[e]=arguments.length>1?r.call(arguments):i,--t||s.resolveWith(n,o)}};if(t<=1&&(L(e,s.done(a(i)).resolve,s.reject,!t),"pending"===s.state()||f(o[i]&&o[i].then)))return s.then();for(;i--;)L(o[i],a(i),s.reject);return s.promise()}});var k=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(t,i){e.console&&e.console.warn&&t&&k.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)},b.readyException=function(t){e.setTimeout((function(){throw t}))};var U=b.Deferred();function X(){m.removeEventListener("DOMContentLoaded",X),e.removeEventListener("load",X),b.ready()}b.fn.ready=function(e){return U.then(e).catch((function(e){b.readyException(e)})),this},b.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==e&&--b.readyWait>0||U.resolveWith(m,[b]))}}),b.ready.then=U.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?e.setTimeout(b.ready):(m.addEventListener("DOMContentLoaded",X),e.addEventListener("load",X));var z=function(e,t,i,n,r,o,s){var a=0,u=e.length,l=null==i;if("object"===x(i))for(a in r=!0,i)z(e,t,a,i[a],!0,o,s);else if(void 0!==n&&(r=!0,f(n)||(s=!0),l&&(s?(t.call(e,n),t=null):(l=t,t=function(e,t,i){return l.call(b(e),i)})),t))for(;a<u;a++)t(e[a],i,s?n:n.call(e[a],a,t(e[a],i)));return r?e:l?t.call(e):u?t(e[0],i):o},j=/^-ms-/,G=/-([a-z])/g;function q(e,t){return t.toUpperCase()}function H(e){return e.replace(j,"ms-").replace(G,q)}var W=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=b.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},W(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,r=this.cache(e);if("string"==typeof t)r[H(t)]=i;else for(n in t)r[H(n)]=t[n];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][H(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){i=(t=Array.isArray(t)?t.map(H):(t=H(t))in n?[t]:t.match(A)||[]).length;for(;i--;)delete n[t[i]]}(void 0===t||b.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!b.isEmptyObject(t)}};var $=new Y,Z=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function J(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(Q,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:K.test(e)?JSON.parse(e):e)}(i)}catch(e){}Z.set(e,t,i)}else i=void 0;return i}b.extend({hasData:function(e){return Z.hasData(e)||$.hasData(e)},data:function(e,t,i){return Z.access(e,t,i)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,i){return $.access(e,t,i)},_removeData:function(e,t){$.remove(e,t)}}),b.fn.extend({data:function(e,t){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=Z.get(o),1===o.nodeType&&!$.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&0===(n=s[i].name).indexOf("data-")&&(n=H(n.slice(5)),J(o,n,r[n]));$.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each((function(){Z.set(this,e)})):z(this,(function(t){var i;if(o&&void 0===t)return void 0!==(i=Z.get(o,e))||void 0!==(i=J(o,e))?i:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),b.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=$.get(e,t),i&&(!n||Array.isArray(i)?n=$.access(e,t,b.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=b.queue(e,t),n=i.length,r=i.shift(),o=b._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete o.stop,r.call(e,(function(){b.dequeue(e,t)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return $.get(e,i)||$.access(e,i,{empty:b.Callbacks("once memory").add((function(){$.remove(e,[t+"queue",i])}))})}}),b.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?b.queue(this[0],e):void 0===t?this:this.each((function(){var i=b.queue(this,e,t);b._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&b.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){b.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=b.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(i=$.get(o[s],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],ne=m.documentElement,re=function(e){return b.contains(e.ownerDocument,e)},oe={composed:!0};ne.getRootNode&&(re=function(e){return b.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&re(e)&&"none"===b.css(e,"display")};function ae(e,t,i,n){var r,o,s=20,a=n?function(){return n.cur()}:function(){return b.css(e,t,"")},u=a(),l=i&&i[3]||(b.cssNumber[t]?"":"px"),c=e.nodeType&&(b.cssNumber[t]||"px"!==l&&+u)&&te.exec(b.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)b.style(e,t,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;c*=2,b.style(e,t,c+l),i=i||[]}return i&&(c=+c||+u||0,r=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=l,n.start=c,n.end=r)),r}var ue={};function le(e){var t,i=e.ownerDocument,n=e.nodeName,r=ue[n];return r||(t=i.body.appendChild(i.createElement(n)),r=b.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),ue[n]=r,r)}function ce(e,t){for(var i,n,r=[],o=0,s=e.length;o<s;o++)(n=e[o]).style&&(i=n.style.display,t?("none"===i&&(r[o]=$.get(n,"display")||null,r[o]||(n.style.display="")),""===n.style.display&&se(n)&&(r[o]=le(n))):"none"!==i&&(r[o]="none",$.set(n,"display",i)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}b.fn.extend({show:function(){return ce(this,!0)},hide:function(){return ce(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){se(this)?b(this).show():b(this).hide()}))}});var he,de,pe=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i;he=m.createDocumentFragment().appendChild(m.createElement("div")),(de=m.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),he.appendChild(de),p.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="<option></option>",p.option=!!he.lastChild;var me={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function _e(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&F(e,t)?b.merge([e],i):i}function ye(e,t){for(var i=0,n=e.length;i<n;i++)$.set(e[i],"globalEval",!t||$.get(t[i],"globalEval"))}me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td,p.option||(me.optgroup=me.option=[1,"<select multiple='multiple'>","</select>"]);var xe=/<|&#?\w+;/;function we(e,t,i,n,r){for(var o,s,a,u,l,c,h=t.createDocumentFragment(),d=[],p=0,f=e.length;p<f;p++)if((o=e[p])||0===o)if("object"===x(o))b.merge(d,o.nodeType?[o]:o);else if(xe.test(o)){for(s=s||h.appendChild(t.createElement("div")),a=(fe.exec(o)||["",""])[1].toLowerCase(),u=me[a]||me._default,s.innerHTML=u[1]+b.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;b.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(t.createTextNode(o));for(h.textContent="",p=0;o=d[p++];)if(n&&b.inArray(o,n)>-1)r&&r.push(o);else if(l=re(o),s=_e(h.appendChild(o),"script"),l&&ye(s),i)for(c=0;o=s[c++];)ge.test(o.type||"")&&i.push(o);return h}var be=/^([^.]*)(?:\.(.+)|)/;function ve(){return!0}function Se(){return!1}function Te(e,t){return e===function(){try{return m.activeElement}catch(e){}}()==("focus"===t)}function Ce(e,t,i,n,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof i&&(n=n||i,i=void 0),t)Ce(e,a,i,n,t[a],o);return e}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=Se;else if(!r)return e;return 1===o&&(s=r,r=function(e){return b().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=b.guid++)),e.each((function(){b.event.add(this,t,r,n,i)}))}function Ne(e,t,i){i?($.set(e,t,!1),b.event.add(e,t,{namespace:!1,handler:function(e){var n,o,s=$.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(b.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=r.call(arguments),$.set(this,t,s),n=i(this,t),this[t](),s!==(o=$.get(this,t))||n?$.set(this,t,!1):o={},s!==o)return e.stopImmediatePropagation(),e.preventDefault(),o&&o.value}else s.length&&($.set(this,t,{value:b.event.trigger(b.extend(s[0],b.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===$.get(e,t)&&b.event.add(e,t,ve)}b.event={global:{},add:function(e,t,i,n,r){var o,s,a,u,l,c,h,d,p,f,g,m=$.get(e);if(W(e))for(i.handler&&(i=(o=i).handler,r=o.selector),r&&b.find.matchesSelector(ne,r),i.guid||(i.guid=b.guid++),(u=m.events)||(u=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(A)||[""]).length;l--;)p=g=(a=be.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=b.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,h=b.event.special[p]||{},c=b.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&b.expr.match.needsContext.test(r),namespace:f.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,n,f,s)||e.addEventListener&&e.addEventListener(p,s)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),b.event.global[p]=!0)},remove:function(e,t,i,n,r){var o,s,a,u,l,c,h,d,p,f,g,m=$.hasData(e)&&$.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(A)||[""]).length;l--;)if(p=g=(a=be.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=b.event.special[p]||{},d=u[p=(n?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!r&&g!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(e,c));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,f,m.handle)||b.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)b.event.remove(e,p+t[l],i,n,!0);b.isEmptyObject(u)&&$.remove(e,"handle events")}},dispatch:function(e){var t,i,n,r,o,s,a=new Array(arguments.length),u=b.event.fix(e),l=($.get(this,"events")||Object.create(null))[u.type]||[],c=b.event.special[u.type]||{};for(a[0]=u,t=1;t<arguments.length;t++)a[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(s=b.event.handlers.call(this,u,l),t=0;(r=s[t++])&&!u.isPropagationStopped();)for(u.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(n=((b.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(u.result=n)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var i,n,r,o,s,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},i=0;i<u;i++)void 0===s[r=(n=t[i]).selector+" "]&&(s[r]=n.needsContext?b(r,this).index(l)>-1:b.find(r,this,null,[l]).length),s[r]&&o.push(n);o.length&&a.push({elem:l,handlers:o})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(e,t){Object.defineProperty(b.Event.prototype,e,{enumerable:!0,configurable:!0,get:f(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[b.expando]?e:new b.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&F(t,"input")&&Ne(t,"click",ve),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&F(t,"input")&&Ne(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&F(t,"input")&&$.get(t,"click")||F(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},b.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},b.Event=function(e,t){if(!(this instanceof b.Event))return new b.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ve:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&b.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[b.expando]=!0},b.Event.prototype={constructor:b.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ve,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ve,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ve,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},b.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},b.event.addProp),b.each({focus:"focusin",blur:"focusout"},(function(e,t){b.event.special[e]={setup:function(){return Ne(this,e,Te),!1},trigger:function(){return Ne(this,e),!0},_default:function(){return!0},delegateType:t}})),b.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===n||b.contains(n,r))||(e.type=o.origType,i=o.handler.apply(this,arguments),e.type=t),i}}})),b.fn.extend({on:function(e,t,i,n){return Ce(this,e,t,i,n)},one:function(e,t,i,n){return Ce(this,e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,b(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=Se),this.each((function(){b.event.remove(this,e,i,t)}))}});var Fe=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ee=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function De(e,t){return F(e,"table")&&F(11!==t.nodeType?t:t.firstChild,"tr")&&b(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ve(e,t){var i,n,r,o,s,a;if(1===t.nodeType){if($.hasData(e)&&(a=$.get(e).events))for(r in $.remove(t,"handle events"),a)for(i=0,n=a[r].length;i<n;i++)b.event.add(t,r,a[r][i]);Z.hasData(e)&&(o=Z.access(e),s=b.extend({},o),Z.set(t,s))}}function Be(e,t){var i=t.nodeName.toLowerCase();"input"===i&&pe.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function Ae(e,t,i,n){t=o(t);var r,s,a,u,l,c,h=0,d=e.length,g=d-1,m=t[0],_=f(m);if(_||d>1&&"string"==typeof m&&!p.checkClone&&Oe.test(m))return e.each((function(r){var o=e.eq(r);_&&(t[0]=m.call(this,r,o.html())),Ae(o,t,i,n)}));if(d&&(s=(r=we(t,e[0].ownerDocument,!1,e,n)).firstChild,1===r.childNodes.length&&(r=s),s||n)){for(u=(a=b.map(_e(r,"script"),Me)).length;h<d;h++)l=r,h!==g&&(l=b.clone(l,!0,!0),u&&b.merge(a,_e(l,"script"))),i.call(e[h],l,h);if(u)for(c=a[a.length-1].ownerDocument,b.map(a,Ie),h=0;h<u;h++)l=a[h],ge.test(l.type||"")&&!$.access(l,"globalEval")&&b.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?b._evalUrl&&!l.noModule&&b._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):y(l.textContent.replace(Ee,""),l,c))}return e}function Pe(e,t,i){for(var n,r=t?b.filter(t,e):e,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||b.cleanData(_e(n)),n.parentNode&&(i&&re(n)&&ye(_e(n,"script")),n.parentNode.removeChild(n));return e}b.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,r,o,s,a=e.cloneNode(!0),u=re(e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(s=_e(a),n=0,r=(o=_e(e)).length;n<r;n++)Be(o[n],s[n]);if(t)if(i)for(o=o||_e(e),s=s||_e(a),n=0,r=o.length;n<r;n++)Ve(o[n],s[n]);else Ve(e,a);return(s=_e(a,"script")).length>0&&ye(s,!u&&_e(e,"script")),a},cleanData:function(e){for(var t,i,n,r=b.event.special,o=0;void 0!==(i=e[o]);o++)if(W(i)){if(t=i[$.expando]){if(t.events)for(n in t.events)r[n]?b.event.remove(i,n):b.removeEvent(i,n,t.handle);i[$.expando]=void 0}i[Z.expando]&&(i[Z.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Pe(this,e,!0)},remove:function(e){return Pe(this,e)},text:function(e){return z(this,(function(e){return void 0===e?b.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ae(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||De(this,e).appendChild(e)}))},prepend:function(){return Ae(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=De(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ae(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ae(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(_e(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return z(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Fe.test(e)&&!me[(fe.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(b.cleanData(_e(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ae(this,arguments,(function(t){var i=this.parentNode;b.inArray(this,e)<0&&(b.cleanData(_e(this)),i&&i.replaceChild(t,this))}),e)}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){b.fn[e]=function(e){for(var i,n=[],r=b(e),o=r.length-1,a=0;a<=o;a++)i=a===o?this:this.clone(!0),b(r[a])[t](i),s.apply(n,i.get());return this.pushStack(n)}}));var Re=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Le=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=e),i.getComputedStyle(t)},ke=function(e,t,i){var n,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in n=i.call(e),t)e.style[r]=o[r];return n},Ue=new RegExp(ie.join("|"),"i");function Xe(e,t,i){var n,r,o,s,a=e.style;return(i=i||Le(e))&&(""!==(s=i.getPropertyValue(t)||i[t])||re(e)||(s=b.style(e,t)),!p.pixelBoxStyles()&&Re.test(s)&&Ue.test(t)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ne.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);n="1%"!==t.top,u=12===i(t.marginLeft),c.style.right="60%",s=36===i(t.right),r=36===i(t.width),c.style.position="absolute",o=12===i(c.offsetWidth/3),ne.removeChild(l),c=null}}function i(e){return Math.round(parseFloat(e))}var n,r,o,s,a,u,l=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===c.style.backgroundClip,b.extend(p,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,i,n,r;return null==a&&(t=m.createElement("table"),i=m.createElement("tr"),n=m.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="border:1px solid",i.style.height="1px",n.style.height="9px",n.style.display="block",ne.appendChild(t).appendChild(i).appendChild(n),r=e.getComputedStyle(i),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===i.offsetHeight,ne.removeChild(t)),a}}))}();var je=["Webkit","Moz","ms"],Ge=m.createElement("div").style,qe={};function He(e){var t=b.cssProps[e]||qe[e];return t||(e in Ge?e:qe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),i=je.length;i--;)if((e=je[i]+t)in Ge)return e}(e)||e)}var We=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,$e={position:"absolute",visibility:"hidden",display:"block"},Ze={letterSpacing:"0",fontWeight:"400"};function Ke(e,t,i){var n=te.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function Qe(e,t,i,n,r,o){var s="width"===t?1:0,a=0,u=0;if(i===(n?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(u+=b.css(e,i+ie[s],!0,r)),n?("content"===i&&(u-=b.css(e,"padding"+ie[s],!0,r)),"margin"!==i&&(u-=b.css(e,"border"+ie[s]+"Width",!0,r))):(u+=b.css(e,"padding"+ie[s],!0,r),"padding"!==i?u+=b.css(e,"border"+ie[s]+"Width",!0,r):a+=b.css(e,"border"+ie[s]+"Width",!0,r));return!n&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))||0),u}function Je(e,t,i){var n=Le(e),r=(!p.boxSizingReliable()||i)&&"border-box"===b.css(e,"boxSizing",!1,n),o=r,s=Xe(e,t,n),a="offset"+t[0].toUpperCase()+t.slice(1);if(Re.test(s)){if(!i)return s;s="auto"}return(!p.boxSizingReliable()&&r||!p.reliableTrDimensions()&&F(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===b.css(e,"display",!1,n))&&e.getClientRects().length&&(r="border-box"===b.css(e,"boxSizing",!1,n),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+Qe(e,t,i||(r?"border":"content"),o,n,s)+"px"}function et(e,t,i,n,r){return new et.prototype.init(e,t,i,n,r)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=Xe(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=H(t),u=Ye.test(t),l=e.style;if(u||(t=He(a)),s=b.cssHooks[t]||b.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(e,!1,n))?r:l[t];"string"===(o=typeof i)&&(r=te.exec(i))&&r[1]&&(i=ae(e,t,r),o="number"),null!=i&&i==i&&("number"!==o||u||(i+=r&&r[3]||(b.cssNumber[a]?"":"px")),p.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(i=s.set(e,i,n))||(u?l.setProperty(t,i):l[t]=i))}},css:function(e,t,i,n){var r,o,s,a=H(t);return Ye.test(t)||(t=He(a)),(s=b.cssHooks[t]||b.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,i)),void 0===r&&(r=Xe(e,t,n)),"normal"===r&&t in Ze&&(r=Ze[t]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),b.each(["height","width"],(function(e,t){b.cssHooks[t]={get:function(e,i,n){if(i)return!We.test(b.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,t,n):ke(e,$e,(function(){return Je(e,t,n)}))},set:function(e,i,n){var r,o=Le(e),s=!p.scrollboxSize()&&"absolute"===o.position,a=(s||n)&&"border-box"===b.css(e,"boxSizing",!1,o),u=n?Qe(e,t,n,a,o):0;return a&&s&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Qe(e,t,"border",!1,o)-.5)),u&&(r=te.exec(i))&&"px"!==(r[3]||"px")&&(e.style[t]=i,i=b.css(e,t)),Ke(0,i,u)}}})),b.cssHooks.marginLeft=ze(p.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Xe(e,"marginLeft"))||e.getBoundingClientRect().left-ke(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),b.each({margin:"",padding:"",border:"Width"},(function(e,t){b.cssHooks[e+t]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[e+ie[n]+t]=o[n]||o[n-2]||o[0];return r}},"margin"!==e&&(b.cssHooks[e+t].set=Ke)})),b.fn.extend({css:function(e,t){return z(this,(function(e,t,i){var n,r,o={},s=0;if(Array.isArray(t)){for(n=Le(e),r=t.length;s<r;s++)o[t[s]]=b.css(e,t[s],!1,n);return o}return void 0!==i?b.style(e,t,i):b.css(e,t)}),e,t,arguments.length>1)}}),b.Tween=et,et.prototype={constructor:et,init:function(e,t,i,n,r,o){this.elem=e,this.prop=i,this.easing=r||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(b.cssNumber[i]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,i=et.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):et.propHooks._default.set(this),this}},et.prototype.init.prototype=et.prototype,et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[He(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},et.propHooks.scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=et.prototype.init,b.fx.step={};var tt,it,nt=/^(?:toggle|show|hide)$/,rt=/queueHooks$/;function ot(){it&&(!1===m.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ot):e.setTimeout(ot,b.fx.interval),b.fx.tick())}function st(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function at(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)r["margin"+(i=ie[n])]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function ut(e,t,i){for(var n,r=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,s=r.length;o<s;o++)if(n=r[o].call(i,t,e))return n}function lt(e,t,i){var n,r,o=0,s=lt.prefilters.length,a=b.Deferred().always((function(){delete u.elem})),u=function(){if(r)return!1;for(var t=tt||st(),i=Math.max(0,l.startTime+l.duration-t),n=1-(i/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(n);return a.notifyWith(e,[l,n,i]),n<1&&s?i:(s||a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{},easing:b.easing._default},i),originalProperties:t,originalOptions:i,startTime:tt||st(),duration:i.duration,tweens:[],createTween:function(t,i){var n=b.Tween(e,l.opts,t,i,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(n),n},stop:function(t){var i=0,n=t?l.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)l.tweens[i].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var i,n,r,o,s;for(i in e)if(r=t[n=H(i)],o=e[i],Array.isArray(o)&&(r=o[1],o=e[i]=o[0]),i!==n&&(e[n]=o,delete e[i]),(s=b.cssHooks[n])&&"expand"in s)for(i in o=s.expand(o),delete e[n],o)i in e||(e[i]=o[i],t[i]=r);else t[n]=r}(c,l.opts.specialEasing);o<s;o++)if(n=lt.prefilters[o].call(l,e,c,l.opts))return f(n.stop)&&(b._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return b.map(c,ut,l),f(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}b.Animation=b.extend(lt,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return ae(i.elem,e,te.exec(t),i),i}]},tweener:function(e,t){f(e)?(t=e,e=["*"]):e=e.match(A);for(var i,n=0,r=e.length;n<r;n++)i=e[n],lt.tweeners[i]=lt.tweeners[i]||[],lt.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var n,r,o,s,a,u,l,c,h="width"in t||"height"in t,d=this,p={},f=e.style,g=e.nodeType&&se(e),m=$.get(e,"fxshow");for(n in i.queue||(null==(s=b._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,b.queue(e,"fx").length||s.empty.fire()}))}))),t)if(r=t[n],nt.test(r)){if(delete t[n],o=o||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[n])continue;g=!0}p[n]=m&&m[n]||b.style(e,n)}if((u=!b.isEmptyObject(t))||!b.isEmptyObject(p))for(n in h&&1===e.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=m&&m.display)&&(l=$.get(e,"display")),"none"===(c=b.css(e,"display"))&&(l?c=l:(ce([e],!0),l=e.style.display||l,c=b.css(e,"display"),ce([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===b.css(e,"float")&&(u||(d.done((function(){f.display=l})),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]}))),u=!1,p)u||(m?"hidden"in m&&(g=m.hidden):m=$.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&ce([e],!0),d.done((function(){for(n in g||ce([e]),$.remove(e,"fxshow"),p)b.style(e,n,p[n])}))),u=ut(g?m[n]:0,n,d),n in m||(m[n]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),b.speed=function(e,t,i){var n=e&&"object"==typeof e?b.extend({},e):{complete:i||!i&&t||f(e)&&e,duration:e,easing:i&&t||t&&!f(t)&&t};return b.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in b.fx.speeds?n.duration=b.fx.speeds[n.duration]:n.duration=b.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){f(n.old)&&n.old.call(this),n.queue&&b.dequeue(this,n.queue)},n},b.fn.extend({fadeTo:function(e,t,i,n){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var r=b.isEmptyObject(e),o=b.speed(t,i,n),s=function(){var t=lt(this,b.extend({},e),o);(r||$.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",o=b.timers,s=$.get(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&rt.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(i),t=!1,o.splice(r,1));!t&&i||b.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=$.get(this),n=i[e+"queue"],r=i[e+"queueHooks"],o=b.timers,s=n?n.length:0;for(i.finish=!0,b.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish}))}}),b.each(["toggle","show","hide"],(function(e,t){var i=b.fn[t];b.fn[t]=function(e,n,r){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(at(t,!0),e,n,r)}})),b.each({slideDown:at("show"),slideUp:at("hide"),slideToggle:at("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){b.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}})),b.timers=[],b.fx.tick=function(){var e,t=0,i=b.timers;for(tt=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||b.fx.stop(),tt=void 0},b.fx.timer=function(e){b.timers.push(e),b.fx.start()},b.fx.interval=13,b.fx.start=function(){it||(it=!0,ot())},b.fx.stop=function(){it=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fn.delay=function(t,i){return t=b.fx&&b.fx.speeds[t]||t,i=i||"fx",this.queue(i,(function(i,n){var r=e.setTimeout(i,t);n.stop=function(){e.clearTimeout(r)}}))},function(){var e=m.createElement("input"),t=m.createElement("select").appendChild(m.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=t.selected,(e=m.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var ct,ht=b.expr.attrHandle;b.fn.extend({attr:function(e,t){return z(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))}}),b.extend({attr:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?b.prop(e,t,i):(1===o&&b.isXMLDoc(e)||(r=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?ct:void 0)),void 0!==i?null===i?void b.removeAttr(e,t):r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:(e.setAttribute(t,i+""),i):r&&"get"in r&&null!==(n=r.get(e,t))?n:null==(n=b.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&F(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,r=t&&t.match(A);if(r&&1===e.nodeType)for(;i=r[n++];)e.removeAttribute(i)}}),ct={set:function(e,t,i){return!1===t?b.removeAttr(e,i):e.setAttribute(i,i),i}},b.each(b.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=ht[t]||b.find.attr;ht[t]=function(e,t,n){var r,o,s=t.toLowerCase();return n||(o=ht[s],ht[s]=r,r=null!=i(e,t,n)?s:null,ht[s]=o),r}}));var dt=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function ft(e){return(e.match(A)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(A)||[]}b.fn.extend({prop:function(e,t){return z(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[b.propFix[e]||e]}))}}),b.extend({prop:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&b.isXMLDoc(e)||(t=b.propFix[t]||t,r=b.propHooks[t]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,"tabindex");return t?parseInt(t,10):dt.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){b.propFix[this.toLowerCase()]=this})),b.fn.extend({addClass:function(e){var t,i,n,r,o,s,a,u=0;if(f(e))return this.each((function(t){b(this).addClass(e.call(this,t,gt(this)))}));if((t=mt(e)).length)for(;i=this[u++];)if(r=gt(i),n=1===i.nodeType&&" "+ft(r)+" "){for(s=0;o=t[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r!==(a=ft(n))&&i.setAttribute("class",a)}return this},removeClass:function(e){var t,i,n,r,o,s,a,u=0;if(f(e))return this.each((function(t){b(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=mt(e)).length)for(;i=this[u++];)if(r=gt(i),n=1===i.nodeType&&" "+ft(r)+" "){for(s=0;o=t[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r!==(a=ft(n))&&i.setAttribute("class",a)}return this},toggleClass:function(e,t){var i=typeof e,n="string"===i||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):f(e)?this.each((function(i){b(this).toggleClass(e.call(this,i,gt(this),t),t)})):this.each((function(){var t,r,o,s;if(n)for(r=0,o=b(this),s=mt(e);t=s[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==i||((t=gt(this))&&$.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":$.get(this,"__className__")||""))}))},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+ft(gt(i))+" ").indexOf(t)>-1)return!0;return!1}});var _t=/\r/g;b.fn.extend({val:function(e){var t,i,n,r=this[0];return arguments.length?(n=f(e),this.each((function(i){var r;1===this.nodeType&&(null==(r=n?e.call(this,i,b(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=b.map(r,(function(e){return null==e?"":e+""}))),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=b.valHooks[r.type]||b.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(_t,""):null==i?"":i:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:ft(b.text(e))}},select:{get:function(e){var t,i,n,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:r.length;for(n=o<0?u:s?o:0;n<u;n++)if(((i=r[n]).selected||n===o)&&!i.disabled&&(!i.parentNode.disabled||!F(i.parentNode,"optgroup"))){if(t=b(i).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var i,n,r=e.options,o=b.makeArray(t),s=r.length;s--;)((n=r[s]).selected=b.inArray(b.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(e.selectedIndex=-1),o}}}}),b.each(["radio","checkbox"],(function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},p.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),p.focusin="onfocusin"in e;var yt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(t,i,n,r){var o,s,a,u,l,h,d,p,_=[n||m],y=c.call(t,"type")?t.type:t,x=c.call(t,"namespace")?t.namespace.split("."):[];if(s=p=a=n=n||m,3!==n.nodeType&&8!==n.nodeType&&!yt.test(y+b.event.triggered)&&(y.indexOf(".")>-1&&(x=y.split("."),y=x.shift(),x.sort()),l=y.indexOf(":")<0&&"on"+y,(t=t[b.expando]?t:new b.Event(y,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:b.makeArray(i,[t]),d=b.event.special[y]||{},r||!d.trigger||!1!==d.trigger.apply(n,i))){if(!r&&!d.noBubble&&!g(n)){for(u=d.delegateType||y,yt.test(u+y)||(s=s.parentNode);s;s=s.parentNode)_.push(s),a=s;a===(n.ownerDocument||m)&&_.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=_[o++])&&!t.isPropagationStopped();)p=s,t.type=o>1?u:d.bindType||y,(h=($.get(s,"events")||Object.create(null))[t.type]&&$.get(s,"handle"))&&h.apply(s,i),(h=l&&s[l])&&h.apply&&W(s)&&(t.result=h.apply(s,i),!1===t.result&&t.preventDefault());return t.type=y,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(_.pop(),i)||!W(n)||l&&f(n[y])&&!g(n)&&((a=n[l])&&(n[l]=null),b.event.triggered=y,t.isPropagationStopped()&&p.addEventListener(y,xt),n[y](),t.isPropagationStopped()&&p.removeEventListener(y,xt),b.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(e,t,i){var n=b.extend(new b.Event,i,{type:e,isSimulated:!0});b.event.trigger(n,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return b.event.trigger(e,t,i,!0)}}),p.focusin||b.each({focus:"focusin",blur:"focusout"},(function(e,t){var i=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,r=$.access(n,t);r||n.addEventListener(e,i,!0),$.access(n,t,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,r=$.access(n,t)-1;r?$.access(n,t,r):(n.removeEventListener(e,i,!0),$.remove(n,t))}}}));var wt=e.location,bt={guid:Date.now()},vt=/\?/;b.parseXML=function(t){var i,n;if(!t||"string"!=typeof t)return null;try{i=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return n=i&&i.getElementsByTagName("parsererror")[0],i&&!n||b.error("Invalid XML: "+(n?b.map(n.childNodes,(function(e){return e.textContent})).join("\n"):t)),i};var St=/\[\]$/,Tt=/\r?\n/g,Ct=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Ft(e,t,i,n){var r;if(Array.isArray(t))b.each(t,(function(t,r){i||St.test(e)?n(e,r):Ft(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,i,n)}));else if(i||"object"!==x(t))n(e,t);else for(r in t)Ft(e+"["+r+"]",t[r],i,n)}b.param=function(e,t){var i,n=[],r=function(e,t){var i=f(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,(function(){r(this.name,this.value)}));else for(i in e)Ft(i,e[i],t,r);return n.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&Nt.test(this.nodeName)&&!Ct.test(e)&&(this.checked||!pe.test(e))})).map((function(e,t){var i=b(this).val();return null==i?null:Array.isArray(i)?b.map(i,(function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}})):{name:t.name,value:i.replace(Tt,"\r\n")}})).get()}});var Ot=/%20/g,Et=/#.*$/,Dt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,Vt=/^\/\//,Bt={},At={},Pt="*/".concat("*"),Rt=m.createElement("a");function Lt(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,r=0,o=t.toLowerCase().match(A)||[];if(f(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function kt(e,t,i,n){var r={},o=e===At;function s(a){var u;return r[a]=!0,b.each(e[a]||[],(function(e,a){var l=a(t,i,n);return"string"!=typeof l||o||r[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),s(l),!1)})),u}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Ut(e,t){var i,n,r=b.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&b.extend(!0,e,n),e}Rt.href=wt.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,b.ajaxSettings),t):Ut(b.ajaxSettings,e)},ajaxPrefilter:Lt(Bt),ajaxTransport:Lt(At),ajax:function(t,i){"object"==typeof t&&(i=t,t=void 0),i=i||{};var n,r,o,s,a,u,l,c,h,d,p=b.ajaxSetup({},i),f=p.context||p,g=p.context&&(f.nodeType||f.jquery)?b(f):b.event,_=b.Deferred(),y=b.Callbacks("once memory"),x=p.statusCode||{},w={},v={},S="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(l){if(!s)for(s={};t=Mt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=v[e.toLowerCase()]=v[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)T.always(e[T.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||S;return n&&n.abort(t),C(0,t),this}};if(_.promise(T),p.url=((t||p.url||wt.href)+"").replace(Vt,wt.protocol+"//"),p.type=i.method||i.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(A)||[""],null==p.crossDomain){u=m.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Rt.protocol+"//"+Rt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),kt(Bt,p,i,T),l)return T;for(h in(c=b.event&&p.global)&&0==b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!It.test(p.type),r=p.url.replace(Et,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ot,"+")):(d=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(vt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Dt,"$1"),d=(vt.test(r)?"&":"?")+"_="+bt.guid+++d),p.url=r+d),p.ifModified&&(b.lastModified[r]&&T.setRequestHeader("If-Modified-Since",b.lastModified[r]),b.etag[r]&&T.setRequestHeader("If-None-Match",b.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||i.contentType)&&T.setRequestHeader("Content-Type",p.contentType),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Pt+"; q=0.01":""):p.accepts["*"]),p.headers)T.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,T,p)||l))return T.abort();if(S="abort",y.add(p.complete),T.done(p.success),T.fail(p.error),n=kt(At,p,i,T)){if(T.readyState=1,c&&g.trigger("ajaxSend",[T,p]),l)return T;p.async&&p.timeout>0&&(a=e.setTimeout((function(){T.abort("timeout")}),p.timeout));try{l=!1,n.send(w,C)}catch(e){if(l)throw e;C(-1,e)}}else C(-1,"No Transport");function C(t,i,s,u){var h,d,m,w,v,S=i;l||(l=!0,a&&e.clearTimeout(a),n=void 0,o=u||"",T.readyState=t>0?4:0,h=t>=200&&t<300||304===t,s&&(w=function(e,t,i){for(var n,r,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){u.unshift(r);break}if(u[0]in i)o=u[0];else{for(r in i){if(!u[0]||e.converters[r+" "+u[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),i[o]}(p,T,s)),!h&&b.inArray("script",p.dataTypes)>-1&&b.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(e,t,i,n){var r,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!u&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(r in l)if((a=r.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[r]:!0!==l[r]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,w,T,h),h?(p.ifModified&&((v=T.getResponseHeader("Last-Modified"))&&(b.lastModified[r]=v),(v=T.getResponseHeader("etag"))&&(b.etag[r]=v)),204===t||"HEAD"===p.type?S="nocontent":304===t?S="notmodified":(S=w.state,d=w.data,h=!(m=w.error))):(m=S,!t&&S||(S="error",t<0&&(t=0))),T.status=t,T.statusText=(i||S)+"",h?_.resolveWith(f,[d,S,T]):_.rejectWith(f,[T,S,m]),T.statusCode(x),x=void 0,c&&g.trigger(h?"ajaxSuccess":"ajaxError",[T,p,h?d:m]),y.fireWith(f,[T,S]),c&&(g.trigger("ajaxComplete",[T,p]),--b.active||b.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,i){return b.get(e,t,i,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],(function(e,t){b[t]=function(e,i,n,r){return f(i)&&(r=r||n,n=i,i=void 0),b.ajax(b.extend({url:e,type:t,dataType:r,data:i,success:n},b.isPlainObject(e)&&e))}})),b.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),b._evalUrl=function(e,t,i){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){b.globalEval(e,t,i)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(f(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return f(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=f(e);return this.each((function(i){b(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){b(this).replaceWith(this.childNodes)})),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Xt={0:200,1223:204},zt=b.ajaxSettings.xhr();p.cors=!!zt&&"withCredentials"in zt,p.ajax=zt=!!zt,b.ajaxTransport((function(t){var i,n;if(p.cors||zt&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);i=function(e){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Xt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=a.ontimeout=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){i&&n()}))},i=i("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(i)throw e}},abort:function(){i&&i()}}})),b.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),b.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,r){t=b("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&r("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){i&&i()}}}));var jt,Gt=[],qt=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||b.expando+"_"+bt.guid++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",(function(t,i,n){var r,o,s,a=!1!==t.jsonp&&(qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&qt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=f(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(qt,"$1"+r):!1!==t.jsonp&&(t.url+=(vt.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||b.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){s=arguments},n.always((function(){void 0===o?b(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=i.jsonpCallback,Gt.push(r)),s&&f(o)&&o(s[0]),s=o=void 0})),"script"})),p.createHTMLDocument=((jt=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===jt.childNodes.length),b.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(p.createHTMLDocument?((n=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(n)):t=m),o=!i&&[],(r=O.exec(e))?[t.createElement(r[1])]:(r=we([e],t,o),o&&o.length&&b(o).remove(),b.merge([],r.childNodes)));var n,r,o},b.fn.load=function(e,t,i){var n,r,o,s=this,a=e.indexOf(" ");return a>-1&&(n=ft(e.slice(a)),e=e.slice(0,a)),f(t)?(i=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&b.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(n?b("<div>").append(b.parseHTML(e)).find(n):e)})).always(i&&function(e,t){s.each((function(){i.apply(this,o||[e.responseText,t,e])}))}),this},b.expr.pseudos.animated=function(e){return b.grep(b.timers,(function(t){return e===t.elem})).length},b.offset={setOffset:function(e,t,i){var n,r,o,s,a,u,l=b.css(e,"position"),c=b(e),h={};"static"===l&&(e.style.position="relative"),a=c.offset(),o=b.css(e,"top"),u=b.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(s=(n=c.position()).top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(u)||0),f(t)&&(t=t.call(e,i,b.extend({},a))),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+r),"using"in t?t.using.call(e,h):c.css(h)}},b.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){b.offset.setOffset(this,e,t)}));var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,n=this[0],r={top:0,left:0};if("fixed"===b.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===b.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((r=b(e).offset()).top+=b.css(e,"borderTopWidth",!0),r.left+=b.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-b.css(n,"marginTop",!0),left:t.left-r.left-b.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===b.css(e,"position");)e=e.offsetParent;return e||ne}))}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i="pageYOffset"===t;b.fn[e]=function(n){return z(this,(function(e,n,r){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[n];o?o.scrollTo(i?o.pageXOffset:r,i?r:o.pageYOffset):e[n]=r}),e,n,arguments.length)}})),b.each(["top","left"],(function(e,t){b.cssHooks[t]=ze(p.pixelPosition,(function(e,i){if(i)return i=Xe(e,t),Re.test(i)?b(e).position()[t]+"px":i}))})),b.each({Height:"height",Width:"width"},(function(e,t){b.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,n){b.fn[n]=function(r,o){var s=arguments.length&&(i||"boolean"!=typeof r),a=i||(!0===r||!0===o?"margin":"border");return z(this,(function(t,i,r){var o;return g(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?b.css(t,i,a):b.style(t,i,r,a)}),t,s?r:void 0,s)}}))})),b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){b.fn[t]=function(e){return this.on(t,e)}})),b.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),b.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){b.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}));var Ht=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;b.proxy=function(e,t){var i,n,o;if("string"==typeof t&&(i=e[t],t=e,e=i),f(e))return n=r.call(arguments,2),o=function(){return e.apply(t||this,n.concat(r.call(arguments)))},o.guid=e.guid=e.guid||b.guid++,o},b.holdReady=function(e){e?b.readyWait++:b.ready(!0)},b.isArray=Array.isArray,b.parseJSON=JSON.parse,b.nodeName=F,b.isFunction=f,b.isWindow=g,b.camelCase=H,b.type=x,b.now=Date.now,b.isNumeric=function(e){var t=b.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},b.trim=function(e){return null==e?"":(e+"").replace(Ht,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return b}));var Wt=e.jQuery,Yt=e.$;return b.noConflict=function(t){return e.$===b&&(e.$=Yt),t&&e.jQuery===b&&(e.jQuery=Wt),b},void 0===t&&(e.jQuery=e.$=b),b})),define("jquery/dist/jquery",(function(){})),define("x_ite/Base/X3DConstants",[],(function(){"use strict";let e=0,t=0,i=0;return{CONNECTION_ERROR:e++,BROWSER_EVENT:e++,INITIALIZED_EVENT:e++,SHUTDOWN_EVENT:e++,INITIALIZED_ERROR:e++,NOT_STARTED_STATE:t++,IN_PROGRESS_STATE:t++,COMPLETE_STATE:t++,FAILED_STATE:t++,initializeOnly:1,inputOnly:2,outputOnly:4,inputOutput:7,SFBool:i++,SFColor:i++,SFColorRGBA:i++,SFDouble:i++,SFFloat:i++,SFImage:i++,SFInt32:i++,SFMatrix3d:i++,SFMatrix3f:i++,SFMatrix4d:i++,SFMatrix4f:i++,SFNode:i++,SFRotation:i++,SFString:i++,SFTime:i++,SFVec2d:i++,SFVec2f:i++,SFVec3d:i++,SFVec3f:i++,SFVec4d:i++,SFVec4f:i++,VrmlMatrix:i++,MFBool:i++,MFColor:i++,MFColorRGBA:i++,MFDouble:i++,MFFloat:i++,MFImage:i++,MFInt32:i++,MFMatrix3d:i++,MFMatrix3f:i++,MFMatrix4d:i++,MFMatrix4f:i++,MFNode:i++,MFRotation:i++,MFString:i++,MFTime:i++,MFVec2d:i++,MFVec2f:i++,MFVec3d:i++,MFVec3f:i++,MFVec4d:i++,MFVec4f:i++,X3DBaseNode:0}})),define("x_ite/InputOutput/Generator",["x_ite/Base/X3DConstants"],(function(e){"use strict";function t(){this.indent="",this.indentChar=" ",this.precision=6,this.doublePrecision=14,this.removeTrailingZeros=/\.?0*(?=$|[eE])/,this.executionContextStack=[null],this.importedNodesIndex=new Map,this.exportedNodesIndex=new Map,this.nodes=new Set,this.names=new Map,this.namesByNode=new Map,this.importedNames=new Map,this.routeNodes=new Set,this.level=0,this.newName=0,this.containerFields=[],this.units=!0,this.unitCategories=[],this.names.set(null,new Map)}t.prototype={constructor:t,Indent:function(){return this.indent},IncIndent:function(){this.indent+=this.indentChar},DecIndent:function(){this.indent=this.indent.substr(0,this.indent.length-this.indentChar.length)},PadRight:function(e,t){for(let i=0,n=t-e.length;i<n;++i)e+=" ";return e},Precision:function(e){return Math.fround(e).toPrecision(this.precision).replace(this.removeTrailingZeros,"")},DoublePrecision:function(e){return e.toPrecision(this.doublePrecision).replace(this.removeTrailingZeros,"")},PushExecutionContext:function(e){this.executionContextStack.push(e),this.names.has(e)||this.names.set(e,new Map),this.importedNodesIndex.has(e)||this.importedNodesIndex.set(e,new Set),this.exportedNodesIndex.has(e)||this.exportedNodesIndex.set(e,new Set)},PopExecutionContext:function(){this.executionContextStack.pop(),this.ExecutionContext()||(this.importedNodesIndex.clear(),this.exportedNodesIndex.clear())},ExecutionContext:function(){return this.executionContextStack.at(-1)},EnterScope:function(){0===this.level&&(this.newName=0),++this.level},LeaveScope:function(){--this.level,0===this.level&&(this.nodes.clear(),this.namesByNode.clear(),this.importedNames.clear())},ExportedNodes:function(e){const t=this.exportedNodesIndex.get(this.ExecutionContext());e.forEach((function(e){try{t.add(e.getLocalNode())}catch(e){}}))},ImportedNodes:function(e){const t=this.importedNodesIndex.get(this.ExecutionContext());e.forEach((function(e){try{t.add(e.getInlineNode())}catch(e){}}))},AddImportedNode:function(e,t){this.importedNames.set(e,t)},AddRouteNode:function(e){this.routeNodes.add(e)},ExistsRouteNode:function(e){return this.routeNodes.has(e)},IsSharedNode:function(e){return this.ExecutionContext()!==e.getExecutionContext()},AddNode:function(e){this.nodes.add(e),this.AddRouteNode(e)},ExistsNode:function(e){return this.nodes.has(e)},Name:function(){const e=/_\d+$/;return function(t){const i=this.namesByNode.get(t);if(void 0!==i)return i;{const i=this.names.get(this.ExecutionContext());if(0===t.getName().length){if(this.NeedsName(t)){const e=this.UniqueName();return i.set(e,t),this.namesByNode.set(t,e),e}return t.getName()}let n=t.getName();const r=null!==n.match(e);if(n=n.replace(e,""),0===n.length){if(!this.NeedsName(t))return"";n=this.UniqueName()}else{let e=0,t=r?n+"_"+ ++e:n;for(;i.has(t);)t=n+"_"+ ++e;n=t}return i.set(n,t),this.namesByNode.set(t,n),n}}}(),NeedsName:function(e){if(e.getCloneCount()>1)return!0;if(e.hasRoutes())return!0;const t=e.getExecutionContext(),i=this.importedNodesIndex.get(t);if(!i){const i=this.exportedNodesIndex.get(t);return!(!i||!i.has(e))}return!!i.has(e)||void 0},UniqueName:function(){const e=this.names.get(this.ExecutionContext());for(;;){const t="_"+ ++this.newName;if(!e.has(t))return t}},LocalName:function(e){const t=this.importedNames.get(e);if(void 0!==t)return t;if(this.ExistsNode(e))return this.Name(e);throw new Error("Couldn't get local name for node '"+e.getTypeName()+"'.")},PushContainerField:function(e){this.containerFields.push(e)},PopContainerField:function(){this.containerFields.pop()},ContainerField:function(){return this.containerFields.length?this.containerFields[this.containerFields.length-1]:null},AccessType:function(t){switch(t){case e.initializeOnly:return"initializeOnly";case e.inputOnly:return"inputOnly";case e.outputOnly:return"outputOnly";case e.inputOutput:return"inputOutput"}},SetUnits:function(e){this.units=e},GetUnits:function(){return this.units},PushUnitCategory:function(e){this.unitCategories.push(e)},PopUnitCategory:function(){this.unitCategories.pop()},Unit:function(e){return 0==this.unitCategories.length?e:this.unitCategories.at(-1)},ToUnit:function(e,t){if(this.units){const i=this.ExecutionContext();if(i)return i.toUnit(e,t)}return t},XMLEncode:function(e){return e.replace(/&/g,"&").replace(/\\/g,"\").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,'\\"')},escapeCDATA:function(e){return e.replace(/\]\]\>/g,"\\]\\]\\>")}};for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t.Get=function(e){return e.generator||(e.generator=new t),e.generator},t})),define("standard/Utility/MapUtilities",["require"],(function(e){"use strict";return{assign:function(e,t){return e.clear(),t.forEach((function(t,i){e.set(i,t)})),e},values:function(e,t){let i=0;return t.forEach((function(t){e[i++]=t})),e.length=t.size,e}}})),define("x_ite/Base/X3DObject",["x_ite/InputOutput/Generator","standard/Utility/MapUtilities"],(function(e,t){"use strict";const i=Symbol(),n=Symbol(),r=Symbol();function o(){}o.prototype={constructor:o,[i]:"",[n]:new Map,[r]:[],getId:function(){return o.getId(this)},getTypeName:function(){return"X3DObject"},setName:function(e){this[i]=e},getName:function(){return this[i]},getDisplayName:function(){return this[i]},getInterestId:function(e,t){return o.getId(t)+"."+String(e)},hasInterest:function(e,t){return this[n].has(this.getInterestId(e,t))},addInterest:function(e,t){this[n]===o.prototype[n]&&(this[n]=new Map,this[r]=[]);const i=this.getInterestId(e,t),s=t[e];if(arguments.length>2){const e=Array.prototype.slice.call(arguments,2);e.unshift(t),e.push(this),this[n].set(i,Function.prototype.bind.apply(s,e))}else this[n].set(i,s.bind(t,this))},removeInterest:function(e,t){this[n].delete(this.getInterestId(e,t))},getInterests:function(){return this[n]},processInterests:function(){if(this[n].size)for(const e of t.values(this[r],this[n]))e()},toString:function(t){const i={string:""};return t&&e.Get(i).PushExecutionContext(t),this.toStream(i),i.string},toVRMLString:function(){const e={string:""};return this.toVRMLStream(e),e.string},toXMLString:function(){const e={string:""};return this.toXMLStream(e),e.string},toJSONString:function(){const e={string:""};return this.toVRMLStream(e),e.string},toStream:function(e){e.string="[object "+this.getTypeName()+"]"},dispose:function(){}};for(const e of Reflect.ownKeys(o.prototype))Object.defineProperty(o.prototype,e,{enumerable:!1});return o.getId=function(){const e=new WeakMap;let t=0;return function(i){const n=e.get(i);return void 0!==n?n:(e.set(i,++t),t)}}(),o})),define("x_ite/Base/X3DChildObject",["x_ite/Base/X3DObject"],(function(e){"use strict";const t=Symbol(),i=Symbol(),n=Symbol();function r(){e.call(this)}r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,[t]:0,[i]:!1,[n]:new Set,setModificationTime:function(e){this[t]=e},getModificationTime:function(){return this[t]},setTainted:function(e){this[i]=e},isTainted:function(){return this[i]},addEvent:function(){this.setModificationTime(performance.now());for(const e of this[n])e.addEvent(this)},addEventObject:function(e,t){this.setModificationTime(performance.now());for(const e of this[n])e.addEventObject(this,t)},addParent:function(e){this[n]===r.prototype[n]&&(this[n]=new Set),this[n].add(e)},removeParent:function(e){this[n].delete(e)},getParents:function(){return this[n]},dispose:function(){this[n].clear(),e.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});return r})),define("x_ite/Base/Events",[],(function(){"use strict";const e=Symbol();function t(){this[e]=[]}t.prototype={create:function(t){if(this[e].length){const i=this[e].pop();return i.field=t,i.clear(),i}const i=new Set;return i.field=t,i},copy:function(t){if(this[e].length){const i=this[e].pop();i.field=t.field,i.clear();for(const e of t)i.add(e);return i}const i=new Set(t);return i.field=t.field,i},push:function(t){this[e].push(t)},clear:function(){this[e].length=0}};for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return new t})),define("x_ite/Base/X3DEventObject",["x_ite/Base/X3DChildObject","x_ite/Base/Events"],(function(e,t){"use strict";const i=Symbol.for("X3DEventObject.browser");function n(t){e.call(this),this[i]=t}n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,getBrowser:function(){return this[i]},getExtendedEventHandling:function(){return!0},addEvent:function(e){e.isTainted()||(e.setTainted(!0),this.addEventObject(e,t.create(e)))},addEventObject:function(e,t){const i=this.getBrowser();i.addBrowserEvent(),i.addTaintedField(e,t),this.isTainted()||(e.isInput()||this.getExtendedEventHandling()&&!e.isOutput())&&this.addNodeEvent()},addNodeEvent:function(){if(this.isTainted())return;const e=this.getBrowser();this.setTainted(!0),e.addTaintedNode(this),e.addBrowserEvent()},processEvents:function(){this.setTainted(!1),this.processInterests()}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Base/X3DFieldDefinition",["x_ite/Base/X3DObject"],(function(e){"use strict";function t(e,t,i){this.accessType=e,this.dataType=i.getType(),this.name=t,this.value=i}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"X3DFieldDefinition"}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/X3DInfoArray",["x_ite/Base/X3DBaseNode"],(function(){"use strict";const e=Symbol(),t=Symbol(),i={get:function(t,i){const n=t[i];if(void 0!==n)return n;if("string"==typeof i){const n=+i;return Number.isInteger(n)?t[e][n]:void 0}},set:function(e,t,i){return void 0!==e[t]&&(e[t]=i,!0)},has:function(t,i){return Number.isInteger(+i)?i<t[e].length:i in t},ownKeys:function(t){return Object.keys(t[e])},getOwnPropertyDescriptor:function(t,i){if("string"!=typeof i)return;const n=+i;if(Number.isInteger(n)&&n<t[e].length){const n=Object.getOwnPropertyDescriptor(t[e],i);return n&&(n.writable=!1),n}}};function n(n){if(this[e]=[],this[t]=new Map,this[Symbol.iterator]=this[e][Symbol.iterator],n)for(const e of n)this.add(e.name,e);return new Proxy(this,i)}n.prototype={constructor:n,equals:function(t){const i=this[e],n=t[e]||t,r=i.length;if(i===n)return!0;if(r!==n.length)return!1;for(let e=0;e<r;++e)if(i[e]!==n[e])return!1;return!0},has:function(e){return this[t].has(e)},get:function(e){return this[t].get(e)},add:function(i,n){this[e].push(n),this[t].set(i,n)},addAlias:function(e,i){this[t].set(e,this[t].get(i))},update:function(i,n,r){const o=this[t].get(i);if(i!==n&&this.remove(n),this[t].delete(i),this[t].set(n,r),void 0!==o){const t=this[e].indexOf(o);t>-1&&(this[e][t]=r)}else this[e].push(r)},remove:function(i){const n=this[t].get(i);if(void 0===n)return;const r=this[e].indexOf(n);this[t].delete(i),r>-1&&this[e].splice(r,1)},at:Array.prototype.at,concat:Array.prototype.concat,every:Array.prototype.every,fill:Array.prototype.fill,filter:Array.prototype.filter,find:Array.prototype.find,findIndex:Array.prototype.findIndex,forEach:Array.prototype.forEach,includes:Array.prototype.includes,indexOf:Array.prototype.indexOf,join:Array.prototype.join,keys:function(){return Array(this.length).keys()},lastIndexOf:Array.prototype.lastIndexOf,map:Array.prototype.map,reduce:Array.prototype.reduce,reduceRight:Array.prototype.reduceRight,slice:Array.prototype.slice,some:Array.prototype.some,values:function(){return this[Symbol.iterator]},toString:function(e){const t={string:""};return e&&Generator.Get(t).PushExecutionContext(e),this.toStream(t),t.string},toVRMLStream:function(t){const i=require("x_ite/Base/X3DBaseNode");for(const n of this[e])try{n.toVRMLStream(t),t.string+="\n",n instanceof i&&(t.string+="\n")}catch(e){console.error(e)}},toXMLStream:function(t){for(const i of this[e])try{i.toXMLStream(t),t.string+="\n"}catch(e){console.error(e)}},toStream:function(e){e.string="[object "+this.getTypeName()+"]"}};for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return Object.defineProperty(n.prototype,"length",{get:function(){return this[e].length},enumerable:!1,configurable:!1}),n})),define("x_ite/Base/FieldDefinitionArray",["x_ite/Base/X3DInfoArray"],(function(e){"use strict";function t(t){return e.call(this,t)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"FieldDefinitionArray"}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/FieldArray",["x_ite/Base/X3DInfoArray"],(function(e){"use strict";function t(){return e.call(this)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"FieldArray"}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/X3DField",["jquery","x_ite/Base/X3DChildObject","x_ite/Base/X3DConstants","x_ite/Base/Events","standard/Utility/MapUtilities"],(function(e,t,i,n,r){"use strict";const o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol.for("X3DField.uniformLocation");function m(e){return t.call(this),this[o]=e,this}m.prototype=Object.assign(Object.create(t.prototype),{constructor:m,[o]:null,[s]:i.initializeOnly,[a]:null,[g]:null,[u]:new Set,[l]:new Map,[c]:new Set,[h]:new Map,[d]:new Set,[p]:new Set,[f]:new Map,create:function(){return new this.constructor},equals:function(e){return this[o]===e.valueOf()},assign:function(e){this.set(e.getValue()),this.addEvent()},set:function(e){this[o]=e},setValue:function(e){this.set(e instanceof this.constructor?e.getValue():e),this.addEvent()},getValue:function(){return this[o]},setAccessType:function(e){this[s]=e},getAccessType:function(){return this[s]},isInitializable:function(){return this[s]&i.initializeOnly},isInput:function(){return this[s]&i.inputOnly},isOutput:function(){return this[s]&i.outputOnly},isReadable:function(){return this[s]!==i.inputOnly},isWritable:function(){return this[s]!==i.initializeOnly},setUnit:function(e){this[a]=e},getUnit:function(){return this[a]},hasReferences:function(){return 0!==this[u].size},isReference:function(e){return e===this[s]||e===i.inputOutput},addReference:function(e){const t=this.getReferences();if(!t.has(e)){switch(t.add(e),this.getAccessType()&e.getAccessType()){case i.initializeOnly:e.addFieldInterest(this),this.assign(e);break;case i.inputOnly:e.addFieldInterest(this);break;case i.outputOnly:this.addFieldInterest(e);break;case i.inputOutput:e.addFieldInterest(this),this.addFieldInterest(e),this.assign(e)}this.processReferencesCallbacks()}},removeReference:function(e){switch(this.getReferences().delete(e),this.getAccessType()&e.getAccessType()){case i.initializeOnly:case i.inputOnly:e.removeFieldInterest(this);break;case i.outputOnly:this.removeFieldInterest(e);break;case i.inputOutput:e.removeFieldInterest(this),this.removeFieldInterest(e)}this.processReferencesCallbacks()},getReferences:function(){return this[u]===m.prototype[u]&&(this[u]=new Set),this[u]},addReferencesCallback:function(e,t){this[l]===m.prototype[l]&&(this[l]=new Map),this[l].set(e,t)},removeReferencesCallback:function(e){this[l].delete(e)},getReferencesCallbacks:function(){return this[l]},processReferencesCallbacks:function(){const e=[];return function(){if(this[l].size)for(const t of r.values(e,this[l]))t()}}(),addFieldInterest:function(e){this[c]===m.prototype[c]&&(this[c]=new Set),this[c].add(e)},removeFieldInterest:function(e){this[c].delete(e)},getFieldInterests:function(){return this[c]},addFieldCallback:function(e,t){this[h]===m.prototype[h]&&(this[h]=new Map),this[h].set(e,t)},removeFieldCallback:function(e){this[h].delete(e)},getFieldCallbacks:function(){return this[h]},addInputRoute:function(e){this[d]===m.prototype[d]&&(this[d]=new Set),this[d].add(e),this.processRouteCallbacks()},removeInputRoute:function(e){this[d].delete(e),this.processRouteCallbacks()},getInputRoutes:function(){return this[d]},addOutputRoute:function(e){this[p]===m.prototype[p]&&(this[p]=new Set),this[p].add(e),this.processRouteCallbacks()},removeOutputRoute:function(e){this[p].delete(e),this.processRouteCallbacks()},getOutputRoutes:function(){return this[p]},addRouteCallback:function(e,t){this[f]===m.prototype[f]&&(this[f]=new Map),this[f].set(e,t)},removeRouteCallback:function(e){this[f].delete(e)},getRouteCallbacks:function(){return this[f]},processRouteCallbacks:function(){const e=[];return function(){if(this[f].size)for(const t of r.values(e,this[f]))t()}}(),processEvent:function(){const e=[];return function(t=n.create(this)){if(t.has(this))return;t.add(this),this.setTainted(!1);const i=t.field;i!==this&&this.set(i.getValue(),i.length),this.processInterests();let o=!0;if(this[c].size)for(const e of this[c].values())o?(o=!1,e.addEventObject(this,t)):e.addEventObject(this,n.copy(t));if(o&&n.push(t),this[h].size)for(const t of r.values(e,this[h]))t(this.valueOf())}}(),addCloneCount:Function.prototype,removeCloneCount:Function.prototype,valueOf:function(){return this},fromString:function(e,t){const i=new(require("x_ite/Parser/VRMLParser"))(t);if(i.setUnits(!!t),i.setInput(e),!i.fieldValue(this))throw new Error("Couldn't read value for field '"+this.getName()+"'.")},dispose:function(){for(const e of new Set(this[d]))e.dispose();for(const e of new Set(this[p]))e.dispose();t.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(m.prototype))Object.defineProperty(m.prototype,e,{enumerable:!1});return m})),define("x_ite/Fields/SFBool",["x_ite/Base/X3DField","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(t){return e.call(this,!!t)}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,copy:function(){return new i(this.getValue())},isDefaultValue:function(){return!1===this.getValue()},set:function(t){e.prototype.set.call(this,!!t)},getTypeName:function(){return"SFBool"},getType:function(){return t.SFBool},valueOf:function(){return this.getValue()},toStream:function(e){e.string+=this.getValue()?"TRUE":"FALSE"},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){e.string+=this.getValue()?"true":"false"}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("standard/Math/Algorithm",[],(function(){"use strict";function e(){}return e.prototype={constructor:e,radians:function(e){return e*(Math.PI/180)},degrees:function(e){return e*(180/Math.PI)},random:function(e,t){return e+Math.random()*(t-e)},fract:function(e){return e>0?e-Math.floor(e):e-Math.ceil(e)},clamp:function(e,t,i){return Math.min(Math.max(e,t),i)},interval:function(e,t,i){return e>=i?(e-t)%(i-t)+t:e<t?(e-i)%(i-t)+i:e},lerp:function(e,t,i){return e+i*(t-e)},slerp:function(e,t,i){let n=e.dot(t);if(n<=-1)throw new Error("slerp is not possible: vectors are inverse collinear.");if(n>=1)return e;n<0&&(n=-n,t.negate());const r=Math.acos(n),o=Math.sin(r),s=Math.sin((1-i)*r)/o,a=Math.sin(i*r)/o;return e.x=e.x*s+t.x*a,e.y=e.y*s+t.y*a,e.z=e.z*s+t.z*a,e.w=e.w*s+t.w*a,e},simpleSlerp:function(e,t,i){const n=e.dot(t);if(n<=-1)throw new Error("slerp is not possible: vectors are inverse collinear.");if(n>=1)return e;const r=Math.acos(n),o=Math.sin(r),s=Math.sin((1-i)*r)/o,a=Math.sin(i*r)/o;return e.x=e.x*s+t.x*a,e.y=e.y*s+t.y*a,e.z=e.z*s+t.z*a,e.w=e.w*s+t.w*a,e},isPowerOfTwo:function(e){return 0==(e-1&e)},nextPowerOfTwo:function(e){return this.isPowerOfTwo(e)?e:1<<32-Math.clz32(e)},cmp:function(e,t){return e>t?1:e<t?-1:0},less:function(e,t){return e<t},greater:function(e,t){return e>t},lowerBound:function(e,t,i,n,r){let o=0,s=0,a=i-t;for(;a>0;)s=a>>>1,o=t+s,r(e[o],n)?(t=++o,a-=s+1):a=s;return t},upperBound:function(e,t,i,n,r){let o=0,s=0,a=i-t;for(;a>0;)s=a>>>1,o=t+s,r(n,e[o])?a=s:(t=++o,a-=s+1);return t},set_difference:function(e,t,i){for(const n of e)t.has(n)||i.add(n);return i},map_difference:function(e,t,i){for(const[n,r]of e)t.has(n)||i.set(n,r);return i}},new e})),define("standard/Math/Numbers/Color3",["standard/Math/Algorithm"],(function(e){"use strict";const t=e.clamp,i=Symbol.for("X_ITE.Color3.r"),n=Symbol.for("X_ITE.Color3.g"),r=Symbol.for("X_ITE.Color3.b");function o(e,o,s){arguments.length?(this[i]=t(e,0,1),this[n]=t(o,0,1),this[r]=t(s,0,1)):(this[i]=0,this[n]=0,this[r]=0)}o.prototype={constructor:o,length:3,copy:function(){const e=Object.create(o.prototype);return e[i]=this[i],e[n]=this[n],e[r]=this[r],e},assign:function(e){this[i]=e[i],this[n]=e[n],this[r]=e[r]},set:function(e,o,s){this[i]=t(e,0,1),this[n]=t(o,0,1),this[r]=t(s,0,1)},equals:function(e){return this[i]===e[i]&&this[n]===e[n]&&this[r]===e[r]},getHSV:function(e){let t,o,s;const a=Math.min(this[i],this[n],this[r]),u=Math.max(this[i],this[n],this[r]);s=u;const l=u-a;return 0!==u&&0!==l?(o=l/u,t=this[i]===u?(this[n]-this[r])/l:this[n]===u?2+(this[r]-this[i])/l:4+(this[i]-this[n])/l,t*=Math.PI/3,t<0&&(t+=2*Math.PI)):o=t=0,e[0]=t,e[1]=o,e[2]=s,e},setHSV:function(o,s,a){if(s=t(s,0,1),a=t(a,0,1),0===s)this[i]=this[n]=this[r]=a;else{const t=e.degrees(e.interval(o,0,2*Math.PI))/60,u=Math.floor(t),l=t-u,c=a*(1-s),h=a*(1-s*l),d=a*(1-s*(1-l));switch(u%6){case 0:this[i]=a,this[n]=d,this[r]=c;break;case 1:this[i]=h,this[n]=a,this[r]=c;break;case 2:this[i]=c,this[n]=a,this[r]=d;break;case 3:this[i]=c,this[n]=h,this[r]=a;break;case 4:this[i]=d,this[n]=c,this[r]=a;break;default:this[i]=a,this[n]=c,this[r]=h}}},toString:function(){return this[i]+" "+this[n]+" "+this[r]}};const s={get:function(){return this[i]},set:function(e){this[i]=t(e,0,1)},enumerable:!0,configurable:!1},a={get:function(){return this[n]},set:function(e){this[n]=t(e,0,1)},enumerable:!0,configurable:!1},u={get:function(){return this[r]},set:function(e){this[r]=t(e,0,1)},enumerable:!0,configurable:!1};return Object.defineProperty(o.prototype,"r",s),Object.defineProperty(o.prototype,"g",a),Object.defineProperty(o.prototype,"b",u),s.enumerable=!1,a.enumerable=!1,u.enumerable=!1,Object.defineProperty(o.prototype,"0",s),Object.defineProperty(o.prototype,"1",a),Object.defineProperty(o.prototype,"2",u),Object.assign(o,{HSV:function(e,t,i){const n=Object.create(this.prototype);return n.setHSV(e,t,i),n},lerp:function(e,t,i,n){let r=e[0],o=t[0];const s=e[1],a=t[1],u=e[2],l=t[2];0===s&&(r=o),0===a&&(o=r);const c=Math.abs(o-r);if(c<=Math.PI)return n[0]=r+i*(o-r),n[1]=s+i*(a-s),n[2]=u+i*(l-u),n;const h=2*Math.PI,d=(h-c)*i;let p=r<o?r-d:r+d;return p<0?p+=h:p>h&&(p-=h),n[0]=p,n[1]=s+i*(a-s),n[2]=u+i*(l-u),n}}),o})),define("x_ite/Fields/SFColor",["standard/Math/Numbers/Color3","x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i,n){"use strict";function r(i,n,r){switch(arguments.length){case 0:return t.call(this,new e);case 1:return t.call(this,arguments[0]);case 3:return t.call(this,new e(+i,+n,+r))}throw new Error("Invalid arguments.")}r.prototype=Object.assign(Object.create(t.prototype),{constructor:r,copy:function(){return new r(this.getValue().copy())},getTypeName:function(){return"SFColor"},getType:function(){return i.SFColor},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return 0===this.getValue().r&&0===this.getValue().g&&0===this.getValue().b},set:function(e){this.getValue().assign(e)},getHSV:function(){return this.getValue().getHSV([])},setHSV:function(e,t,i){this.getValue().setHSV(e,t,i),this.addEvent()},lerp:function(){const t=[],i=[],n=[];return function(o,s){const a=new r;return this.getValue().getHSV(t),o.getValue().getHSV(i),e.lerp(t,i,s,n),a.setHSV(n[0],n[1],n[2],n[3]),a}}(),toStream:function(e){const t=n.Get(e),i=this.getValue(),r=i.length-1;for(let n=0;n<r;++n)e.string+=t.Precision(i[n]),e.string+=" ";e.string+=t.Precision(i[r])},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});const o={get:function(){return this.getValue().r},set:function(e){this.getValue().r=+e,this.addEvent()},enumerable:!0,configurable:!1},s={get:function(){return this.getValue().g},set:function(e){this.getValue().g=+e,this.addEvent()},enumerable:!0,configurable:!1},a={get:function(){return this.getValue().b},set:function(e){this.getValue().b=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(r.prototype,"r",o),Object.defineProperty(r.prototype,"g",s),Object.defineProperty(r.prototype,"b",a),o.enumerable=!1,s.enumerable=!1,a.enumerable=!1,Object.defineProperty(r.prototype,"0",o),Object.defineProperty(r.prototype,"1",s),Object.defineProperty(r.prototype,"2",a),r})),define("standard/Math/Numbers/Color4",["standard/Math/Numbers/Color3","standard/Math/Algorithm"],(function(e,t){"use strict";const i=t.clamp,n=Symbol.for("X_ITE.Color3.r"),r=Symbol.for("X_ITE.Color3.g"),o=Symbol.for("X_ITE.Color3.b"),s=Symbol();function a(e,t,a,u){arguments.length?(this[n]=i(e,0,1),this[r]=i(t,0,1),this[o]=i(a,0,1),this[s]=i(u,0,1)):(this[n]=0,this[r]=0,this[o]=0,this[s]=0)}a.prototype={constructor:a,length:4,copy:function(){const e=Object.create(a.prototype);return e[n]=this[n],e[r]=this[r],e[o]=this[o],e[s]=this[s],e},assign:function(e){this[n]=e[n],this[r]=e[r],this[o]=e[o],this[s]=e[s]},set:function(e,t,a,u){this[n]=i(e,0,1),this[r]=i(t,0,1),this[o]=i(a,0,1),this[s]=i(u,0,1)},equals:function(e){return this[n]===e[n]&&this[r]===e[r]&&this[o]===e[o]&&this[s]===e[s]},getHSVA:function(t){return e.prototype.getHSV.call(this,t),t[3]=this[s],t},setHSVA:function(t,n,r,o){e.prototype.setHSV.call(this,t,n,r),this[s]=i(o,0,1)},toString:function(){return this[n]+" "+this[r]+" "+this[o]+" "+this[s]}};const u={get:function(){return this[n]},set:function(e){this[n]=i(e,0,1)},enumerable:!0,configurable:!1},l={get:function(){return this[r]},set:function(e){this[r]=i(e,0,1)},enumerable:!0,configurable:!1},c={get:function(){return this[o]},set:function(e){this[o]=i(e,0,1)},enumerable:!0,configurable:!1},h={get:function(){return this[s]},set:function(e){this[s]=i(e,0,1)},enumerable:!0,configurable:!1};return Object.defineProperty(a.prototype,"r",u),Object.defineProperty(a.prototype,"g",l),Object.defineProperty(a.prototype,"b",c),Object.defineProperty(a.prototype,"a",h),u.enumerable=!1,l.enumerable=!1,c.enumerable=!1,h.enumerable=!1,Object.defineProperty(a.prototype,"0",u),Object.defineProperty(a.prototype,"1",l),Object.defineProperty(a.prototype,"2",c),Object.defineProperty(a.prototype,"3",h),Object.assign(a,{HSVA:function(e,t,i,n){const r=Object.create(this.prototype);return r.setHSVA(e,t,i,n),r},lerp:function(t,i,n,r){const o=t[3];return e.lerp(t,i,n,r),r[3]=o+n*(i[3]-o),r}}),a})),define("x_ite/Fields/SFColorRGBA",["x_ite/Base/X3DField","x_ite/Fields/SFColor","x_ite/Base/X3DConstants","standard/Math/Numbers/Color4"],(function(e,t,i,n){"use strict";function r(t,i,r,o){switch(arguments.length){case 0:return e.call(this,new n);case 1:return e.call(this,arguments[0]);case 4:return e.call(this,new n(+t,+i,+r,+o))}throw new Error("Invalid arguments.")}r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,copy:function(){return new r(this.getValue().copy())},getTypeName:function(){return"SFColorRGBA"},getType:function(){return i.SFColorRGBA},equals:t.prototype.equals,isDefaultValue:function(){return 0===this.getValue().r&&0===this.getValue().g&&0===this.getValue().b&&0===this.getValue().a},set:t.prototype.set,getHSVA:function(){return this.getValue().getHSVA([])},setHSVA:function(e,t,i,n){this.getValue().setHSVA(e,t,i,n),this.addEvent()},lerp:function(){const e=[],t=[],i=[];return function(o,s){const a=new r;return this.getValue().getHSVA(e),o.getValue().getHSVA(t),n.lerp(e,t,s,i),a.setHSVA(i[0],i[1],i[2],i[3]),a}}(),toStream:t.prototype.toStream,toVRMLStream:t.prototype.toVRMLStream,toXMLStream:t.prototype.toXMLStream});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});const o={get:function(){return this.getValue().r},set:function(e){this.getValue().r=+e,this.addEvent()},enumerable:!0,configurable:!1},s={get:function(){return this.getValue().g},set:function(e){this.getValue().g=+e,this.addEvent()},enumerable:!0,configurable:!1},a={get:function(){return this.getValue().b},set:function(e){this.getValue().b=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().a},set:function(e){this.getValue().a=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(r.prototype,"r",o),Object.defineProperty(r.prototype,"g",s),Object.defineProperty(r.prototype,"b",a),Object.defineProperty(r.prototype,"a",u),o.enumerable=!1,s.enumerable=!1,a.enumerable=!1,u.enumerable=!1,Object.defineProperty(r.prototype,"0",o),Object.defineProperty(r.prototype,"1",s),Object.defineProperty(r.prototype,"2",a),Object.defineProperty(r.prototype,"3",u),r})),define("x_ite/Fields/SFDouble",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i){"use strict";function n(t){return e.call(this,arguments.length?+t:0)}n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,copy:function(){return new n(this.getValue())},getTypeName:function(){return"SFDouble"},getType:function(){return t.SFDouble},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,+t)},valueOf:e.prototype.getValue,toStream:function(e){const t=i.Get(e),n=t.Unit(this.getUnit());e.string+=t.DoublePrecision(t.ToUnit(n,this.getValue()))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Fields/SFFloat",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i){"use strict";function n(t){return e.call(this,arguments.length?+t:0)}n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,copy:function(){return new n(this.getValue())},getTypeName:function(){return"SFFloat"},getType:function(){return t.SFFloat},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,+t)},valueOf:e.prototype.getValue,toStream:function(e){const t=i.Get(e),n=t.Unit(this.getUnit());e.string+=t.Precision(t.ToUnit(n,this.getValue()))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Fields/SFInt32",["x_ite/Base/X3DField","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(t){return e.call(this,~~t)}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,copy:function(){return new i(this.getValue())},getTypeName:function(){return"SFInt32"},getType:function(){return t.SFInt32},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,~~t)},valueOf:e.prototype.getValue,toStream:function(e,t){e.string+=this.getValue().toString(t)},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){e.string+=this.getValue().toString()}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("x_ite/Fields/SFImage",["x_ite/Base/X3DField","x_ite/Fields/SFInt32","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(e,t,i,n){const r=require("x_ite/Fields/ArrayFields").MFInt32;this.width=~~e,this.height=~~t,this.comp=~~i,this.array=new r,this.array.setValue(n),this.array.length=this.width*this.height}function r(t,i,r,o){const s=require("x_ite/Fields/ArrayFields").MFInt32;return arguments[0]instanceof n?e.call(this,arguments[0]):4===arguments.length?e.call(this,new n(t,i,r,o)):e.call(this,new n(0,0,0,new s)),this.getValue().getArray().addParent(this),this.addInterest("set_size__",this),this}n.prototype={constructor:n,copy:function(){return new n(this.width,this.height,this.comp,this.array)},equals:function(e){return this.width===e.width&&this.height===e.height&&this.comp===e.comp&&this.array.equals(e.array)},assign:function(e){this.width=e.width,this.height=e.height,this.comp=e.comp,this.array.assign(e.array)},set:function(e,t,i,n){this.width=~~e,this.height=~~t,this.comp=~~i,this.array.assign(n)},setWidth:function(e){this.width=~~e,this.array.length=this.width*this.height},getWidth:function(){return this.width},setHeight:function(e){this.height=~~e,this.array.length=this.width*this.height},getHeight:function(){return this.height},setComp:function(e){this.comp=~~e},getComp:function(){return this.comp},setArray:function(e){this.array.assign(e),this.array.length=this.width*this.height},getArray:function(){return this.array}},r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,set_size__:function(){this.getValue().getArray().length=this.width*this.height},copy:function(){return new r(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return 0===this.width&&0===this.height&&0===this.comp},set:function(e){this.getValue().assign(e)},getTypeName:function(){return"SFImage"},getType:function(){return i.SFImage},toStream:function(e){const i=this.array,n=new t;e.string+=this.width+" "+this.height+" "+this.comp;for(let t=0,r=this.width*this.height;t<r;++t)e.string+=" 0x",n.set(i[t]),n.toXMLStream(e)},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(r.prototype))Object.defineProperty(r.prototype,e,{enumerable:!1});const o={get:function(){return this.getValue().getWidth()},set:function(e){this.getValue().setWidth(e),this.addEvent()},enumerable:!0,configurable:!1},s={get:function(){return this.getValue().getHeight()},set:function(e){this.getValue().setHeight(e),this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(r.prototype,"width",o),Object.defineProperty(r.prototype,"height",s),Object.defineProperty(r.prototype,"comp",{get:function(){return this.getValue().getComp()},set:function(e){this.getValue().setComp(e),this.addEvent()},enumerable:!0,configurable:!1}),Object.defineProperty(r.prototype,"array",{get:function(){return this.getValue().getArray()},set:function(e){this.getValue().setArray(e),this.addEvent()},enumerable:!0,configurable:!1}),o.enumerable=!1,s.enumerable=!1,Object.defineProperty(r.prototype,"x",o),Object.defineProperty(r.prototype,"y",s),r})),define("x_ite/Fields/SFMatrixPrototypeTemplate",["x_ite/Base/X3DField"],(function(e){"use strict";return function(t,i,n){return Object.assign(Object.create(e.prototype),{copy:function(){return new this.constructor(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return this.getValue().equals(t.Identity)},set:function(e){this.getValue().assign(e)},setTransform:function(e,t,i,n,r){e=e?e.getValue():null,t=t?t.getValue():null,i=i?i.getValue():null,n=n?n.getValue():null,r=r?r.getValue():null,this.getValue().set(e,t,i,n,r)},getTransform:function(e,t,i,n,r){e=e?e.getValue():null,t=t?t.getValue():null,i=i?i.getValue():null,n=n?n.getValue():null,r=r?r.getValue():null,this.getValue().get(e,t,i,n,r)},determinant:function(){return this.getValue().determinant()},transpose:function(){return new this.constructor(t.transpose(this.getValue()))},inverse:function(){return new this.constructor(t.inverse(this.getValue()))},multLeft:function(e){return new this.constructor(t.multLeft(this.getValue(),e.getValue()))},multRight:function(e){return new this.constructor(t.multRight(this.getValue(),e.getValue()))},multVecMatrix:function(e){return new i(this.getValue().multVecMatrix(e.getValue().copy()))},multMatrixVec:function(e){return new i(this.getValue().multMatrixVec(e.getValue().copy()))},multDirMatrix:function(e){return new i(this.getValue().multDirMatrix(e.getValue().copy()))},multMatrixDir:function(e){return new i(this.getValue().multMatrixDir(e.getValue().copy()))},toStream:function(e){const t=Generator.Get(e),i=this.getValue(),r=i.length-1;for(let o=0;o<r;++o)e.string+=n?t.DoublePrecision(i[o]):t.Precision(i[o]),e.string+=" ";e.string+=n?t.DoublePrecision(i[r]):t.Precision(i[r])},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}})}})),define("x_ite/Fields/SFVecPrototypeTemplate",["x_ite/Base/X3DField","x_ite/InputOutput/Generator"],(function(e,t){"use strict";return function(i,n){return Object.assign(Object.create(e.prototype),{copy:function(){return new this.constructor(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return this.getValue().equals(i.Zero)},set:function(e){this.getValue().assign(e)},add:function(e){return new this.constructor(i.add(this.getValue(),e.getValue()))},distance:function(e){return this.getValue().distance(e.getValue())},divide:function(e){return new this.constructor(i.divide(this.getValue(),e))},divVec:function(e){return new this.constructor(i.divVec(this.getValue(),e.getValue()))},dot:function(e){return this.getValue().dot(e.getValue())},length:function(){return this.getValue().abs()},lerp:function(e,t){return new this.constructor(i.lerp(this.getValue(),e,t))},multiply:function(e){return new this.constructor(i.multiply(this.getValue(),e))},multVec:function(e){return new this.constructor(i.multVec(this.getValue(),e.getValue()))},negate:function(){return new this.constructor(i.negate(this.getValue().copy()))},normalize:function(e){return new this.constructor(i.normalize(this.getValue()))},subtract:function(e){return new this.constructor(i.subtract(this.getValue(),e.getValue()))},toStream:function(e){const i=t.Get(e),r=this.getValue(),o=i.Unit(this.getUnit()),s=r.length-1;for(let t=0;t<s;++t)e.string+=n?i.DoublePrecision(i.ToUnit(o,r[t])):i.Precision(i.ToUnit(o,r[t])),e.string+=" ";e.string+=n?i.DoublePrecision(i.ToUnit(o,r[s])):i.Precision(i.ToUnit(o,r[s]))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}})}})),define("standard/Math/Numbers/Vector2",["standard/Math/Algorithm"],(function(e){"use strict";function t(e,t){this.x=e,this.y=t}return t.prototype={constructor:t,length:2,copy:function(){const e=Object.create(t.prototype);return e.x=this.x,e.y=this.y,e},assign:function(e){return this.x=e.x,this.y=e.y,this},set:function(e,t){return this.x=e,this.y=t,this},equals:function(e){return this.x===e.x&&this.y===e.y},negate:function(){return this.x=-this.x,this.y=-this.y,this},add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this},multiply:function(e){return this.x*=e,this.y*=e,this},multVec:function(e){return this.x*=e.x,this.y*=e.y,this},divide:function(e){return this.x/=e,this.y/=e,this},divVec:function(e){return this.x/=e.x,this.y/=e.y,this},normalize:function(){let e=Math.hypot(this.x,this.y);return e&&(e=1/e,this.x*=e,this.y*=e),this},dot:function(e){return this.x*e.x+this.y*e.y},norm:function(){const e=this.x,t=this.y;return e*e+t*t},abs:function(){return Math.hypot(this.x,this.y)},distance:function(e){return Math.hypot(this.x-e.x,this.y-e.y)},lerp:function(e,t){const i=this.x,n=this.y;return this.x=i+t*(e.x-i),this.y=n+t*(e.y-n),this},min:function(e){let t=this.x,i=this.y;for(const e of arguments)t=Math.min(t,e.x),i=Math.min(i,e.y);return this.x=t,this.y=i,this},max:function(e){let t=this.x,i=this.y;for(const e of arguments)t=Math.max(t,e.x),i=Math.max(i,e.y);return this.x=t,this.y=i,this},toString:function(){return this.x+" "+this.y}},Object.defineProperty(t.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.assign(t,{Zero:new t(0,0),One:new t(1,1),negate:function(e){return e.copy().negate()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multVec:function(e,t){return e.copy().multVec(t)},divide:function(e,t){return e.copy().divide(t)},divVec:function(e,t){return e.copy().divVec(t)},normalize:function(e){return e.copy().normalize()},dot:function(e,t){return e.copy().dot(t)},lerp:function(e,t,i){return e.copy().lerp(t,i)},min:function(e,i){return t.prototype.min.apply(e.copy(),arguments)},max:function(e,i){return t.prototype.max.apply(e.copy(),arguments)}}),t})),define("x_ite/Fields/SFVec2",["x_ite/Base/X3DField","x_ite/Fields/SFVecPrototypeTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n){"use strict";function r(i,r,o){function s(t,i){switch(arguments.length){case 0:return e.call(this,new n(0,0));case 1:return e.call(this,arguments[0]);case 2:return e.call(this,new n(+t,+i))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(e.prototype),t(n,o),{constructor:s,getTypeName:function(){return i},getType:function(){return r}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),a.enumerable=!1,u.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),s}return{SFVec2d:r("SFVec2d",i.SFVec2d,!0),SFVec2f:r("SFVec2f",i.SFVec2f,!1)}})),define("standard/Math/Numbers/Vector3",["standard/Math/Algorithm"],(function(e){"use strict";function t(e,t,i){this.x=e,this.y=t,this.z=i}return t.prototype={constructor:t,length:3,copy:function(){const e=Object.create(t.prototype);return e.x=this.x,e.y=this.y,e.z=this.z,e},assign:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},equals:function(e){return this.x===e.x&&this.y===e.y&&this.z===e.z},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},add:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this},multiply:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multVec:function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this},divide:function(e){return this.x/=e,this.y/=e,this.z/=e,this},divVec:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},cross:function(e){const t=this.x,i=this.y,n=this.z;return this.x=i*e.z-n*e.y,this.y=n*e.x-t*e.z,this.z=t*e.y-i*e.x,this},normalize:function(){let e=Math.hypot(this.x,this.y,this.z);return e&&(e=1/e,this.x*=e,this.y*=e,this.z*=e),this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},norm:function(){let e=this.x,t=this.y,i=this.z;return e*e+t*t+i*i},abs:function(){return Math.hypot(this.x,this.y,this.z)},distance:function(e){return Math.hypot(this.x-e.x,this.y-e.y,this.z-e.z)},lerp:function(e,t){const i=this.x,n=this.y,r=this.z;return this.x=i+t*(e.x-i),this.y=n+t*(e.y-n),this.z=r+t*(e.z-r),this},slerp:function(){const i=new t(0,0,0);return function(t,n){return e.simpleSlerp(this,i.assign(t),n)}}(),min:function(e){let t=this.x,i=this.y,n=this.z;for(const e of arguments)t=Math.min(t,e.x),i=Math.min(i,e.y),n=Math.min(n,e.z);return this.x=t,this.y=i,this.z=n,this},max:function(e){let t=this.x,i=this.y,n=this.z;for(const e of arguments)t=Math.max(t,e.x),i=Math.max(i,e.y),n=Math.max(n,e.z);return this.x=t,this.y=i,this.z=n,this},toString:function(){return this.x+" "+this.y+" "+this.z}},Object.defineProperty(t.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"2",{get:function(){return this.z},set:function(e){this.z=e},enumerable:!1,configurable:!1}),Object.assign(t,{Zero:new t(0,0,0),One:new t(1,1,1),xAxis:new t(1,0,0),yAxis:new t(0,1,0),zAxis:new t(0,0,1),negate:function(e){return e.copy().negate()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multVec:function(e,t){return e.copy().multVec(t)},divide:function(e,t){return e.copy().divide(t)},divVec:function(e,t){return e.copy().divVec(t)},cross:function(e,t){return e.copy().cross(t)},normalize:function(e){return e.copy().normalize()},dot:function(e,t){return e.copy().dot(t)},lerp:function(e,t,i){return e.copy().lerp(t,i)},slerp:function(e,t,i){return e.copy().slerp(t,i)},min:function(e,i){return t.prototype.min.apply(e.copy(),arguments)},max:function(e,i){return t.prototype.max.apply(e.copy(),arguments)}}),t})),define("standard/Math/Numbers/Matrix2",["standard/Math/Numbers/Vector2","standard/Math/Algorithm"],(function(e,t){"use strict";function i(){arguments.length?(this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3]):this.identity()}return i.prototype={constructor:i,order:2,length:4,copy:function(){const e=Object.create(i.prototype);return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[3],e},assign:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this},equals:function(e){return this[0]===e[0]&&this[1]===e[1]&&this[2]===e[2]&&this[3]===e[3]},set1:function(e,t,i){this[e*this.order+t]=i},get1:function(e,t){return this[e*this.order+t]},set:function(){switch(arguments.length){case 0:this.identity();break;case 4:this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3]}},determinant1:function(){return this[0]},determinant:function(){return this[0]*this[3]-this[1]*this[2]},transpose:function(){const e=this[1];return this[1]=this[2],this[2]=e,this},inverse:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=e*n-t*i;if(0===r)throw new Error("Matrix2 .inverse: determinant is 0.");return this[0]=n/r,this[1]=-t/r,this[2]=-i/r,this[3]=e/r,this},multLeft:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=e[0],s=e[1],a=e[2],u=e[3];return this[0]=t*o+n*s,this[1]=i*o+r*s,this[2]=t*a+n*u,this[3]=i*a+r*u,this},multRight:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=e[0],s=e[1],a=e[2],u=e[3];return this[0]=o*t+a*i,this[1]=s*t+u*i,this[2]=o*n+a*r,this[3]=s*n+u*r,this},identity:function(){this[0]=1,this[1]=0,this[2]=0,this[3]=1},toString:function(){return this[0]+" "+this[1]+" "+this[2]+" "+this[3]}},Object.defineProperty(i.prototype,"x",{get:function(){const t=new e(0,0);return function(){return t.set(this[0],this[1])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(i.prototype,"xAxis",{get:function(){return this[0]},enumerable:!1,configurable:!1}),Object.defineProperty(i.prototype,"origin",{get:function(){return this[2]},enumerable:!1,configurable:!1}),Object.defineProperty(i.prototype,"submatrix",{get:function(){return this[0]},enumerable:!1,configurable:!1}),Object.assign(i,{Identity:new i}),i})),define("standard/Math/Algorithms/eigendecomposition",[],(function(){"use strict";const e=[],t=[],i=[];return function(n,r){const o=n.order,s=r.values,a=r.vectors;let u,l,c,h,d,p,f,g,m,_,y,x,w,b=n.length;for(x=0;x<o;++x)for(e[x]=e[x]||new Array(o),t[x]=s[x]=n.get1(x,x),i[x]=0,w=0;w<o;++w)a[x][w]=x===w?1:0,e[x][w]=n.get1(w,x);for(x=0;x<50;++x){for(u=0,_=0;_<o-1;++_)for(y=_+1;y<o;++y)u+=Math.abs(e[_][y]);if(0===u)break;for(m=x<3?.2*u/b:0,_=0;_<o-1;++_)for(y=_+1;y<o;++y)if(g=100*Math.abs(e[_][y]),x>3&&Math.abs(s[_])+g===Math.abs(s[_])&&Math.abs(s[y])+g===Math.abs(s[y]))e[_][y]=0;else if(Math.abs(e[_][y])>m){for(f=s[y]-s[_],Math.abs(f)+g===Math.abs(f)?d=e[_][y]/f:(l=.5*f/e[_][y],d=1/(Math.abs(l)+Math.sqrt(1+l*l)),l<0&&(d=-d)),c=1/Math.sqrt(1+d*d),h=d*c,p=h/(1+c),f=d*e[_][y],i[_]-=f,i[y]+=f,s[_]-=f,s[y]+=f,e[_][y]=0,w=0;w<_;++w)g=e[w][_],f=e[w][y],e[w][_]=g-h*(f+g*p),e[w][y]=f+h*(g-f*p);for(w=_+1;w<y;++w)g=e[_][w],f=e[w][y],e[_][w]=g-h*(f+g*p),e[w][y]=f+h*(g-f*p);for(w=y+1;w<o;++w)g=e[_][w],f=e[y][w],e[_][w]=g-h*(f+g*p),e[y][w]=f+h*(g-f*p);for(w=0;w<o;++w)g=a[w][_],f=a[w][y],a[w][_]=g-h*(f+g*p),a[w][y]=f+h*(g-f*p)}for(_=0;_<o;++_)s[_]=t[_]+=i[_],i[_]=0}return r}})),define("standard/Math/Numbers/Matrix3",["standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix2","standard/Math/Algorithms/eigendecomposition"],(function(e,t,i,n){"use strict";function r(){arguments.length?(this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8]):this.identity()}return r.prototype={constructor:r,order:3,length:9,copy:function(){const e=Object.create(r.prototype);return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[3],e[4]=this[4],e[5]=this[5],e[6]=this[6],e[7]=this[7],e[8]=this[8],e},assign:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this},equals:function(e){return this[0]===e[0]&&this[1]===e[1]&&this[2]===e[2]&&this[3]===e[3]&&this[4]===e[4]&&this[5]===e[5]&&this[6]===e[6]&&this[7]===e[7]&&this[8]===e[8]},rotation:function(){return math.atan2(this[1],this[0])},set1:function(e,t,i){return this[e*this.order+t]=i,this},get1:function(e,t){return this[e*this.order+t]},set:function(t,i,n,r,o){switch(arguments.length){case 0:this.identity();break;case 1:null===t&&(t=e.Zero),this.identity(),this.translate(t);break;case 2:null===t&&(t=e.Zero),null===i&&(i=0),this.identity(),this.translate(t),0!==i&&this.rotate(i);break;case 3:null===t&&(t=e.Zero),null===i&&(i=0),null===n&&(n=e.One),this.identity(),this.translate(t),0!==i&&this.rotate(i),n.equals(e.One)||this.scale(n);break;case 4:if(null===t&&(t=e.Zero),null===i&&(i=0),null===n&&(n=e.One),null===r&&(r=0),this.identity(),this.translate(t),0!==i&&this.rotate(i),!n.equals(e.One)){0!==r?(this.rotate(r),this.scale(n),this.rotate(-r)):this.scale(n)}break;case 5:{null===t&&(t=e.Zero),null===i&&(i=0),null===n&&(n=e.One),null===r&&(r=0),null===o&&(o=e.Zero),this.identity(),this.translate(t);const s=!o.equals(e.Zero);s&&this.translate(o),0!==i&&this.rotate(i),n.equals(e.One)||(0!==r?(this.rotate(r),this.scale(n),this.rotate(-r)):this.scale(n)),s&&this.translate(e.negate(o));break}case 9:this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8]}return this},get:function(){const n=new e(0,0),o=new t(0,0,0),s=new e(0,0),a=new t(0,0,0),u=new e(0,0),l=new i,c=new i,h=new e(0,0);return function(e,t,i,d,p){switch(null===e&&(e=n),null===t&&(t=o),null===i&&(i=s),null===d&&(d=a),null===p&&(p=u),arguments.length){case 1:e.set(this[6],this[7]);break;case 2:this.factor(e,l,s,c),t[0]=l[0],t[1]=l[1],t[2]=Math.atan2(l[1],l[0]);break;case 3:this.factor(e,l,i,c),t[0]=l[0],t[1]=l[1],t[2]=Math.atan2(l[1],l[0]);break;case 4:this.factor(e,l,i,c),t[0]=l[0],t[1]=l[1],t[2]=Math.atan2(l[1],l[0]),d[0]=c[0],d[1]=c[1],d[2]=Math.atan2(c[1],c[0]);break;case 5:{const n=new r;n.set(h.assign(p).negate()),n.multLeft(this),n.translate(p),n.get(e,t,i,d);break}}}}(),factor:function(){const e=new i,t=new i,r=new i,o={values:[],vectors:[[],[]]};return function(i,s,a,u){i.set(this[6],this[7]);const l=this.submatrix,c=l.determinant(),h=c<0?-1:1;if(0===c)throw new Error("Matrix3 .factor: determinant is 0.");r.assign(l).transpose().multLeft(l);const d=n(r,o);u.set(d.vectors[0][0],d.vectors[1][0],d.vectors[0][1],d.vectors[1][1]),a.x=h*Math.sqrt(d.values[0]),a.y=h*Math.sqrt(d.values[1]),e[0]=1/a.x,e[3]=1/a.y,s.assign(t.assign(u).transpose().multRight(e).multRight(u).multRight(l))}}(),determinant2:function(){return this[0]*this[4]-this[1]*this[3]},determinant:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8];return e*(r*u-o*a)-t*(n*u-o*s)+i*(n*a-r*s)},transpose:function(){let e;return e=this[1],this[1]=this[3],this[3]=e,e=this[2],this[2]=this[6],this[6]=e,e=this[5],this[5]=this[7],this[7]=e,this},inverse:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8],l=e*r,c=e*a,h=n*t,d=n*a,p=s*t,f=s*r;let g=l*u-c*o-h*u+d*i+p*o-f*i;if(0===g)throw new Error("Matrix3 .inverse: determinant is 0.");g=1/g;const m=(r*u-a*o)*g,_=-(t*u-a*i)*g,y=(t*o-r*i)*g,x=-(n*u-s*o)*g,w=(e*u-s*i)*g,b=-(e*o-n*i)*g;return this[0]=m,this[1]=_,this[2]=y,this[3]=x,this[4]=w,this[5]=b,this[6]=(d-f)*g,this[7]=-(c-p)*g,this[8]=(l-h)*g,this},multLeft:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=e[0],h=e[1],d=e[2],p=e[3],f=e[4],g=e[5],m=e[6],_=e[7],y=e[8];return this[0]=t*c+r*h+a*d,this[1]=i*c+o*h+u*d,this[2]=n*c+s*h+l*d,this[3]=t*p+r*f+a*g,this[4]=i*p+o*f+u*g,this[5]=n*p+s*f+l*g,this[6]=t*m+r*_+a*y,this[7]=i*m+o*_+u*y,this[8]=n*m+s*_+l*y,this},multRight:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=e[0],h=e[1],d=e[2],p=e[3],f=e[4],g=e[5],m=e[6],_=e[7],y=e[8];return this[0]=t*c+i*p+n*m,this[1]=t*h+i*f+n*_,this[2]=t*d+i*g+n*y,this[3]=r*c+o*p+s*m,this[4]=r*h+o*f+s*_,this[5]=r*d+o*g+s*y,this[6]=a*c+u*p+l*m,this[7]=a*h+u*f+l*_,this[8]=a*d+u*g+l*y,this},multVecMatrix:function(e){if(2===e.length){const t=e.x,i=e.y,n=t*this[2]+i*this[5]+this[8];return e.x=(t*this[0]+i*this[3]+this[6])/n,e.y=(t*this[1]+i*this[4]+this[7])/n,e}const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[3]+n*this[6],e.y=t*this[1]+i*this[4]+n*this[7],e.z=t*this[2]+i*this[5]+n*this[8],e},multMatrixVec:function(e){if(2===e.length){const t=e.x,i=e.y,n=t*this[6]+i*this[7]+this[8];return e.x=(t*this[0]+i*this[1]+this[2])/n,e.y=(t*this[3]+i*this[4]+this[5])/n,e}const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[1]+n*this[2],e.y=t*this[3]+i*this[4]+n*this[5],e.z=t*this[6]+i*this[7]+n*this[8],e},multDirMatrix:function(e){const t=e.x,i=e.y;return e.x=t*this[0]+i*this[3],e.y=t*this[1]+i*this[4],e},multMatrixDir:function(e){const t=e.x,i=e.y;return e.x=t*this[0]+i*this[1],e.y=t*this[3]+i*this[4],e},identity:function(){this[0]=1,this[1]=0,this[2]=0,this[3]=0,this[4]=1,this[5]=0,this[6]=0,this[7]=0,this[8]=1},translate:function(e){const t=e.x,i=e.y;return this[6]+=this[0]*t+this[3]*i,this[7]+=this[1]*t+this[4]*i,this},rotate:function(e){return this.multLeft(r.Rotation(e)),this},scale:function(e){const t=e.x,i=e.y;return this[0]*=t,this[3]*=i,this[1]*=t,this[4]*=i,this},toString:function(){return this[0]+" "+this[1]+" "+this[2]+" "+this[3]+" "+this[4]+" "+this[5]+" "+this[6]+" "+this[7]+" "+this[8]}},Object.defineProperty(r.prototype,"x",{get:function(){const e=new t(0,0,0);return function(){return e.set(this[0],this[1],this[2])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"y",{get:function(){const e=new t(0,0,0);return function(){return e.set(this[3],this[4],this[5])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"xAxis",{get:function(){const t=new e(0,0);return function(){return t.set(this[0],this[1])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"yAxis",{get:function(){const t=new e(0,0);return function(){return t.set(this[3],this[4])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"origin",{get:function(){const t=new e(0,0);return function(){return t.set(this[6],this[7])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(r.prototype,"submatrix",{get:function(){const e=new i;return function(){return e[0]=this[0],e[1]=this[1],e[2]=this[3],e[3]=this[4],e}}(),enumerable:!1,configurable:!1}),Object.assign(r,{Identity:new r,Rotation:function(e){const t=Math.sin(e),i=Math.cos(e);return new r(i,t,0,-t,i,0,0,0,1)},Matrix2:function(e){return new r(e[0],e[1],0,e[2],e[3],0,0,0,1)},transpose:function(e){return e.copy().transpose()},inverse:function(e){return e.copy().inverse()},multLeft:function(e,t){return e.copy().multLeft(t)},multRight:function(e,t){return e.copy().multRight(t)}}),r})),define("x_ite/Fields/SFMatrix3",["x_ite/Base/X3DField","x_ite/Fields/SFMatrixPrototypeTemplate","x_ite/Fields/SFVec2","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix3"],(function(e,t,i,n,r){"use strict";function o(i,n,o,s){function a(t,i,n,o,s,a,u,l,c){switch(arguments.length){case 0:return e.call(this,new r);case 1:return e.call(this,arguments[0]);case 9:return e.call(this,new r(+t,+i,+n,+o,+s,+a,+u,+l,+c))}throw new Error("Invalid arguments.")}a.prototype=Object.assign(Object.create(e.prototype),t(r,o,s),{constructor:a,getTypeName:function(){return i},getType:function(){return n},setTransform:function(e,t,i,n,r){e=e?e.getValue():null,t=t||0,i=i?i.getValue():null,n=n||0,r=r?r.getValue():null,this.getValue().set(e,t,i,n,r)}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});function u(e){Object.defineProperty(a.prototype,e,{get:function(){return this.getValue()[e]},set:function(t){this.getValue()[e]=+t,this.addEvent()},enumerable:!0,configurable:!1})}for(let e=0,t=r.prototype.length;e<t;++e)u(e);return a}return{SFMatrix3d:o("SFMatrix3d",n.SFMatrix3d,i.SFVec2d,!0),SFMatrix3f:o("SFMatrix3f",n.SFMatrix3f,i.SFVec2f,!1)}})),define("x_ite/Fields/SFVec3",["x_ite/Base/X3DField","x_ite/Fields/SFVecPrototypeTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n){"use strict";function r(i,r,o){function s(t,i,r){switch(arguments.length){case 0:return e.call(this,new n(0,0,0));case 1:return e.call(this,arguments[0]);case 3:return e.call(this,new n(+t,+i,+r))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(e.prototype),t(n,o),{constructor:s,getTypeName:function(){return i},getType:function(){return r},cross:function(e){return new this.constructor(n.cross(this.getValue(),e.getValue()))}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1},l={get:function(){return this.getValue().z},set:function(e){this.getValue().z=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),Object.defineProperty(s.prototype,"z",l),a.enumerable=!1,u.enumerable=!1,l.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),Object.defineProperty(s.prototype,"2",l),s}return{SFVec3d:r("SFVec3d",i.SFVec3d,!0),SFVec3f:r("SFVec3f",i.SFVec3f,!1)}})),define("standard/Math/Numbers/Vector4",["standard/Math/Algorithm"],(function(e){"use strict";function t(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}return t.prototype={constructor:t,length:4,copy:function(){const e=Object.create(t.prototype);return e.x=this.x,e.y=this.y,e.z=this.z,e.w=this.w,e},assign:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},set:function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},equals:function(e){return this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},getReal:function(e){e.x=this.x/this.w,e.y=this.y/this.w,e.z=this.z/this.w},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},add:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},multiply:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},multVec:function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},divide:function(e){return this.x/=e,this.y/=e,this.z/=e,this.w/=e,this},divVec:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this},normalize:function(){let e=Math.hypot(this.x,this.y,this.z,this.w);return e&&(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},norm:function(){const e=this.x,t=this.y,i=this.z,n=this.w;return e*e+t*t+i*i+n*n},abs:function(){return Math.hypot(this.x,this.y,this.z,this.w)},distance:function(e){return Math.hypot(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},lerp:function(e,t){const i=this.x,n=this.y,r=this.z,o=this.w;return this.x=i+t*(e.x-i),this.y=n+t*(e.y-n),this.z=r+t*(e.z-r),this.w=o+t*(e.w-o),this},min:function(e){let t=this.x,i=this.y,n=this.z,r=this.w;for(const e of arguments)t=Math.min(t,e.x),i=Math.min(i,e.y),n=Math.min(n,e.z),r=Math.min(r,e.w);return this.x=t,this.y=i,this.z=n,this.w=r,this},max:function(e){let t=this.x,i=this.y,n=this.z,r=this.w;for(const e of arguments)t=Math.max(t,e.x),i=Math.max(i,e.y),n=Math.max(n,e.z),r=Math.max(r,e.w);return this.x=t,this.y=i,this.z=n,this.w=r,this},toString:function(){return this.x+" "+this.y+" "+this.z+" "+this.w}},Object.defineProperty(t.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"2",{get:function(){return this.z},set:function(e){this.z=e},enumerable:!1,configurable:!1}),Object.defineProperty(t.prototype,"3",{get:function(){return this.w},set:function(e){this.w=e},enumerable:!1,configurable:!1}),Object.assign(t,{Zero:new t(0,0,0,0),One:new t(1,1,1,1),xAxis:new t(1,0,0,0),yAxis:new t(0,1,0,0),zAxis:new t(0,0,1,0),wAxis:new t(0,0,0,1),negate:function(e){return e.copy().negate()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multVec:function(e,t){return e.copy().multVec(t)},divide:function(e,t){return e.copy().divide(t)},divVec:function(e,t){return e.copy().divVec(t)},normalize:function(e){return e.copy().normalize()},dot:function(e,t){return e.copy().dot(t)},lerp:function(e,t,i){return e.copy().lerp(t,i)},min:function(e,i){return t.prototype.min.apply(e.copy(),arguments)},max:function(e,i){return t.prototype.max.apply(e.copy(),arguments)}}),t})),define("standard/Math/Numbers/Quaternion",["standard/Math/Numbers/Vector3","standard/Math/Algorithm"],(function(t,i){"use strict";function n(e,t,i,n){this.x=e,this.y=t,this.z=i,this.w=n}n.prototype={constructor:n,length:4,copy:function(){const e=Object.create(n.prototype);return e.x=this.x,e.y=this.y,e.z=this.z,e.w=this.w,e},assign:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},set:function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},setMatrix:function(e){let t;t=e[0]>e[4]?e[0]>e[8]?0:2:e[4]>e[8]?1:2;const i=e[0]+e[4]+e[8];if(i>e[3*t+t]){this[3]=Math.sqrt(i+1)/2;const t=4*this[3];this[0]=(e[5]-e[7])/t,this[1]=(e[6]-e[2])/t,this[2]=(e[1]-e[3])/t}else{const i=(t+1)%3,n=(t+2)%3;this[t]=Math.sqrt(e[3*t+t]-e[3*i+i]-e[3*n+n]+1)/2;const r=4*this[t];this[i]=(e[3*t+i]+e[3*i+t])/r,this[n]=(e[3*t+n]+e[3*n+t])/r,this[3]=(e[3*i+n]-e[3*n+i])/r}return this},getMatrix:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=t*t,s=t*i,a=i*i,u=i*n,l=n*t,c=n*n,h=r*t,d=r*i,p=r*n;return e[0]=1-2*(a+c),e[1]=2*(s+p),e[2]=2*(l-d),e[3]=2*(s-p),e[4]=1-2*(c+o),e[5]=2*(u+h),e[6]=2*(l+d),e[7]=2*(u-h),e[8]=1-2*(a+o),e},isReal:function(){return!(this.x||this.y||this.z)},isImag:function(){return!this.w},equals:function(e){return this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},inverse:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},add:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},subtract:function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},multiply:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},multLeft:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=e.w;return this.x=r*o+t*u+i*a-n*s,this.y=r*s+i*u+n*o-t*a,this.z=r*a+n*u+t*s-i*o,this.w=r*u-t*o-i*s-n*a,this},multRight:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=e.w;return this.x=u*t+o*r+s*n-a*i,this.y=u*i+s*r+a*t-o*n,this.z=u*n+a*r+o*i-s*t,this.w=u*r-o*t-s*i-a*n,this},divide:function(e){return this.x/=e,this.y/=e,this.z/=e,this.w/=e,this},multVecQuat:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=r*r-t*t-i*i-n*n,l=2*(o*t+s*i+a*n),c=2*r;return e.x=u*o+l*t+c*(i*a-n*s),e.y=u*s+l*i+c*(n*o-t*a),e.z=u*a+l*n+c*(t*s-i*o),e},multQuatVec:function(e){const t=this.x,i=this.y,n=this.z,r=this.w,o=e.x,s=e.y,a=e.z,u=r*r-t*t-i*i-n*n,l=2*(o*t+s*i+a*n),c=2*r;return e.x=u*o+l*t-c*(i*a-n*s),e.y=u*s+l*i-c*(n*o-t*a),e.z=u*a+l*n-c*(t*s-i*o),e},normalize:function(){let e=Math.hypot(this.x,this.y,this.z,this.w);return e&&(e=1/e,this.x*=e,this.y*=e,this.z*=e,this.w*=e),this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},norm:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},abs:function(){return Math.hypot(this.x,this.y,this.z,this.w)},pow:function(t){if(t instanceof n)return this.assign(e.assign(t).multRight(this.log()).exp());if(this.isReal())return this.set(0,0,0,Math.pow(this.w,t));const i=this.abs(),r=Math.acos(this.w/i),o=this.imag.abs(),s=Math.pow(i,t),a=t*r,u=s/o*Math.sin(a);return this.x*=u,this.y*=u,this.z*=u,this.w=s*Math.cos(a),this},log:function(){if(this.isReal())return this.w>0?this.set(0,0,0,Math.log(this.w)):this.set(Math.PI,0,0,Math.log(-this.w));const e=this.abs(),t=this.imag.normalize().multiply(Math.acos(this.w/e)),i=Math.log(e);return this.x=t.x,this.y=t.y,this.z=t.z,this.w=i,this},exp:function(){if(this.isReal())return this.set(0,0,0,Math.exp(this.w));const e=this.imag,t=e.abs(),i=Math.exp(this.w),n=i*Math.cos(t),r=e.multiply(i*Math.sin(t)/t);return this.x=r.x,this.y=r.y,this.z=r.z,this.w=n,this},slerp:function(e,t){return i.slerp(this,r.assign(e),t)},squad:function(e,t,n,a){return i.slerp(i.slerp(this,r.assign(n),a),i.slerp(o.assign(e),s.assign(t),a),2*a*(1-a))},toString:function(){return this.x+" "+this.y+" "+this.z+" "+this.w}},Object.defineProperty(n.prototype,"0",{get:function(){return this.x},set:function(e){this.x=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"1",{get:function(){return this.y},set:function(e){this.y=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"2",{get:function(){return this.z},set:function(e){this.z=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"3",{get:function(){return this.w},set:function(e){this.w=e},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"real",{get:function(){return this.w},enumerable:!1,configurable:!1}),Object.defineProperty(n.prototype,"imag",{get:function(){const e=new t(0,0,0);return function(){return e.set(this.x,this.y,this.z)}}(),enumerable:!1,configurable:!1}),Object.assign(n,{negate:function(e){return e.copy().negate()},inverse:function(e){return e.copy().inverse()},add:function(e,t){return e.copy().add(t)},subtract:function(e,t){return e.copy().subtract(t)},multiply:function(e,t){return e.copy().multiply(t)},multLeft:function(e,t){return e.copy().multLeft(t)},multRight:function(e,t){return e.copy().multRight(t)},divide:function(e,t){return e.copy().divide(t)},normalize:function(e){return e.copy().normalize()},slerp:function(e,t,i){return e.copy().slerp(t,i)},squad:function(e,t,i,n,r){return e.copy().squad(t,i,n,r)},spline:function(e,t,i){return a.assign(e),u.assign(t),l.assign(i),a.dot(u)<0&&a.negate(),l.dot(u)<0&&l.negate(),c.assign(u).inverse(),u.multRight(r.assign(c).multRight(a).log().add(o.assign(c).multRight(l).log()).divide(-4).exp()).normalize().copy()}});const r=new n(0,0,0,1),o=new n(0,0,0,1),s=new n(0,0,0,1),a=new n(0,0,0,1),u=new n(0,0,0,1),l=new n(0,0,0,1),c=new n(0,0,0,1);return n})),define("standard/Math/Numbers/Rotation4",["standard/Math/Numbers/Quaternion","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Algorithm"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s=Symbol(),a=Symbol();function u(i,n,u,l){switch(this[r]=0,this[o]=0,this[s]=1,this[a]=0,arguments.length){case 0:return void(this.value=new e(0,0,0,1));case 1:return this.value=arguments[0],void this.update();case 2:{const i=arguments[0],n=arguments[1];return this.value=new e(0,0,0,1),n instanceof t?this.setFromToVec(i,n):void this.set(i.x,i.y,i.z,n)}case 4:return this.value=new e(0,0,0,1),void this.set(i,n,u,l)}}u.prototype={constructor:u,length:4,update:function(){const e=this.get();return this[r]=e.x,this[o]=e.y,this[s]=e.z,this[a]=e.w,this},copy:function(){const e=Object.create(u.prototype);return e[r]=this[r],e[o]=this[o],e[s]=this[s],e[a]=this[a],e.value=this.value.copy(),e},assign:function(e){return this[r]=e[r],this[o]=e[o],this[s]=e[s],this[a]=e[a],this.value.assign(e.value),this},set:function(e,t,i,u){this[r]=e,this[o]=t,this[s]=i,this[a]=u;const l=Math.hypot(e,t,i);if(0===l)return this.value.set(0,0,0,1),this;const c=n.interval(u/2,0,Math.PI),h=Math.sin(c)/l;return this.value.set(e*h,t*h,i*h,Math.cos(c)),this},get:function(){const e=new i(0,0,0,0);return function(){const t=this.value;if(Math.abs(t.w)>1)return i.zAxis;{const n=2*Math.acos(t.w),r=Math.sin(n/2);if(0===r)return i.zAxis;{const i=t.imag.divide(r);return e.set(i.x,i.y,i.z,n)}}}}(),setAxisAngle:function(e,t){return this.set(e.x,e.y,e.z,t)},setFromToVec:function(){const e=new t(0,0,0),i=new t(0,0,0),r=new t(0,0,0),o=new t(0,0,0);return function(s,a){e.assign(s).normalize(),i.assign(a).normalize();const u=n.clamp(e.dot(i),-1,1),l=r.assign(e).cross(i).normalize();return 0===l.abs()?u>0?this.value.set(0,0,0,1):(o.assign(e).cross(t.xAxis),0===o.norm()&&o.assign(e).cross(t.yAxis),o.normalize(),this.value.set(o.x,o.y,o.z,0)):(l.multiply(Math.sqrt(Math.abs(1-u)/2)),this.value.set(l.x,l.y,l.z,Math.sqrt(Math.abs(1+u)/2))),this.update(),this}}(),setAxis:function(e){this.set(e.x,e.y,e.z,this[a])},getAxis:function(){const e=new t(0,0,0);return function(){return e.set(this[r],this[o],this[s])}}(),setMatrix:function(e){return this.value.setMatrix(e).normalize(),this.update(),this},getMatrix:function(e){return this.value.getMatrix(e)},equals:function(e){return this.value.equals(e.value)},inverse:function(){return this.value.inverse(),this.update(),this},multLeft:function(e){return this.value.multLeft(e.value).normalize(),this.update(),this},multRight:function(e){return this.value.multRight(e.value).normalize(),this.update(),this},multVecRot:function(e){return this.value.multVecQuat(e)},multRotVec:function(e){return this.value.multQuatVec(e)},normalize:function(){return this.value.normalize(),this.update(),this},pow:function(e){return this.value.pow(e),this.update(),this},slerp:function(e,t){return this.value.slerp(e.value,t),this.update(),this},squad:function(e,t,i,n){return this.value.squad(e.value,t.value,i.value,n),this.update(),this},toString:function(){return this[r]+" "+this[o]+" "+this[s]+" "+this[a]}};const l={get:function(){return this[r]},set:function(e){this[r]=e,this.set(e,this[o],this[s],this[a])},enumerable:!0,configurable:!1},c={get:function(){return this[o]},set:function(e){this[o]=e,this.set(this[r],e,this[s],this[a])},enumerable:!0,configurable:!1},h={get:function(){return this[s]},set:function(e){this[s]=e,this.set(this[r],this[o],e,this[a])},enumerable:!0,configurable:!1},d={get:function(){return this[a]},set:function(e){this[a]=e,this.set(this[r],this[o],this[s],e)},enumerable:!0,configurable:!1};return Object.defineProperty(u.prototype,"x",l),Object.defineProperty(u.prototype,"y",c),Object.defineProperty(u.prototype,"z",h),Object.defineProperty(u.prototype,"angle",d),l.enumerable=!1,c.enumerable=!1,h.enumerable=!1,d.enumerable=!1,Object.defineProperty(u.prototype,"0",l),Object.defineProperty(u.prototype,"1",c),Object.defineProperty(u.prototype,"2",h),Object.defineProperty(u.prototype,"3",d),Object.assign(u,{Identity:new u,inverse:function(e){return e.copy().inverse()},multRight:function(e,t){return e.copy().multRight(t)},normalize:function(e){return e.copy().normalize()},slerp:function(e,t,i){return e.copy().slerp(t,i)},squad:function(e,t,i,n,r){return e.copy().squad(t,i,n,r)},spline:function(t,i,n){const r=Object.create(this.prototype);return r.value=e.spline(t.value,i.value,n.value),r.update(),r}}),u})),define("standard/Math/Numbers/Matrix4",["standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix3","standard/Math/Algorithms/eigendecomposition"],(function(e,t,i,n,r){"use strict";function o(){arguments.length?(this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8],this[9]=arguments[9],this[10]=arguments[10],this[11]=arguments[11],this[12]=arguments[12],this[13]=arguments[13],this[14]=arguments[14],this[15]=arguments[15]):this.identity()}o.prototype={constructor:o,order:4,length:16,copy:function(){const e=Object.create(o.prototype);return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[3],e[4]=this[4],e[5]=this[5],e[6]=this[6],e[7]=this[7],e[8]=this[8],e[9]=this[9],e[10]=this[10],e[11]=this[11],e[12]=this[12],e[13]=this[13],e[14]=this[14],e[15]=this[15],e},assign:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this},equals:function(e){return this[0]===e[0]&&this[1]===e[1]&&this[2]===e[2]&&this[3]===e[3]&&this[4]===e[4]&&this[5]===e[5]&&this[6]===e[6]&&this[7]===e[7]&&this[8]===e[8]&&this[9]===e[9]&&this[10]===e[10]&&this[11]===e[11]&&this[12]===e[12]&&this[13]===e[13]&&this[14]===e[14]&&this[15]===e[15]},set1:function(e,t,i){return this[e*this.order+t]=i,this},get1:function(e,t){return this[e*this.order+t]},set:function(t,n,r,o,s){switch(arguments.length){case 0:this.identity();break;case 1:null===t&&(t=e.Zero),this.identity(),this.translate(t);break;case 2:null===t&&(t=e.Zero),null===n&&(n=i.Identity),this.identity(),this.translate(t),n.equals(i.Identity)||this.rotate(n);break;case 3:null===t&&(t=e.Zero),null===n&&(n=i.Identity),null===r&&(r=e.One),this.identity(),this.translate(t),n.equals(i.Identity)||this.rotate(n),r.equals(e.One)||this.scale(r);break;case 4:if(null===t&&(t=e.Zero),null===n&&(n=i.Identity),null===r&&(r=e.One),null===o&&(o=i.Identity),this.identity(),this.translate(t),n.equals(i.Identity)||this.rotate(n),!r.equals(e.One)){!o.equals(i.Identity)?(this.rotate(o),this.scale(r),this.rotate(i.inverse(o))):this.scale(r)}break;case 5:{null===t&&(t=e.Zero),null===n&&(n=i.Identity),null===r&&(r=e.One),null===o&&(o=i.Identity),null===s&&(s=e.Zero),this.identity(),this.translate(t);const a=!s.equals(e.Zero);a&&this.translate(s),n.equals(i.Identity)||this.rotate(n),r.equals(e.One)||(o.equals(i.Identity)?this.scale(r):(this.rotate(o),this.scale(r),this.rotate(i.inverse(o)))),a&&this.translate(e.negate(s));break}case 16:this[0]=arguments[0],this[1]=arguments[1],this[2]=arguments[2],this[3]=arguments[3],this[4]=arguments[4],this[5]=arguments[5],this[6]=arguments[6],this[7]=arguments[7],this[8]=arguments[8],this[9]=arguments[9],this[10]=arguments[10],this[11]=arguments[11],this[12]=arguments[12],this[13]=arguments[13],this[14]=arguments[14],this[15]=arguments[15]}return this},get:function(){const t=new e(0,0,0),r=new i,s=new e(0,0,0),a=new i,u=new e(0,0,0),l=new n,c=new n,h=new e(0,0,0);return function(e,i,n,d,p){switch(null===e&&(e=t),null===i&&(i=r),null===n&&(n=s),null===d&&(d=a),null===p&&(p=u),arguments.length){case 1:e.set(this[12],this[13],this[14]);break;case 2:this.factor(e,l,s,c),i.setMatrix(l);break;case 3:this.factor(e,l,n,c),i.setMatrix(l);break;case 4:this.factor(e,l,n,c),i.setMatrix(l),d.setMatrix(c);break;case 5:{const t=new o;t.set(h.assign(p).negate()),t.multLeft(this),t.translate(p),t.get(e,i,n,d);break}}}}(),setRotation:function(e){return this.setQuaternion(e.value)},setQuaternion:function(e){const t=e.x,i=e.y,n=e.z,r=e.w,o=i*i,s=n*n,a=t*i,u=n*r,l=n*t,c=i*r,h=t*t,d=i*n,p=t*r;return this[0]=1-2*(o+s),this[1]=2*(a+u),this[2]=2*(l-c),this[3]=0,this[4]=2*(a-u),this[5]=1-2*(s+h),this[6]=2*(d+p),this[7]=0,this[8]=2*(l+c),this[9]=2*(d-p),this[10]=1-2*(o+h),this[11]=0,this[12]=0,this[13]=0,this[14]=0,this[15]=1,this},factor:function(){const e=new n,t=new n,i=new n,o={values:[],vectors:[[],[],[]]};return function(n,s,a,u){n.set(this[12],this[13],this[14]);const l=this.submatrix,c=l.determinant(),h=c<0?-1:1;if(0===c)throw new Error("Matrix4 .factor: determinant is 0.");i.assign(l).transpose().multLeft(l);const d=r(i,o);u.set(d.vectors[0][0],d.vectors[1][0],d.vectors[2][0],d.vectors[0][1],d.vectors[1][1],d.vectors[2][1],d.vectors[0][2],d.vectors[1][2],d.vectors[2][2]),a.x=h*Math.sqrt(d.values[0]),a.y=h*Math.sqrt(d.values[1]),a.z=h*Math.sqrt(d.values[2]),e[0]=1/a.x,e[4]=1/a.y,e[8]=1/a.z,s.assign(t.assign(u).transpose().multRight(e).multRight(u).multRight(l))}}(),determinant3:function(){const e=this[0],t=this[1],i=this[2],n=this[4],r=this[5],o=this[6],s=this[8],a=this[9],u=this[10];return e*(r*u-o*a)-t*(n*u-o*s)+i*(n*a-r*s)},determinant:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8],l=this[9],c=this[10],h=this[11],d=this[12],p=this[13],f=this[14],g=this[15],m=c*g,_=f*h,y=s*g,x=f*a,w=s*h,b=c*a,v=i*g,S=f*n,T=i*h,C=c*n,N=i*a,F=s*n;return e*(m*o+x*l+w*p-_*o-y*l-b*p)+r*(_*t+v*l+C*p-m*t-S*l-T*p)+u*(y*t+S*o+N*p-x*t-v*o-F*p)+d*(b*t+T*o+F*l-w*t-C*o-N*l)},transpose:function(){let e;return e=this[1],this[1]=this[4],this[4]=e,e=this[2],this[2]=this[8],this[8]=e,e=this[3],this[3]=this[12],this[12]=e,e=this[6],this[6]=this[9],this[9]=e,e=this[7],this[7]=this[13],this[13]=e,e=this[11],this[11]=this[14],this[14]=e,this},inverse:function(){const e=this[0],t=this[1],i=this[2],n=this[3],r=this[4],o=this[5],s=this[6],a=this[7],u=this[8],l=this[9],c=this[10],h=this[11],d=this[12],p=this[13],f=this[14],g=this[15],m=c*g,_=f*h,y=s*g,x=f*a,w=s*h,b=c*a,v=i*g,S=f*n,T=i*h,C=c*n,N=i*a,F=s*n,O=u*p,E=d*l,D=r*p,M=d*o,I=r*l,V=u*o,B=e*p,A=d*t,P=e*l,R=u*t,L=e*o,k=r*t,U=m*o+x*l+w*p-(_*o+y*l+b*p),X=_*t+v*l+C*p-(m*t+S*l+T*p),z=y*t+S*o+N*p-(x*t+v*o+F*p),j=b*t+T*o+F*l-(w*t+C*o+N*l);let G=e*U+r*X+u*z+d*j;if(0===G)throw new Error("Matrix4 .inverse: determinant is 0.");return G=1/G,this[0]=G*U,this[1]=G*X,this[2]=G*z,this[3]=G*j,this[4]=G*(_*r+y*u+b*d-m*r-x*u-w*d),this[5]=G*(m*e+S*u+T*d-_*e-v*u-C*d),this[6]=G*(x*e+v*r+F*d-y*e-S*r-N*d),this[7]=G*(w*e+C*r+N*u-b*e-T*r-F*u),this[8]=G*(O*a+M*h+I*g-E*a-D*h-V*g),this[9]=G*(E*n+B*h+R*g-O*n-A*h-P*g),this[10]=G*(D*n+A*a+L*g-M*n-B*a-k*g),this[11]=G*(V*n+P*a+k*h-I*n-R*a-L*h),this[12]=G*(D*c+V*f+E*s-I*f-O*s-M*c),this[13]=G*(P*f+O*i+A*c-B*c-R*f-E*i),this[14]=G*(B*s+k*f+M*i-L*f-D*i-A*s),this[15]=G*(L*c+I*i+R*s-P*s-k*c-V*i),this},multLeft:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=this[9],h=this[10],d=this[11],p=this[12],f=this[13],g=this[14],m=this[15],_=e[0],y=e[1],x=e[2],w=e[3],b=e[4],v=e[5],S=e[6],T=e[7],C=e[8],N=e[9],F=e[10],O=e[11],E=e[12],D=e[13],M=e[14],I=e[15];return this[0]=t*_+o*y+l*x+p*w,this[1]=i*_+s*y+c*x+f*w,this[2]=n*_+a*y+h*x+g*w,this[3]=r*_+u*y+d*x+m*w,this[4]=t*b+o*v+l*S+p*T,this[5]=i*b+s*v+c*S+f*T,this[6]=n*b+a*v+h*S+g*T,this[7]=r*b+u*v+d*S+m*T,this[8]=t*C+o*N+l*F+p*O,this[9]=i*C+s*N+c*F+f*O,this[10]=n*C+a*N+h*F+g*O,this[11]=r*C+u*N+d*F+m*O,this[12]=t*E+o*D+l*M+p*I,this[13]=i*E+s*D+c*M+f*I,this[14]=n*E+a*D+h*M+g*I,this[15]=r*E+u*D+d*M+m*I,this},multRight:function(e){const t=this[0],i=this[1],n=this[2],r=this[3],o=this[4],s=this[5],a=this[6],u=this[7],l=this[8],c=this[9],h=this[10],d=this[11],p=this[12],f=this[13],g=this[14],m=this[15],_=e[0],y=e[1],x=e[2],w=e[3],b=e[4],v=e[5],S=e[6],T=e[7],C=e[8],N=e[9],F=e[10],O=e[11],E=e[12],D=e[13],M=e[14],I=e[15];return this[0]=t*_+i*b+n*C+r*E,this[1]=t*y+i*v+n*N+r*D,this[2]=t*x+i*S+n*F+r*M,this[3]=t*w+i*T+n*O+r*I,this[4]=o*_+s*b+a*C+u*E,this[5]=o*y+s*v+a*N+u*D,this[6]=o*x+s*S+a*F+u*M,this[7]=o*w+s*T+a*O+u*I,this[8]=l*_+c*b+h*C+d*E,this[9]=l*y+c*v+h*N+d*D,this[10]=l*x+c*S+h*F+d*M,this[11]=l*w+c*T+h*O+d*I,this[12]=p*_+f*b+g*C+m*E,this[13]=p*y+f*v+g*N+m*D,this[14]=p*x+f*S+g*F+m*M,this[15]=p*w+f*T+g*O+m*I,this},multVecMatrix:function(e){if(3===e.length){const t=e.x,i=e.y,n=e.z,r=1/(t*this[3]+i*this[7]+n*this[11]+this[15]);return e.x=(t*this[0]+i*this[4]+n*this[8]+this[12])*r,e.y=(t*this[1]+i*this[5]+n*this[9]+this[13])*r,e.z=(t*this[2]+i*this[6]+n*this[10]+this[14])*r,e}const t=e.x,i=e.y,n=e.z,r=e.w;return e.x=t*this[0]+i*this[4]+n*this[8]+r*this[12],e.y=t*this[1]+i*this[5]+n*this[9]+r*this[13],e.z=t*this[2]+i*this[6]+n*this[10]+r*this[14],e.w=t*this[3]+i*this[7]+n*this[11]+r*this[15],e},multMatrixVec:function(e){if(3===e.length){const t=e.x,i=e.y,n=e.z,r=1/(t*this[12]+i*this[13]+n*this[14]+this[15]);return e.x=(t*this[0]+i*this[1]+n*this[2]+this[3])*r,e.y=(t*this[4]+i*this[5]+n*this[6]+this[7])*r,e.z=(t*this[8]+i*this[9]+n*this[10]+this[11])*r,e}const t=e.x,i=e.y,n=e.z,r=e.w;return e.x=t*this[0]+i*this[1]+n*this[2]+r*this[3],e.y=t*this[4]+i*this[5]+n*this[6]+r*this[7],e.z=t*this[8]+i*this[9]+n*this[10]+r*this[11],e.w=t*this[12]+i*this[13]+n*this[14]+r*this[15],e},multDirMatrix:function(e){const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[4]+n*this[8],e.y=t*this[1]+i*this[5]+n*this[9],e.z=t*this[2]+i*this[6]+n*this[10],e},multMatrixDir:function(e){const t=e.x,i=e.y,n=e.z;return e.x=t*this[0]+i*this[1]+n*this[2],e.y=t*this[4]+i*this[5]+n*this[6],e.z=t*this[8]+i*this[9]+n*this[10],e},identity:function(){this[0]=1,this[1]=0,this[2]=0,this[3]=0,this[4]=0,this[5]=1,this[6]=0,this[7]=0,this[8]=0,this[9]=0,this[10]=1,this[11]=0,this[12]=0,this[13]=0,this[14]=0,this[15]=1},translate:function(e){const t=e.x,i=e.y,n=e.z;return this[12]+=this[0]*t+this[4]*i+this[8]*n,this[13]+=this[1]*t+this[5]*i+this[9]*n,this[14]+=this[2]*t+this[6]*i+this[10]*n,this},rotate:function(e){return this.multLeft(s.setQuaternion(e.value)),this},scale:function(e){const t=e.x,i=e.y,n=e.z;return this[0]*=t,this[4]*=i,this[8]*=n,this[1]*=t,this[5]*=i,this[9]*=n,this[2]*=t,this[6]*=i,this[10]*=n,this},getDepth:function(e){const t=e.x,i=e.y,n=e.z,r=1/(t*this[3]+i*this[7]+n*this[11]+this[15]);return(t*this[2]+i*this[6]+n*this[10]+this[14])*r},toString:function(){return this[0]+" "+this[1]+" "+this[2]+" "+this[3]+" "+this[4]+" "+this[5]+" "+this[6]+" "+this[7]+" "+this[8]+" "+this[9]+" "+this[10]+" "+this[11]+" "+this[12]+" "+this[13]+" "+this[14]+" "+this[15]}},Object.defineProperty(o.prototype,"x",{get:function(){const e=new t(0,0,0,0);return function(){return e.set(this[0],this[1],this[2],this[3])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"y",{get:function(){const e=new t(0,0,0,0);return function(){return e.set(this[4],this[5],this[6],this[7])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"z",{get:function(){const e=new t(0,0,0,0);return function(){return e.set(this[8],this[9],this[10],this[11])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"xAxis",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[0],this[1],this[2])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"yAxis",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[4],this[5],this[6])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"zAxis",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[8],this[9],this[10])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"origin",{get:function(){const t=new e(0,0,0);return function(){return t.set(this[12],this[13],this[14])}}(),enumerable:!1,configurable:!1}),Object.defineProperty(o.prototype,"submatrix",{get:function(){const e=new n;return function(){return e[0]=this[0],e[1]=this[1],e[2]=this[2],e[3]=this[4],e[4]=this[5],e[5]=this[6],e[6]=this[8],e[7]=this[9],e[8]=this[10],e}}(),enumerable:!1,configurable:!1}),Object.assign(o,{Identity:new o,Rotation:function(e){return Object.create(this.prototype).setQuaternion(e.value)},Quaternion:function(e){return Object.create(this.prototype).setQuaternion(e)},Matrix3:function(e){return new o(e[0],e[1],e[2],0,e[3],e[4],e[5],0,e[6],e[7],e[8],0,0,0,0,1)},transpose:function(e){return e.copy().transpose()},inverse:function(e){return e.copy().inverse()},multLeft:function(e,t){return e.copy().multLeft(t)},multRight:function(e,t){return e.copy().multRight(t)}});const s=new o;return o})),define("x_ite/Fields/SFMatrix4",["x_ite/Base/X3DField","x_ite/Fields/SFMatrixPrototypeTemplate","x_ite/Fields/SFVec3","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r){"use strict";function o(i,n,o,s){function a(t,i,n,o,s,a,u,l,c,h,d,p,f,g,m,_){switch(arguments.length){case 0:return e.call(this,new r);case 1:return e.call(this,arguments[0]);case 16:return e.call(this,new r(+t,+i,+n,+o,+s,+a,+u,+l,+c,+h,+d,+p,+f,+g,+m,+_))}throw new Error("Invalid arguments.")}a.prototype=Object.assign(Object.create(e.prototype),t(r,o,s),{constructor:a,getTypeName:function(){return i},getType:function(){return n}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});function u(e){Object.defineProperty(a.prototype,e,{get:function(){return this.getValue()[e]},set:function(t){this.getValue()[e]=t,this.addEvent()},enumerable:!0,configurable:!1})}for(let e=0,t=r.prototype.length;e<t;++e)u(e);return a}return{SFMatrix4d:o("SFMatrix4d",n.SFMatrix4d,i.SFVec3d,!0),SFMatrix4f:o("SFMatrix4f",n.SFMatrix4f,i.SFVec3f,!1),VrmlMatrix:o("VrmlMatrix",n.VrmlMatrix,i.SFVec3f,!1)}})),define("x_ite/Fields/SFNodeCache",["x_ite/Fields/SFNode"],(function(){"use strict";const e=new WeakMap;function t(){}return t.prototype={get:function(t){const i=e.get(t);if(i)return i;{const i=new(require("x_ite/Fields/SFNode"))(t);return e.set(t,i),i}}},new t})),define("x_ite/Fields/SFNode",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator","x_ite/Fields/SFNodeCache"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s=Symbol(),a={get:function(e,i){try{const n=e[i];if(void 0!==n)return n;const r=e.getValue().getField(i);if(r.getAccessType()===t.inputOnly)return;return r.valueOf()}catch(e){return}},set:function(e,i,n){if(i in e)return e[i]=n,!0;try{const r=e.getValue().getField(i);return r.getAccessType()!==t.outputOnly&&r.setValue(n),!0}catch(t){return console.error(e,i,t),!1}},has:function(e,t){try{return Boolean(e.getValue().getField(t))}catch(i){return t in e}},ownKeys:function(e){const t=e.getValue(),i=[];if(t)for(const e of t.getFieldDefinitions())i.push(e.name);return i},getOwnPropertyDescriptor:function(e,i){const n=e.getValue();if(n){const r=n.getFieldDefinitions().get(i);if(r)return{value:this.get(e,i),writable:r.accessType!==t.outputOnly,enumerable:!0,configurable:!0}}}};function u(t){const i=new Proxy(this,a);return this[r]=this,this[o]=i,t?(t.addParent(i),e.call(this,t)):e.call(this,null),i}u.prototype=Object.assign(Object.create(e.prototype),{constructor:u,[r]:null,[o]:null,[s]:0,copy:function(e){const t=this[r].getValue();return t?new u(e?t.copy(e):t):new u},getTypeName:function(){return"SFNode"},getType:function(){return t.SFNode},equals:function(e){const t=this[r];return e?t.getValue()===e.getValue():null===t.getValue()},isDefaultValue:function(){return null===this[r].getValue()},set:function(t){const i=this[r],n=i.getValue();n&&(n.removeCloneCount(i[s]),n.removeParent(i[o])),t?(t.addParent(i[o]),t.addCloneCount(i[s]),e.prototype.set.call(i,t)):e.prototype.set.call(i,null)},getNodeTypeName:function(){const e=this[r].getValue();if(e)return e.getTypeName();throw new Error("SFNode.getNodeTypeName: node is null.")},getNodeName:function(){const e=this[r].getValue();if(e)return e.getName();throw new Error("SFNode.getNodeName: node is null.")},getNodeDisplayName:function(){const e=this[r].getValue();if(e)return e.getDisplayName();throw new Error("SFNode.getNodeDisplayName: node is null.")},getNodeType:function(){const e=this[r].getValue();if(e)return e.getType().slice();throw new Error("SFNode.getNodeType: node is null.")},getFieldDefinitions:function(){const e=this[r].getValue();if(e)return e.getFieldDefinitions();throw new Error("SFNode.getFieldDefinitions: node is null.")},addFieldCallback:function(t,i,n){const o=this[r];switch(arguments.length){case 2:return e.prototype.addFieldCallback.apply(o,arguments);case 3:{const e=o.getValue();if(e)return e.getField(t).addFieldCallback(i,n);throw new Error("SFNode.addFieldCallback: node is null.")}}},removeFieldCallback:function(t,i){const n=this[r];switch(arguments.length){case 1:return e.prototype.removeFieldCallback.apply(n,arguments);case 2:{const e=n.getValue();if(e)return e.getField(t).removeFieldCallback(i);throw new Error("SFNode.removeFieldCallback: node is null.")}}},addCloneCount:function(e){const t=this[r],i=t.getValue();t[s]+=e,i&&i.addCloneCount(e)},removeCloneCount:function(e){const t=this[r],i=t.getValue();t[s]-=e,i&&i.removeCloneCount(e)},valueOf:function(){const e=this[r].getValue();return e?n.get(e):null},toStream:function(e){const t=this[r].getValue();t?t.toStream(e):e.string+="NULL"},toVRMLStream:function(e){const t=this[r].getValue();t?t.toVRMLStream(e):e.string+="NULL"},toXMLString:function(){const e=this[r],t={string:""},n=i.Get(t),o=e.getValue();return n.PushExecutionContext(o.getExecutionContext()),e.toXMLStream(t),n.PopExecutionContext(),t.string},toXMLStream:function(e){const t=this[r].getValue();t?t.toXMLStream(e):e.string+="\x3c!-- NULL --\x3e"},dispose:function(){const t=this[r],i=t.getValue();i&&i.dispose(),e.prototype.dispose.call(t)}});for(const e of Reflect.ownKeys(u.prototype))Object.defineProperty(u.prototype,e,{enumerable:!1});return u})),define("x_ite/Fields/SFRotation",["x_ite/Fields/SFVec3","x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r){"use strict";const o=e.SFVec3f;function s(e,i,n,s){switch(arguments.length){case 0:return t.call(this,new r);case 1:return t.call(this,arguments[0]);case 2:return arguments[1]instanceof o?t.call(this,new r(arguments[0].getValue(),arguments[1].getValue())):t.call(this,new r(arguments[0].getValue(),+arguments[1]));case 4:return t.call(this,new r(+e,+i,+n,+s))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(t.prototype),{constructor:s,copy:function(){return new s(this.getValue().copy())},equals:function(e){return this.getValue().equals(e.getValue())},isDefaultValue:function(){return this.getValue().equals(r.Identity)},getTypeName:function(){return"SFRotation"},getType:function(){return i.SFRotation},set:function(e){this.getValue().assign(e)},setAxis:function(e){this.getValue().setAxis(e.getValue()),this.addEvent()},getAxis:function(){return new o(this.getValue().getAxis().copy())},inverse:function(){return new s(r.inverse(this.getValue()))},multiply:function(e){return new s(r.multRight(this.getValue(),e.getValue()))},multVec:function(e){return new o(this.getValue().multVecRot(e.getValue().copy()))},slerp:function(e,t){return new s(r.slerp(this.getValue(),e.getValue(),t))},toStream:function(e){const t=n.Get(e),i=this.getValue();e.string+=t.DoublePrecision(i.x)+" "+t.DoublePrecision(i.y)+" "+t.DoublePrecision(i.z)+" "+t.DoublePrecision(t.ToUnit("angle",i.angle))},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1},l={get:function(){return this.getValue().z},set:function(e){this.getValue().z=+e,this.addEvent()},enumerable:!0,configurable:!1},c={get:function(){return this.getValue().angle},set:function(e){this.getValue().angle=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),Object.defineProperty(s.prototype,"z",l),Object.defineProperty(s.prototype,"angle",c),a.enumerable=!1,u.enumerable=!1,l.enumerable=!1,c.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),Object.defineProperty(s.prototype,"2",l),Object.defineProperty(s.prototype,"3",c),s})),define("x_ite/Fields/SFString",["x_ite/Base/X3DField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i){"use strict";const n=/\\(.)/g,r=/([\\"])/g;function o(t){return e.call(this,arguments.length?""+t:"")}Object.assign(o,{unescape:function(e){return e.replace(n,"$1")},escape:function(e){return e.replace(r,"\\$1")}}),o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,copy:function(){return new o(this.getValue())},getTypeName:function(){return"SFString"},getType:function(){return t.SFString},isDefaultValue:function(){return""===this.getValue()},set:function(t){e.prototype.set.call(this,""+t)},valueOf:e.prototype.getValue,toStream:function(e){e.string+='"'+o.escape(this.getValue())+'"'},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){e.string+=i.Get(e).XMLEncode(this.getValue())}});for(const e of Reflect.ownKeys(o.prototype))Object.defineProperty(o.prototype,e,{enumerable:!1});return Object.defineProperty(o.prototype,"length",{get:function(){return this.getValue().length},enumerable:!0,configurable:!1}),o})),define("x_ite/Fields/SFTime",["x_ite/Base/X3DField","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(t){return e.call(this,arguments.length?+t:0)}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,copy:function(){return new i(this.getValue())},getTypeName:function(){return"SFTime"},getType:function(){return t.SFTime},isDefaultValue:function(){return 0===this.getValue()},set:function(t){e.prototype.set.call(this,+t)},valueOf:e.prototype.getValue,toStream:function(e){e.string+=this.getValue()},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){this.toStream(e)}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("x_ite/Fields/SFVec4",["x_ite/Base/X3DField","x_ite/Fields/SFVecPrototypeTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector4"],(function(e,t,i,n){"use strict";function r(i,r,o){function s(t,i,r,o){switch(arguments.length){case 0:return e.call(this,new n(0,0,0,0));case 1:return e.call(this,arguments[0]);case 4:return e.call(this,new n(+t,+i,+r,+o))}throw new Error("Invalid arguments.")}s.prototype=Object.assign(Object.create(e.prototype),t(n,o),{constructor:s,getTypeName:function(){return i},getType:function(){return r}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});const a={get:function(){return this.getValue().x},set:function(e){this.getValue().x=+e,this.addEvent()},enumerable:!0,configurable:!1},u={get:function(){return this.getValue().y},set:function(e){this.getValue().y=+e,this.addEvent()},enumerable:!0,configurable:!1},l={get:function(){return this.getValue().z},set:function(e){this.getValue().z=+e,this.addEvent()},enumerable:!0,configurable:!1},c={get:function(){return this.getValue().w},set:function(e){this.getValue().w=+e,this.addEvent()},enumerable:!0,configurable:!1};return Object.defineProperty(s.prototype,"x",a),Object.defineProperty(s.prototype,"y",u),Object.defineProperty(s.prototype,"z",l),Object.defineProperty(s.prototype,"w",c),a.enumerable=!1,u.enumerable=!1,l.enumerable=!1,c.enumerable=!1,Object.defineProperty(s.prototype,"0",a),Object.defineProperty(s.prototype,"1",u),Object.defineProperty(s.prototype,"2",l),Object.defineProperty(s.prototype,"3",c),s}return{SFVec4d:r("SFVec4d",i.SFVec4d,!0),SFVec4f:r("SFVec4f",i.SFVec4f,!1)}})),define("x_ite/Base/X3DArrayField",["x_ite/Base/X3DField"],(function(e){"use strict";function t(t){e.call(this,t)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,at:Array.prototype.at,concat:Array.prototype.concat,every:Array.prototype.every,fill:Array.prototype.fill,filter:Array.prototype.filter,find:Array.prototype.find,findIndex:Array.prototype.findIndex,forEach:Array.prototype.forEach,includes:Array.prototype.includes,indexOf:Array.prototype.indexOf,join:Array.prototype.join,keys:function(){return Array(this.length).keys()},lastIndexOf:Array.prototype.lastIndexOf,map:Array.prototype.map,reduce:Array.prototype.reduce,reduceRight:Array.prototype.reduceRight,slice:Array.prototype.slice,some:Array.prototype.some,values:function(){return this[Symbol.iterator]}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Base/X3DObjectArrayField",["jquery","x_ite/Base/X3DField","x_ite/Base/X3DArrayField","x_ite/InputOutput/Generator"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s={get:function(e,t){const i=e[t];if(void 0!==i)return i;if("string"==typeof t){const i=e.getValue(),n=+t;return Number.isInteger(n)?(n>=i.length&&e.resize(n+1),i[n].valueOf()):e[t]}},set:function(e,t,i){if(t in e)return e[t]=i,!0;const n=e.getValue(),r=+t;return r>=n.length&&e.resize(r+1),n[r].setValue(i),!0},has:function(e,t){return Number.isInteger(+t)?t<e.getValue().length:t in e},ownKeys:function(e){return Object.keys(e.getValue())},getOwnPropertyDescriptor:function(e,t){if("string"!=typeof t)return;const i=+t;return Number.isInteger(i)&&i<e.getValue().length?Object.getOwnPropertyDescriptor(e.getValue(),t):void 0}};function a(e){const t=new Proxy(this,s);return i.call(this,[]),this[r]=this,this[o]=t,e[0]instanceof Array&&(e=e[0]),a.prototype.push.apply(this,e),t}a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,[r]:null,[o]:null,[Symbol.iterator]:function*(){const e=this[r].getValue();for(const t of e)yield t.valueOf()},getTarget:function(){return this[r]},copy:function(){const e=this[r],t=e.create(),i=e.getValue();return a.prototype.push.apply(t,i),t.setModificationTime(0),t},equals:function(e){const t=this[r].getValue(),i=e.getValue(),n=t.length;if(t===i)return!0;if(n!==i.length)return!1;for(let e=0;e<n;++e)if(!t[e].equals(i[e]))return!1;return!0},set:function(e){const i=this[r];i.resize(e.length,void 0,!0);const n=i.getValue();for(let i=0,r=e.length;i<r;++i)n[i].set(e[i]instanceof t?e[i].getValue():e[i])},isDefaultValue:function(){return 0===this.length},setValue:function(e){const t=this[r];t.set(e instanceof a?e.getValue():e),t.addEvent()},unshift:function(e){const t=this[r],i=t.getValue();for(let e=arguments.length-1;e>=0;--e){const n=new(t.getSingleType());n.setValue(arguments[e]),t.addChildObject(n),i.unshift(n)}return t.addEvent(),i.length},shift:function(){const e=this[r],t=e.getValue();if(t.length){const i=t.shift();return e.removeChildObject(i),e.addEvent(),i.valueOf()}},push:function(e){const t=this[r],i=t.getValue();for(const e of arguments){const n=new(t.getSingleType());n.setValue(e),t.addChildObject(n),i.push(n)}return t.addEvent(),i.length},pop:function(){const e=this[r],t=e.getValue();if(t.length){const i=t.pop();return e.removeChildObject(i),e.addEvent(),i.valueOf()}},splice:function(e,t){const i=this[r],n=i.getValue();e>n.length&&(e=n.length),e+t>n.length&&(t=n.length-e);const o=i.erase(e,e+t);return arguments.length>2&&i.insert(e,arguments,2,arguments.length),o},insert:function(e,t,i,n){const o=this[r],s=[e,0];for(let e=i;e<n;++e){const i=new(o.getSingleType());i.setValue(t[e]),o.addChildObject(i),s.push(i)}Array.prototype.splice.apply(o.getValue(),s),o.addEvent()},find:function(t,i,n){const o=this[r].getValue();if(e.isFunction(n)){for(let e=t;e<i;++e)if(n(o[e].valueOf()))return e;return i}for(let e=t;e<i;++e)if(o[e].equals(n))return e;return i},remove:function(t,i,n){const o=this[r],s=o.getValue();if(e.isFunction(n)){if((t=o.find(t,i,n))!==i)for(let e=t;++e<i;){const i=s[e];if(!n(i.valueOf())){const n=s[t];s[t++]=i,s[e]=n}}return t!==i&&o.addEvent(),t}if((t=o.find(t,i,n))!==i)for(let e=t;++e<i;){const i=s[e];if(!i.equals(n)){const n=s[t];s[t++]=i,s[e]=n}}return t!==i&&o.addEvent(),t},erase:function(e,t){const i=this[r],n=i.getValue().splice(e,t-e);for(const e of n)i.removeChildObject(e);return i.addEvent(),n.map((function(e){return e.valueOf()}))},resize:function(e,t,i){const n=this[r],o=n.getValue();if(e<o.length){for(let t=e,i=o.length;t<i;++t)n.removeChildObject(o[t]);o.length=e,i||n.addEvent()}else if(e>o.length){for(let i=o.length;i<e;++i){const e=new(n.getSingleType());void 0!==t&&e.setValue(t),n.addChildObject(e),o.push(e)}i||n.addEvent()}},addChildObject:function(e){e.addParent(this[o])},removeChildObject:function(e){e.removeParent(this[o])},toStream:function(e){const t=this[r],i=t.getValue(),o=n.Get(e);switch(i.length){case 0:e.string+="[ ]";break;case 1:o.PushUnitCategory(t.getUnit()),i[0].toStream(e),o.PopUnitCategory();break;default:o.PushUnitCategory(t.getUnit()),e.string+="[\n",o.IncIndent();for(let t=0,n=i.length-1;t<n;++t)e.string+=o.Indent(),i[t].toStream(e),e.string+=",\n";e.string+=o.Indent(),i.at(-1).toStream(e),e.string+="\n",o.DecIndent(),e.string+=o.Indent(),e.string+="]",o.PopUnitCategory()}},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){const t=this[r];if(t.length){const i=n.Get(e),r=t.getValue();i.PushUnitCategory(t.getUnit());for(const t of r)t.toXMLStream(e),e.string+=", ";r.at(-1).toXMLStream(e),i.PopUnitCategory()}},dispose:function(){const e=this[r],t=e.getValue();for(const i of t)e.removeChildObject(i);t.length=0,i.prototype.dispose.call(e)}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});return Object.defineProperty(a.prototype,"length",{get:function(){return this[r].getValue().length},set:function(e){this[r].resize(e)},enumerable:!1,configurable:!1}),a})),define("x_ite/Base/X3DTypedArrayField",["x_ite/Base/X3DArrayField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator","standard/Math/Algorithm"],(function(e,t,i,n){"use strict";const r=Symbol(),o=Symbol(),s=Symbol(),a={get:function(e,t){const i=e[t];if(void 0!==i)return i;if("string"==typeof t){const i=+t;if(Number.isInteger(i)){const t=e.getComponents(),n=e.getValueType();let r=e.getValue();if(i>=e[s]&&(r=e.resize(i+1)),1===t)return n(r[i]);{const r=new n,o=r.getValue(),s=i*t;return r.addEvent=c.bind(e,s,o,t),r.getValue=l.bind(e,s,o,t),r}}return e[t]}},set:function(e,t,i){if(t in e)return e[t]=i,!0;const n=e.getComponents();let r=+t,o=e.getValue();if(r>=e[s]&&(o=e.resize(r+1)),1===n)o[r]=i;else{r*=n;for(let e=0;e<n;++e,++r)o[r]=i[e]}return e.addEvent(),!0},has:function(e,t){return Number.isInteger(+t)?t<e[s]:t in e},ownKeys:function(e){const t=[];for(let i=0,n=e[s];i<n;++i)t.push(String(i));return t},getOwnPropertyDescriptor:function(e,t){if("string"!=typeof t)return;const i=+t;return Number.isInteger(i)&&i<e[s]?Object.getOwnPropertyDescriptor(e.getValue(),t):void 0}};function u(t){return e.call(this,new(this.getArrayType())(2)),this[r]=this,this[o]=[],t[0]instanceof Array&&(t=t[0]),u.prototype.push.apply(this,t),new Proxy(this,a)}u.prototype=Object.assign(Object.create(e.prototype),{constructor:u,[r]:null,[o]:null,[s]:0,[Symbol.iterator]:function*(){const e=this[r],t=e.getValue(),i=e.getComponents(),n=e.getValueType(),o=e[s];if(1===i)for(let e=0;e<o;++e)yield n(t[e]);else for(let t=0;t<o;++t){const r=new n,o=r.getValue(),s=t*i;r.addEvent=c.bind(e,s,o,i),r.getValue=l.bind(e,s,o,i),yield r}},getTarget:function(){return this[r]},copy:function(){const t=this[r],i=t.getValue(),n=t.create(),o=new(t.getArrayType())(i);return n[s]=t[s],e.prototype.set.call(n,o,t[s]),n.setModificationTime(0),n},equals:function(e){if(this===e)return!0;const t=this[r],i=t[s];if(i!==e[s])return!1;const n=t.getValue(),o=e.getValue();for(let e=0,r=i*t.getComponents();e<r;++e)if(n[e]!==o[e])return!1;return!0},assign:function(e){const t=this[r];t.set(e.getValue(),e.length),t.addEvent()},set:function(e,t){const i=this[r],n=i.getComponents(),o=i[s];let a=i.getValue(),u=void 0!==t?t*n:e.length;const l=u%n;l&&(u-=l,console.warn("Array length must be multiple of components size, which is "+n+".")),u/=n,a.length<e.length?(a=i.grow(e.length),a.set(e),l&&a.fill(0,u*n,u*n+l)):(a.set(e),u<o&&a.fill(0,u*n,o*n)),i[s]=u},isDefaultValue:function(){return 0===this[s]},setValue:function(e){const t=this[r];e instanceof t.constructor?t.assign(e):(t.set(e),t.addEvent())},unshift:function(e){const t=this[r],i=t.getComponents(),n=t[s],o=arguments.length,a=t.grow((n+o)*i);if(a.copyWithin(o*i,0,n*i),1===i)a.set(arguments,0);else for(let e=0,t=0;t<o;++t){const n=arguments[t];for(let t=0;t<i;++t,++e)a[e]=n[t]}return t[s]+=o,t.addEvent(),a.length},shift:function(){const e=this[r],t=e[s];if(t){const n=e.getValue(),r=e.getComponents(),a=e.getValueType(),u=t-1;if(1===r)var i=a(n[0]);else{const t=e[o];for(let e=0;e<r;++e)t[e]=n[e];i=Object.create(a.prototype);a.apply(i,t)}return n.copyWithin(0,r,t*r),n.fill(0,r*u,t*r),e[s]=u,e.addEvent(),i}},push:function(e){const t=this[r],i=t.getComponents(),n=t[s],o=arguments.length,a=t.grow((n+o)*i);if(1===i)a.set(arguments,n);else for(let e=n*i,t=0;t<o;++t){const n=arguments[t];for(let t=0;t<i;++t,++e)a[e]=n[t]}return t[s]+=o,t.addEvent(),t[s]},pop:function(){const e=this[r],t=e[s];if(t){const n=e.getValue(),r=e.getComponents(),a=e.getValueType(),u=t-1;if(1===r)var i=a(n[t-1]);else{const t=e[o];for(let e=0,i=u*r;e<r;++e,++i)t[e]=n[i];i=Object.create(a.prototype);a.apply(i,t)}return n.fill(0,u*r,t*r),e[s]=u,e.addEvent(),i}},splice:function(e,t){const i=this[r],n=i[s];e>n&&(e=n),e+t>n&&(t=n-e);const o=i.erase(e,e+t);return arguments.length>2&&i.spliceInsert(e,Array.prototype.splice.call(arguments,2)),i.addEvent(),o},spliceInsert:function(e,t){const i=this[r],n=i.getComponents(),o=i[s],a=t.length,u=i.grow((o+a)*n);if(e*=n,u.copyWithin(e+a*n,e,o*n),1===n)u.set(t,e);else for(let i=0,r=e;i<a;++i){const e=t[i];for(let t=0;t<n;++t,++r)u[r]=e[t]}i[s]+=a},insert:function(e,t,i,n){const o=this[r],a=o[s],u=t.getValue(),l=o.getComponents(),c=n-i,h=o.grow((a+c)*l);for(e*=l,i*=l,n*=l,h.copyWithin(e+c*l,e,a*l);i<n;++e,++i)h[e]=u[i];o[s]+=c,o.addEvent()},erase:function(e,t){const i=this[r],n=i.getValue(),o=i.getComponents(),a=t-e,u=i[s],l=u-a,c=i.create(),h=c.grow(a*o);t*=o;for(let i=0,r=e*=o;r<t;++i,++r)h[i]=n[r];return n.copyWithin(e,t,u*o),n.fill(0,l*o,u*o),i[s]=l,c[s]=a,i.addEvent(),c.slice()},resize:function(e,t,i){const n=this[r],o=n[s],a=n.getComponents();let u=n.getValue();if(e<o)u.fill(0,e*a,o*a),i||n.addEvent();else if(e>o){if(u=n.grow(e*a),void 0!==t)if(1===a)u.fill(t,o*a,e*a);else for(let i=o*a,n=e*a;i<n;)for(let e=0;e<a;++e,++i)u[i]=t[e];i||n.addEvent()}return n[s]=e,u},grow:function(t){const i=this[r],o=i.getValue();if(t<o.length)return o;const s=n.nextPowerOfTwo(t),a=new(i.getArrayType())(s);return a.set(o),e.prototype.set.call(i,a),a},shrinkToFit:function(){const t=this[r],i=t.getValue(),n=t[s]*t.getComponents();if(i.length==n)return i;const o=i.subarray(0,n);return e.prototype.set.call(t,o),o},toStream:function(e){const t=this[r],n=i.Get(e),o=t.getValue(),a=t[s],u=t.getComponents(),l=new(t.getSingleType());switch(a){case 0:e.string+="[ ]";break;case 1:if(n.PushUnitCategory(t.getUnit()),1===u)l.set(o[0]),l.toStream(e);else{for(let e=0,t=0;e<u;++e,++t)l[e]=o[t];l.toStream(e)}n.PopUnitCategory();break;default:if(n.PushUnitCategory(t.getUnit()),e.string+="[\n",n.IncIndent(),1===u){for(let t=0,i=a-1;t<i;++t)e.string+=n.Indent(),l.set(o[t*u]),l.toStream(e),e.string+=",\n";e.string+=n.Indent(),l.set(o[(a-1)*u]),l.toStream(e),e.string+="\n"}else{for(let t=0,i=a-1;t<i;++t){e.string+=n.Indent();for(let e=0,i=t*u;e<u;++e,++i)l[e]=o[i];l.toStream(e),e.string+=",\n"}e.string+=n.Indent();for(let e=0,t=(a-1)*u;e<u;++e,++t)l[e]=o[t];l.toStream(e),e.string+="\n"}n.DecIndent(),e.string+=n.Indent(),e.string+="]",n.PopUnitCategory()}},toVRMLStream:function(e){this.toStream(e)},toXMLStream:function(e){const t=this[r],n=t[s];if(n){const r=i.Get(e),o=t.getValue(),s=t.getComponents(),a=new(t.getSingleType());if(r.PushUnitCategory(t.getUnit()),1===s){for(let t=0,i=n-1;t<i;++t)a.set(o[t*s]),a.toXMLStream(e),e.string+=", ";a.set(o[(n-1)*s]),a.toXMLStream(e)}else{for(let t=0,i=n-1;t<i;++t){for(let e=0,i=t*s;e<s;++e,++i)a[e]=o[i];a.toXMLStream(e),e.string+=", "}for(let e=0,t=(n-1)*s;e<s;++e,++t)a[e]=o[t];a.toXMLStream(e)}r.PopUnitCategory()}},dispose:function(){e.prototype.dispose.call(this[r])}});for(const e of Reflect.ownKeys(u.prototype))Object.defineProperty(u.prototype,e,{enumerable:!1});function l(e,t,i){const n=this.getValue(),r=this[o];for(let t=0;t<i;++t,++e)r[t]=n[e];return t.set.apply(t,r),t}function c(e,t,i){const n=this.getValue();for(let r=0;r<i;++r,++e)n[e]=t[r];this.addEvent()}return Object.defineProperty(u.prototype,"length",{get:function(){return this[s]},set:function(e){this[r].resize(e)},enumerable:!1,configurable:!1}),u})),define("x_ite/Fields/ArrayFields",["x_ite/Fields/SFBool","x_ite/Fields/SFColor","x_ite/Fields/SFColorRGBA","x_ite/Fields/SFDouble","x_ite/Fields/SFFloat","x_ite/Fields/SFImage","x_ite/Fields/SFInt32","x_ite/Fields/SFMatrix3","x_ite/Fields/SFMatrix4","x_ite/Fields/SFNode","x_ite/Fields/SFRotation","x_ite/Fields/SFString","x_ite/Fields/SFTime","x_ite/Fields/SFVec2","x_ite/Fields/SFVec3","x_ite/Fields/SFVec4","x_ite/Base/X3DObjectArrayField","x_ite/Base/X3DTypedArrayField","x_ite/Base/X3DConstants","x_ite/InputOutput/Generator"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x){"use strict";const w=a.SFMatrix3d,b=a.SFMatrix3f,v=u.SFMatrix4d,S=u.SFMatrix4f,T=p.SFVec2d,C=p.SFVec2f,N=f.SFVec3d,F=f.SFVec3f,O=g.SFVec4d,E=g.SFVec4f,D=Symbol();function M(e){return m.call(this,arguments)}M.prototype=Object.assign(Object.create(m.prototype),{constructor:M,[D]:0,getSingleType:function(){return l},getValueType:function(){return l},getArrayType:function(){return Array},getComponents:function(){return 1},getTypeName:function(){return"MFNode"},getType:function(){return y.MFNode},copy:function(e){if(e){const t=new M;for(const i of this.getValue())t.push(i.copy(e));return t.setModificationTime(0),t}return m.prototype.copy.call(this)},addCloneCount:function(e){this[D]+=e;for(const t of this.getValue())t.addCloneCount(e)},removeCloneCount:function(e){this[D]-=e;for(const t of this.getValue())t.removeCloneCount(e)},addChildObject:function(e){m.prototype.addChildObject.call(this,e),e.addCloneCount(this[D])},removeChildObject:function(e){m.prototype.removeChildObject.call(this,e),e.removeCloneCount(this[D])},toStream:function(e){const t=this.getTarget(),i=t.getValue(),n=x.Get(e);switch(i.length){case 0:e.string+="[ ]";break;case 1:n.PushUnitCategory(t.getUnit()),i[0].toStream(e),n.PopUnitCategory();break;default:n.PushUnitCategory(t.getUnit()),e.string+="[\n",n.IncIndent();for(let t=0,r=i.length;t<r;++t)e.string+=n.Indent(),i[t].toStream(e),e.string+="\n";n.DecIndent(),e.string+=n.Indent(),e.string+="]",n.PopUnitCategory()}},toVRMLString:function(){this.addCloneCount(1);const e=m.prototype.toVRMLString.call(this);return this.removeCloneCount(1),e},toVRMLStream:function(e){const t=this.getTarget().getValue(),i=x.Get(e);switch(t.length){case 0:e.string+="[ ]";break;case 1:i.EnterScope(),t[0].toVRMLStream(e),i.LeaveScope();break;default:i.EnterScope(),e.string+="[\n",i.IncIndent();for(const n of t)e.string+=i.Indent(),n.toVRMLStream(e),e.string+="\n";i.DecIndent(),e.string+=i.Indent(),e.string+="]",i.LeaveScope()}},toXMLString:function(){this.addCloneCount(1);const e=m.prototype.toXMLString.call(this);return this.removeCloneCount(1),e},toXMLStream:function(e){const t=x.Get(e),i=this.length;if(i){t.EnterScope();const n=this.getValue();for(let r=0,o=i-1;r<o;++r){const i=n[r].getValue();if(i)i.toXMLStream(e),e.string+="\n";else{e.string+=t.Indent(),e.string+="<",e.string+="NULL";const i=t.ContainerField();i&&(e.string+=" ",e.string+="containerField='",e.string+=t.XMLEncode(i.getName()),e.string+="'"),e.string+="/>"}}const r=n.at(-1).getValue();if(r)r.toXMLStream(e);else{e.string+=t.Indent(),e.string+="<",e.string+="NULL";const i=t.ContainerField();i&&(e.string+=" ",e.string+="containerField='",e.string+=t.XMLEncode(i.getName()),e.string+="'")}t.LeaveScope()}},dispose:function(){this.resize(0),m.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(M.prototype))Object.defineProperty(M.prototype,e,{enumerable:!1});function I(e){return m.call(this,arguments)}I.prototype=Object.assign(Object.create(m.prototype),{constructor:I,getValueType:function(){return String},getSingleType:function(){return h},getArrayType:function(){return Array},getComponents:function(){return 1},getTypeName:function(){return"MFString"},getType:function(){return y.MFString},toXMLStream:function(e){const t=this.length;if(t){const i=this.getValue();for(let n=0,r=t-1;n<r;++n)e.string+='"',i[n].toXMLStream(e),e.string+='"',e.string+=", ";e.string+='"',i.at(-1).toXMLStream(e),e.string+='"'}}});for(const e of Reflect.ownKeys(I.prototype))Object.defineProperty(I.prototype,e,{enumerable:!1});function V(e,t,i,n,r,o){function s(e){return _.call(this,arguments)}s.prototype=Object.assign(Object.create(_.prototype),{constructor:s,getSingleType:function(){return i},getValueType:function(){return n},getArrayType:function(){return r},getComponents:function(){return o},getTypeName:function(){return e},getType:function(){return t}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});return s}function B(e){return e}const A={MFBool:V("MFBool",y.MFBool,e,Boolean,Uint8Array,1),MFColor:V("MFColor",y.MFColor,t,t,Float32Array,3),MFColorRGBA:V("MFColorRGBA",y.MFColorRGBA,i,i,Float32Array,4),MFDouble:V("MFDouble",y.MFDouble,n,B,Float64Array,1),MFFloat:V("MFFloat",y.MFFloat,r,B,Float32Array,1),MFImage:function(e,t,i,n,r,o){function s(e){return m.call(this,arguments)}s.prototype=Object.assign(Object.create(m.prototype),{constructor:s,getSingleType:function(){return i},getValueType:function(){return n},getArrayType:function(){return r},getComponents:function(){return o},getTypeName:function(){return e},getType:function(){return t}});for(const e of Reflect.ownKeys(s.prototype))Object.defineProperty(s.prototype,e,{enumerable:!1});return s}("MFImage",y.MFImage,o,o,Array,1),MFInt32:V("MFInt32",y.MFInt32,s,B,Int32Array,1),MFMatrix3d:V("MFMatrix3d",y.MFMatrix3d,w,w,Float64Array,9),MFMatrix3f:V("MFMatrix3f",y.MFMatrix3f,b,b,Float32Array,9),MFMatrix4d:V("MFMatrix4d",y.MFMatrix4d,v,v,Float64Array,16),MFMatrix4f:V("MFMatrix4f",y.MFMatrix4f,S,S,Float32Array,16),MFNode:M,MFRotation:V("MFRotation",y.MFRotation,c,c,Float64Array,4),MFString:I,MFTime:V("MFTime",y.MFTime,d,B,Float64Array,1),MFVec2d:V("MFVec2d",y.MFVec2d,T,T,Float64Array,2),MFVec2f:V("MFVec2f",y.MFVec2f,C,C,Float32Array,2),MFVec3d:V("MFVec3d",y.MFVec3d,N,N,Float64Array,3),MFVec3f:V("MFVec3f",y.MFVec3f,F,F,Float32Array,3),MFVec4d:V("MFVec4d",y.MFVec4d,O,O,Float64Array,4),MFVec4f:V("MFVec4f",y.MFVec4f,E,E,Float32Array,4)};return A})),define("x_ite/Fields",["x_ite/Fields/SFBool","x_ite/Fields/SFColor","x_ite/Fields/SFColorRGBA","x_ite/Fields/SFDouble","x_ite/Fields/SFFloat","x_ite/Fields/SFImage","x_ite/Fields/SFInt32","x_ite/Fields/SFMatrix3","x_ite/Fields/SFMatrix4","x_ite/Fields/SFNode","x_ite/Fields/SFRotation","x_ite/Fields/SFString","x_ite/Fields/SFTime","x_ite/Fields/SFVec2","x_ite/Fields/SFVec3","x_ite/Fields/SFVec4","x_ite/Fields/ArrayFields"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m){"use strict";return Object.assign({SFBool:e,SFColor:t,SFColorRGBA:i,SFDouble:n,SFFloat:r,SFImage:o,SFInt32:s,SFMatrix3d:a.SFMatrix3d,SFMatrix3f:a.SFMatrix3f,SFMatrix4d:u.SFMatrix4d,SFMatrix4f:u.SFMatrix4f,SFNode:l,SFRotation:c,SFString:h,SFTime:d,SFVec2d:p.SFVec2d,SFVec2f:p.SFVec2f,SFVec3d:f.SFVec3d,SFVec3f:f.SFVec3f,SFVec4d:g.SFVec4d,SFVec4f:g.SFVec4f,VrmlMatrix:u.VrmlMatrix},m)})),define("x_ite/Base/X3DBaseNode",["x_ite/Base/X3DEventObject","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/FieldArray","x_ite/Fields","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";const s=Symbol(),a=Symbol(),u=Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions"),l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol("X3DBaseNode.set_live__"),m=Symbol(),_=Symbol();function y(t){if(!this[s]){e.call(this,t.getBrowser()),this[s]=t,this[a]=[o.X3DBaseNode],this[l]=new n,this[c]=new n,this[h]=new Map,this[d]=new n,this[f]=!0,this[p]=!1,this[m]=!1,this[_]=0,this.canUserDefinedFields()&&(this[u]=new i(this[u]));for(const e of this[u])this.addField(e);this.addChildObjects("name_changed",new r.SFTime,"typeName_changed",new r.SFTime,"fields_changed",new r.SFTime,"cloneCount_changed",new r.SFTime)}}y.prototype=Object.assign(Object.create(e.prototype),{constructor:y,[u]:new i([]),setName:function(t){e.prototype.setName.call(this,t),this._name_changed=this.getBrowser().getCurrentTime()},getMainScene:function(){let e=this[s].getScene();for(;!e.isMainScene();)e=e.getScene();return e},getScene:function(){let e=this[s];for(;!e.isScene();)e=e.getExecutionContext();return e},getExecutionContext:function(){return this[s]},setExecutionContext:function(e){this[s]=e},addType:function(e){this[a].push(e)},getType:function(){return this[a]},getInnerNode:function(){return this},isLive:function(){function e(){return this._isLive}return function(){return Object.defineProperty(this,"isLive",{value:e,enumerable:!1,configurable:!0}),this.addChildObjects("isLive",new r.SFBool(this.getLiveState())),this._isLive.removeParent(this),this.getOuterNode&&this.getOuterNode()?this.getOuterNode().isLive().addInterest(g,this):this[s]!==this&&this[s].isLive().addInterest(g,this),this.isLive()}}(),setLive:function(e){this[f]=e.valueOf(),this[g]()},getLive:function(){return this[f]},getLiveState:function(){return this.getOuterNode&&this.getOuterNode()?this.getLive()&&this.getOuterNode().isLive().getValue():this!==this[s]?this.getLive()&&this[s].isLive().getValue():this.getLive()},[g]:function(){const e=this.getLiveState(),t=this.isLive();if(e){if(t.getValue())return;t.set(!0),t.processEvent()}else t.getValue()&&(t.set(!1),t.processEvent())},create:function(e){return new this.constructor(e||this[s])},copy:function(e){const t=this.create(e);if(this.canUserDefinedFields())for(const e of this[u])t.getFields().has(e.name)||t.addUserDefinedField(e.accessType,e.name,e.value.copy());for(const e of this[l])t.getFields().get(e.getName()).assign(e);return t.setup(),t},setup:function(){if(!this[p]){this[p]=!0;for(const e of this[l])e.setTainted(!1);this.initialize()}},isInitialized:function(){return this[p]},initialize:function(){},addChildObjects:function(e,t){for(let e=0,t=arguments.length;e<t;e+=2)this.addChildObject(arguments[e],arguments[e+1])},addChildObject:function(e,t){t.addParent(this),t.setName(e),Object.defineProperty(this,"_"+e,{get:function(){return t},set:function(e){t.setValue(e)},enumerable:!1,configurable:!1})},getFieldDefinitions:function(){return this[u]},getFieldsAreEnumerable:function(){return!1},addField:function(e){const t=e.accessType,i=e.name,n=e.value.copy();n.setTainted(!this[p]),n.addParent(this),n.setName(i),n.setAccessType(t),this[l].add(i,n),this[c].add(i,n),Object.defineProperty(this,"_"+i,{get:function(){return n},set:function(e){n.setValue(e)},enumerable:this.getFieldsAreEnumerable(),configurable:!0}),this.getPrivate()||n.addCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime()},getField:function(){const e=/^set_(.*?)$/,t=/^(.*?)_changed$/;return function(i){const n=this[l].get(i)||this[h].get(i);if(n)return n;const r=i.match(e);if(r){const e=this[l].get(r[1])||this[h].get(r[1]);if(e&&e.getAccessType()===o.inputOutput)return e}else{const e=i.match(t);if(e){const t=this[l].get(e[1])||this[h].get(e[1]);if(t&&t.getAccessType()===o.inputOutput)return t}}throw new Error("Unknown field '"+i+"' in node class "+this.getTypeName()+".")}}(),addAlias:function(e,t){this[h].set(e,t),Object.defineProperty(this,"_"+e,{get:function(){return t},set:function(e){t.setValue(e)},enumerable:!0,configurable:!1})},removeField:function(e){const t=this[c].get(e);t&&(t.removeParent(this),this[l].remove(e),this[c].remove(e),delete this["_"+t.getName()],this.getPrivate()||t.removeCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime())},canUserDefinedFields:function(){return!1},addUserDefinedField:function(e,i,n){this[d].has(i)&&this.removeUserDefinedField(i),n.setTainted(!this[p]),n.addParent(this),n.setName(i),n.setAccessType(e),this[u].add(i,new t(e,i,n)),this[l].add(i,n),this[d].add(i,n),this.getPrivate()||n.addCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime()},removeUserDefinedField:function(e){const t=this[d].get(e);t&&(t.removeParent(this),this[l].remove(e),this[d].remove(e),this[u].remove(e),this.getPrivate()||t.removeCloneCount(1),this._fields_changed=this.getBrowser().getCurrentTime())},getUserDefinedFields:function(){return this[d]},getPredefinedFields:function(){return this[c]},getChangedFields:function(e){const t=[];if(e)for(const e of this[d])t.push(e);for(const i of this[c])if(e&&(i.getInputRoutes().size||i.getOutputRoutes().size))t.push(i);else{if(0===i.getReferences().size){if(!i.isInitializable())continue;if(this.isDefaultValue(i))continue}t.push(i)}return t},isDefaultValue:function(e){const t=this.getFieldDefinitions().get(e.getName());return t?t.value.equals(e):!e.getModificationTime()},getFields:function(){return this[l]},getSourceText:function(){return null},hasRoutes:function(){for(const e of this[l]){if(e.getInputRoutes().size)return!0;if(e.getOutputRoutes().size)return!0}return!1},getPrivate:function(){return this[m]},setPrivate:function(e){if(this[m]=e,e)for(const e of this[l])e.removeCloneCount(1);else for(const e of this[l])e.addCloneCount(1)},getCloneCount:function(){return this[_]},addCloneCount:function(e){0!==e&&(this[_]+=e,this._cloneCount_changed=this.getBrowser().getCurrentTime(),this[s]._sceneGraph_changed=this.getBrowser().getCurrentTime())},removeCloneCount:function(e){0!==e&&(this[_]-=e,this._cloneCount_changed=this.getBrowser().getCurrentTime(),this[s]._sceneGraph_changed=this.getBrowser().getCurrentTime())},dispose:function(){for(const e of this.getFields())e.dispose();e.prototype.dispose.call(this)}});for(const e of Reflect.ownKeys(y.prototype))Object.defineProperty(y.prototype,e,{enumerable:!1});return y})),define("x_ite/Browser/VERSION",[],(function(){return"5.0.3"})),define("x_ite/DEBUG",[],(function(){"use strict";return!1})),
|
|
33
33
|
/**
|
|
34
34
|
* @license text 2.0.16 Copyright jQuery Foundation and other contributors.
|
|
35
35
|
* Released under MIT license, http://github.com/requirejs/text/LICENSE
|
|
@@ -66,7 +66,7 @@ i([s],(function(e){t.finishLoad(o.moduleName+"."+o.ext,o.strip,e,n)}),(function(
|
|
|
66
66
|
* Copyright in any portions created by third parties is as indicated
|
|
67
67
|
* elsewhere herein. All Rights Reserved.
|
|
68
68
|
*/
|
|
69
|
-
var libtess={DEBUG:!1,assert:function(e,t){if(libtess.DEBUG&&!e)throw new Error("Assertion failed"+(t?": "+t:""))},GLU_TESS_MAX_COORD:1e150,TRUE_PROJECT:!1,GLU_TESS_DEFAULT_TOLERANCE:0,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111,GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901}};libtess.PQHandle,libtess.geom={},libtess.geom.vertEq=function(e,t){return e.s===t.s&&e.t===t.t},libtess.geom.vertLeq=function(e,t){return e.s<t.s||e.s===t.s&&e.t<=t.t},libtess.geom.edgeEval=function(e,t,i){var n=t.s-e.s,r=i.s-t.s;return n+r>0?n<r?t.t-e.t+(e.t-i.t)*(n/(n+r)):t.t-i.t+(i.t-e.t)*(r/(n+r)):0},libtess.geom.edgeSign=function(e,t,i){var n=t.s-e.s,r=i.s-t.s;return n+r>0?(t.t-i.t)*n+(t.t-e.t)*r:0},libtess.geom.transLeq=function(e,t){return e.t<t.t||e.t===t.t&&e.s<=t.s},libtess.geom.transEval=function(e,t,i){var n=t.t-e.t,r=i.t-t.t;return n+r>0?n<r?t.s-e.s+(e.s-i.s)*(n/(n+r)):t.s-i.s+(i.s-e.s)*(r/(n+r)):0},libtess.geom.transSign=function(e,t,i){var n=t.t-e.t,r=i.t-t.t;return n+r>0?(t.s-i.s)*n+(t.s-e.s)*r:0},libtess.geom.edgeGoesLeft=function(e){return libtess.geom.vertLeq(e.dst(),e.org)},libtess.geom.edgeGoesRight=function(e){return libtess.geom.vertLeq(e.org,e.dst())},libtess.geom.vertL1dist=function(e,t){return Math.abs(e.s-t.s)+Math.abs(e.t-t.t)},libtess.geom.vertCCW=function(e,t,i){return e.s*(t.t-i.t)+t.s*(i.t-e.t)+i.s*(e.t-t.t)>=0},libtess.geom.interpolate_=function(e,t,i,n){return(e=e<0?0:e)<=(i=i<0?0:i)?0===i?(t+n)/2:t+e/(e+i)*(n-t):n+i/(e+i)*(t-n)},libtess.geom.edgeIntersect=function(e,t,i,n,r){var o,s,a;libtess.geom.vertLeq(e,t)||(a=e,e=t,t=a),libtess.geom.vertLeq(i,n)||(a=i,i=n,n=a),libtess.geom.vertLeq(e,i)||(a=e,e=i,i=a,a=t,t=n,n=a),libtess.geom.vertLeq(i,t)?libtess.geom.vertLeq(t,n)?((o=libtess.geom.edgeEval(e,i,t))+(s=libtess.geom.edgeEval(i,t,n))<0&&(o=-o,s=-s),r.s=libtess.geom.interpolate_(o,i.s,s,t.s)):((o=libtess.geom.edgeSign(e,i,t))+(s=-libtess.geom.edgeSign(e,n,t))<0&&(o=-o,s=-s),r.s=libtess.geom.interpolate_(o,i.s,s,n.s)):r.s=(i.s+t.s)/2,libtess.geom.transLeq(e,t)||(a=e,e=t,t=a),libtess.geom.transLeq(i,n)||(a=i,i=n,n=a),libtess.geom.transLeq(e,i)||(a=e,e=i,i=a,a=t,t=n,n=a),libtess.geom.transLeq(i,t)?libtess.geom.transLeq(t,n)?((o=libtess.geom.transEval(e,i,t))+(s=libtess.geom.transEval(i,t,n))<0&&(o=-o,s=-s),r.t=libtess.geom.interpolate_(o,i.t,s,t.t)):((o=libtess.geom.transSign(e,i,t))+(s=-libtess.geom.transSign(e,n,t))<0&&(o=-o,s=-s),r.t=libtess.geom.interpolate_(o,i.t,s,n.t)):r.t=(i.t+t.t)/2},libtess.mesh={},libtess.mesh.makeEdge=function(e){var t=libtess.mesh.makeEdgePair_(e.eHead);return libtess.mesh.makeVertex_(t,e.vHead),libtess.mesh.makeVertex_(t.sym,e.vHead),libtess.mesh.makeFace_(t,e.fHead),t},libtess.mesh.meshSplice=function(e,t){var i=!1,n=!1;e!==t&&(t.org!==e.org&&(n=!0,libtess.mesh.killVertex_(t.org,e.org)),t.lFace!==e.lFace&&(i=!0,libtess.mesh.killFace_(t.lFace,e.lFace)),libtess.mesh.splice_(t,e),n||(libtess.mesh.makeVertex_(t,e.org),e.org.anEdge=e),i||(libtess.mesh.makeFace_(t,e.lFace),e.lFace.anEdge=e))},libtess.mesh.deleteEdge=function(e){var t=e.sym,i=!1;e.lFace!==e.rFace()&&(i=!0,libtess.mesh.killFace_(e.lFace,e.rFace())),e.oNext===e?libtess.mesh.killVertex_(e.org,null):(e.rFace().anEdge=e.oPrev(),e.org.anEdge=e.oNext,libtess.mesh.splice_(e,e.oPrev()),i||libtess.mesh.makeFace_(e,e.lFace)),t.oNext===t?(libtess.mesh.killVertex_(t.org,null),libtess.mesh.killFace_(t.lFace,null)):(e.lFace.anEdge=t.oPrev(),t.org.anEdge=t.oNext,libtess.mesh.splice_(t,t.oPrev())),libtess.mesh.killEdge_(e)},libtess.mesh.addEdgeVertex=function(e){var t=libtess.mesh.makeEdgePair_(e),i=t.sym;return libtess.mesh.splice_(t,e.lNext),t.org=e.dst(),libtess.mesh.makeVertex_(i,t.org),t.lFace=i.lFace=e.lFace,t},libtess.mesh.splitEdge=function(e){var t=libtess.mesh.addEdgeVertex(e).sym;return libtess.mesh.splice_(e.sym,e.sym.oPrev()),libtess.mesh.splice_(e.sym,t),e.sym.org=t.org,t.dst().anEdge=t.sym,t.sym.lFace=e.rFace(),t.winding=e.winding,t.sym.winding=e.sym.winding,t},libtess.mesh.connect=function(e,t){var i=!1,n=libtess.mesh.makeEdgePair_(e),r=n.sym;return t.lFace!==e.lFace&&(i=!0,libtess.mesh.killFace_(t.lFace,e.lFace)),libtess.mesh.splice_(n,e.lNext),libtess.mesh.splice_(r,t),n.org=e.dst(),r.org=t.org,n.lFace=r.lFace=e.lFace,e.lFace.anEdge=r,i||libtess.mesh.makeFace_(n,e.lFace),n},libtess.mesh.zapFace=function(e){var t,i=e.anEdge,n=i.lNext;do{if(n=(t=n).lNext,t.lFace=null,null===t.rFace()){t.oNext===t?libtess.mesh.killVertex_(t.org,null):(t.org.anEdge=t.oNext,libtess.mesh.splice_(t,t.oPrev()));var r=t.sym;r.oNext===r?libtess.mesh.killVertex_(r.org,null):(r.org.anEdge=r.oNext,libtess.mesh.splice_(r,r.oPrev())),libtess.mesh.killEdge_(t)}}while(t!==i);var o=e.prev,s=e.next;s.prev=o,o.next=s},libtess.mesh.meshUnion=function(e,t){var i=e.fHead,n=e.vHead,r=e.eHead,o=t.fHead,s=t.vHead,a=t.eHead;return o.next!==o&&(i.prev.next=o.next,o.next.prev=i.prev,o.prev.next=i,i.prev=o.prev),s.next!==s&&(n.prev.next=s.next,s.next.prev=n.prev,s.prev.next=n,n.prev=s.prev),a.next!==a&&(r.sym.next.sym.next=a.next,a.next.sym.next=r.sym.next,a.sym.next.sym.next=r,r.sym.next=a.sym.next),e},libtess.mesh.deleteMesh=function(e){},libtess.mesh.makeEdgePair_=function(e){var t=new libtess.GluHalfEdge,i=new libtess.GluHalfEdge,n=e.sym.next;return i.next=n,n.sym.next=t,t.next=e,e.sym.next=i,t.sym=i,t.oNext=t,t.lNext=i,i.sym=t,i.oNext=i,i.lNext=t,t},libtess.mesh.splice_=function(e,t){var i=e.oNext,n=t.oNext;i.sym.lNext=t,n.sym.lNext=e,e.oNext=n,t.oNext=i},libtess.mesh.makeVertex_=function(e,t){var i=t.prev,n=new libtess.GluVertex(t,i);i.next=n,t.prev=n,n.anEdge=e;var r=e;do{r.org=n,r=r.oNext}while(r!==e)},libtess.mesh.makeFace_=function(e,t){var i=t.prev,n=new libtess.GluFace(t,i);i.next=n,t.prev=n,n.anEdge=e,n.inside=t.inside;var r=e;do{r.lFace=n,r=r.lNext}while(r!==e)},libtess.mesh.killEdge_=function(e){var t=e.next,i=e.sym.next;t.sym.next=i,i.sym.next=t},libtess.mesh.killVertex_=function(e,t){var i=e.anEdge,n=i;do{n.org=t,n=n.oNext}while(n!==i);var r=e.prev,o=e.next;o.prev=r,r.next=o},libtess.mesh.killFace_=function(e,t){var i=e.anEdge,n=i;do{n.lFace=t,n=n.lNext}while(n!==i);var r=e.prev,o=e.next;o.prev=r,r.next=o},libtess.normal={},libtess.normal.S_UNIT_X_=1,libtess.normal.S_UNIT_Y_=0,libtess.normal.projectPolygon=function(e,t,i,n){var r=!1,o=[t,i,n];0===t&&0===i&&0===n&&(libtess.normal.computeNormal_(e,o),r=!0);var s,a=libtess.normal.longAxis_(o),u=e.mesh.vHead;if(libtess.TRUE_PROJECT){libtess.normal.normalize_(o);var l=[0,0,0],c=[0,0,0];l[a]=0,l[(a+1)%3]=libtess.normal.S_UNIT_X_,l[(a+2)%3]=libtess.normal.S_UNIT_Y_;var h=libtess.normal.dot_(l,o);for(l[0]-=h*o[0],l[1]-=h*o[1],l[2]-=h*o[2],libtess.normal.normalize_(l),c[0]=o[1]*l[2]-o[2]*l[1],c[1]=o[2]*l[0]-o[0]*l[2],c[2]=o[0]*l[1]-o[1]*l[0],libtess.normal.normalize_(c),s=u.next;s!==u;s=s.next)s.s=libtess.normal.dot_(s.coords,l),s.t=libtess.normal.dot_(s.coords,c)}else{var d=(a+1)%3,p=(a+2)%3,f=o[a]>0?1:-1;for(s=u.next;s!==u;s=s.next)s.s=s.coords[d],s.t=f*s.coords[p]}r&&libtess.normal.checkOrientation_(e)},libtess.normal.dot_=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},libtess.normal.normalize_=function(e){var t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];t=Math.sqrt(t),e[0]/=t,e[1]/=t,e[2]/=t},libtess.normal.longAxis_=function(e){var t=0;return Math.abs(e[1])>Math.abs(e[0])&&(t=1),Math.abs(e[2])>Math.abs(e[t])&&(t=2),t},libtess.normal.computeNormal_=function(e,t){var i,n=[-2*libtess.GLU_TESS_MAX_COORD,-2*libtess.GLU_TESS_MAX_COORD,-2*libtess.GLU_TESS_MAX_COORD],r=[2*libtess.GLU_TESS_MAX_COORD,2*libtess.GLU_TESS_MAX_COORD,2*libtess.GLU_TESS_MAX_COORD],o=[],s=[],a=e.mesh.vHead;for(i=a.next;i!==a;i=i.next)for(var u=0;u<3;++u){var l=i.coords[u];l<r[u]&&(r[u]=l,s[u]=i),l>n[u]&&(n[u]=l,o[u]=i)}var c=0;if(n[1]-r[1]>n[0]-r[0]&&(c=1),n[2]-r[2]>n[c]-r[c]&&(c=2),r[c]>=n[c])return t[0]=0,t[1]=0,void(t[2]=1);var h=0,d=s[c],p=o[c],f=[0,0,0],g=[d.coords[0]-p.coords[0],d.coords[1]-p.coords[1],d.coords[2]-p.coords[2]],m=[0,0,0];for(i=a.next;i!==a;i=i.next){m[0]=i.coords[0]-p.coords[0],m[1]=i.coords[1]-p.coords[1],m[2]=i.coords[2]-p.coords[2],f[0]=g[1]*m[2]-g[2]*m[1],f[1]=g[2]*m[0]-g[0]*m[2],f[2]=g[0]*m[1]-g[1]*m[0];var _=f[0]*f[0]+f[1]*f[1]+f[2]*f[2];_>h&&(h=_,t[0]=f[0],t[1]=f[1],t[2]=f[2])}h<=0&&(t[0]=t[1]=t[2]=0,t[libtess.normal.longAxis_(g)]=1)},libtess.normal.checkOrientation_=function(e){for(var t=0,i=e.mesh.fHead,n=i.next;n!==i;n=n.next){var r=n.anEdge;if(!(r.winding<=0))do{t+=(r.org.s-r.dst().s)*(r.org.t+r.dst().t),r=r.lNext}while(r!==n.anEdge)}if(t<0)for(var o=e.mesh.vHead,s=o.next;s!==o;s=s.next)s.t=-s.t},libtess.render={},libtess.render.renderMesh=function(e,t,i){for(var n=!1,r=-1,o=t.fHead.prev;o!==t.fHead;o=o.prev)if(o.inside){n||(e.callBeginCallback(libtess.primitiveType.GL_TRIANGLES),n=!0);var s=o.anEdge;do{if(i){var a=s.rFace().inside?0:1;r!==a&&(r=a,e.callEdgeFlagCallback(!!r))}e.callVertexCallback(s.org.data),s=s.lNext}while(s!==o.anEdge)}n&&e.callEndCallback()},libtess.render.renderBoundary=function(e,t){for(var i=t.fHead.next;i!==t.fHead;i=i.next)if(i.inside){e.callBeginCallback(libtess.primitiveType.GL_LINE_LOOP);var n=i.anEdge;do{e.callVertexCallback(n.org.data),n=n.lNext}while(n!==i.anEdge);e.callEndCallback()}},libtess.sweep={},libtess.sweep.SENTINEL_COORD_=4*libtess.GLU_TESS_MAX_COORD,libtess.sweep.TOLERANCE_NONZERO_=!1,libtess.sweep.computeInterior=function(e){var t;for(e.fatalError=!1,libtess.sweep.removeDegenerateEdges_(e),libtess.sweep.initPriorityQ_(e),libtess.sweep.initEdgeDict_(e);null!==(t=e.pq.extractMin());){for(;;){var i=e.pq.minimum();if(null===i||!libtess.geom.vertEq(i,t))break;i=e.pq.extractMin(),libtess.sweep.spliceMergeVertices_(e,t.anEdge,i.anEdge)}libtess.sweep.sweepEvent_(e,t)}var n=e.dict.getMin().getKey();e.event=n.eUp.org,libtess.sweep.doneEdgeDict_(e),libtess.sweep.donePriorityQ_(e),libtess.sweep.removeDegenerateFaces_(e.mesh),e.mesh.checkMesh()},libtess.sweep.addWinding_=function(e,t){e.winding+=t.winding,e.sym.winding+=t.sym.winding},libtess.sweep.edgeLeq_=function(e,t,i){var n=e.event,r=t.eUp,o=i.eUp;return r.dst()===n?o.dst()===n?libtess.geom.vertLeq(r.org,o.org)?libtess.geom.edgeSign(o.dst(),r.org,o.org)<=0:libtess.geom.edgeSign(r.dst(),o.org,r.org)>=0:libtess.geom.edgeSign(o.dst(),n,o.org)<=0:o.dst()===n?libtess.geom.edgeSign(r.dst(),n,r.org)>=0:libtess.geom.edgeEval(r.dst(),n,r.org)>=libtess.geom.edgeEval(o.dst(),n,o.org)},libtess.sweep.deleteRegion_=function(e,t){t.fixUpperEdge,t.eUp.activeRegion=null,e.dict.deleteNode(t.nodeUp),t.nodeUp=null},libtess.sweep.fixUpperEdge_=function(e,t){libtess.mesh.deleteEdge(e.eUp),e.fixUpperEdge=!1,e.eUp=t,t.activeRegion=e},libtess.sweep.topLeftRegion_=function(e){var t=e.eUp.org;do{e=e.regionAbove()}while(e.eUp.org===t);if(e.fixUpperEdge){var i=libtess.mesh.connect(e.regionBelow().eUp.sym,e.eUp.lNext);libtess.sweep.fixUpperEdge_(e,i),e=e.regionAbove()}return e},libtess.sweep.topRightRegion_=function(e){var t=e.eUp.dst();do{e=e.regionAbove()}while(e.eUp.dst()===t);return e},libtess.sweep.addRegionBelow_=function(e,t,i){var n=new libtess.ActiveRegion;return n.eUp=i,n.nodeUp=e.dict.insertBefore(t.nodeUp,n),i.activeRegion=n,n},libtess.sweep.isWindingInside_=function(e,t){switch(e.windingRule){case libtess.windingRule.GLU_TESS_WINDING_ODD:return 0!=(1&t);case libtess.windingRule.GLU_TESS_WINDING_NONZERO:return 0!==t;case libtess.windingRule.GLU_TESS_WINDING_POSITIVE:return t>0;case libtess.windingRule.GLU_TESS_WINDING_NEGATIVE:return t<0;case libtess.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:return t>=2||t<=-2}return!1},libtess.sweep.computeWinding_=function(e,t){t.windingNumber=t.regionAbove().windingNumber+t.eUp.winding,t.inside=libtess.sweep.isWindingInside_(e,t.windingNumber)},libtess.sweep.finishRegion_=function(e,t){var i=t.eUp,n=i.lFace;n.inside=t.inside,n.anEdge=i,libtess.sweep.deleteRegion_(e,t)},libtess.sweep.finishLeftRegions_=function(e,t,i){for(var n=t,r=t.eUp;n!==i;){n.fixUpperEdge=!1;var o=n.regionBelow(),s=o.eUp;if(s.org!==r.org){if(!o.fixUpperEdge){libtess.sweep.finishRegion_(e,n);break}s=libtess.mesh.connect(r.lPrev(),s.sym),libtess.sweep.fixUpperEdge_(o,s)}r.oNext!==s&&(libtess.mesh.meshSplice(s.oPrev(),s),libtess.mesh.meshSplice(r,s)),libtess.sweep.finishRegion_(e,n),r=o.eUp,n=o}return r},libtess.sweep.addRightEdges_=function(e,t,i,n,r,o){var s=!0,a=i;do{libtess.sweep.addRegionBelow_(e,t,a.sym),a=a.oNext}while(a!==n);null===r&&(r=t.regionBelow().eUp.rPrev());for(var u,l=t,c=r;(a=(u=l.regionBelow()).eUp.sym).org===c.org;)a.oNext!==c&&(libtess.mesh.meshSplice(a.oPrev(),a),libtess.mesh.meshSplice(c.oPrev(),a)),u.windingNumber=l.windingNumber-a.winding,u.inside=libtess.sweep.isWindingInside_(e,u.windingNumber),l.dirty=!0,!s&&libtess.sweep.checkForRightSplice_(e,l)&&(libtess.sweep.addWinding_(a,c),libtess.sweep.deleteRegion_(e,l),libtess.mesh.deleteEdge(c)),s=!1,l=u,c=a;l.dirty=!0,o&&libtess.sweep.walkDirtyRegions_(e,l)},libtess.sweep.callCombine_=function(e,t,i,n,r){var o=[t.coords[0],t.coords[1],t.coords[2]];t.data=null,t.data=e.callCombineCallback(o,i,n),null===t.data&&(r?e.fatalError||(e.callErrorCallback(libtess.errorType.GLU_TESS_NEED_COMBINE_CALLBACK),e.fatalError=!0):t.data=i[0])},libtess.sweep.spliceMergeVertices_=function(e,t,i){var n=[null,null,null,null];n[0]=t.org.data,n[1]=i.org.data,libtess.sweep.callCombine_(e,t.org,n,[.5,.5,0,0],!1),libtess.mesh.meshSplice(t,i)},libtess.sweep.vertexWeights_=function(e,t,i,n,r){var o=libtess.geom.vertL1dist(t,e),s=libtess.geom.vertL1dist(i,e),a=r,u=r+1;n[a]=.5*s/(o+s),n[u]=.5*o/(o+s),e.coords[0]+=n[a]*t.coords[0]+n[u]*i.coords[0],e.coords[1]+=n[a]*t.coords[1]+n[u]*i.coords[1],e.coords[2]+=n[a]*t.coords[2]+n[u]*i.coords[2]},libtess.sweep.getIntersectData_=function(e,t,i,n,r,o){var s=[0,0,0,0],a=[i.data,n.data,r.data,o.data];t.coords[0]=t.coords[1]=t.coords[2]=0,libtess.sweep.vertexWeights_(t,i,n,s,0),libtess.sweep.vertexWeights_(t,r,o,s,2),libtess.sweep.callCombine_(e,t,a,s,!0)},libtess.sweep.checkForRightSplice_=function(e,t){var i=t.regionBelow(),n=t.eUp,r=i.eUp;if(libtess.geom.vertLeq(n.org,r.org)){if(libtess.geom.edgeSign(r.dst(),n.org,r.org)>0)return!1;libtess.geom.vertEq(n.org,r.org)?n.org!==r.org&&(e.pq.remove(n.org.pqHandle),libtess.sweep.spliceMergeVertices_(e,r.oPrev(),n)):(libtess.mesh.splitEdge(r.sym),libtess.mesh.meshSplice(n,r.oPrev()),t.dirty=i.dirty=!0)}else{if(libtess.geom.edgeSign(n.dst(),r.org,n.org)<0)return!1;t.regionAbove().dirty=t.dirty=!0,libtess.mesh.splitEdge(n.sym),libtess.mesh.meshSplice(r.oPrev(),n)}return!0},libtess.sweep.checkForLeftSplice_=function(e,t){var i,n=t.regionBelow(),r=t.eUp,o=n.eUp;if(libtess.geom.vertLeq(r.dst(),o.dst())){if(libtess.geom.edgeSign(r.dst(),o.dst(),r.org)<0)return!1;t.regionAbove().dirty=t.dirty=!0,i=libtess.mesh.splitEdge(r),libtess.mesh.meshSplice(o.sym,i),i.lFace.inside=t.inside}else{if(libtess.geom.edgeSign(o.dst(),r.dst(),o.org)>0)return!1;t.dirty=n.dirty=!0,i=libtess.mesh.splitEdge(o),libtess.mesh.meshSplice(r.lNext,o.sym),i.rFace().inside=t.inside}return!0},libtess.sweep.checkForIntersect_=function(e,t){var i=t.regionBelow(),n=t.eUp,r=i.eUp,o=n.org,s=r.org,a=n.dst(),u=r.dst(),l=new libtess.GluVertex;if(o===s)return!1;if(Math.min(o.t,a.t)>Math.max(s.t,u.t))return!1;if(libtess.geom.vertLeq(o,s)){if(libtess.geom.edgeSign(u,o,s)>0)return!1}else if(libtess.geom.edgeSign(a,s,o)<0)return!1;libtess.geom.edgeIntersect(a,o,u,s,l),libtess.geom.vertLeq(l,e.event)&&(l.s=e.event.s,l.t=e.event.t);var c=libtess.geom.vertLeq(o,s)?o:s;if(libtess.geom.vertLeq(c,l)&&(l.s=c.s,l.t=c.t),libtess.geom.vertEq(l,o)||libtess.geom.vertEq(l,s))return libtess.sweep.checkForRightSplice_(e,t),!1;if(!libtess.geom.vertEq(a,e.event)&&libtess.geom.edgeSign(a,e.event,l)>=0||!libtess.geom.vertEq(u,e.event)&&libtess.geom.edgeSign(u,e.event,l)<=0){if(u===e.event)return libtess.mesh.splitEdge(n.sym),libtess.mesh.meshSplice(r.sym,n),n=(t=libtess.sweep.topLeftRegion_(t)).regionBelow().eUp,libtess.sweep.finishLeftRegions_(e,t.regionBelow(),i),libtess.sweep.addRightEdges_(e,t,n.oPrev(),n,n,!0),!0;if(a===e.event){libtess.mesh.splitEdge(r.sym),libtess.mesh.meshSplice(n.lNext,r.oPrev()),i=t;var h=(t=libtess.sweep.topRightRegion_(t)).regionBelow().eUp.rPrev();return i.eUp=r.oPrev(),r=libtess.sweep.finishLeftRegions_(e,i,null),libtess.sweep.addRightEdges_(e,t,r.oNext,n.rPrev(),h,!0),!0}return libtess.geom.edgeSign(a,e.event,l)>=0&&(t.regionAbove().dirty=t.dirty=!0,libtess.mesh.splitEdge(n.sym),n.org.s=e.event.s,n.org.t=e.event.t),libtess.geom.edgeSign(u,e.event,l)<=0&&(t.dirty=i.dirty=!0,libtess.mesh.splitEdge(r.sym),r.org.s=e.event.s,r.org.t=e.event.t),!1}return libtess.mesh.splitEdge(n.sym),libtess.mesh.splitEdge(r.sym),libtess.mesh.meshSplice(r.oPrev(),n),n.org.s=l.s,n.org.t=l.t,n.org.pqHandle=e.pq.insert(n.org),libtess.sweep.getIntersectData_(e,n.org,o,a,s,u),t.regionAbove().dirty=t.dirty=i.dirty=!0,!1},libtess.sweep.walkDirtyRegions_=function(e,t){for(var i=t.regionBelow();;){for(;i.dirty;)t=i,i=i.regionBelow();if(!t.dirty&&(i=t,null===(t=t.regionAbove())||!t.dirty))return;t.dirty=!1;var n=t.eUp,r=i.eUp;if(n.dst()!==r.dst()&&libtess.sweep.checkForLeftSplice_(e,t)&&(i.fixUpperEdge?(libtess.sweep.deleteRegion_(e,i),libtess.mesh.deleteEdge(r),r=(i=t.regionBelow()).eUp):t.fixUpperEdge&&(libtess.sweep.deleteRegion_(e,t),libtess.mesh.deleteEdge(n),n=(t=i.regionAbove()).eUp)),n.org!==r.org)if(n.dst()===r.dst()||t.fixUpperEdge||i.fixUpperEdge||n.dst()!==e.event&&r.dst()!==e.event)libtess.sweep.checkForRightSplice_(e,t);else if(libtess.sweep.checkForIntersect_(e,t))return;n.org===r.org&&n.dst()===r.dst()&&(libtess.sweep.addWinding_(r,n),libtess.sweep.deleteRegion_(e,t),libtess.mesh.deleteEdge(n),t=i.regionAbove())}},libtess.sweep.connectRightVertex_=function(e,t,i){var n,r=i.oNext,o=t.regionBelow(),s=t.eUp,a=o.eUp,u=!1;(s.dst()!==a.dst()&&libtess.sweep.checkForIntersect_(e,t),libtess.geom.vertEq(s.org,e.event)&&(libtess.mesh.meshSplice(r.oPrev(),s),r=(t=libtess.sweep.topLeftRegion_(t)).regionBelow().eUp,libtess.sweep.finishLeftRegions_(e,t.regionBelow(),o),u=!0),libtess.geom.vertEq(a.org,e.event)&&(libtess.mesh.meshSplice(i,a.oPrev()),i=libtess.sweep.finishLeftRegions_(e,o,null),u=!0),u)?libtess.sweep.addRightEdges_(e,t,i.oNext,r,r,!0):(n=libtess.geom.vertLeq(a.org,s.org)?a.oPrev():s,n=libtess.mesh.connect(i.lPrev(),n),libtess.sweep.addRightEdges_(e,t,n,n.oNext,n.oNext,!1),n.sym.activeRegion.fixUpperEdge=!0,libtess.sweep.walkDirtyRegions_(e,t))},libtess.sweep.connectLeftDegenerate_=function(e,t,i){var n=t.eUp;if(libtess.geom.vertEq(n.org,i))libtess.sweep.TOLERANCE_NONZERO_&&libtess.sweep.spliceMergeVertices_(e,n,i.anEdge);else{if(!libtess.geom.vertEq(n.dst(),i))return libtess.mesh.splitEdge(n.sym),t.fixUpperEdge&&(libtess.mesh.deleteEdge(n.oNext),t.fixUpperEdge=!1),libtess.mesh.meshSplice(i.anEdge,n),void libtess.sweep.sweepEvent_(e,i);if(libtess.sweep.TOLERANCE_NONZERO_){var r=(t=libtess.sweep.topRightRegion_(t)).regionBelow(),o=r.eUp.sym,s=o.oNext,a=s;r.fixUpperEdge&&(libtess.sweep.deleteRegion_(e,r),libtess.mesh.deleteEdge(o),o=s.oPrev()),libtess.mesh.meshSplice(i.anEdge,o),libtess.geom.edgeGoesLeft(s)||(s=null),libtess.sweep.addRightEdges_(e,t,o.oNext,a,s,!0)}}},libtess.sweep.connectLeftVertex_=function(e,t){var i=new libtess.ActiveRegion;i.eUp=t.anEdge.sym;var n=e.dict.search(i).getKey(),r=n.regionBelow(),o=n.eUp,s=r.eUp;if(0!==libtess.geom.edgeSign(o.dst(),t,o.org)){var a,u=libtess.geom.vertLeq(s.dst(),o.dst())?n:r;if(n.inside||u.fixUpperEdge){if(u===n)a=libtess.mesh.connect(t.anEdge.sym,o.lNext);else a=libtess.mesh.connect(s.dNext(),t.anEdge).sym;u.fixUpperEdge?libtess.sweep.fixUpperEdge_(u,a):libtess.sweep.computeWinding_(e,libtess.sweep.addRegionBelow_(e,n,a)),libtess.sweep.sweepEvent_(e,t)}else libtess.sweep.addRightEdges_(e,n,t.anEdge,t.anEdge,null,!0)}else libtess.sweep.connectLeftDegenerate_(e,n,t)},libtess.sweep.sweepEvent_=function(e,t){e.event=t;for(var i=t.anEdge;null===i.activeRegion;)if((i=i.oNext)===t.anEdge)return void libtess.sweep.connectLeftVertex_(e,t);var n=libtess.sweep.topLeftRegion_(i.activeRegion),r=n.regionBelow(),o=r.eUp,s=libtess.sweep.finishLeftRegions_(e,r,null);s.oNext===o?libtess.sweep.connectRightVertex_(e,n,s):libtess.sweep.addRightEdges_(e,n,s.oNext,o,o,!0)},libtess.sweep.addSentinel_=function(e,t){var i=new libtess.ActiveRegion,n=libtess.mesh.makeEdge(e.mesh);n.org.s=libtess.sweep.SENTINEL_COORD_,n.org.t=t,n.dst().s=-libtess.sweep.SENTINEL_COORD_,n.dst().t=t,e.event=n.dst(),i.eUp=n,i.windingNumber=0,i.inside=!1,i.fixUpperEdge=!1,i.sentinel=!0,i.dirty=!1,i.nodeUp=e.dict.insert(i)},libtess.sweep.initEdgeDict_=function(e){e.dict=new libtess.Dict(e,libtess.sweep.edgeLeq_),libtess.sweep.addSentinel_(e,-libtess.sweep.SENTINEL_COORD_),libtess.sweep.addSentinel_(e,libtess.sweep.SENTINEL_COORD_)},libtess.sweep.doneEdgeDict_=function(e){for(var t;null!==(t=e.dict.getMin().getKey());)t.sentinel,libtess.sweep.deleteRegion_(e,t);e.dict=null},libtess.sweep.removeDegenerateEdges_=function(e){for(var t,i=e.mesh.eHead,n=i.next;n!==i;n=t){t=n.next;var r=n.lNext;libtess.geom.vertEq(n.org,n.dst())&&n.lNext.lNext!==n&&(libtess.sweep.spliceMergeVertices_(e,r,n),libtess.mesh.deleteEdge(n),r=(n=r).lNext),r.lNext===n&&(r!==n&&(r!==t&&r!==t.sym||(t=t.next),libtess.mesh.deleteEdge(r)),n!==t&&n!==t.sym||(t=t.next),libtess.mesh.deleteEdge(n))}},libtess.sweep.initPriorityQ_=function(e){var t=new libtess.PriorityQ;e.pq=t;var i,n=e.mesh.vHead;for(i=n.next;i!==n;i=i.next)i.pqHandle=t.insert(i);t.init()},libtess.sweep.donePriorityQ_=function(e){e.pq.deleteQ(),e.pq=null},libtess.sweep.removeDegenerateFaces_=function(e){for(var t,i=e.fHead.next;i!==e.fHead;i=t){t=i.next;var n=i.anEdge;n.lNext.lNext===n&&(libtess.sweep.addWinding_(n.oNext,n),libtess.mesh.deleteEdge(n))}},libtess.tessmono={},libtess.tessmono.tessellateMonoRegion_=function(e){for(var t=e.anEdge;libtess.geom.vertLeq(t.dst(),t.org);t=t.lPrev());for(;libtess.geom.vertLeq(t.org,t.dst());t=t.lNext);for(var i,n=t.lPrev();t.lNext!==n;)if(libtess.geom.vertLeq(t.dst(),n.org)){for(;n.lNext!==t&&(libtess.geom.edgeGoesLeft(n.lNext)||libtess.geom.edgeSign(n.org,n.dst(),n.lNext.dst())<=0);)n=(i=libtess.mesh.connect(n.lNext,n)).sym;n=n.lPrev()}else{for(;n.lNext!==t&&(libtess.geom.edgeGoesRight(t.lPrev())||libtess.geom.edgeSign(t.dst(),t.org,t.lPrev().org)>=0);)i=libtess.mesh.connect(t,t.lPrev()),t=i.sym;t=t.lNext}for(;n.lNext.lNext!==t;)n=(i=libtess.mesh.connect(n.lNext,n)).sym},libtess.tessmono.tessellateInterior=function(e){for(var t,i=e.fHead.next;i!==e.fHead;i=t)t=i.next,i.inside&&libtess.tessmono.tessellateMonoRegion_(i)},libtess.tessmono.discardExterior=function(e){for(var t,i=e.fHead.next;i!==e.fHead;i=t)t=i.next,i.inside||libtess.mesh.zapFace(i)},libtess.tessmono.setWindingNumber=function(e,t,i){for(var n,r=e.eHead.next;r!==e.eHead;r=n)n=r.next,r.rFace().inside!==r.lFace.inside?r.winding=r.lFace.inside?t:-t:i?libtess.mesh.deleteEdge(r):r.winding=0},libtess.Dict=function(e,t){this.head_=new libtess.DictNode,this.frame_=e,this.leq_=t},libtess.Dict.prototype.deleteDict_=function(){},libtess.Dict.prototype.insertBefore=function(e,t){do{e=e.prev}while(null!==e.key&&!this.leq_(this.frame_,e.key,t));var i=new libtess.DictNode(t,e.next,e);return e.next.prev=i,e.next=i,i},libtess.Dict.prototype.insert=function(e){return this.insertBefore(this.head_,e)},libtess.Dict.prototype.deleteNode=function(e){e.next.prev=e.prev,e.prev.next=e.next},libtess.Dict.prototype.search=function(e){var t=this.head_;do{t=t.next}while(null!==t.key&&!this.leq_(this.frame_,e,t.key));return t},libtess.Dict.prototype.getMin=function(){return this.head_.next},libtess.Dict.prototype.getMax=function(){return this.head_.prev},libtess.DictNode=function(e,t,i){this.key=e||null,this.next=t||this,this.prev=i||this},libtess.DictNode.prototype.getKey=function(){return this.key},libtess.DictNode.prototype.getSuccessor=function(){return this.next},libtess.DictNode.prototype.getPredecessor=function(){return this.prev},libtess.GluTesselator=function(){this.state_=libtess.GluTesselator.tessState_.T_DORMANT,this.lastEdge_=null,this.mesh=null,this.errorCallback_=null,this.normal_=[0,0,0],this.windingRule=libtess.windingRule.GLU_TESS_WINDING_ODD,this.fatalError=!1,this.dict=null,this.pq=null,this.event=null,this.combineCallback_=null,this.boundaryOnly_=!1,this.beginCallback_=null,this.edgeFlagCallback_=null,this.vertexCallback_=null,this.endCallback_=null,this.meshCallback_=null,this.polygonData_=null},libtess.GluTesselator.tessState_={T_DORMANT:0,T_IN_POLYGON:1,T_IN_CONTOUR:2},libtess.GluTesselator.prototype.gluDeleteTess=function(){this.requireState_(libtess.GluTesselator.tessState_.T_DORMANT)},libtess.GluTesselator.prototype.gluTessProperty=function(e,t){switch(e){case libtess.gluEnum.GLU_TESS_TOLERANCE:return;case libtess.gluEnum.GLU_TESS_WINDING_RULE:var i=t;switch(i){case libtess.windingRule.GLU_TESS_WINDING_ODD:case libtess.windingRule.GLU_TESS_WINDING_NONZERO:case libtess.windingRule.GLU_TESS_WINDING_POSITIVE:case libtess.windingRule.GLU_TESS_WINDING_NEGATIVE:case libtess.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:return void(this.windingRule=i)}break;case libtess.gluEnum.GLU_TESS_BOUNDARY_ONLY:return void(this.boundaryOnly_=!!t);default:return void this.callErrorCallback(libtess.gluEnum.GLU_INVALID_ENUM)}this.callErrorCallback(libtess.gluEnum.GLU_INVALID_VALUE)},libtess.GluTesselator.prototype.gluGetTessProperty=function(e){switch(e){case libtess.gluEnum.GLU_TESS_TOLERANCE:return 0;case libtess.gluEnum.GLU_TESS_WINDING_RULE:return this.windingRule;case libtess.gluEnum.GLU_TESS_BOUNDARY_ONLY:return this.boundaryOnly_;default:this.callErrorCallback(libtess.gluEnum.GLU_INVALID_ENUM)}return!1},libtess.GluTesselator.prototype.gluTessNormal=function(e,t,i){this.normal_[0]=e,this.normal_[1]=t,this.normal_[2]=i},libtess.GluTesselator.prototype.gluTessCallback=function(e,t){var i=t||null;switch(e){case libtess.gluEnum.GLU_TESS_BEGIN:case libtess.gluEnum.GLU_TESS_BEGIN_DATA:return void(this.beginCallback_=i);case libtess.gluEnum.GLU_TESS_EDGE_FLAG:case libtess.gluEnum.GLU_TESS_EDGE_FLAG_DATA:return void(this.edgeFlagCallback_=i);case libtess.gluEnum.GLU_TESS_VERTEX:case libtess.gluEnum.GLU_TESS_VERTEX_DATA:return void(this.vertexCallback_=i);case libtess.gluEnum.GLU_TESS_END:case libtess.gluEnum.GLU_TESS_END_DATA:return void(this.endCallback_=i);case libtess.gluEnum.GLU_TESS_ERROR:case libtess.gluEnum.GLU_TESS_ERROR_DATA:return void(this.errorCallback_=i);case libtess.gluEnum.GLU_TESS_COMBINE:case libtess.gluEnum.GLU_TESS_COMBINE_DATA:return void(this.combineCallback_=i);case libtess.gluEnum.GLU_TESS_MESH:return void(this.meshCallback_=i);default:return void this.callErrorCallback(libtess.gluEnum.GLU_INVALID_ENUM)}},libtess.GluTesselator.prototype.gluTessVertex=function(e,t){var i=!1,n=[0,0,0];this.requireState_(libtess.GluTesselator.tessState_.T_IN_CONTOUR);for(var r=0;r<3;++r){var o=e[r];o<-libtess.GLU_TESS_MAX_COORD&&(o=-libtess.GLU_TESS_MAX_COORD,i=!0),o>libtess.GLU_TESS_MAX_COORD&&(o=libtess.GLU_TESS_MAX_COORD,i=!0),n[r]=o}i&&this.callErrorCallback(libtess.errorType.GLU_TESS_COORD_TOO_LARGE),this.addVertex_(n,t)},libtess.GluTesselator.prototype.gluTessBeginPolygon=function(e){this.requireState_(libtess.GluTesselator.tessState_.T_DORMANT),this.state_=libtess.GluTesselator.tessState_.T_IN_POLYGON,this.mesh=new libtess.GluMesh,this.polygonData_=e},libtess.GluTesselator.prototype.gluTessBeginContour=function(){this.requireState_(libtess.GluTesselator.tessState_.T_IN_POLYGON),this.state_=libtess.GluTesselator.tessState_.T_IN_CONTOUR,this.lastEdge_=null},libtess.GluTesselator.prototype.gluTessEndContour=function(){this.requireState_(libtess.GluTesselator.tessState_.T_IN_CONTOUR),this.state_=libtess.GluTesselator.tessState_.T_IN_POLYGON},libtess.GluTesselator.prototype.gluTessEndPolygon=function(){if(this.requireState_(libtess.GluTesselator.tessState_.T_IN_POLYGON),this.state_=libtess.GluTesselator.tessState_.T_DORMANT,libtess.normal.projectPolygon(this,this.normal_[0],this.normal_[1],this.normal_[2]),libtess.sweep.computeInterior(this),!this.fatalError){var e=this.mesh;if(this.boundaryOnly_?libtess.tessmono.setWindingNumber(e,1,!0):libtess.tessmono.tessellateInterior(e),this.mesh.checkMesh(),this.beginCallback_||this.endCallback_||this.vertexCallback_||this.edgeFlagCallback_)if(this.boundaryOnly_)libtess.render.renderBoundary(this,this.mesh);else{var t=!!this.edgeFlagCallback_;libtess.render.renderMesh(this,this.mesh,t)}if(this.meshCallback_)return libtess.tessmono.discardExterior(this.mesh),this.meshCallback_(this.mesh),this.mesh=null,void(this.polygonData_=null)}libtess.mesh.deleteMesh(this.mesh),this.polygonData_=null,this.mesh=null},libtess.GluTesselator.prototype.requireState_=function(e){this.state_!==e&&this.gotoState_(e)},libtess.GluTesselator.prototype.gotoState_=function(e){for(;this.state_!==e;)if(this.state_<e)switch(this.state_){case libtess.GluTesselator.tessState_.T_DORMANT:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_BEGIN_POLYGON),this.gluTessBeginPolygon(null);break;case libtess.GluTesselator.tessState_.T_IN_POLYGON:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_BEGIN_CONTOUR),this.gluTessBeginContour()}else switch(this.state_){case libtess.GluTesselator.tessState_.T_IN_CONTOUR:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_END_CONTOUR),this.gluTessEndContour();break;case libtess.GluTesselator.tessState_.T_IN_POLYGON:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_END_POLYGON),this.gluTessEndPolygon()}},libtess.GluTesselator.prototype.addVertex_=function(e,t){var i=this.lastEdge_;null===i?(i=libtess.mesh.makeEdge(this.mesh),libtess.mesh.meshSplice(i,i.sym)):(libtess.mesh.splitEdge(i),i=i.lNext),i.org.data=t,i.org.coords[0]=e[0],i.org.coords[1]=e[1],i.org.coords[2]=e[2],i.winding=1,i.sym.winding=-1,this.lastEdge_=i},libtess.GluTesselator.prototype.callBeginCallback=function(e){this.beginCallback_&&this.beginCallback_(e,this.polygonData_)},libtess.GluTesselator.prototype.callVertexCallback=function(e){this.vertexCallback_&&this.vertexCallback_(e,this.polygonData_)},libtess.GluTesselator.prototype.callEdgeFlagCallback=function(e){this.edgeFlagCallback_&&this.edgeFlagCallback_(e,this.polygonData_)},libtess.GluTesselator.prototype.callEndCallback=function(){this.endCallback_&&this.endCallback_(this.polygonData_)},libtess.GluTesselator.prototype.callCombineCallback=function(e,t,i){return this.combineCallback_&&this.combineCallback_(e,t,i,this.polygonData_)||null},libtess.GluTesselator.prototype.callErrorCallback=function(e){this.errorCallback_&&this.errorCallback_(e,this.polygonData_)},libtess.GluFace=function(e,t){this.next=e||this,this.prev=t||this,this.anEdge=null,this.data=null,this.inside=!1},libtess.GluHalfEdge=function(e){this.next=e||this,this.sym=null,this.oNext=null,this.lNext=null,this.org=null,this.lFace=null,this.activeRegion=null,this.winding=0},libtess.GluHalfEdge.prototype.rFace=function(){return this.sym.lFace},libtess.GluHalfEdge.prototype.dst=function(){return this.sym.org},libtess.GluHalfEdge.prototype.oPrev=function(){return this.sym.lNext},libtess.GluHalfEdge.prototype.lPrev=function(){return this.oNext.sym},libtess.GluHalfEdge.prototype.dPrev=function(){return this.lNext.sym},libtess.GluHalfEdge.prototype.rPrev=function(){return this.sym.oNext},libtess.GluHalfEdge.prototype.dNext=function(){return this.rPrev().sym},libtess.GluHalfEdge.prototype.rNext=function(){return this.oPrev().sym},libtess.GluMesh=function(){this.vHead=new libtess.GluVertex,this.fHead=new libtess.GluFace,this.eHead=new libtess.GluHalfEdge,this.eHeadSym=new libtess.GluHalfEdge,this.eHead.sym=this.eHeadSym,this.eHeadSym.sym=this.eHead},libtess.GluMesh.prototype.checkMesh=function(){if(libtess.DEBUG){var e,t,i,n=this.fHead,r=this.vHead,o=this.eHead,s=n;for(s=n;(t=s.next)!==n;s=t){e=t.anEdge;do{e=e.lNext}while(e!==t.anEdge)}var a=r;for(a=r;(i=a.next)!==r;a=i){e=i.anEdge;do{e=e.oNext}while(e!==i.anEdge)}var u=o;for(u=o;(e=u.next)!==o;u=e);}},libtess.GluVertex=function(e,t){this.next=e||this,this.prev=t||this,this.anEdge=null,this.data=null,this.coords=[0,0,0],this.s=0,this.t=0,this.pqHandle=0},libtess.PriorityQ=function(){this.verts_=[],this.order_=null,this.size_=0,this.initialized_=!1,this.heap_=new libtess.PriorityQHeap},libtess.PriorityQ.prototype.deleteQ=function(){this.heap_=null,this.order_=null,this.verts_=null},libtess.PriorityQ.prototype.init=function(){this.order_=[];for(var e=0;e<this.size_;e++)this.order_[e]=e;var t,i=(t=this.verts_,function(e,i){return libtess.geom.vertLeq(t[e],t[i])?1:-1});if(this.order_.sort(i),this.initialized_=!0,this.heap_.init(),libtess.DEBUG){var n=0+this.size_-1;for(e=0;e<n;++e);}},libtess.PriorityQ.prototype.insert=function(e){if(this.initialized_)return this.heap_.insert(e);var t=this.size_++;return this.verts_[t]=e,-(t+1)},libtess.PriorityQ.prototype.extractMin=function(){if(0===this.size_)return this.heap_.extractMin();var e=this.verts_[this.order_[this.size_-1]];if(!this.heap_.isEmpty()){var t=this.heap_.minimum();if(libtess.geom.vertLeq(t,e))return this.heap_.extractMin()}do{--this.size_}while(this.size_>0&&null===this.verts_[this.order_[this.size_-1]]);return e},libtess.PriorityQ.prototype.minimum=function(){if(0===this.size_)return this.heap_.minimum();var e=this.verts_[this.order_[this.size_-1]];if(!this.heap_.isEmpty()){var t=this.heap_.minimum();if(libtess.geom.vertLeq(t,e))return t}return e},libtess.PriorityQ.prototype.remove=function(e){if(e>=0)this.heap_.remove(e);else for(e=-(e+1),this.verts_[e]=null;this.size_>0&&null===this.verts_[this.order_[this.size_-1]];)--this.size_},libtess.PriorityQHeap=function(){this.heap_=libtess.PriorityQHeap.reallocNumeric_([0],libtess.PriorityQHeap.INIT_SIZE_+1),this.verts_=[null,null],this.handles_=[0,0],this.size_=0,this.max_=libtess.PriorityQHeap.INIT_SIZE_,this.freeList_=0,this.initialized_=!1,this.heap_[1]=1},libtess.PriorityQHeap.INIT_SIZE_=32,libtess.PriorityQHeap.reallocNumeric_=function(e,t){for(var i=new Array(t),n=0;n<e.length;n++)i[n]=e[n];for(;n<t;n++)i[n]=0;return i},libtess.PriorityQHeap.prototype.init=function(){for(var e=this.size_;e>=1;--e)this.floatDown_(e);this.initialized_=!0},libtess.PriorityQHeap.prototype.insert=function(e){var t,i=++this.size_;return 2*i>this.max_&&(this.max_*=2,this.handles_=libtess.PriorityQHeap.reallocNumeric_(this.handles_,this.max_+1)),0===this.freeList_?t=i:(t=this.freeList_,this.freeList_=this.handles_[this.freeList_]),this.verts_[t]=e,this.handles_[t]=i,this.heap_[i]=t,this.initialized_&&this.floatUp_(i),t},libtess.PriorityQHeap.prototype.isEmpty=function(){return 0===this.size_},libtess.PriorityQHeap.prototype.minimum=function(){return this.verts_[this.heap_[1]]},libtess.PriorityQHeap.prototype.extractMin=function(){var e=this.heap_,t=this.verts_,i=this.handles_,n=e[1],r=t[n];return this.size_>0&&(e[1]=e[this.size_],i[e[1]]=1,t[n]=null,i[n]=this.freeList_,this.freeList_=n,--this.size_>0&&this.floatDown_(1)),r},libtess.PriorityQHeap.prototype.remove=function(e){var t=this.heap_,i=this.verts_,n=this.handles_,r=n[e];if(t[r]=t[this.size_],n[t[r]]=r,r<=--this.size_)if(r<=1)this.floatDown_(r);else{var o=i[t[r]],s=i[t[r>>1]];libtess.geom.vertLeq(s,o)?this.floatDown_(r):this.floatUp_(r)}i[e]=null,n[e]=this.freeList_,this.freeList_=e},libtess.PriorityQHeap.prototype.floatDown_=function(e){for(var t=this.heap_,i=this.verts_,n=this.handles_,r=e,o=t[r];;){var s=r<<1;s<this.size_&&libtess.geom.vertLeq(i[t[s+1]],i[t[s]])&&(s+=1);var a=t[s];if(s>this.size_||libtess.geom.vertLeq(i[o],i[a]))return t[r]=o,void(n[o]=r);t[r]=a,n[a]=r,r=s}},libtess.PriorityQHeap.prototype.floatUp_=function(e){for(var t=this.heap_,i=this.verts_,n=this.handles_,r=e,o=t[r];;){var s=r>>1,a=t[s];if(0===s||libtess.geom.vertLeq(i[a],i[o]))return t[r]=o,void(n[o]=r);t[r]=a,n[a]=r,r=s}},libtess.ActiveRegion=function(){this.eUp=null,this.nodeUp=null,this.windingNumber=0,this.inside=!1,this.sentinel=!1,this.dirty=!1,this.fixUpperEdge=!1},libtess.ActiveRegion.prototype.regionBelow=function(){return this.nodeUp.getPredecessor().getKey()},libtess.ActiveRegion.prototype.regionAbove=function(){return this.nodeUp.getSuccessor().getKey()},void 0!==module&&(module.exports=libtess),define("libtess",["libtess/libtess.cat"],(function(e){return e})),define("libtess/libtess.cat",(function(){})),define("standard/Math/Geometry/Triangle3",["standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","libtess"],(function(e,t){"use strict";return{area:function(){const t=new e(0,0,0),i=new e(0,0,0);return function(e,n,r){return t.assign(n).subtract(e).cross(i.assign(r).subtract(e)).abs()/2}}(),normal:function(e,t,i,n){const r=i.x-t.x,o=i.y-t.y,s=i.z-t.z,a=e.x-t.x,u=e.y-t.y,l=e.z-t.z;return n.set(o*l-s*u,s*a-r*l,r*u-o*a),n.normalize()},quadNormal:function(e,t,i,n,r){const o=i.x-e.x,s=i.y-e.y,a=i.z-e.z,u=n.x-t.x,l=n.y-t.y,c=n.z-t.z;return r.set(s*c-a*l,a*u-o*c,o*l-s*u),r.normalize()},triangulatePolygon:function(){const e=function(){const e=new libtess.GluTesselator;return e.gluTessCallback(libtess.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t[t.length]=e})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_BEGIN,(function(e){e!==libtess.primitiveType.GL_TRIANGLES&&console.log("expected TRIANGLES but got type: "+e)})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_ERROR,(function(e){console.log("error callback"),console.log("error number: "+e)})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_COMBINE,(function(e,t,i){return t[0]})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e.gluTessProperty(libtess.gluEnum.GLU_TESS_TOLERANCE,0),e.gluTessProperty(libtess.gluEnum.GLU_TESS_WINDING_RULE,libtess.windingRule.GLU_TESS_WINDING_ODD),e}();return function(){const t=arguments[arguments.length-1];e.gluTessBeginPolygon(t);for(let t=0,i=arguments.length-1;t<i;++t){e.gluTessBeginContour();for(const i of arguments[t])e.gluTessVertex(i,i);e.gluTessEndContour()}return e.gluTessEndPolygon(),t}}(),triangulateConvexPolygon:function(e,t){for(let i=1,n=e.length-1;i<n;++i)t.push(e[0],e[i],e[i+1])},getPolygonNormal:function(e,t){t.set(0,0,0);var i=e[0];for(let r=0,o=e.length;r<o;++r){var n=i;i=e[(r+1)%o];t.x+=(n.y-i.y)*(n.z+i.z),t.y+=(n.z-i.z)*(n.x+i.x),t.z+=(n.x-i.x)*(n.y+i.y)}return t.normalize()}}})),define("standard/Math/Algorithms/SAT",[],(function(){"use strict";const e={min:0,max:0},t={min:0,max:0};function i(){}function n(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 r(e,t,i){return t<=e&&e<=i}return i.isSeparated=function(i,o,s){for(const c of i)if(n(o,c,e),n(s,c,t),l=t.max,!r(u=t.min,a=e.min,e.max)&&!r(a,u,l))return!0;var a,u,l;return!1},i})),define("standard/Math/Geometry/ViewVolume",["standard/Math/Geometry/Plane3","standard/Math/Geometry/Triangle3","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Algorithms/SAT"],(function(e,t,i,n,r,o){"use strict";function s(t,r,o){this.viewport=new n(0,0,0,0),this.scissor=new n(0,0,0,0),this.points=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],this.normals=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],this.edges=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],this.planes=[new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero)],arguments.length&&this.set(t,r,o)}return s.prototype={constructor:s,set:function(){const e=new r;return function(i,n,r){try{this.viewport.assign(n),this.scissor.assign(r);const o=this.points,a=o[0],u=o[1],l=o[2],c=o[3],h=o[4],d=o[5],p=o[6],f=o[7],g=r[0],m=g+r[2],_=r[1],y=_+r[3];e.assign(i).inverse(),s.unProjectPointMatrix(g,_,0,e,n,a),s.unProjectPointMatrix(m,_,0,e,n,u),s.unProjectPointMatrix(m,y,0,e,n,l),s.unProjectPointMatrix(g,y,0,e,n,c),s.unProjectPointMatrix(g,_,1,e,n,h),s.unProjectPointMatrix(m,_,1,e,n,d),s.unProjectPointMatrix(m,y,1,e,n,p),s.unProjectPointMatrix(g,y,1,e,n,f);const x=this.normals;t.normal(a,u,l,x[0]),t.normal(f,h,a,x[1]),t.normal(p,l,u,x[2]),t.normal(l,p,f,x[3]),t.normal(u,a,h,x[4]),t.normal(h,f,p,x[5]);const w=this.planes;w[0].set(u,x[0]),w[1].set(h,x[1]),w[2].set(l,x[2]),w[3].set(p,x[3]),w[4].set(a,x[4]),w[5].set(f,x[5]),this.edges.tainted=!0,this.valid=!0}catch(e){this.valid=!1}return this}}(),getViewport:function(){return this.viewport},getScissor:function(){return this.scissor},getEdges:function(){const e=this.edges;if(e.tainted){const t=this.points;e[0].assign(t[0]).subtract(t[1]),e[1].assign(t[1]).subtract(t[2]),e[2].assign(t[2]).subtract(t[3]),e[3].assign(t[3]).subtract(t[0]),e[4].assign(t[0]).subtract(t[4]),e[5].assign(t[1]).subtract(t[5]),e[6].assign(t[2]).subtract(t[6]),e[7].assign(t[3]).subtract(t[7]),e.tainted=!1}return e},intersectsSphere:function(e,t){if(this.valid){const i=this.planes;if(i[0].getDistanceToPoint(t)>e)return!1;if(i[1].getDistanceToPoint(t)>e)return!1;if(i[2].getDistanceToPoint(t)>e)return!1;if(i[3].getDistanceToPoint(t)>e)return!1;if(i[4].getDistanceToPoint(t)>e)return!1;if(i[5].getDistanceToPoint(t)>e)return!1}return!0},intersectsBox:function(){const e=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],t=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],n=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],r=[];for(let e=0;e<24;++e)r.push(new i(0,0,0));return function(i){i.getPoints(e);const s=this.points;if(o.isSeparated(i.getNormals(t),e,s))return!1;if(o.isSeparated(this.normals,e,s))return!1;i.getAxes(n);const a=this.getEdges();for(let e=0;e<3;++e)for(let t=0;t<8;++t)r[3*e+t].assign(n[e]).cross(a[t]);return!o.isSeparated(r,e,s)}}()},Object.assign(s,{unProjectPoint:function(){const e=new r;return function(t,i,n,r,o,s,a){return e.assign(r).multRight(o).inverse(),this.unProjectPointMatrix(t,i,n,e,s,a)}}(),unProjectPointMatrix:function(){const e=new n(0,0,0,0);return function(t,i,n,r,o,s){if(e.set((t-o[0])/o[2]*2-1,(i-o[1])/o[3]*2-1,2*n-1,1),r.multVecMatrix(e),0===e.w)throw new Error("Couldn't unproject point: divisor is 0.");const a=1/e.w;return s.set(e.x*a,e.y*a,e.z*a)}}(),unProjectRay:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new r;return function(i,r,o,a,u,l){return n.assign(o).multRight(a).inverse(),s.unProjectPointMatrix(i,r,0,n,u,e),s.unProjectPointMatrix(i,r,.9,n,u,t),l.setPoints(e,t)}}(),projectPoint:function(){const e=new n(0,0,0,0);return function(t,i,n,r,o){if(e.set(t.x,t.y,t.z,1),n.multVecMatrix(i.multVecMatrix(e)),0===e.w)throw new Error("Couldn't project point: divisor is 0.");const s=1/(2*e.w);return o.set((e.x*s+.5)*r[2]+r[0],(e.y*s+.5)*r[3]+r[1],e.z*s+.5)}}(),projectLine:function(){const e=new i(0,0,0),t=new i(0,0,0);return function(n,r,o,a,u){return s.projectPoint(n.point,r,o,a,e),s.projectPoint(i.multiply(n.direction,1e9).add(n.point),r,o,a,t),e.z=0,t.z=0,u.setPoints(e,t)}}()}),s})),define("x_ite/Rendering/TextureBuffer",["standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i){"use strict";function n(e,t,i){const n=e.getContext();if(this.browser=e,this.width=t,this.height=i,this.array=new Uint8Array(t*i*4),this.lastBuffer=n.getParameter(n.FRAMEBUFFER_BINDING),this.buffer=n.createFramebuffer(),n.bindFramebuffer(n.FRAMEBUFFER,this.buffer),this.colorTexture=n.createTexture(),n.bindTexture(n.TEXTURE_2D,this.colorTexture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,t,i,0,n.RGBA,n.UNSIGNED_BYTE,null),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.colorTexture,0),n.getVersion()>=2||e.getExtension("WEBGL_depth_texture")){this.depthTexture=n.createTexture(),n.bindTexture(n.TEXTURE_2D,this.depthTexture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST);const e=n.getVersion()>=2?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT;n.texImage2D(n.TEXTURE_2D,0,e,t,i,0,n.DEPTH_COMPONENT,n.UNSIGNED_INT,null),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,this.depthTexture,0)}else this.depthBuffer=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this.depthBuffer),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t,i),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,this.depthBuffer);const r=n.checkFramebufferStatus(n.FRAMEBUFFER)===n.FRAMEBUFFER_COMPLETE;if(n.bindFramebuffer(n.FRAMEBUFFER,this.lastBuffer),!r)throw new Error("Couldn't create frame buffer.")}n.prototype={constructor:n,getWidth:function(){return this.width},getHeight:function(){return this.height},getColorTexture:function(){return this.colorTexture},getDepthTexture:function(){return this.depthTexture},readPixels:function(){const e=this.browser.getContext(),t=this.array,i=this.width,n=this.height;return e.readPixels(0,0,i,n,e.RGBA,e.UNSIGNED_BYTE,t),t},getDepth:function(){const n=new i,r=new t(0,0,0);return function(t,i){try{const o=this.browser.getContext(),s=this.array,a=this.width,u=this.height;let l=0,c=0,h=Number.POSITIVE_INFINITY;n.assign(t).inverse(),o.readPixels(0,0,a,u,o.RGBA,o.UNSIGNED_BYTE,s);for(let e=0,t=0;e<u;++e)for(let i=0;i<a;++i,t+=4){const n=s[t]/255+s[t+1]/65025+s[t+2]/16581375+s[t+3]/4228250625;n<h&&(l=i,c=e,h=n)}return e.unProjectPointMatrix(l,c,h,n,i,r),r.z}catch(e){return 0}}}(),bind:function(){const e=this.browser.getContext();this.lastBuffer=e.getParameter(e.FRAMEBUFFER_BINDING),e.bindFramebuffer(e.FRAMEBUFFER,this.buffer)},unbind:function(){const e=this.browser.getContext();e.bindFramebuffer(e.FRAMEBUFFER,this.lastBuffer)}};for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("standard/Math/Algorithms/MergeSort",[],(function(){"use strict";function e(e,t){this.array=e,this.auxiliary=[],t&&(this.compare=t)}return e.prototype={compare:function(e,t){return e<t},sort:function(e,t){this.mergeSort(e,t-1)},mergeSort:function(e,t){if(e<t){const i=e+t>>>1;this.mergeSort(e,i),this.mergeSort(i+1,t),this.merge(e,i,t)}},merge:function(e,t,i){let n,r,o;for(n=0,r=e;r<=t;)this.auxiliary[n++]=this.array[r++];for(n=0,o=e;o<r&&r<=i;)this.compare(this.array[r],this.auxiliary[n])?this.array[o++]=this.array[r++]:this.array[o++]=this.auxiliary[n++];for(;o<r;)this.array[o++]=this.auxiliary[n++]}},e})),define("standard/Math/Geometry/Box3",["standard/Math/Geometry/Triangle3","standard/Math/Numbers/Matrix4","standard/Math/Numbers/Vector3","standard/Math/Algorithms/SAT"],(function(e,t,i,n){"use strict";function r(e,i){switch(arguments.length){case 0:return void(this.matrix=new t(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));case 2:return void(this.matrix=new t(e.x/2,0,0,0,0,e.y/2,0,0,0,0,e.z/2,0,i.x,i.y,i.z,1));case 3:{const e=arguments[0],i=arguments[1],n=(i.x-e.x)/2,r=(i.y-e.y)/2,o=(i.z-e.z)/2,s=(i.x+e.x)/2,a=(i.y+e.y)/2,u=(i.z+e.z)/2;return void(this.matrix=new t(n,0,0,0,0,r,0,0,0,0,o,0,s,a,u,1))}}}return r.prototype={constructor:r,copy:function(){const e=Object.create(r.prototype);return e.matrix=this.matrix.copy(),e},assign:function(e){return this.matrix.assign(e.matrix),this},equals:function(e){return this.matrix.equals(e.matrix)},getMatrix:function(){return this.matrix},set:function(e,t){const i=this.matrix;switch(arguments.length){case 0:return i[0]=.5,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=.5,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=.5,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=0,this;case 2:return i[0]=e.x/2,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=e.y/2,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=e.z/2,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this;case 3:{const e=arguments[0],t=arguments[1],i=(t.x-e.x)/2,n=(t.y-e.y)/2,r=(t.z-e.z)/2,o=(t.x+e.x)/2,s=(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,r,0,o,s,a,1),this}}},setExtents:function(e,t){const i=this.matrix,n=(t.x-e.x)/2,r=(t.y-e.y)/2,o=(t.z-e.z)/2,s=(t.x+e.x)/2,a=(t.y+e.y)/2,u=(t.z+e.z)/2;return i[0]=n,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=r,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=o,i[11]=0,i[12]=s,i[13]=a,i[14]=u,i[15]=1,this},getExtents:function(e,t){this.getAbsoluteExtents(e,t),e.add(this.center),t.add(this.center)},getAbsoluteExtents:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0);return function(i,r){const o=this.matrix,s=o.xAxis,a=o.yAxis,u=o.zAxis;e.assign(a).add(u);const l=u.subtract(a);t.assign(s).add(e),n.assign(s).add(l);const c=e.subtract(s),h=l.subtract(s);i.assign(t),r.assign(t),i.min(c,h,n),r.max(c,h,n),t.negate(),c.negate(),h.negate(),n.negate(),i.min(t,c,h,n),r.max(t,c,h,n)}}(),getPoints:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0),r=new i(0,0,0);return function(i){const o=this.matrix;e.assign(o.xAxis),t.assign(o.yAxis),n.assign(o.zAxis),r.assign(t).add(n);const s=n.subtract(t);i[0].assign(e).add(r),i[1].assign(r).subtract(e),i[2].assign(s).subtract(e),i[3].assign(e).add(s),i[4].assign(i[2]).negate(),i[5].assign(i[3]).negate(),i[6].assign(i[0]).negate(),i[7].assign(i[1]).negate();const a=this.center;return i[0].add(a),i[1].add(a),i[2].add(a),i[3].add(a),i[4].add(a),i[5].add(a),i[6].add(a),i[7].add(a),i}}(),getAxes:function(e){const t=this.matrix;return e[0].assign(t.xAxis),e[1].assign(t.yAxis),e[2].assign(t.zAxis),e},getNormals:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0),r=[i.xAxis,i.yAxis,i.zAxis];return function(o){const s=this.matrix;if(e.assign(s.xAxis),t.assign(s.yAxis),n.assign(s.zAxis),0===e.norm()&&(e.assign(t).cross(n),0===e.norm())){for(const i of r)if(e.assign(i).cross(t),0!==e.norm())break;if(0===e.norm()){for(const t of r)if(e.assign(t).cross(n),0!==e.norm())break;0===e.norm()&&e.assign(i.xAxis)}}if(0===t.norm()&&(t.assign(n).cross(e),0===t.norm())){for(const e of r)if(t.assign(e).cross(n),0!==t.norm())break;if(0===t.norm()){for(const i of r)if(t.assign(i).cross(e),0!==t.norm())break;0===t.norm()&&t.assign(i.yAxis)}}if(0===n.norm()&&(n.assign(e).cross(t),0===n.norm())){for(const t of r)if(n.assign(t).cross(e),0!==n.norm())break;if(0===n.norm()){for(const e of r)if(n.assign(e).cross(t),0!==n.norm())break;0===n.norm()&&n.assign(i.zAxis)}}return o[0].assign(t).cross(n).normalize(),o[1].assign(n).cross(e).normalize(),o[2].assign(e).cross(t).normalize(),o}}(),isEmpty:function(){return 0===this.matrix[15]},add:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0),r=new i(0,0,0);return function(i){return this.isEmpty()?this.assign(i):i.isEmpty()?this:(this.getExtents(e,t),i.getExtents(n,r),this.set(e.min(n),t.max(r),!0))}}(),multLeft:function(e){return this.matrix.multLeft(e),this},multRight:function(e){return this.matrix.multRight(e),this},containsPoint:function(){const e=new i(0,0,0),t=new i(0,0,0);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:function(){const e=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],t=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],r=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],o=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],s=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],a=[new i(0,0,0),new i(0,0,0),new i(0,0,0)];return function(i){if(this.isEmpty())return!1;if(i.isEmpty())return!1;if(this.getPoints(e),i.getPoints(t),n.isSeparated(this.getNormals(a),e,t))return!1;if(n.isSeparated(i.getNormals(a),e,t))return!1;this.getAxes(r),i.getAxes(o);for(let e=0;e<3;++e)for(let t=0;t<3;++t)s[3*e+t].assign(r[e]).cross(o[t]);return!n.isSeparated(s,e,t)}}(),intersectsTriangle:function(){const t=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],r=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],o=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],s=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],a=[],u=[new i(0,0,0)],l=[new i(0,0,0),new i(0,0,0),new i(0,0,0)];return function(i,c,h){if(this.isEmpty())return!1;if(this.getPoints(t),a[0]=i,a[1]=c,a[2]=h,n.isSeparated(this.getNormals(s),t,a))return!1;if(e.normal(i,c,h,u[0]),n.isSeparated(u,t,a))return!1;this.getAxes(r),l[0].assign(i).subtract(c),l[1].assign(c).subtract(h),l[2].assign(h).subtract(i);for(let e=0;e<3;++e)for(let t=0;t<3;++t)o[3*e+t].assign(r[e]).cross(l[t]);return!n.isSeparated(o,t,a)}}(),toString:function(){return this.size+", "+this.center}},Object.defineProperty(r.prototype,"size",{get:function(){const e=new i(0,0,0),t=new i(0,0,0);return function(){return this.getAbsoluteExtents(e,t),t.subtract(e)}}(),enumerable:!0,configurable:!1}),Object.defineProperty(r.prototype,"center",{get:function(){return this.matrix.origin},enumerable:!0,configurable:!1}),r})),define("standard/Math/Utility/MatrixStack",[],(function(){"use strict";return function(e){return Object.assign([new e],{top:0,set:function(e){this[this.top].assign(e)},get:function(){return this[this.top]},push:function(){const e=++this.top;e<this.length?this[e].assign(this[e-1]):this[e]=this[e-1].copy()},pushMatrix:function(e){const t=++this.top;t<this.length?this[t].assign(e):this[t]=e.copy()},pop:function(){--this.top},clear:function(){this.top=0},size:function(){return this.top+1},identity:function(){this[this.top].identity()},multLeft:function(e){this[this.top].multLeft(e)},translate:function(e){this[this.top].translate(e)},rotate:function(e){this[this.top].rotate(e)},scale:function(e){this[this.top].scale(e)}})}})),define("x_ite/Rendering/X3DRenderObject",["x_ite/Rendering/TextureBuffer","x_ite/Rendering/TraverseType","standard/Math/Algorithm","standard/Math/Algorithms/MergeSort","standard/Math/Geometry/Camera","standard/Math/Geometry/Box3","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Utility/MatrixStack"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";function d(e,t){return e.distance<t.distance}function p(t){this.cameraSpaceMatrix=new h(c),this.viewMatrix=new h(c),this.projectionMatrix=new h(c),this.modelViewMatrix=new h(c),this.viewVolumes=[],this.globalObjects=[],this.localObjects=[],this.lights=[],this.shadow=[!1],this.localFogs=[],this.layouts=[],this.textureProjectors=[],this.generatedCubeMapTextures=[],this.shaders=new Set,this.collisions=[],this.numOpaqueShapes=0,this.numTransparentShapes=0,this.numCollisionShapes=0,this.numDepthShapes=0,this.opaqueShapes=[],this.transparentShapes=[],this.transparencySorter=new n(this.transparentShapes,d),this.collisionShapes=[],this.activeCollisions=new Set,this.depthShapes=[],this.speed=0;try{this.depthBuffer=new e(t.getBrowser(),16,16)}catch(e){console.error(e),this.getDepth=function(){return 0}}}function f(e,t){for(var i=0,n=t.length;i<n;++i)e[i]=t[i];e.length=n}return p.prototype={constructor:p,initialize:function(){},isIndependent:function(){return!0},getCameraSpaceMatrix:function(){return this.cameraSpaceMatrix},getViewMatrix:function(){return this.viewMatrix},getProjectionMatrix:function(){return this.projectionMatrix},getModelViewMatrix:function(){return this.modelViewMatrix},getViewVolumes:function(){return this.viewVolumes},getViewVolume:function(){return this.viewVolumes.at(-1)},getGlobalObjects:function(){return this.globalObjects},getLocalObjects:function(){return this.localObjects},getLights:function(){return this.lights},pushShadow:function(e){this.shadow.push(e||this.shadow.at(-1))},popShadow:function(){this.shadow.pop()},setGlobalFog:function(){const e=new c;return function(t){const i=this.localFogs[0]||t.getFogs().pop();e.assign(t.getModelMatrix()).multRight(this.getViewMatrix().get()),i.set(t,e),this.localFog=this.localFogs[0]=i}}(),pushLocalFog:function(e){this.localFogs.push(e),this.localFog=e},popLocalFog:function(){const e=this.localFogs.pop();return this.localFog=this.localFogs.at(-1),e},getLayouts:function(){return this.layouts},getParentLayout:function(){return this.layouts.at(-1)},getTextureProjectors:function(){return this.textureProjectors},getGeneratedCubeMapTextures:function(){return this.generatedCubeMapTextures},getShaders:function(){return this.shaders},getCollisions:function(){return this.collisions},setNumCollisionShapes:function(e){this.numCollisionShapes=e},getNumCollisionShapes:function(){return this.numCollisionShapes},getCollisionShapes:function(){return this.collisionShapes},setNumDepthShapes:function(e){this.numDepthShapes=e},getNumDepthShapes:function(){return this.numDepthShapes},getDepthShapes:function(){return this.depthShapes},setNumOpaqueShapes:function(e){this.numOpaqueShapes=e},getNumOpaqueShapes:function(){return this.numOpaqueShapes},getOpaqueShapes:function(){return this.opaqueShapes},setNumTransparentShapes:function(e){this.numTransparentShapes=e},getNumTransparentShapes:function(){return this.numTransparentShapes},getTransparentShapes:function(){return this.transparentShapes},constrainTranslation:function(e,t){const i=this.getDistance(e)-this.getNavigationInfo().getCollisionRadius();if(i>0){return e.abs()>i?e.normalize().multiply(i):e}return t?this.constrainTranslation(e.normalize().multiply(i),!1):e.assign(a.Zero)},getDistance:function(){const e=new c,t=new c,i=new l(0,0,1,0),n=new a(0,0,0),o=new l(0,0,1,0);return function(s){try{const u=performance.now(),l=this.getViewpoint(),c=this.getNavigationInfo(),h=c.getCollisionRadius(),d=c.getStepHeight()-c.getAvatarHeight(),p=c.getNearValue(),f=c.getAvatarHeight();r.ortho(-h,h,Math.min(d,-h),h,p,Math.max(2*h,2*f),e),i.assign(l._orientation.getValue()).inverse().multRight(l.getOrientation()),o.setFromToVec(a.zAxis,n.assign(s).negate()).multRight(i),l.straightenHorizon(o),t.assign(l.getModelMatrix()),t.translate(l.getUserPosition()),t.rotate(o),t.inverse(),t.multRight(e),t.multLeft(l.getCameraSpaceMatrix()),this.getProjectionMatrix().pushMatrix(t);const g=this.getDepth(e);return this.getProjectionMatrix().pop(),this.collisionTime+=performance.now()-u,-g}catch(e){console.error(e)}}}(),getDepth:function(){const e=new u(0,0,16,16),t=new s;return t.set(c.Identity,e,e),function(i){this.depthBuffer.bind(),this.viewVolumes.push(t),this.depth(this.collisionShapes,this.numCollisionShapes),this.viewVolumes.pop();const n=this.depthBuffer.getDepth(i,e);return this.depthBuffer.unbind(),n}}(),render:function(e,i,n){switch(e){case t.COLLISION:this.numCollisionShapes=0,i.call(n,e,this),this.collide(),this.gravite();break;case t.SHADOW:this.numDepthShapes=0,i.call(n,e,this),this.depth(this.depthShapes,this.numDepthShapes);break;case t.DISPLAY:this.lightIndex=0,this.numOpaqueShapes=0,this.numTransparentShapes=0,this.setGlobalFog(this.getFog()),i.call(n,e,this),this.draw()}},addCollisionShape:function(){const e=new a(0,0,0),t=new a(0,0,0);return function(i){const n=this.getModelViewMatrix().get();n.multDirMatrix(e.assign(i.getBBoxSize())),n.multVecMatrix(t.assign(i.getBBoxCenter()));const r=e.abs()/2,o=this.viewVolumes.at(-1);if(o.intersectsSphere(r,t)){const e=this.numCollisionShapes++;e===this.collisionShapes.length&&this.collisionShapes.push({renderer:this,browser:this.getBrowser(),modelViewMatrix:new Float32Array(16),collisions:[],clipPlanes:[]});const t=this.collisionShapes[e];return t.modelViewMatrix.set(n),t.shapeNode=i,t.scissor=o.getScissor(),f(t.collisions,this.collisions),f(t.clipPlanes,this.localObjects),!0}return!1}}(),addDepthShape:function(){const e=new a(0,0,0),t=new a(0,0,0);return function(i){const n=this.getModelViewMatrix().get();n.multDirMatrix(e.assign(i.getBBoxSize())),n.multVecMatrix(t.assign(i.getBBoxCenter()));const r=e.abs()/2,o=this.viewVolumes.at(-1);if(o.intersectsSphere(r,t)){const e=this.numDepthShapes++;e===this.depthShapes.length&&this.depthShapes.push({renderer:this,browser:this.getBrowser(),modelViewMatrix:new Float32Array(16),clipPlanes:[]});const t=this.depthShapes[e];return t.modelViewMatrix.set(n),t.shapeNode=i,t.scissor=o.getScissor(),f(t.clipPlanes,this.localObjects),!0}return!1}}(),addDisplayShape:function(){const e=new a(0,0,0),t=new a(0,0,0);return function(i){const n=this.getModelViewMatrix().get();n.multDirMatrix(e.assign(i.getBBoxSize())),n.multVecMatrix(t.assign(i.getBBoxCenter()));const r=e.abs()/2,o=this.viewVolumes.at(-1);if(o.intersectsSphere(r,t)){if(i.getTransparent()){const e=this.numTransparentShapes++;e===this.transparentShapes.length&&this.transparentShapes.push(this.createShapeContext(!0));var s=this.transparentShapes[e]}else{const e=this.numOpaqueShapes++;e===this.opaqueShapes.length&&this.opaqueShapes.push(this.createShapeContext(!1));s=this.opaqueShapes[e]}return s.modelViewMatrix.set(n),s.scissor.assign(o.getScissor()),s.shapeNode=i,s.textureNode=null,s.distance=t.z,s.fogNode=this.localFog,s.shadow=this.shadow.at(-1),f(s.localObjects,this.localObjects),!0}return!1}}(),createShapeContext:function(e){return{renderer:this,browser:this.getBrowser(),transparent:e,modelViewMatrix:new Float32Array(16),scissor:new u(0,0,0,0),localObjects:[]}},collide:function(){const e=new c,t=new c,n=new o(a.Zero,a.Zero),r=new a(0,0,0);return function(){const o=new Set,s=2.2*this.getNavigationInfo().getCollisionRadius();r.set(s,s,s);for(let i=0,s=this.numCollisionShapes;i<s;++i)try{const s=this.collisionShapes[i],u=s.collisions;if(u.length&&(n.set(r,a.Zero),n.multRight(e.assign(s.modelViewMatrix).inverse()),s.shapeNode.intersectsBox(n,s.clipPlanes,t.assign(s.modelViewMatrix))))for(const e of u)o.add(e)}catch(e){console.error(e)}if(this.activeCollisions.size){const e=o.size?i.set_difference(this.activeCollisions,o,new Set):this.activeCollisions;for(const t of e)t.set_active(!1)}this.activeCollisions=o;for(const e of o)e.set_active(!0)}}(),gravite:function(){const e=new c,t=new c,i=new a(0,0,0),n=new l(0,0,1,0);return function(){try{const o=this.getBrowser();if(o.getDepthShader().getValid()){if(o.getActiveLayer()===this){if("WALK"!==o.getCurrentViewer())return}else if("WALK"!==this.getNavigationInfo().getViewer())return;const s=this.getNavigationInfo(),u=this.getViewpoint(),l=s.getCollisionRadius(),c=s.getNearValue(),h=s.getAvatarHeight(),d=s.getStepHeight();r.ortho(-l,l,-l,l,c,Math.max(2*l,2*h),e);const p=u.getUpVector(),f=n.setFromToVec(a.zAxis,p);t.assign(u.getModelMatrix()),t.translate(u.getUserPosition()),t.rotate(f),t.inverse(),t.multRight(e),t.multLeft(u.getCameraSpaceMatrix()),this.getProjectionMatrix().pushMatrix(t);let g=-this.getDepth(e);this.getProjectionMatrix().pop(),g-=h;const m=n.setFromToVec(a.yAxis,p);if(g>0){const e=this.speed?o.getCurrentFrameRate():1e6;this.speed-=o.getBrowserOptions()._Gravity.getValue()/e;let t=this.speed/e;t<-g&&(t=-g,this.speed=0),u._positionOffset=u._positionOffset.getValue().add(m.multVecRot(i.set(0,t,0)))}else this.speed=0,g=-g,g>.01&&g<d&&(this.constrainTranslation(m.multVecRot(i.set(0,g,0)),!1),u._positionOffset=i.add(u._positionOffset.getValue()))}}catch(e){console.error(e)}}}(),depth:function(){const e=new Float32Array(16);return function(t,i){const n=this.getBrowser(),r=n.getContext(),o=this.getViewVolume().getViewport(),s=n.getDepthShader();if(s.getValid()){s.enable(r),e.set(this.getProjectionMatrix().get()),r.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,e),r.viewport(o[0],o[1],o[2],o[3]),r.scissor(o[0],o[1],o[2],o[3]),r.clearColor(1,0,0,0),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT),r.enable(r.DEPTH_TEST),r.depthMask(!0),r.disable(r.BLEND),r.disable(r.CULL_FACE);for(let e=0;e<i;++e){const i=t[e],n=i.scissor;r.scissor(n.x,n.y,n.z,n.w),s.setLocalObjects(r,i.clipPlanes),r.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,i.modelViewMatrix),i.shapeNode.depth(r,i,s)}}}}(),draw:function(){const e=new Int32Array(4),t=new Float32Array(16),i=new Float32Array(16);return function(){const n=this.getBrowser(),r=n.getContext(),o=this.getViewVolume().getViewport(),s=this.shaders,a=this.lights,u=this.textureProjectors,l=this.generatedCubeMapTextures;if(this.isIndependent()){for(const e of a)e.renderShadowMap(this);for(const e of l)e.renderTexture(this)}n.getHeadlight().setGlobalVariables(this);for(const e of a)e.setGlobalVariables(this);for(const e of u)e.setGlobalVariables(this);r.viewport(o[0],o[1],o[2],o[3]),r.scissor(o[0],o[1],o[2],o[3]),r.clear(r.DEPTH_BUFFER_BIT),this.getBackground().display(r,this,o),e.set(o),i.set(this.getCameraSpaceMatrix().get()),t.set(this.getProjectionMatrix().get());for(const e of n.getStandardShaders())s.add(e);for(const n of s)n.setGlobalUniforms(r,this,i,t,e);r.enable(r.DEPTH_TEST),r.depthMask(!0),r.disable(r.BLEND);const c=this.opaqueShapes;for(let e=0,t=this.numOpaqueShapes;e<t;++e){const t=c[e],i=t.scissor;r.scissor(i.x,i.y,i.z,i.w),t.shapeNode.display(r,t),n.resetTextureUnits()}r.depthMask(!1),r.enable(r.BLEND);const h=this.transparentShapes;this.transparencySorter.sort(0,this.numTransparentShapes);for(let e=0,t=this.numTransparentShapes;e<t;++e){const t=h[e],i=t.scissor;r.scissor(i.x,i.y,i.z,i.w),t.shapeNode.display(r,t),n.resetTextureUnits()}r.depthMask(!0),r.disable(r.BLEND);const d=this.globalObjects;if(this.isIndependent()){const e=n.getLocalObjects();for(const t of e)t.dispose();e.length=0;for(const e of d)e.dispose()}s.clear(),d.length=0,a.length=0,u.length=0,l.length=0}}()},p})),define("x_ite/Components/Grouping/X3DBoundedObject",["x_ite/Fields","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Box3"],(function(e,t,i,n,r,o){"use strict";function s(t){this.addType(i.X3DBoundedObject),this.addChildObjects("transformSensors_changed",new e.SFTime),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),this.childBBox=new o,this.transformSensorNodes=new Set}return s.prototype={constructor:s,initialize:function(){},getDefaultBBoxSize:function(){const e=new n(-1,-1,-1);return function(){return e}}(),getBBox:function(e,t,i){const n=this.childBBox;t.set();for(var r=0,o=e.length;r<o;++r){const o=e[r];o.getBBox&&t.add(o.getBBox(n,i))}return t},displayBBox:function(){const e=new o,t=new r;return function(i,n){const r=n.getModelViewMatrix();this.getBBox(e),t.set(e.center,null,e.size),r.push(),r.multLeft(t),this.getBrowser().getBBoxNode().traverse(i,n),r.pop()}}(),addTransformSensor:function(e){this.transformSensorNodes.add(e),this._transformSensors_changed=this.getBrowser().getCurrentTime()},removeTransformSensor:function(e){this.transformSensorNodes.delete(e),this._transformSensors_changed=this.getBrowser().getCurrentTime()},getTransformSensors:function(){return this.transformSensorNodes}},s})),define("x_ite/Components/Grouping/X3DGroupingNode",["x_ite/Components/Core/X3DChildNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","x_ite/Base/X3DCast"],(function(e,t,i,n,r){"use strict";function o(e){return e?e.getValue().getId():-1}function s(e,t,i,n,r,s){const a={};for(let e=r;e<s;++e)a[o(n[e])]=!0;return e.remove(t,i,(function(e){return a[o(e)]}))}function a(i){e.call(this,i),t.call(this,i),this.addType(n.X3DGroupingNode),this.hidden=!1,this.allowedTypes=new Set,this.clipPlaneNodes=[],this.localFogNodes=[],this.lightNodes=[],this.textureProjectorNodes=[],this.pointingDeviceSensorNodes=[],this.maybeCameraObjects=[],this.cameraObjects=[],this.maybePickableSensorNodes=[],this.pickableSensorNodes=[],this.pickableObjects=[],this.childNodes=[],this.displayNodes=[],this.visibleNodes=[],this.boundedObjects=[],this.sensors=new Map}return a.prototype=Object.assign(Object.create(e.prototype),t.prototype,{constructor:a,initialize:function(){e.prototype.initialize.call(this),t.prototype.initialize.call(this),this._transformSensors_changed.addInterest("set_transformSensors__",this),this._addChildren.addInterest("set_addChildren__",this),this._removeChildren.addInterest("set_removeChildren__",this),this._children.addInterest("set_children__",this),this.set_children__()},getBBox:function(e,t){return this.getSubBBox(e,t)},getSubBBox:function(e,i){return this._bboxSize.getValue().equals(this.getDefaultBBoxSize())?t.prototype.getBBox.call(this,this.visibleNodes,e,i):e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},setHidden:function(e){e!==this.hidden&&(this.hidden=e,this.set_children__())},setAllowedTypes:function(){const e=this.allowedTypes;e.clear();for(const t of arguments)e.add(t)},set_addChildren__:function(){0!==this._addChildren.length&&(this._addChildren.setTainted(!0),this._addChildren.erase(s(this._addChildren,0,this._addChildren.length,this._children,0,this._children.length),this._addChildren.length),this._children.isTainted()||(this._children.removeInterest("set_children__",this),this._children.addInterest("connectChildren",this)),this._children.insert(this._children.length,this._addChildren,0,this._addChildren.length),this.add(this._addChildren),this._addChildren.set([]),this._addChildren.setTainted(!1))},set_removeChildren__:function(){0!==this._removeChildren.length&&(this._children.length>0&&(this._children.isTainted()||(this._children.removeInterest("set_children__",this),this._children.addInterest("connectChildren",this)),this._children.erase(s(this._children,0,this._children.length,this._removeChildren,0,this._removeChildren.length),this._children.length),this.remove(this._removeChildren)),this._removeChildren.set([]))},set_children__:function(){this.clear(),this.add(this._children)},connectChildren:function(){this._children.removeInterest("connectChildren",this),this._children.addInterest("set_children__",this)},clear:function(){for(const e of this.maybePickableSensorNodes)e._isPickableObject.removeInterest("set_pickableObjects__",this);for(const e of this.childNodes)e._isCameraObject.removeInterest("set_cameraObjects__",this),e._isPickableObject.removeInterest("set_pickableObjects__",this),r(n.X3DBoundedObject,e)&&(e._visible.removeInterest("set_visibles__",this),e._bboxDisplay.removeInterest("set_bboxDisplays__",this));this.clipPlaneNodes.length=0,this.localFogNodes.length=0,this.lightNodes.length=0,this.textureProjectorNodes.length=0,this.pointingDeviceSensorNodes.length=0,this.maybeCameraObjects.length=0,this.maybePickableSensorNodes.length=0,this.childNodes.length=0},add:function(e){if(!this.hidden){for(const t of e)if(t)try{const e=t.getValue().getInnerNode(),i=e.getType();for(let t=i.length-1;t>=0;--t){switch(i[t]){case n.X3DPointingDeviceSensorNode:this.pointingDeviceSensorNodes.push(e);break;case n.ClipPlane:this.clipPlaneNodes.push(e);break;case n.LocalFog:this.localFogNodes.push(e);break;case n.X3DTextureProjectorNode:this.textureProjectorNodes.push(e);break;case n.X3DLightNode:this.lightNodes.push(e);break;case n.X3DBindableNode:this.maybeCameraObjects.push(e);break;case n.TransformSensor:case n.X3DPickSensorNode:e._isPickableObject.addInterest("set_pickableObjects__",this),this.maybePickableSensorNodes.push(e);break;case n.X3DBackgroundNode:case n.X3DChildNode:e._isCameraObject.addInterest("set_cameraObjects__",this),e._isPickableObject.addInterest("set_pickableObjects__",this),r(n.X3DBoundedObject,e)&&(e._visible.addInterest("set_visibles__",this),e._bboxDisplay.addInterest("set_bboxDisplays__",this)),this.maybeCameraObjects.push(e),this.childNodes.push(e);break;case n.BooleanFilter:case n.BooleanToggle:case n.NurbsOrientationInterpolator:case n.NurbsPositionInterpolator:case n.NurbsSurfaceInterpolator:case n.TimeSensor:case n.X3DFollowerNode:case n.X3DInfoNode:case n.X3DInterpolatorNode:case n.X3DKeyDeviceSensorNode:case n.X3DLayoutNode:case n.X3DScriptNode:case n.X3DSequencerNode:case n.X3DTriggerNode:break;default:continue}break}}catch(e){}this.set_pickableObjects__(),this.set_displayNodes__(),this.set_visibles__(),this.set_bboxDisplays__()}},remove:function(e){for(const i of e)if(i)try{const e=i.getValue().getInnerNode(),o=e.getType();for(let i=o.length-1;i>=0;--i){switch(o[i]){case n.X3DPointingDeviceSensorNode:{const t=this.pointingDeviceSensorNodes.indexOf(e);t>=0&&this.pointingDeviceSensorNodes.splice(t,1);break}case n.ClipPlane:{const t=this.clipPlaneNodes.indexOf(e);t>=0&&this.clipPlaneNodes.splice(t,1);break}case n.LocalFog:{const t=this.localFogNodes.indexOf(e);t>=0&&this.localFogNodes.splice(t,1);break}case n.X3DTextureProjectorNode:{const t=this.textureProjectorNodes.indexOf(e);t>=0&&this.textureProjectorNodes.splice(t,1);break}case n.X3DLightNode:{const t=this.lightNodes.indexOf(e);t>=0&&this.lightNodes.splice(t,1);break}case n.X3DBindableNode:{const t=this.maybeCameraObjects.indexOf(e);t>=0&&this.maybeCameraObjects.splice(t,1);break}case n.TransformSensor:case n.X3DPickSensorNode:{e._isPickableObject.removeInterest("set_pickableObjects__",this);const t=this.maybePickableSensorNodes.indexOf(e);t>=0&&this.maybePickableSensorNodes.splice(t,1);break}case n.X3DBackgroundNode:case n.X3DChildNode:var t;e._isCameraObject.removeInterest("set_cameraObjects__",this),e._isPickableObject.removeInterest("set_pickableObjects__",this),r(n.X3DBoundedObject,e)&&(e._visible.removeInterest("set_visibles__",this),e._bboxDisplay.removeInterest("set_bboxDisplays__",this)),(t=this.maybeCameraObjects.indexOf(e))>=0&&this.maybeCameraObjects.splice(t,1),(t=this.childNodes.indexOf(e))>=0&&this.childNodes.splice(t,1);break;case n.BooleanFilter:case n.BooleanToggle:case n.NurbsOrientationInterpolator:case n.NurbsPositionInterpolator:case n.NurbsSurfaceInterpolator:case n.TimeSensor:case n.X3DFollowerNode:case n.X3DInfoNode:case n.X3DInterpolatorNode:case n.X3DKeyDeviceSensorNode:case n.X3DLayoutNode:case n.X3DScriptNode:case n.X3DSequencerNode:case n.X3DTriggerNode:break;default:continue}break}}catch(e){}this.set_pickableObjects__(),this.set_displayNodes__(),this.set_visibles__(),this.set_bboxDisplays__()},set_cameraObjects__:function(){const e=this.cameraObjects;e.length=0;for(const t of this.maybeCameraObjects)t.getCameraObject()&&(r(n.X3DBoundedObject,t)?t._visible.getValue()&&e.push(t):e.push(t));this.setCameraObject(Boolean(e.length))},set_pickableObjects__:function(){const e=this.pickableSensorNodes,t=this.pickableObjects;e.length=0,t.length=0;for(const t of this.maybePickableSensorNodes)t.getPickableObject()&&e.push(t);for(const e of this.childNodes)e.getPickableObject()&&t.push(e);this.set_transformSensors__()},set_transformSensors__:function(){this.setPickableObject(Boolean(this.getTransformSensors().size||this.pickableSensorNodes.length||this.pickableObjects.length))},set_displayNodes__:function(){const e=this.displayNodes;e.length=0;for(const t of this.clipPlaneNodes)e.push(t);for(const t of this.localFogNodes)e.push(t);for(const t of this.lightNodes)e.push(t);for(const t of this.textureProjectorNodes)e.push(t)},set_visibles__:function(){const e=this.childNodes,t=this.visibleNodes;t.length=0;for(const i of e)r(n.X3DBoundedObject,i)?i._visible.getValue()&&t.push(i):t.push(i);this.set_cameraObjects__()},set_bboxDisplays__:function(){const e=this.boundedObjects;e.length=0;for(const t of this.childNodes)r(n.X3DBoundedObject,t)&&t._bboxDisplay.getValue()&&e.push(t)},traverse:function(e,t){switch(e){case i.POINTER:{const i=this.pointingDeviceSensorNodes,n=this.clipPlaneNodes;if(i.length){const e=this.sensors;e.clear(),t.getBrowser().getSensors().push(e);for(const n of i)n.push(t,e)}for(const e of n)e.push(t);for(const i of this.childNodes)i.traverse(e,t);for(const e of n)e.pop(t);return void(i.length&&t.getBrowser().getSensors().pop())}case i.CAMERA:for(const i of this.cameraObjects)i.traverse(e,t);return;case i.PICKING:{if(this.getTransformSensors().size){const e=t.getModelViewMatrix().get();for(const t of this.getTransformSensors())t.collect(e)}for(const i of this.pickableSensorNodes)i.traverse(e,t);const i=t.getBrowser(),n=i.getPickingHierarchy();if(n.push(this),i.getPickable().at(-1))for(const i of this.childNodes)i.traverse(e,t);else for(const i of this.pickableObjects)i.traverse(e,t);return void n.pop()}case i.COLLISION:{const i=this.clipPlaneNodes;for(const e of i)e.push(t);for(const i of this.childNodes)i.traverse(e,t);for(const e of i)e.pop(t);return}case i.SHADOW:{const i=this.clipPlaneNodes;for(const e of i)e.push(t);for(const i of this.visibleNodes)i.traverse(e,t);for(const e of i)e.push(t);return}case i.DISPLAY:{const i=this.displayNodes;for(const e of i)e.push(t,this);for(const i of this.visibleNodes)i.traverse(e,t);for(const i of this.boundedObjects)i.displayBBox(e,t);for(const e of i)e.pop(t);return}}}}),a})),define("x_ite/Components/Layering/X3DViewportNode",["x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DViewportNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Execution/BindableStack",["x_ite/Base/X3DBaseNode"],(function(e){"use strict";function t(t,i){e.call(this,t),this.array=[i],this.transitionNode=i.create(t)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"BindableStack"},get:function(){return this.array},top:function(){return this.transitionNode._transitionActive.getValue()?this.transitionNode:this.array.at(-1)},pushOnTop:function(e){e!==this.array[0]&&(this.array.at(-1)._isBound=!1,this.array.push(e)),e._isBound=!0,e._bindTime=this.getBrowser().getCurrentTime(),this.addNodeEvent()},update:function(e,t,i){if(0===t.length&&0===i.length)return;const n=this.top(),r=this.array.at(-1);for(const e of t){const t=this.array.indexOf(e);t>0&&this.array.splice(t,1)}r!==this.array[0]&&i.some((e=>!e._set_bind.getValue()&&e===r))&&this.array.pop();for(const e of i)if(e._set_bind.getValue()){const t=this.array.indexOf(e);t>-1&&this.array.splice(t,1),this.array.push(e)}const o=this.array.at(-1);o!==r&&(r._set_bind=!1,r._isBound=!1,o._set_bind=!0,o._isBound=!0,o._bindTime=this.getBrowser().getCurrentTime(),this.transitionNode=o.create(this.getExecutionContext()),this.transitionNode.setup(),this.transitionNode.transitionStart(e,n,o),this.transitionNode._transitionActive.getValue()&&this.transitionNode._transitionActive.addInterest("set_transitionActive__",this),this.addNodeEvent())},set_transitionActive__:function(e){e.getValue()||(this.transitionNode._transitionActive.removeInterest("set_transitionActive__",this),this.addNodeEvent())}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Execution/BindableList",["x_ite/Base/X3DBaseNode","x_ite/Components/Core/X3DPrototypeInstance"],(function(e,t){"use strict";function i(t,i){e.call(this,t),this.collected=[i],this.array=[i],this.updateTime=0,this.removedNodes=[]}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTypeName:function(){return"BindableList"},get:function(){return this.array},getBound:function(e){if(this.array.length>1){const i=!1,n=this.getMainScene();if(e&&e.length)for(let r=1,o=this.array.length;r<o;++r){const o=this.array[r],s=o.getExecutionContext().getOuterNode(),a=s instanceof t?s.getScene():o.getScene();if((i||a===n)&&o.getName()==e)return o}for(let e=1,r=this.array.length;e<r;++e){const r=this.array[e],o=r.getExecutionContext().getOuterNode(),s=o instanceof t?o.getScene():r.getScene();if((i||s===n)&&r._isBound.getValue())return r}for(let e=1,r=this.array.length;e<r;++e){const r=this.array[e],o=r.getExecutionContext().getOuterNode(),s=o instanceof t?o.getScene():r.getScene();if(i||s===n)return r}}return this.array[0]},push:function(e){return this.collected.push(e)},update:function(e,t){const i=this.collected.filter((e=>e._set_bind.getModificationTime()>this.updateTime)),n=this.removedNodes;if(!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(this.collected,this.array)){for(const e of this.array)-1===this.collected.indexOf(e)&&n.push(e);const e=this.array;this.array=this.collected,this.collected=e}this.collected.length=1,t.update(e,n,i),n.length=0,this.updateTime=performance.now()}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("x_ite/Components/Navigation/NavigationInfo",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DBindableNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";const s={TELEPORT:!0,LINEAR:!0,ANIMATE:!0};function a(t){n.call(this,t),this.addType(o.NavigationInfo),this.addChildObjects("transitionStart",new e.SFBool,"availableViewers",new e.MFString,"viewer",new e.SFString("EXAMINE")),this._avatarSize.setUnit("length"),this._speed.setUnit("speed"),this._visibilityLimit.setUnit("speed")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"type",new e.MFString("EXAMINE","ANY")),new t(o.inputOutput,"avatarSize",new e.MFFloat(.25,1.6,.75)),new t(o.inputOutput,"speed",new e.SFFloat(1)),new t(o.inputOutput,"headlight",new e.SFBool(!0)),new t(o.inputOutput,"visibilityLimit",new e.SFFloat),new t(o.inputOutput,"transitionType",new e.MFString("LINEAR")),new t(o.inputOutput,"transitionTime",new e.SFTime(1)),new t(o.outputOnly,"transitionComplete",new e.SFBool),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"NavigationInfo"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._type.addInterest("set_type__",this),this._headlight.addInterest("set_headlight__",this),this._transitionStart.addInterest("set_transitionStart__",this),this._transitionComplete.addInterest("set_transitionComplete__",this),this._isBound.addInterest("set_isBound__",this),this.set_type__(),this.set_headlight__()},getViewer:function(){return this._viewer.getValue()},getCollisionRadius:function(){return this._avatarSize.length>0&&this._avatarSize[0]>0?this._avatarSize[0]:.25},getAvatarHeight:function(){return this._avatarSize.length>1?this._avatarSize[1]:1.6},getStepHeight:function(){return this._avatarSize.length>2?this._avatarSize[2]:.75},getNearValue:function(){const e=this.getCollisionRadius();return 0===e?1e-5:e/2},getFarValue:function(e){return this._visibilityLimit.getValue()?this._visibilityLimit.getValue():e.getMaxFarValue()},getTransitionType:function(){for(const e of this._transitionType){if(s[e])return e}return"LINEAR"},set_type__:function(){this._viewer="EXAMINE";for(const e of this._type){switch(e){case"EXAMINE":case"WALK":case"FLY":case"LOOKAT":case"PLANE":case"NONE":this._viewer=e;break;case"PLANE_create3000.de":this._viewer="PLANE";break;default:continue}break}let e=!1,t=!1,i=!1,n=!1,r=!1,o=!1;if(this._type.length)for(const s of this._type){switch(s){case"EXAMINE":default:e=!0;continue;case"WALK":t=!0;continue;case"FLY":i=!0;continue;case"LOOKAT":o=!0;continue;case"PLANE":n=!0;continue;case"NONE":r=!0;continue;case"ANY":e=!0,t=!0,i=!0,n=!0,r=!0,o=!0}break}else e=!0,t=!0,i=!0,n=!0,r=!0,o=!0;this._availableViewers.length=0,e&&this._availableViewers.push("EXAMINE"),t&&this._availableViewers.push("WALK"),i&&this._availableViewers.push("FLY"),n&&this._availableViewers.push("PLANE"),o&&this._availableViewers.push("LOOKAT"),r&&this._availableViewers.push("NONE")},set_headlight__:function(){this._headlight.getValue()?delete this.enable:this.enable=Function.prototype},set_transitionStart__:function(){this._transitionActive.getValue()||(this._transitionActive=!0)},set_transitionComplete__:function(){this._transitionActive.getValue()&&(this._transitionActive=!1)},set_isBound__:function(){this._isBound.getValue()||this._transitionActive.getValue()&&(this._transitionActive=!1)},enable:function(e,t){e===r.DISPLAY&&this._headlight.getValue()&&t.getGlobalObjects().push(t.getBrowser().getHeadlight())},traverse:function(e,t){e===r.CAMERA&&t.getLayer().getNavigationInfos().push(this)}}),a})),define("standard/Utility/ObjectCache",[],(function(){"use strict";return function(e){return{stack:[],last:-1,pop:function(){if(this.last>-1){const e=this.stack[this.last];return this.last--,e}return new e},push:function(e){return this.last++,this.stack[this.last]=e},clear:function(){this.stack.length=0,this.last=-1}}}})),define("x_ite/Components/EnvironmentalEffects/X3DFogObject",["x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix3","standard/Utility/ObjectCache"],(function(e,t,i){"use strict";const n=i(r);function r(){this.fogMatrix=new Float32Array(9)}function o(t){this.addType(e.X3DFogObject),this._visibilityRange.setUnit("length"),this.hidden=!1}return r.prototype={constructor:r,set:function(e,i){this.fogNode=e;try{this.fogMatrix.set(i.submatrix.inverse())}catch(e){this.fogMatrix.set(t.Identity)}},setShaderUniforms:function(e,t){if(t.hasFog(this))return;const i=this.fogNode,n=Math.max(0,i._visibilityRange.getValue());if(i.getHidden()||0===n)e.uniform1i(t.x3d_FogType,0);else{const r=i._color.getValue();e.uniform1i(t.x3d_FogType,i.fogType),e.uniform3f(t.x3d_FogColor,r.r,r.g,r.b),e.uniform1f(t.x3d_FogVisibilityRange,n),e.uniformMatrix3fv(t.x3d_FogMatrix,!1,this.fogMatrix)}},dispose:function(){n.push(this)}},o.prototype={constructor:o,initialize:function(){this._fogType.addInterest("set_fogType__",this),this.set_fogType__()},set_fogType__:function(){if("EXPONENTIAL"===this._fogType.getValue())this.fogType=2;else this.fogType=1},setHidden:function(e){this.hidden=e,this.getBrowser().addBrowserEvent()},getHidden:function(){return this.hidden},getFogs:function(){return n}},o})),define("x_ite/Components/EnvironmentalEffects/Fog",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DBindableNode","x_ite/Components/EnvironmentalEffects/X3DFogObject","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),r.call(this,e),this.addType(s.Fog),this.modelMatrix=new a}return u.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOnly,"set_bind",new e.SFBool),new t(s.inputOutput,"fogType",new e.SFString("LINEAR")),new t(s.inputOutput,"color",new e.SFColor(1,1,1)),new t(s.inputOutput,"visibilityRange",new e.SFFloat),new t(s.outputOnly,"isBound",new e.SFBool),new t(s.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"Fog"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this)},getModelMatrix:function(){return this.modelMatrix},traverse:function(e,t){e===o.CAMERA&&(t.getLayer().getFogs().push(this),this.modelMatrix.assign(t.getModelViewMatrix().get()))}}),u})),define("standard/Math/Numbers/Complex",[],(function(){"use strict";function e(e,t){this.real=e,this.imag=t}return e.prototype={constructor:e,copy:function(){const t=Object.create(e.prototype);return t.real=this.real,t.imag=this.imag,t},assign:function(e){return this.real=e.real,this.imag=e.imag,this},equals:function(e){return this.real===e.real&&this.imag===e.imag},setRadius:function(e){return this.setPolar(e,this.getAngle())},getRadius:function(){return this.real?this.imag?Math.hypot(this.real,this.imag):Math.abs(this.real):Math.abs(this.imag)},setAngle:function(e){return this.setPolar(this.getRadius(),e)},getAngle:function(){return Math.atan2(this.imag,this.real)},setPolar:function(e,t){return this.real=e*Math.cos(t),this.imag=e*Math.sin(t),this},conjugate:function(){return this.imag=-this.imag,this},negate:function(){return this.real=-this.real,this.imag=-this.imag,this},inverse:function(){const e=this.real*this.real+this.imag*this.imag;return this.real/=e,this.imag/=-e,this},add:function(e){return this.real+=e.real,this.imag+=e.imag,this},subtract:function(e){return this.real-=e.real,this.imag-=e.imag,this},multiply:function(e){return this.real*=e,this.imag*=e,this},multComp:function(){const e=this.real,t=this.imag;return this.real=e*value.real-t*value.imag,this.imag=e*value.imag+t*value.real,this},divComp:function(e){const t=this.real,i=this.imag,n=e.real,r=e.imag,o=n*n+r*r;return this.real=(t*n+i*r)/o,this.imag=(i*n-t*r)/o,this},toString:function(){return this.imag?this.real+" "+this.imag+"i":""+this.real}},Object.assign(e,{Polar:function(t,i){const n=Object.create(e.prototype);return n.real=t*Math.cos(i),n.imag=t*Math.sin(i),n},multiply:function(e,t){return e.copy().multiply(t)},multComp:function(e,t){return e.copy().multComp(t)}}),e})),define("x_ite/Components/EnvironmentalEffects/X3DBackgroundNode",["x_ite/Components/Core/X3DBindableNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=Math.sqrt(.5),c=[1,1,0,1,0,1,0,1,0,0,0,1,1,1,0,1,0,0,0,1,1,0,0,1],h=[l,l,-l,1,-l,l,-l,1,-l,-l,-l,1,l,l,-l,1,-l,-l,-l,1,l,-l,-l,1],d=[-l,l,l,1,l,l,l,1,l,-l,l,1,-l,l,l,1,l,-l,l,1,-l,-l,l,1],p=[-l,l,-l,1,-l,l,l,1,-l,-l,l,1,-l,l,-l,1,-l,-l,l,1,-l,-l,-l,1],f=[l,l,l,1,l,l,-l,1,l,-l,-l,1,l,l,l,1,l,-l,-l,1,l,-l,l,1],g=[l,l,l,1,-l,l,l,1,-l,l,-l,1,l,l,l,1,-l,l,-l,1,l,l,-l,1],m=[l,-l,-l,1,-l,-l,-l,1,-l,-l,l,1,l,-l,-l,1,-l,-l,l,1,l,-l,l,1],_=new r(0,0),y=new r(0,0),x=new r(0,0),w=new r(0,0),b=new r(0,0),v=new r(0,0);function S(t){e.call(this,t),this.addType(i.X3DBackgroundNode),this._skyAngle.setUnit("angle"),this._groundAngle.setUnit("angle"),this.hidden=!1,this.projectionMatrixArray=new Float32Array(16),this.modelMatrix=new a,this.modelViewMatrixArray=new Float32Array(16),this.localObjects=[],this.colors=[],this.sphere=[],this.textures=0}return S.prototype=Object.assign(Object.create(e.prototype),{constructor:S,initialize:function(){e.prototype.initialize.call(this);const t=this.getBrowser().getContext();this.colorBuffer=t.createBuffer(),this.sphereBuffer=t.createBuffer(),this.texCoordBuffer=t.createBuffer(),this.cubeBuffer=t.createBuffer(),this.texCoordBuffers=[t.createBuffer()],this.frontBuffer=t.createBuffer(),this.backBuffer=t.createBuffer(),this.leftBuffer=t.createBuffer(),this.rightBuffer=t.createBuffer(),this.topBuffer=t.createBuffer(),this.bottomBuffer=t.createBuffer(),this._groundAngle.addInterest("build",this),this._groundColor.addInterest("build",this),this._skyAngle.addInterest("build",this),this._skyColor.addInterest("build",this),this._transparency.addInterest("build",this),this.build(),this.transferRectangle()},set_frontTexture__:function(e){this.setTexture("frontTexture",e,0)},set_backTexture__:function(e){this.setTexture("backTexture",e,1)},set_leftTexture__:function(e){this.setTexture("leftTexture",e,2)},set_rightTexture__:function(e){this.setTexture("rightTexture",e,3)},set_topTexture__:function(e){this.setTexture("topTexture",e,4)},set_bottomTexture__:function(e){this.setTexture("bottomTexture",e,5)},setTexture:function(e,t,i){this[e]&&this[e]._loadState.removeInterest("setTextureBit",this),this[e]=t,t?(t._loadState.addInterest("setTextureBit",this,t,i),this.setTextureBit(t,i,t._loadState)):this.textures&=~(1<<i)},setTextureBit:function(e,t,n){n.getValue()===i.COMPLETE_STATE||e&&e.getData()?this.textures|=1<<t:this.textures&=~(1<<t)},setHidden:function(e){this.hidden=e,this.getBrowser().addBrowserEvent()},getHidden:function(){return this.hidden},getTransparent:function(){return!!this.hidden||0!==this._transparency.getValue()&&(!(this.frontTexture&&!this.frontTexture._transparent.getValue())||(!(this.backTexture&&!this.backTexture._transparent.getValue())||(!(this.leftTexture&&!this.leftTexture._transparent.getValue())||(!(this.rightTexture&&!this.rightTexture._transparent.getValue())||(!(this.topTexture&&!this.topTexture._transparent.getValue())||!(this.bottomTexture&&!this.bottomTexture._transparent.getValue()))))))},getColor:function(e,t,i){return t[u.upperBound(i,0,i.length,e,u.less)]},build:function(){if(this.colors.length=0,this.sphere.length=0,this._transparency.getValue()>=1)return;const e=1-u.clamp(this._transparency.getValue(),0,1);if(0===this._groundColor.length&&1==this._skyColor.length){const t=l;this.sphere.vertices=36,this.sphere.push(t,t,-t,1,-t,t,-t,1,-t,-t,-t,1,t,t,-t,1,-t,-t,-t,1,t,-t,-t,1,-t,t,t,1,t,t,t,1,-t,-t,t,1,-t,-t,t,1,t,t,t,1,t,-t,t,1,-t,t,-t,1,-t,t,t,1,-t,-t,t,1,-t,t,-t,1,-t,-t,t,1,-t,-t,-t,1,t,t,t,1,t,t,-t,1,t,-t,t,1,t,-t,t,1,t,t,-t,1,t,-t,-t,1,t,t,t,1,-t,t,t,1,-t,t,-t,1,t,t,t,1,-t,t,-t,1,t,t,-t,1,-t,-t,t,1,t,-t,t,1,-t,-t,-t,1,-t,-t,-t,1,t,-t,t,1,t,-t,-t,1);const i=this._skyColor[0];for(let t=0,n=this.sphere.vertices;t<n;++t)this.colors.push(i.r,i.g,i.b,e)}else{if(this._skyColor.length>this._skyAngle.length){const t=this._skyAngle.slice();(0===t.length||t[0]>0)&&t.unshift(0),t.at(-1)<Math.PI&&t.push(Math.PI),2===t.length&&t.splice(1,0,(t[0]+t[1])/2),this.buildSphere(1,t,this._skyAngle,this._skyColor,e,!1)}if(this._groundColor.length>this._groundAngle.length){const t=this._groundAngle.slice().reverse();(0===t.length||t[0]<Math.PI/2)&&t.unshift(Math.PI/2),t.at(-1)>0&&t.push(0),this.buildSphere(1,t,this._groundAngle,this._groundColor,e,!0)}}this.transferSphere()},buildSphere:function(e,t,i,n,r,o){const s=o?Math.PI/2:Math.PI,a=t.length-1;for(let l=0;l<a;++l){let a=u.clamp(t[l],0,s),c=u.clamp(t[l+1],0,s);o&&(a=Math.PI-a,c=Math.PI-c),_.setPolar(e,a),y.setPolar(e,c);const h=this.getColor(t[l],n,i),d=this.getColor(t[l+1],n,i);for(let e=0;e<20;++e){const t=e<19?e+1:0;let i=2*Math.PI*(e/20);x.setPolar(-_.imag,i),w.setPolar(-y.imag,i),i=2*Math.PI*(t/20),b.setPolar(-y.imag,i),v.setPolar(-_.imag,i),this.colors.push(h.r,h.g,h.b,r,d.r,d.g,d.b,r,d.r,d.g,d.b,r,h.r,h.g,h.b,r,h.r,h.g,h.b,r,d.r,d.g,d.b,r),this.sphere.push(x.imag,_.real,x.real,1,b.imag,y.real,b.real,1,w.imag,y.real,w.real,1,x.imag,_.real,x.real,1,v.imag,_.real,v.real,1,b.imag,y.real,b.real,1)}}},transferSphere:function(){const e=this.getBrowser().getContext();e.bindBuffer(e.ARRAY_BUFFER,this.colorBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.colors),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.sphereBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.sphere),e.STATIC_DRAW),this.sphereCount=this.sphere.length/4},transferRectangle:function(){const e=this.getBrowser().getContext();e.bindBuffer(e.ARRAY_BUFFER,this.texCoordBuffers[0]),e.bufferData(e.ARRAY_BUFFER,new Float32Array(c),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.frontBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(h),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.backBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(d),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.leftBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(p),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.rightBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.topBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.bottomBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(m),e.STATIC_DRAW)},traverse:function(e,i){switch(e){case t.CAMERA:return i.getLayer().getBackgrounds().push(this),void this.modelMatrix.assign(i.getModelViewMatrix().get());case t.DISPLAY:{const e=i.getLocalObjects(),t=this.localObjects;for(let i=0,n=e.length;i<n;++i)t[i]=e[i];return void(t.length=e.length)}}},display:function(){const e=new a,t=new a,i=new s,r=new o(0,0,0),u=new o(0,0,0);return function(o,s,a){try{if(this.hidden)return;o.disable(o.DEPTH_TEST),o.depthMask(!1),o.enable(o.CULL_FACE),o.frontFace(o.CCW);const l=.8*-n.unProjectPointMatrix(0,0,1,e.assign(s.getProjectionMatrix().get()).inverse(),a,u).z;this.projectionMatrixArray.set(s.getProjectionMatrix().get()),t.assign(this.modelMatrix),t.multRight(s.getViewMatrix().get()),t.get(null,i),t.identity(),t.rotate(i),t.scale(r.set(l,l,l)),this.modelViewMatrixArray.set(t),this.drawSphere(s),this.textures&&this.drawCube(s)}catch(e){console.error(e)}}}(),drawSphere:function(e){const t=this._transparency.getValue();if(t>=1)return;const i=e.getBrowser(),n=i.getContext(),r=i.getBackgroundSphereShader();r.getValid()&&(r.enable(n),r.setLocalObjects(n,this.localObjects),r.enableColorAttribute(n,this.colorBuffer),r.enableVertexAttribute(n,this.sphereBuffer),n.uniformMatrix4fv(r.x3d_ProjectionMatrix,!1,this.projectionMatrixArray),n.uniformMatrix4fv(r.x3d_ModelViewMatrix,!1,this.modelViewMatrixArray),t?n.enable(n.BLEND):n.disable(n.BLEND),n.drawArrays(n.TRIANGLES,0,this.sphereCount),r.disableColorAttribute(n))},drawCube:function(){const e=new Float32Array(a.Identity),t=new Float32Array([1,1,1]);return function(i){const n=i.getBrowser(),r=n.getContext(),o=n.getUnlitShader();o.getValid()&&(o.enable(r),o.setLocalObjects(r,this.localObjects),o.enableTexCoordAttribute(r,this.texCoordBuffers),r.uniform1i(o.x3d_FogType,0),r.uniform1i(o.x3d_FillPropertiesFilled,!0),r.uniform1i(o.x3d_FillPropertiesHatched,!1),r.uniform1i(o.x3d_ColorMaterial,!1),r.uniform3fv(o.x3d_EmissiveColor,t),r.uniform1i(o.x3d_EmissiveTexture.textureType,0),r.uniform1f(o.x3d_Transparency,0),r.uniform1i(o.x3d_NumTextures,1),r.uniform1i(o.x3d_TextureCoordinateGeneratorMode[0],0),r.uniform1i(o.x3d_NumProjectiveTextures,0),r.uniformMatrix4fv(o.x3d_TextureMatrix[0],!1,e),r.uniformMatrix4fv(o.x3d_ProjectionMatrix,!1,this.projectionMatrixArray),r.uniformMatrix4fv(o.x3d_ModelViewMatrix,!1,this.modelViewMatrixArray),this.drawRectangle(r,n,o,i,this.frontTexture,this.frontBuffer),this.drawRectangle(r,n,o,i,this.backTexture,this.backBuffer),this.drawRectangle(r,n,o,i,this.leftTexture,this.leftBuffer),this.drawRectangle(r,n,o,i,this.rightTexture,this.rightBuffer),this.drawRectangle(r,n,o,i,this.topTexture,this.topBuffer),this.drawRectangle(r,n,o,i,this.bottomTexture,this.bottomBuffer),o.disableTexCoordAttribute(r))}}(),drawRectangle:function(e,t,n,r,o,s){o&&(o.checkLoadState()===i.COMPLETE_STATE||o.getData())&&(o.setShaderUniforms(e,n,r),o._transparent.getValue()?e.enable(e.BLEND):e.disable(e.BLEND),n.enableVertexAttribute(e,s),e.drawArrays(e.TRIANGLES,0,6),t.resetTextureUnits())}}),S})),define("x_ite/Components/Texturing/X3DTextureNode",["x_ite/Fields","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(n){t.call(this,n),this.addType(i.X3DTextureNode),this.addChildObjects("transparent",new e.SFBool),this._transparent.setAccessType(i.outputOnly)}return n.prototype=Object.assign(Object.create(t.prototype),{constructor:n,setTransparent:function(e){e!==this._transparent.getValue()&&(this._transparent=e)},getTransparent:function(){return this._transparent.getValue()}}),n})),define("x_ite/Components/Texturing/X3DSingleTextureNode",["x_ite/Components/Texturing/X3DTextureNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast","x_ite/Browser/Texturing/MultiTextureModeType","x_ite/Browser/Texturing/MultiTextureSourceType","x_ite/Browser/Texturing/MultiTextureFunctionType"],(function(e,t,i,n,r,o){"use strict";function s(i){e.call(this,i),this.addType(t.X3DSingleTextureNode)}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,initialize:function(){e.prototype.initialize.call(this),this._textureProperties.addInterest("set_textureProperties__",this);const t=this.getBrowser().getContext();this.texture=t.createTexture(),this.set_textureProperties__()},set_textureProperties__:function(){this.texturePropertiesNode&&this.texturePropertiesNode.removeInterest("updateTextureProperties",this),this.texturePropertiesNode=i(t.TextureProperties,this._textureProperties),this.texturePropertiesNode||(this.texturePropertiesNode=this.getBrowser().getDefaultTextureProperties()),this.texturePropertiesNode.addInterest("updateTextureProperties",this),this.updateTextureProperties()},getTexture:function(){return this.texture},updateTextureProperties:function(){const e=["EXT_texture_filter_anisotropic","MOZ_EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"];return function(t,i,n,r,o,s,a,u){const l=this.getBrowser().getContext();l.bindTexture(t,this.getTexture()),Math.max(r,o)<this.getBrowser().getMinTextureSize()&&!i?(l.texParameteri(t,l.TEXTURE_MIN_FILTER,l.NEAREST),l.texParameteri(t,l.TEXTURE_MAG_FILTER,l.NEAREST)):(n._generateMipMaps.getValue()&&l.generateMipmap(t),l.texParameteri(t,l.TEXTURE_MIN_FILTER,l[n.getMinificationFilter()]),l.texParameteri(t,l.TEXTURE_MAG_FILTER,l[n.getMagnificationFilter()])),i?(l.texParameteri(t,l.TEXTURE_WRAP_S,l[n.getBoundaryModeS()]),l.texParameteri(t,l.TEXTURE_WRAP_T,l[n.getBoundaryModeT()]),l.getVersion()>=2&&l.texParameteri(t,l.TEXTURE_WRAP_R,l[n.getBoundaryModeR()])):(l.texParameteri(t,l.TEXTURE_WRAP_S,s?l.REPEAT:l.CLAMP_TO_EDGE),l.texParameteri(t,l.TEXTURE_WRAP_T,a?l.REPEAT:l.CLAMP_TO_EDGE),l.getVersion()>=2&&l.texParameteri(t,l.TEXTURE_WRAP_R,u?l.REPEAT:l.CLAMP_TO_EDGE));for(const i of e){const e=l.getExtension(i);if(e){l.texParameterf(t,e.TEXTURE_MAX_ANISOTROPY_EXT,n._anisotropicDegree.getValue());break}}}}(),setShaderUniforms:function(e,t,i){this.setShaderUniformsToChannel(e,t,i,t.x3d_Textures[0]),e.uniform1i(t.x3d_NumTextures,1),e.uniform1i(t.x3d_MultiTextureMode[0],n.MODULATE),e.uniform1i(t.x3d_MultiTextureAlphaMode[0],n.MODULATE),e.uniform1i(t.x3d_MultiTextureSource[0],r.DEFAULT),e.uniform1i(t.x3d_MultiTextureFunction[0],o.DEFAULT)}}),s})),define("x_ite/Components/Texturing/X3DTexture2DNode",["x_ite/Components/Texturing/X3DSingleTextureNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";const i=new Uint8Array([255,255,255,255]);function n(i){e.call(this,i),this.addType(t.X3DTexture2DNode);const n=this.getBrowser().getContext();this.target=n.TEXTURE_2D,this.width=0,this.height=0,this.flipY=!1,this.data=null}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,initialize:function(){e.prototype.initialize.call(this),this._repeatS.addInterest("updateTextureProperties",this),this._repeatT.addInterest("updateTextureProperties",this);const t=this.getBrowser().getContext();t.bindTexture(t.TEXTURE_2D,this.getTexture()),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i)},getTarget:function(){return this.target},getTextureType:function(){return 2},getTextureTypeString:function(){return"2D"},getWidth:function(){return this.width},getHeight:function(){return this.height},getFlipY:function(){return this.flipY},getData:function(){return this.data},clearTexture:function(){this.setTexture(1,1,!1,i,!1),this.data=null},setTexture:function(e,t,i,n,r){try{this.width=e,this.height=t,this.flipY=r,this.data=n;const o=this.getBrowser().getContext();o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,r),o.pixelStorei(o.UNPACK_ALIGNMENT,1),o.bindTexture(o.TEXTURE_2D,this.getTexture()),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,e,t,0,o.RGBA,o.UNSIGNED_BYTE,n),this.setTransparent(i),this.updateTextureProperties(),this.addNodeEvent()}catch(e){}},updateTexture:function(e,t){try{this.data=e;const i=this.getBrowser().getContext();i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,t),i.bindTexture(i.TEXTURE_2D,this.getTexture()),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,e),this.texturePropertiesNode._generateMipMaps.getValue()&&i.generateMipmap(i.TEXTURE_2D),this.addNodeEvent()}catch(e){}},updateTextureProperties:function(){e.prototype.updateTextureProperties.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,this.width,this.height,this._repeatS.getValue(),this._repeatT.getValue(),!1)},setShaderUniformsToChannel:function(e,t,i,n){const r=i.getBrowser().getTexture2DUnit();e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.getTexture()),e.uniform1i(n.textureType,2),e.uniform1i(n.texture2D,r)}}),n})),define("x_ite/Components/Texturing/ImageTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","standard/Math/Algorithm","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){r.call(this,e),o.call(this,e),this.addType(s.ImageTexture),this.urlStack=new t.MFString}return l.prototype=Object.assign(Object.create(r.prototype),o.prototype,{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(s.inputOutput,"metadata",new t.SFNode),new i(s.inputOutput,"description",new t.SFString),new i(s.inputOutput,"load",new t.SFBool(!0)),new i(s.inputOutput,"url",new t.MFString),new i(s.inputOutput,"autoRefresh",new t.SFTime),new i(s.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(s.initializeOnly,"repeatS",new t.SFBool(!0)),new i(s.initializeOnly,"repeatT",new t.SFBool(!0)),new i(s.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"ImageTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),o.prototype.initialize.call(this),this.canvas=e("<canvas></canvas>"),this.image=e("<img></img>"),this.image.on("load",this.setImage.bind(this)),this.image.on("error",this.setError.bind(this)),this.image.bind("abort",this.setError.bind(this)),this.image[0].crossOrigin="Anonymous",this.requestImmediateLoad()},unloadNow:function(){this.clearTexture()},loadNow:function(){this.urlStack.setValue(this._url),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.clearTexture(),void this.setLoadState(s.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.image.attr("src",this.URL.href)},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading image:",decodeURI(this.URL.href)),this.loadNext()},setImage:function(){u&&"data:"!==this.URL.protocol&&console.info("Done loading image:",decodeURI(this.URL.href));try{const e=this.getBrowser().getContext(),t=this.image[0],i=this.canvas[0],n=i.getContext("2d");let r=t.width,o=t.height;e.getVersion()>=2||a.isPowerOfTwo(r)&&a.isPowerOfTwo(o)?(i.width=r,i.height=o,n.clearRect(0,0,r,o),n.save(),n.translate(0,o),n.scale(1,-1),n.drawImage(t,0,0),n.restore()):(r=a.nextPowerOfTwo(r),o=a.nextPowerOfTwo(o),i.width=r,i.height=o,n.clearRect(0,0,r,o),n.save(),n.translate(0,o),n.scale(1,-1),n.drawImage(t,0,0,t.width,t.height,0,0,r,o),n.restore());const u=n.getImageData(0,0,r,o).data;let l=!1;for(let e=3,t=u.length;e<t;e+=4)if(255!==u[e]){l=!0;break}this.setTexture(r,o,l,new Uint8Array(u.buffer),!1),this.setLoadState(s.COMPLETE_STATE)}catch(e){console.log(e.message),this.setError()}}}),l})),define("x_ite/Components/EnvironmentalEffects/Background",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalEffects/X3DBackgroundNode","x_ite/Components/Texturing/ImageTexture","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.Background)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"frontUrl",new e.MFString),new t(o.inputOutput,"backUrl",new e.MFString),new t(o.inputOutput,"leftUrl",new e.MFString),new t(o.inputOutput,"rightUrl",new e.MFString),new t(o.inputOutput,"topUrl",new e.MFString),new t(o.inputOutput,"bottomUrl",new e.MFString),new t(o.inputOutput,"skyAngle",new e.MFFloat),new t(o.inputOutput,"skyColor",new e.MFColor(new e.SFColor)),new t(o.inputOutput,"groundAngle",new e.MFFloat),new t(o.inputOutput,"groundColor",new e.MFColor),new t(o.inputOutput,"transparency",new e.SFFloat),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"Background"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this);const e=new r(this.getExecutionContext()),t=new r(this.getExecutionContext()),i=new r(this.getExecutionContext()),o=new r(this.getExecutionContext()),s=new r(this.getExecutionContext()),a=new r(this.getExecutionContext()),u=this.getBrowser().getBackgroundTextureProperties();this._frontUrl.addFieldInterest(e._url),this._backUrl.addFieldInterest(t._url),this._leftUrl.addFieldInterest(i._url),this._rightUrl.addFieldInterest(o._url),this._topUrl.addFieldInterest(s._url),this._bottomUrl.addFieldInterest(a._url),e._url=this._frontUrl,t._url=this._backUrl,i._url=this._leftUrl,o._url=this._rightUrl,s._url=this._topUrl,a._url=this._bottomUrl,e._textureProperties=u,t._textureProperties=u,i._textureProperties=u,o._textureProperties=u,s._textureProperties=u,a._textureProperties=u,e.setup(),t.setup(),i.setup(),o.setup(),s.setup(),a.setup(),this.set_frontTexture__(e),this.set_backTexture__(t),this.set_leftTexture__(i),this.set_rightTexture__(o),this.set_topTexture__(s),this.set_bottomTexture__(a)}}),s})),define("x_ite/Components/Layering/X3DLayerNode",["x_ite/Components/Core/X3DNode","x_ite/Rendering/X3DRenderObject","x_ite/Components/Layering/X3DViewportNode","x_ite/Execution/BindableStack","x_ite/Execution/BindableList","x_ite/Components/Navigation/NavigationInfo","x_ite/Components/EnvironmentalEffects/Fog","x_ite/Components/EnvironmentalEffects/Background","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/Camera","standard/Math/Geometry/Box3","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f){"use strict";var g=new f;function m(i,u,l){e.call(this,i),t.call(this,i),this.addType(c.X3DLayerNode),this.groupNode=l,this.currentViewport=null,this.defaultNavigationInfo=new o(i),this.defaultViewpoint=u,this.defaultBackground=new a(i),this.defaultFog=new s(i),this.navigationInfoStack=new n(i,this.defaultNavigationInfo),this.viewpointStack=new n(i,this.defaultViewpoint),this.backgroundStack=new n(i,this.defaultBackground),this.fogStack=new n(i,this.defaultFog),this.navigationInfos=new r(i,this.defaultNavigationInfo),this.viewpoints=new r(i,this.defaultViewpoint),this.backgrounds=new r(i,this.defaultBackground),this.fogs=new r(i,this.defaultFog),this.defaultBackground.setHidden(!0),this.defaultFog.setHidden(!0),this.collisionTime=0}return m.prototype=Object.assign(Object.create(e.prototype),t.prototype,{constructor:m,layer0:!1,initialize:function(){e.prototype.initialize.call(this),t.prototype.initialize.call(this),this.defaultNavigationInfo.setup(),this.defaultViewpoint.setup(),this.defaultBackground.setup(),this.defaultFog.setup(),this.navigationInfoStack.setup(),this.viewpointStack.setup(),this.backgroundStack.setup(),this.fogStack.setup(),this.navigationInfos.setup(),this.viewpoints.setup(),this.backgrounds.setup(),this.fogs.setup(),this._viewport.addInterest("set_viewport__",this),this.set_viewport__()},isLayer0:function(e){this.layer0=e,this.defaultBackground.setHidden(!e)},getLayer:function(){return this},getGroup:function(){return this.groupNode},getViewport:function(){return this.currentViewport},getBackground:function(){return this.backgroundStack.top()},getFog:function(){return this.fogStack.top()},getNavigationInfo:function(){return this.navigationInfoStack.top()},getViewpoint:function(){return this.viewpointStack.top()},getBackgrounds:function(){return this.backgrounds},getFogs:function(){return this.fogs},getNavigationInfos:function(){return this.navigationInfos},getViewpoints:function(){return this.viewpoints},getUserViewpoints:function(){for(var e=[],t=0;t<this.viewpoints.get().length;++t){var i=this.viewpoints.get()[t];i._description.length&&e.push(i)}return e},getBackgroundStack:function(){return this.backgroundStack},getFogStack:function(){return this.fogStack},getNavigationInfoStack:function(){return this.navigationInfoStack},getViewpointStack:function(){return this.viewpointStack},getBBox:function(e,t){return this.groupNode.getBBox(e,t)},lookAt:function(e,t){this.getViewpoint().lookAtBBox(this.getBBox(new d),e,t)},set_viewport__:function(){this.currentViewport=u(c.X3DViewportNode,this._viewport),this.currentViewport||(this.currentViewport=this.getBrowser().getDefaultViewport())},bind:function(e){this.traverse(l.CAMERA,this);const t=this.navigationInfos.getBound(),i=this.backgrounds.getBound(),n=this.fogs.getBound(),r=this.viewpoints.getBound(e);this.navigationInfoStack.pushOnTop(t),this.viewpointStack.pushOnTop(r),this.backgroundStack.pushOnTop(i),this.fogStack.pushOnTop(n),r.resetUserOffsets()},traverse:function(e,t){t=t||this;var i=this.getViewpoint();switch(this.getProjectionMatrix().pushMatrix(i.getProjectionMatrix(this)),this.getCameraSpaceMatrix().pushMatrix(i.getCameraSpaceMatrix()),this.getViewMatrix().pushMatrix(i.getViewMatrix()),e){case l.POINTER:this.pointer(e,t);break;case l.CAMERA:this.camera(e,t);break;case l.PICKING:this.picking(e,t);break;case l.COLLISION:this.collision(e,t);break;case l.SHADOW:case l.DISPLAY:this.display(e,t)}this.getViewMatrix().pop(),this.getCameraSpaceMatrix().pop(),this.getProjectionMatrix().pop()},pointer:function(e,t){if(this._isPickable.getValue()){var i=this.getBrowser(),n=this.currentViewport.getRectangle(i);if(i.getSelectedLayer()){if(i.getSelectedLayer()!==this)return}else if(!i.isPointerInRectangle(n))return;i.setHitRay(this.getProjectionMatrix().get(),n),this.getModelViewMatrix().pushMatrix(this.getViewMatrix().get()),this.currentViewport.push(this),this.groupNode.traverse(e,t),this.currentViewport.pop(this),this.getModelViewMatrix().pop()}},camera:function(e,t){this.getModelViewMatrix().pushMatrix(f.Identity),this.currentViewport.push(this),this.groupNode.traverse(e,t),this.currentViewport.pop(this),this.getModelViewMatrix().pop(),this.navigationInfos.update(this,this.navigationInfoStack),this.viewpoints.update(this,this.viewpointStack),this.backgrounds.update(this,this.backgroundStack),this.fogs.update(this,this.fogStack),this.getViewpoint().update()},picking:function(e,t){this.getModelViewMatrix().pushMatrix(f.Identity),this.currentViewport.push(this),this.groupNode.traverse(e,t),this.currentViewport.pop(this),this.getModelViewMatrix().pop()},collision:function(e,t){var i=this.getNavigationInfo();if(!i._transitionActive.getValue()){var n=i.getCollisionRadius(),r=i.getAvatarHeight(),o=Math.max(2*n,2*r);this.collisionTime=0,h.ortho(-o,o,-o,o,-o,o,g),this.getProjectionMatrix().pushMatrix(g),this.getModelViewMatrix().pushMatrix(this.getViewMatrix().get()),this.currentViewport.push(this),t.render(e,this.groupNode.traverse,this.groupNode),this.currentViewport.pop(this),this.getModelViewMatrix().pop(),this.getProjectionMatrix().pop()}},display:function(e,t){this.getNavigationInfo().enable(e,t),this.getModelViewMatrix().pushMatrix(this.getViewMatrix().get()),this.currentViewport.push(this),t.render(e,this.groupNode.traverse,this.groupNode),this.currentViewport.pop(this),this.getModelViewMatrix().pop()}}),m})),define("x_ite/Components/Navigation/Viewpoint",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Navigation/X3DViewpointNode","x_ite/Components/Interpolation/ScalarInterpolator","x_ite/Base/X3DConstants","standard/Math/Geometry/Camera","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),this.addType(o.Viewpoint),this._position.setUnit("length"),this._centerOfRotation.setUnit("length"),this._fieldOfView.setUnit("angle"),this.projectionMatrix=new l,this.fieldOfViewInterpolator=new r(this.getBrowser().getPrivateScene())}var h,d;return c.prototype=Object.assign(Object.create(n.prototype),{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"description",new e.SFString),new t(o.inputOutput,"position",new e.SFVec3f(0,0,10)),new t(o.inputOutput,"orientation",new e.SFRotation),new t(o.inputOutput,"centerOfRotation",new e.SFVec3f),new t(o.inputOutput,"fieldOfView",new e.SFFloat(.7854)),new t(o.inputOutput,"jump",new e.SFBool(!0)),new t(o.inputOutput,"retainUserOffsets",new e.SFBool),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"Viewpoint"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.fieldOfViewInterpolator._key=new e.MFFloat(0,1),this.fieldOfViewInterpolator.setup(),this.getEaseInEaseOut()._modifiedFraction_changed.addFieldInterest(this.fieldOfViewInterpolator._set_fraction),this.fieldOfViewInterpolator._value_changed.addFieldInterest(this._fieldOfViewScale)},setInterpolators:function(t,i){if(t.getType().indexOf(o.Viewpoint)>=0){const n=t.getFieldOfView()/i.getFieldOfView();this.fieldOfViewInterpolator._keyValue=new e.MFFloat(n,i._fieldOfViewScale.getValue()),this._fieldOfViewScale=n}else this.fieldOfViewInterpolator._keyValue=new e.MFFloat(i._fieldOfViewScale.getValue(),i._fieldOfViewScale.getValue()),this._fieldOfViewScale=i._fieldOfViewScale.getValue()},getFieldOfView:function(){var e=this._fieldOfView.getValue()*this._fieldOfViewScale.getValue();return e>0&&e<Math.PI?e:Math.PI/4},getScreenScale:(d=new u(0,0,0),function(e,t){var i=t[2],n=t[3],r=Math.abs(e.z)*Math.tan(this.getFieldOfView()/2)*2;return r/=i>n?n:i,d.set(r,r,r)}),getViewportSize:(h=new a(0,0),function(e,t){var i=e[2],n=e[3],r=t*Math.tan(this.getFieldOfView()/2)*2,o=i/n;return o>1?h.set(r*o,r):h.set(r,r/o)}),getLookAtDistance:function(e){return e.size.abs()/2/Math.tan(this.getFieldOfView()/2)},getProjectionMatrixWithLimits:function(e,t,i){return s.perspective(this.getFieldOfView(),e,t,i[2],i[3],this.projectionMatrix)}}),c})),define("x_ite/Components/Grouping/Group",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Group)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Group"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"}}),o})),define("x_ite/Components/Layering/Layer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Layering/X3DLayerNode","x_ite/Components/Navigation/Viewpoint","x_ite/Components/Grouping/Group","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e,new r(e),new o(e)),this.addType(s.Layer)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"isPickable",new e.SFBool(!0)),new t(s.inputOutput,"viewport",new e.SFNode),new t(s.inputOnly,"addChildren",new e.MFNode),new t(s.inputOnly,"removeChildren",new e.MFNode),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Layer"},getComponentName:function(){return"Layering"},getContainerField:function(){return"layers"},initialize:function(){n.prototype.initialize.call(this),this._addChildren.addFieldInterest(this.getGroup()._addChildren),this._removeChildren.addFieldInterest(this.getGroup()._removeChildren),this._children.addFieldInterest(this.getGroup()._children),this.getGroup()._children=this._children,this.getGroup().setPrivate(!0),this.getGroup().setup()}}),a})),define("x_ite/Components/Layering/LayerSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Layering/Layer","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(a.LayerSet),this.layerNodes=[new r(e)],this.layerNode0=this.layerNodes[0],this.activeLayerNode=null}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(a.inputOutput,"metadata",new e.SFNode),new t(a.inputOutput,"activeLayer",new e.SFInt32),new t(a.inputOutput,"order",new e.MFInt32(0)),new t(a.inputOutput,"layers",new e.MFNode)]),getTypeName:function(){return"LayerSet"},getComponentName:function(){return"Layering"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.layerNode0.setPrivate(!0),this.layerNode0.setup(),this.layerNode0.isLayer0(!0),this._activeLayer.addInterest("set_activeLayer",this),this._order.addInterest("set_layers",this),this._layers.addInterest("set_layers",this),this.set_layers()},getActiveLayer:function(){return this.activeLayerNode},setLayer0:function(e){this.layerNode0=e,this.set_layers()},getLayer0:function(){return this.layerNode0},getLayers:function(){return this.layerNodes},set_activeLayer:function(){if(0===this._activeLayer.getValue())this.activeLayerNode!==this.layerNode0&&(this.activeLayerNode=this.layerNode0);else{const e=this._activeLayer-1;e>=0&&e<this._layers.length?this.activeLayerNode!==this._layers[e].getValue()&&(this.activeLayerNode=o(a.X3DLayerNode,this._layers[e])):null!==this.activeLayerNode&&(this.activeLayerNode=null)}},set_layers:function(){const e=this._layers.getValue();this.layerNodes.length=0;for(let t of this._order)if(0===t)this.layerNodes.push(this.layerNode0);else if(--t,t>=0&&t<e.length){const i=o(a.X3DLayerNode,e[t]);i&&this.layerNodes.push(i)}this.set_activeLayer()},bind:function(e){const t=this._layers.getValue();this.layerNode0.bind(e);for(let i=0,n=t.length;i<n;++i){const n=o(a.X3DLayerNode,t[i]);n&&n.bind(e)}},traverse:function(e,t){const i=this.layerNodes;if(e===s.POINTER)for(let n=0,r=i.length;n<r;++n)this.getBrowser().setLayerNumber(n),i[n].traverse(e,t);else for(const n of i)n.traverse(e,t)}}),u})),define("x_ite/Execution/X3DWorld",["x_ite/Configuration/SupportedNodes","x_ite/Fields/SFNode","x_ite/Base/X3DBaseNode","x_ite/Components/Layering/LayerSet","x_ite/Components/Layering/Layer","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){i.call(this,e),this.addType(s.X3DWorld),this.addChildObjects("activeLayer",new t(this.layer0)),this.defaultLayerSet=new n(e),this.layerSet=this.defaultLayerSet,this.layer0=new r(e)}e.addAbstractType("X3DWorld",a),a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,getTypeName:function(){return"X3DWorld"},initialize:function(){i.prototype.initialize.call(this),this.layerSet.setPrivate(!0),this.layerSet.setup(),this.layerSet.setLayer0(this.layer0),this.layerSet._activeLayer.addInterest("set_rootNodes__",this),this.getExecutionContext().getRootNodes().addInterest("set_rootNodes__",this),this.set_rootNodes__(),this.layer0.setPrivate(!0),this.layer0.isLayer0(!0),this.layer0.setup(),this.set_activeLayer__()},getCache:function(){return!0},getLayerSet:function(){return this.layerSet},getActiveLayer:function(){return this._activeLayer.getValue()},set_rootNodes__:function(){const e=this.layerSet,t=this.getExecutionContext().getRootNodes();this.layerSet=this.defaultLayerSet,this.layer0._children=t;for(const e of t){const t=o(s.LayerSet,e);t&&(this.layerSet=t)}this.layerSet!==e&&(this.layerSet.setLayer0(this.layer0),e._activeLayer.removeInterest("set_activeLayer__",this),this.layerSet._activeLayer.addInterest("set_activeLayer__",this),this.set_activeLayer__())},set_activeLayer__:function(){this._activeLayer=this.layerSet.getActiveLayer()},bind:function(){const e=this.getExecutionContext().getWorldURL();this.layerSet.bind(decodeURIComponent(new URL(e,e).hash.substr(1)))},traverse:function(e,t){this.layerSet.traverse(e,t)}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});return a})),define("standard/Networking/BinaryTransport",[],(function(){"use strict";return function(e){e.ajaxTransport("+binary",(function(e,t,i){if(e.dataType&&"binary"==e.dataType)return{send:function(t,i){const n=e.xhr();if(n.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(const t in e.xhrFields)n[t]=e.xhrFields[t];e.mimeType&&n.overrideMimeType&&n.overrideMimeType(e.mimeType);for(const e in t)n.setRequestHeader(e,t[e]);n.onload=function(){n.onload=n.onerror=null;const t={};t[e.dataType]=n.response,i(n.status||200,n.statusText,t,n.getAllResponseHeaders())},n.onerror=function(){n.onload=n.onerror=null,i(n.status||404,n.statusText)},n.responseType=e.responseType||"blob",n.send(e.hasContent&&e.data||null)},abort:function(){const t=e.xhr();t.onload=t.onerror=null,t.abort()}}}))}})),
|
|
69
|
+
var libtess={DEBUG:!1,assert:function(e,t){if(libtess.DEBUG&&!e)throw new Error("Assertion failed"+(t?": "+t:""))},GLU_TESS_MAX_COORD:1e150,TRUE_PROJECT:!1,GLU_TESS_DEFAULT_TOLERANCE:0,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111,GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901}};libtess.PQHandle,libtess.geom={},libtess.geom.vertEq=function(e,t){return e.s===t.s&&e.t===t.t},libtess.geom.vertLeq=function(e,t){return e.s<t.s||e.s===t.s&&e.t<=t.t},libtess.geom.edgeEval=function(e,t,i){var n=t.s-e.s,r=i.s-t.s;return n+r>0?n<r?t.t-e.t+(e.t-i.t)*(n/(n+r)):t.t-i.t+(i.t-e.t)*(r/(n+r)):0},libtess.geom.edgeSign=function(e,t,i){var n=t.s-e.s,r=i.s-t.s;return n+r>0?(t.t-i.t)*n+(t.t-e.t)*r:0},libtess.geom.transLeq=function(e,t){return e.t<t.t||e.t===t.t&&e.s<=t.s},libtess.geom.transEval=function(e,t,i){var n=t.t-e.t,r=i.t-t.t;return n+r>0?n<r?t.s-e.s+(e.s-i.s)*(n/(n+r)):t.s-i.s+(i.s-e.s)*(r/(n+r)):0},libtess.geom.transSign=function(e,t,i){var n=t.t-e.t,r=i.t-t.t;return n+r>0?(t.s-i.s)*n+(t.s-e.s)*r:0},libtess.geom.edgeGoesLeft=function(e){return libtess.geom.vertLeq(e.dst(),e.org)},libtess.geom.edgeGoesRight=function(e){return libtess.geom.vertLeq(e.org,e.dst())},libtess.geom.vertL1dist=function(e,t){return Math.abs(e.s-t.s)+Math.abs(e.t-t.t)},libtess.geom.vertCCW=function(e,t,i){return e.s*(t.t-i.t)+t.s*(i.t-e.t)+i.s*(e.t-t.t)>=0},libtess.geom.interpolate_=function(e,t,i,n){return(e=e<0?0:e)<=(i=i<0?0:i)?0===i?(t+n)/2:t+e/(e+i)*(n-t):n+i/(e+i)*(t-n)},libtess.geom.edgeIntersect=function(e,t,i,n,r){var o,s,a;libtess.geom.vertLeq(e,t)||(a=e,e=t,t=a),libtess.geom.vertLeq(i,n)||(a=i,i=n,n=a),libtess.geom.vertLeq(e,i)||(a=e,e=i,i=a,a=t,t=n,n=a),libtess.geom.vertLeq(i,t)?libtess.geom.vertLeq(t,n)?((o=libtess.geom.edgeEval(e,i,t))+(s=libtess.geom.edgeEval(i,t,n))<0&&(o=-o,s=-s),r.s=libtess.geom.interpolate_(o,i.s,s,t.s)):((o=libtess.geom.edgeSign(e,i,t))+(s=-libtess.geom.edgeSign(e,n,t))<0&&(o=-o,s=-s),r.s=libtess.geom.interpolate_(o,i.s,s,n.s)):r.s=(i.s+t.s)/2,libtess.geom.transLeq(e,t)||(a=e,e=t,t=a),libtess.geom.transLeq(i,n)||(a=i,i=n,n=a),libtess.geom.transLeq(e,i)||(a=e,e=i,i=a,a=t,t=n,n=a),libtess.geom.transLeq(i,t)?libtess.geom.transLeq(t,n)?((o=libtess.geom.transEval(e,i,t))+(s=libtess.geom.transEval(i,t,n))<0&&(o=-o,s=-s),r.t=libtess.geom.interpolate_(o,i.t,s,t.t)):((o=libtess.geom.transSign(e,i,t))+(s=-libtess.geom.transSign(e,n,t))<0&&(o=-o,s=-s),r.t=libtess.geom.interpolate_(o,i.t,s,n.t)):r.t=(i.t+t.t)/2},libtess.mesh={},libtess.mesh.makeEdge=function(e){var t=libtess.mesh.makeEdgePair_(e.eHead);return libtess.mesh.makeVertex_(t,e.vHead),libtess.mesh.makeVertex_(t.sym,e.vHead),libtess.mesh.makeFace_(t,e.fHead),t},libtess.mesh.meshSplice=function(e,t){var i=!1,n=!1;e!==t&&(t.org!==e.org&&(n=!0,libtess.mesh.killVertex_(t.org,e.org)),t.lFace!==e.lFace&&(i=!0,libtess.mesh.killFace_(t.lFace,e.lFace)),libtess.mesh.splice_(t,e),n||(libtess.mesh.makeVertex_(t,e.org),e.org.anEdge=e),i||(libtess.mesh.makeFace_(t,e.lFace),e.lFace.anEdge=e))},libtess.mesh.deleteEdge=function(e){var t=e.sym,i=!1;e.lFace!==e.rFace()&&(i=!0,libtess.mesh.killFace_(e.lFace,e.rFace())),e.oNext===e?libtess.mesh.killVertex_(e.org,null):(e.rFace().anEdge=e.oPrev(),e.org.anEdge=e.oNext,libtess.mesh.splice_(e,e.oPrev()),i||libtess.mesh.makeFace_(e,e.lFace)),t.oNext===t?(libtess.mesh.killVertex_(t.org,null),libtess.mesh.killFace_(t.lFace,null)):(e.lFace.anEdge=t.oPrev(),t.org.anEdge=t.oNext,libtess.mesh.splice_(t,t.oPrev())),libtess.mesh.killEdge_(e)},libtess.mesh.addEdgeVertex=function(e){var t=libtess.mesh.makeEdgePair_(e),i=t.sym;return libtess.mesh.splice_(t,e.lNext),t.org=e.dst(),libtess.mesh.makeVertex_(i,t.org),t.lFace=i.lFace=e.lFace,t},libtess.mesh.splitEdge=function(e){var t=libtess.mesh.addEdgeVertex(e).sym;return libtess.mesh.splice_(e.sym,e.sym.oPrev()),libtess.mesh.splice_(e.sym,t),e.sym.org=t.org,t.dst().anEdge=t.sym,t.sym.lFace=e.rFace(),t.winding=e.winding,t.sym.winding=e.sym.winding,t},libtess.mesh.connect=function(e,t){var i=!1,n=libtess.mesh.makeEdgePair_(e),r=n.sym;return t.lFace!==e.lFace&&(i=!0,libtess.mesh.killFace_(t.lFace,e.lFace)),libtess.mesh.splice_(n,e.lNext),libtess.mesh.splice_(r,t),n.org=e.dst(),r.org=t.org,n.lFace=r.lFace=e.lFace,e.lFace.anEdge=r,i||libtess.mesh.makeFace_(n,e.lFace),n},libtess.mesh.zapFace=function(e){var t,i=e.anEdge,n=i.lNext;do{if(n=(t=n).lNext,t.lFace=null,null===t.rFace()){t.oNext===t?libtess.mesh.killVertex_(t.org,null):(t.org.anEdge=t.oNext,libtess.mesh.splice_(t,t.oPrev()));var r=t.sym;r.oNext===r?libtess.mesh.killVertex_(r.org,null):(r.org.anEdge=r.oNext,libtess.mesh.splice_(r,r.oPrev())),libtess.mesh.killEdge_(t)}}while(t!==i);var o=e.prev,s=e.next;s.prev=o,o.next=s},libtess.mesh.meshUnion=function(e,t){var i=e.fHead,n=e.vHead,r=e.eHead,o=t.fHead,s=t.vHead,a=t.eHead;return o.next!==o&&(i.prev.next=o.next,o.next.prev=i.prev,o.prev.next=i,i.prev=o.prev),s.next!==s&&(n.prev.next=s.next,s.next.prev=n.prev,s.prev.next=n,n.prev=s.prev),a.next!==a&&(r.sym.next.sym.next=a.next,a.next.sym.next=r.sym.next,a.sym.next.sym.next=r,r.sym.next=a.sym.next),e},libtess.mesh.deleteMesh=function(e){},libtess.mesh.makeEdgePair_=function(e){var t=new libtess.GluHalfEdge,i=new libtess.GluHalfEdge,n=e.sym.next;return i.next=n,n.sym.next=t,t.next=e,e.sym.next=i,t.sym=i,t.oNext=t,t.lNext=i,i.sym=t,i.oNext=i,i.lNext=t,t},libtess.mesh.splice_=function(e,t){var i=e.oNext,n=t.oNext;i.sym.lNext=t,n.sym.lNext=e,e.oNext=n,t.oNext=i},libtess.mesh.makeVertex_=function(e,t){var i=t.prev,n=new libtess.GluVertex(t,i);i.next=n,t.prev=n,n.anEdge=e;var r=e;do{r.org=n,r=r.oNext}while(r!==e)},libtess.mesh.makeFace_=function(e,t){var i=t.prev,n=new libtess.GluFace(t,i);i.next=n,t.prev=n,n.anEdge=e,n.inside=t.inside;var r=e;do{r.lFace=n,r=r.lNext}while(r!==e)},libtess.mesh.killEdge_=function(e){var t=e.next,i=e.sym.next;t.sym.next=i,i.sym.next=t},libtess.mesh.killVertex_=function(e,t){var i=e.anEdge,n=i;do{n.org=t,n=n.oNext}while(n!==i);var r=e.prev,o=e.next;o.prev=r,r.next=o},libtess.mesh.killFace_=function(e,t){var i=e.anEdge,n=i;do{n.lFace=t,n=n.lNext}while(n!==i);var r=e.prev,o=e.next;o.prev=r,r.next=o},libtess.normal={},libtess.normal.S_UNIT_X_=1,libtess.normal.S_UNIT_Y_=0,libtess.normal.projectPolygon=function(e,t,i,n){var r=!1,o=[t,i,n];0===t&&0===i&&0===n&&(libtess.normal.computeNormal_(e,o),r=!0);var s,a=libtess.normal.longAxis_(o),u=e.mesh.vHead;if(libtess.TRUE_PROJECT){libtess.normal.normalize_(o);var l=[0,0,0],c=[0,0,0];l[a]=0,l[(a+1)%3]=libtess.normal.S_UNIT_X_,l[(a+2)%3]=libtess.normal.S_UNIT_Y_;var h=libtess.normal.dot_(l,o);for(l[0]-=h*o[0],l[1]-=h*o[1],l[2]-=h*o[2],libtess.normal.normalize_(l),c[0]=o[1]*l[2]-o[2]*l[1],c[1]=o[2]*l[0]-o[0]*l[2],c[2]=o[0]*l[1]-o[1]*l[0],libtess.normal.normalize_(c),s=u.next;s!==u;s=s.next)s.s=libtess.normal.dot_(s.coords,l),s.t=libtess.normal.dot_(s.coords,c)}else{var d=(a+1)%3,p=(a+2)%3,f=o[a]>0?1:-1;for(s=u.next;s!==u;s=s.next)s.s=s.coords[d],s.t=f*s.coords[p]}r&&libtess.normal.checkOrientation_(e)},libtess.normal.dot_=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},libtess.normal.normalize_=function(e){var t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];t=Math.sqrt(t),e[0]/=t,e[1]/=t,e[2]/=t},libtess.normal.longAxis_=function(e){var t=0;return Math.abs(e[1])>Math.abs(e[0])&&(t=1),Math.abs(e[2])>Math.abs(e[t])&&(t=2),t},libtess.normal.computeNormal_=function(e,t){var i,n=[-2*libtess.GLU_TESS_MAX_COORD,-2*libtess.GLU_TESS_MAX_COORD,-2*libtess.GLU_TESS_MAX_COORD],r=[2*libtess.GLU_TESS_MAX_COORD,2*libtess.GLU_TESS_MAX_COORD,2*libtess.GLU_TESS_MAX_COORD],o=[],s=[],a=e.mesh.vHead;for(i=a.next;i!==a;i=i.next)for(var u=0;u<3;++u){var l=i.coords[u];l<r[u]&&(r[u]=l,s[u]=i),l>n[u]&&(n[u]=l,o[u]=i)}var c=0;if(n[1]-r[1]>n[0]-r[0]&&(c=1),n[2]-r[2]>n[c]-r[c]&&(c=2),r[c]>=n[c])return t[0]=0,t[1]=0,void(t[2]=1);var h=0,d=s[c],p=o[c],f=[0,0,0],g=[d.coords[0]-p.coords[0],d.coords[1]-p.coords[1],d.coords[2]-p.coords[2]],m=[0,0,0];for(i=a.next;i!==a;i=i.next){m[0]=i.coords[0]-p.coords[0],m[1]=i.coords[1]-p.coords[1],m[2]=i.coords[2]-p.coords[2],f[0]=g[1]*m[2]-g[2]*m[1],f[1]=g[2]*m[0]-g[0]*m[2],f[2]=g[0]*m[1]-g[1]*m[0];var _=f[0]*f[0]+f[1]*f[1]+f[2]*f[2];_>h&&(h=_,t[0]=f[0],t[1]=f[1],t[2]=f[2])}h<=0&&(t[0]=t[1]=t[2]=0,t[libtess.normal.longAxis_(g)]=1)},libtess.normal.checkOrientation_=function(e){for(var t=0,i=e.mesh.fHead,n=i.next;n!==i;n=n.next){var r=n.anEdge;if(!(r.winding<=0))do{t+=(r.org.s-r.dst().s)*(r.org.t+r.dst().t),r=r.lNext}while(r!==n.anEdge)}if(t<0)for(var o=e.mesh.vHead,s=o.next;s!==o;s=s.next)s.t=-s.t},libtess.render={},libtess.render.renderMesh=function(e,t,i){for(var n=!1,r=-1,o=t.fHead.prev;o!==t.fHead;o=o.prev)if(o.inside){n||(e.callBeginCallback(libtess.primitiveType.GL_TRIANGLES),n=!0);var s=o.anEdge;do{if(i){var a=s.rFace().inside?0:1;r!==a&&(r=a,e.callEdgeFlagCallback(!!r))}e.callVertexCallback(s.org.data),s=s.lNext}while(s!==o.anEdge)}n&&e.callEndCallback()},libtess.render.renderBoundary=function(e,t){for(var i=t.fHead.next;i!==t.fHead;i=i.next)if(i.inside){e.callBeginCallback(libtess.primitiveType.GL_LINE_LOOP);var n=i.anEdge;do{e.callVertexCallback(n.org.data),n=n.lNext}while(n!==i.anEdge);e.callEndCallback()}},libtess.sweep={},libtess.sweep.SENTINEL_COORD_=4*libtess.GLU_TESS_MAX_COORD,libtess.sweep.TOLERANCE_NONZERO_=!1,libtess.sweep.computeInterior=function(e){var t;for(e.fatalError=!1,libtess.sweep.removeDegenerateEdges_(e),libtess.sweep.initPriorityQ_(e),libtess.sweep.initEdgeDict_(e);null!==(t=e.pq.extractMin());){for(;;){var i=e.pq.minimum();if(null===i||!libtess.geom.vertEq(i,t))break;i=e.pq.extractMin(),libtess.sweep.spliceMergeVertices_(e,t.anEdge,i.anEdge)}libtess.sweep.sweepEvent_(e,t)}var n=e.dict.getMin().getKey();e.event=n.eUp.org,libtess.sweep.doneEdgeDict_(e),libtess.sweep.donePriorityQ_(e),libtess.sweep.removeDegenerateFaces_(e.mesh),e.mesh.checkMesh()},libtess.sweep.addWinding_=function(e,t){e.winding+=t.winding,e.sym.winding+=t.sym.winding},libtess.sweep.edgeLeq_=function(e,t,i){var n=e.event,r=t.eUp,o=i.eUp;return r.dst()===n?o.dst()===n?libtess.geom.vertLeq(r.org,o.org)?libtess.geom.edgeSign(o.dst(),r.org,o.org)<=0:libtess.geom.edgeSign(r.dst(),o.org,r.org)>=0:libtess.geom.edgeSign(o.dst(),n,o.org)<=0:o.dst()===n?libtess.geom.edgeSign(r.dst(),n,r.org)>=0:libtess.geom.edgeEval(r.dst(),n,r.org)>=libtess.geom.edgeEval(o.dst(),n,o.org)},libtess.sweep.deleteRegion_=function(e,t){t.fixUpperEdge,t.eUp.activeRegion=null,e.dict.deleteNode(t.nodeUp),t.nodeUp=null},libtess.sweep.fixUpperEdge_=function(e,t){libtess.mesh.deleteEdge(e.eUp),e.fixUpperEdge=!1,e.eUp=t,t.activeRegion=e},libtess.sweep.topLeftRegion_=function(e){var t=e.eUp.org;do{e=e.regionAbove()}while(e.eUp.org===t);if(e.fixUpperEdge){var i=libtess.mesh.connect(e.regionBelow().eUp.sym,e.eUp.lNext);libtess.sweep.fixUpperEdge_(e,i),e=e.regionAbove()}return e},libtess.sweep.topRightRegion_=function(e){var t=e.eUp.dst();do{e=e.regionAbove()}while(e.eUp.dst()===t);return e},libtess.sweep.addRegionBelow_=function(e,t,i){var n=new libtess.ActiveRegion;return n.eUp=i,n.nodeUp=e.dict.insertBefore(t.nodeUp,n),i.activeRegion=n,n},libtess.sweep.isWindingInside_=function(e,t){switch(e.windingRule){case libtess.windingRule.GLU_TESS_WINDING_ODD:return 0!=(1&t);case libtess.windingRule.GLU_TESS_WINDING_NONZERO:return 0!==t;case libtess.windingRule.GLU_TESS_WINDING_POSITIVE:return t>0;case libtess.windingRule.GLU_TESS_WINDING_NEGATIVE:return t<0;case libtess.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:return t>=2||t<=-2}return!1},libtess.sweep.computeWinding_=function(e,t){t.windingNumber=t.regionAbove().windingNumber+t.eUp.winding,t.inside=libtess.sweep.isWindingInside_(e,t.windingNumber)},libtess.sweep.finishRegion_=function(e,t){var i=t.eUp,n=i.lFace;n.inside=t.inside,n.anEdge=i,libtess.sweep.deleteRegion_(e,t)},libtess.sweep.finishLeftRegions_=function(e,t,i){for(var n=t,r=t.eUp;n!==i;){n.fixUpperEdge=!1;var o=n.regionBelow(),s=o.eUp;if(s.org!==r.org){if(!o.fixUpperEdge){libtess.sweep.finishRegion_(e,n);break}s=libtess.mesh.connect(r.lPrev(),s.sym),libtess.sweep.fixUpperEdge_(o,s)}r.oNext!==s&&(libtess.mesh.meshSplice(s.oPrev(),s),libtess.mesh.meshSplice(r,s)),libtess.sweep.finishRegion_(e,n),r=o.eUp,n=o}return r},libtess.sweep.addRightEdges_=function(e,t,i,n,r,o){var s=!0,a=i;do{libtess.sweep.addRegionBelow_(e,t,a.sym),a=a.oNext}while(a!==n);null===r&&(r=t.regionBelow().eUp.rPrev());for(var u,l=t,c=r;(a=(u=l.regionBelow()).eUp.sym).org===c.org;)a.oNext!==c&&(libtess.mesh.meshSplice(a.oPrev(),a),libtess.mesh.meshSplice(c.oPrev(),a)),u.windingNumber=l.windingNumber-a.winding,u.inside=libtess.sweep.isWindingInside_(e,u.windingNumber),l.dirty=!0,!s&&libtess.sweep.checkForRightSplice_(e,l)&&(libtess.sweep.addWinding_(a,c),libtess.sweep.deleteRegion_(e,l),libtess.mesh.deleteEdge(c)),s=!1,l=u,c=a;l.dirty=!0,o&&libtess.sweep.walkDirtyRegions_(e,l)},libtess.sweep.callCombine_=function(e,t,i,n,r){var o=[t.coords[0],t.coords[1],t.coords[2]];t.data=null,t.data=e.callCombineCallback(o,i,n),null===t.data&&(r?e.fatalError||(e.callErrorCallback(libtess.errorType.GLU_TESS_NEED_COMBINE_CALLBACK),e.fatalError=!0):t.data=i[0])},libtess.sweep.spliceMergeVertices_=function(e,t,i){var n=[null,null,null,null];n[0]=t.org.data,n[1]=i.org.data,libtess.sweep.callCombine_(e,t.org,n,[.5,.5,0,0],!1),libtess.mesh.meshSplice(t,i)},libtess.sweep.vertexWeights_=function(e,t,i,n,r){var o=libtess.geom.vertL1dist(t,e),s=libtess.geom.vertL1dist(i,e),a=r,u=r+1;n[a]=.5*s/(o+s),n[u]=.5*o/(o+s),e.coords[0]+=n[a]*t.coords[0]+n[u]*i.coords[0],e.coords[1]+=n[a]*t.coords[1]+n[u]*i.coords[1],e.coords[2]+=n[a]*t.coords[2]+n[u]*i.coords[2]},libtess.sweep.getIntersectData_=function(e,t,i,n,r,o){var s=[0,0,0,0],a=[i.data,n.data,r.data,o.data];t.coords[0]=t.coords[1]=t.coords[2]=0,libtess.sweep.vertexWeights_(t,i,n,s,0),libtess.sweep.vertexWeights_(t,r,o,s,2),libtess.sweep.callCombine_(e,t,a,s,!0)},libtess.sweep.checkForRightSplice_=function(e,t){var i=t.regionBelow(),n=t.eUp,r=i.eUp;if(libtess.geom.vertLeq(n.org,r.org)){if(libtess.geom.edgeSign(r.dst(),n.org,r.org)>0)return!1;libtess.geom.vertEq(n.org,r.org)?n.org!==r.org&&(e.pq.remove(n.org.pqHandle),libtess.sweep.spliceMergeVertices_(e,r.oPrev(),n)):(libtess.mesh.splitEdge(r.sym),libtess.mesh.meshSplice(n,r.oPrev()),t.dirty=i.dirty=!0)}else{if(libtess.geom.edgeSign(n.dst(),r.org,n.org)<0)return!1;t.regionAbove().dirty=t.dirty=!0,libtess.mesh.splitEdge(n.sym),libtess.mesh.meshSplice(r.oPrev(),n)}return!0},libtess.sweep.checkForLeftSplice_=function(e,t){var i,n=t.regionBelow(),r=t.eUp,o=n.eUp;if(libtess.geom.vertLeq(r.dst(),o.dst())){if(libtess.geom.edgeSign(r.dst(),o.dst(),r.org)<0)return!1;t.regionAbove().dirty=t.dirty=!0,i=libtess.mesh.splitEdge(r),libtess.mesh.meshSplice(o.sym,i),i.lFace.inside=t.inside}else{if(libtess.geom.edgeSign(o.dst(),r.dst(),o.org)>0)return!1;t.dirty=n.dirty=!0,i=libtess.mesh.splitEdge(o),libtess.mesh.meshSplice(r.lNext,o.sym),i.rFace().inside=t.inside}return!0},libtess.sweep.checkForIntersect_=function(e,t){var i=t.regionBelow(),n=t.eUp,r=i.eUp,o=n.org,s=r.org,a=n.dst(),u=r.dst(),l=new libtess.GluVertex;if(o===s)return!1;if(Math.min(o.t,a.t)>Math.max(s.t,u.t))return!1;if(libtess.geom.vertLeq(o,s)){if(libtess.geom.edgeSign(u,o,s)>0)return!1}else if(libtess.geom.edgeSign(a,s,o)<0)return!1;libtess.geom.edgeIntersect(a,o,u,s,l),libtess.geom.vertLeq(l,e.event)&&(l.s=e.event.s,l.t=e.event.t);var c=libtess.geom.vertLeq(o,s)?o:s;if(libtess.geom.vertLeq(c,l)&&(l.s=c.s,l.t=c.t),libtess.geom.vertEq(l,o)||libtess.geom.vertEq(l,s))return libtess.sweep.checkForRightSplice_(e,t),!1;if(!libtess.geom.vertEq(a,e.event)&&libtess.geom.edgeSign(a,e.event,l)>=0||!libtess.geom.vertEq(u,e.event)&&libtess.geom.edgeSign(u,e.event,l)<=0){if(u===e.event)return libtess.mesh.splitEdge(n.sym),libtess.mesh.meshSplice(r.sym,n),n=(t=libtess.sweep.topLeftRegion_(t)).regionBelow().eUp,libtess.sweep.finishLeftRegions_(e,t.regionBelow(),i),libtess.sweep.addRightEdges_(e,t,n.oPrev(),n,n,!0),!0;if(a===e.event){libtess.mesh.splitEdge(r.sym),libtess.mesh.meshSplice(n.lNext,r.oPrev()),i=t;var h=(t=libtess.sweep.topRightRegion_(t)).regionBelow().eUp.rPrev();return i.eUp=r.oPrev(),r=libtess.sweep.finishLeftRegions_(e,i,null),libtess.sweep.addRightEdges_(e,t,r.oNext,n.rPrev(),h,!0),!0}return libtess.geom.edgeSign(a,e.event,l)>=0&&(t.regionAbove().dirty=t.dirty=!0,libtess.mesh.splitEdge(n.sym),n.org.s=e.event.s,n.org.t=e.event.t),libtess.geom.edgeSign(u,e.event,l)<=0&&(t.dirty=i.dirty=!0,libtess.mesh.splitEdge(r.sym),r.org.s=e.event.s,r.org.t=e.event.t),!1}return libtess.mesh.splitEdge(n.sym),libtess.mesh.splitEdge(r.sym),libtess.mesh.meshSplice(r.oPrev(),n),n.org.s=l.s,n.org.t=l.t,n.org.pqHandle=e.pq.insert(n.org),libtess.sweep.getIntersectData_(e,n.org,o,a,s,u),t.regionAbove().dirty=t.dirty=i.dirty=!0,!1},libtess.sweep.walkDirtyRegions_=function(e,t){for(var i=t.regionBelow();;){for(;i.dirty;)t=i,i=i.regionBelow();if(!t.dirty&&(i=t,null===(t=t.regionAbove())||!t.dirty))return;t.dirty=!1;var n=t.eUp,r=i.eUp;if(n.dst()!==r.dst()&&libtess.sweep.checkForLeftSplice_(e,t)&&(i.fixUpperEdge?(libtess.sweep.deleteRegion_(e,i),libtess.mesh.deleteEdge(r),r=(i=t.regionBelow()).eUp):t.fixUpperEdge&&(libtess.sweep.deleteRegion_(e,t),libtess.mesh.deleteEdge(n),n=(t=i.regionAbove()).eUp)),n.org!==r.org)if(n.dst()===r.dst()||t.fixUpperEdge||i.fixUpperEdge||n.dst()!==e.event&&r.dst()!==e.event)libtess.sweep.checkForRightSplice_(e,t);else if(libtess.sweep.checkForIntersect_(e,t))return;n.org===r.org&&n.dst()===r.dst()&&(libtess.sweep.addWinding_(r,n),libtess.sweep.deleteRegion_(e,t),libtess.mesh.deleteEdge(n),t=i.regionAbove())}},libtess.sweep.connectRightVertex_=function(e,t,i){var n,r=i.oNext,o=t.regionBelow(),s=t.eUp,a=o.eUp,u=!1;(s.dst()!==a.dst()&&libtess.sweep.checkForIntersect_(e,t),libtess.geom.vertEq(s.org,e.event)&&(libtess.mesh.meshSplice(r.oPrev(),s),r=(t=libtess.sweep.topLeftRegion_(t)).regionBelow().eUp,libtess.sweep.finishLeftRegions_(e,t.regionBelow(),o),u=!0),libtess.geom.vertEq(a.org,e.event)&&(libtess.mesh.meshSplice(i,a.oPrev()),i=libtess.sweep.finishLeftRegions_(e,o,null),u=!0),u)?libtess.sweep.addRightEdges_(e,t,i.oNext,r,r,!0):(n=libtess.geom.vertLeq(a.org,s.org)?a.oPrev():s,n=libtess.mesh.connect(i.lPrev(),n),libtess.sweep.addRightEdges_(e,t,n,n.oNext,n.oNext,!1),n.sym.activeRegion.fixUpperEdge=!0,libtess.sweep.walkDirtyRegions_(e,t))},libtess.sweep.connectLeftDegenerate_=function(e,t,i){var n=t.eUp;if(libtess.geom.vertEq(n.org,i))libtess.sweep.TOLERANCE_NONZERO_&&libtess.sweep.spliceMergeVertices_(e,n,i.anEdge);else{if(!libtess.geom.vertEq(n.dst(),i))return libtess.mesh.splitEdge(n.sym),t.fixUpperEdge&&(libtess.mesh.deleteEdge(n.oNext),t.fixUpperEdge=!1),libtess.mesh.meshSplice(i.anEdge,n),void libtess.sweep.sweepEvent_(e,i);if(libtess.sweep.TOLERANCE_NONZERO_){var r=(t=libtess.sweep.topRightRegion_(t)).regionBelow(),o=r.eUp.sym,s=o.oNext,a=s;r.fixUpperEdge&&(libtess.sweep.deleteRegion_(e,r),libtess.mesh.deleteEdge(o),o=s.oPrev()),libtess.mesh.meshSplice(i.anEdge,o),libtess.geom.edgeGoesLeft(s)||(s=null),libtess.sweep.addRightEdges_(e,t,o.oNext,a,s,!0)}}},libtess.sweep.connectLeftVertex_=function(e,t){var i=new libtess.ActiveRegion;i.eUp=t.anEdge.sym;var n=e.dict.search(i).getKey(),r=n.regionBelow(),o=n.eUp,s=r.eUp;if(0!==libtess.geom.edgeSign(o.dst(),t,o.org)){var a,u=libtess.geom.vertLeq(s.dst(),o.dst())?n:r;if(n.inside||u.fixUpperEdge){if(u===n)a=libtess.mesh.connect(t.anEdge.sym,o.lNext);else a=libtess.mesh.connect(s.dNext(),t.anEdge).sym;u.fixUpperEdge?libtess.sweep.fixUpperEdge_(u,a):libtess.sweep.computeWinding_(e,libtess.sweep.addRegionBelow_(e,n,a)),libtess.sweep.sweepEvent_(e,t)}else libtess.sweep.addRightEdges_(e,n,t.anEdge,t.anEdge,null,!0)}else libtess.sweep.connectLeftDegenerate_(e,n,t)},libtess.sweep.sweepEvent_=function(e,t){e.event=t;for(var i=t.anEdge;null===i.activeRegion;)if((i=i.oNext)===t.anEdge)return void libtess.sweep.connectLeftVertex_(e,t);var n=libtess.sweep.topLeftRegion_(i.activeRegion),r=n.regionBelow(),o=r.eUp,s=libtess.sweep.finishLeftRegions_(e,r,null);s.oNext===o?libtess.sweep.connectRightVertex_(e,n,s):libtess.sweep.addRightEdges_(e,n,s.oNext,o,o,!0)},libtess.sweep.addSentinel_=function(e,t){var i=new libtess.ActiveRegion,n=libtess.mesh.makeEdge(e.mesh);n.org.s=libtess.sweep.SENTINEL_COORD_,n.org.t=t,n.dst().s=-libtess.sweep.SENTINEL_COORD_,n.dst().t=t,e.event=n.dst(),i.eUp=n,i.windingNumber=0,i.inside=!1,i.fixUpperEdge=!1,i.sentinel=!0,i.dirty=!1,i.nodeUp=e.dict.insert(i)},libtess.sweep.initEdgeDict_=function(e){e.dict=new libtess.Dict(e,libtess.sweep.edgeLeq_),libtess.sweep.addSentinel_(e,-libtess.sweep.SENTINEL_COORD_),libtess.sweep.addSentinel_(e,libtess.sweep.SENTINEL_COORD_)},libtess.sweep.doneEdgeDict_=function(e){for(var t;null!==(t=e.dict.getMin().getKey());)t.sentinel,libtess.sweep.deleteRegion_(e,t);e.dict=null},libtess.sweep.removeDegenerateEdges_=function(e){for(var t,i=e.mesh.eHead,n=i.next;n!==i;n=t){t=n.next;var r=n.lNext;libtess.geom.vertEq(n.org,n.dst())&&n.lNext.lNext!==n&&(libtess.sweep.spliceMergeVertices_(e,r,n),libtess.mesh.deleteEdge(n),r=(n=r).lNext),r.lNext===n&&(r!==n&&(r!==t&&r!==t.sym||(t=t.next),libtess.mesh.deleteEdge(r)),n!==t&&n!==t.sym||(t=t.next),libtess.mesh.deleteEdge(n))}},libtess.sweep.initPriorityQ_=function(e){var t=new libtess.PriorityQ;e.pq=t;var i,n=e.mesh.vHead;for(i=n.next;i!==n;i=i.next)i.pqHandle=t.insert(i);t.init()},libtess.sweep.donePriorityQ_=function(e){e.pq.deleteQ(),e.pq=null},libtess.sweep.removeDegenerateFaces_=function(e){for(var t,i=e.fHead.next;i!==e.fHead;i=t){t=i.next;var n=i.anEdge;n.lNext.lNext===n&&(libtess.sweep.addWinding_(n.oNext,n),libtess.mesh.deleteEdge(n))}},libtess.tessmono={},libtess.tessmono.tessellateMonoRegion_=function(e){for(var t=e.anEdge;libtess.geom.vertLeq(t.dst(),t.org);t=t.lPrev());for(;libtess.geom.vertLeq(t.org,t.dst());t=t.lNext);for(var i,n=t.lPrev();t.lNext!==n;)if(libtess.geom.vertLeq(t.dst(),n.org)){for(;n.lNext!==t&&(libtess.geom.edgeGoesLeft(n.lNext)||libtess.geom.edgeSign(n.org,n.dst(),n.lNext.dst())<=0);)n=(i=libtess.mesh.connect(n.lNext,n)).sym;n=n.lPrev()}else{for(;n.lNext!==t&&(libtess.geom.edgeGoesRight(t.lPrev())||libtess.geom.edgeSign(t.dst(),t.org,t.lPrev().org)>=0);)i=libtess.mesh.connect(t,t.lPrev()),t=i.sym;t=t.lNext}for(;n.lNext.lNext!==t;)n=(i=libtess.mesh.connect(n.lNext,n)).sym},libtess.tessmono.tessellateInterior=function(e){for(var t,i=e.fHead.next;i!==e.fHead;i=t)t=i.next,i.inside&&libtess.tessmono.tessellateMonoRegion_(i)},libtess.tessmono.discardExterior=function(e){for(var t,i=e.fHead.next;i!==e.fHead;i=t)t=i.next,i.inside||libtess.mesh.zapFace(i)},libtess.tessmono.setWindingNumber=function(e,t,i){for(var n,r=e.eHead.next;r!==e.eHead;r=n)n=r.next,r.rFace().inside!==r.lFace.inside?r.winding=r.lFace.inside?t:-t:i?libtess.mesh.deleteEdge(r):r.winding=0},libtess.Dict=function(e,t){this.head_=new libtess.DictNode,this.frame_=e,this.leq_=t},libtess.Dict.prototype.deleteDict_=function(){},libtess.Dict.prototype.insertBefore=function(e,t){do{e=e.prev}while(null!==e.key&&!this.leq_(this.frame_,e.key,t));var i=new libtess.DictNode(t,e.next,e);return e.next.prev=i,e.next=i,i},libtess.Dict.prototype.insert=function(e){return this.insertBefore(this.head_,e)},libtess.Dict.prototype.deleteNode=function(e){e.next.prev=e.prev,e.prev.next=e.next},libtess.Dict.prototype.search=function(e){var t=this.head_;do{t=t.next}while(null!==t.key&&!this.leq_(this.frame_,e,t.key));return t},libtess.Dict.prototype.getMin=function(){return this.head_.next},libtess.Dict.prototype.getMax=function(){return this.head_.prev},libtess.DictNode=function(e,t,i){this.key=e||null,this.next=t||this,this.prev=i||this},libtess.DictNode.prototype.getKey=function(){return this.key},libtess.DictNode.prototype.getSuccessor=function(){return this.next},libtess.DictNode.prototype.getPredecessor=function(){return this.prev},libtess.GluTesselator=function(){this.state_=libtess.GluTesselator.tessState_.T_DORMANT,this.lastEdge_=null,this.mesh=null,this.errorCallback_=null,this.normal_=[0,0,0],this.windingRule=libtess.windingRule.GLU_TESS_WINDING_ODD,this.fatalError=!1,this.dict=null,this.pq=null,this.event=null,this.combineCallback_=null,this.boundaryOnly_=!1,this.beginCallback_=null,this.edgeFlagCallback_=null,this.vertexCallback_=null,this.endCallback_=null,this.meshCallback_=null,this.polygonData_=null},libtess.GluTesselator.tessState_={T_DORMANT:0,T_IN_POLYGON:1,T_IN_CONTOUR:2},libtess.GluTesselator.prototype.gluDeleteTess=function(){this.requireState_(libtess.GluTesselator.tessState_.T_DORMANT)},libtess.GluTesselator.prototype.gluTessProperty=function(e,t){switch(e){case libtess.gluEnum.GLU_TESS_TOLERANCE:return;case libtess.gluEnum.GLU_TESS_WINDING_RULE:var i=t;switch(i){case libtess.windingRule.GLU_TESS_WINDING_ODD:case libtess.windingRule.GLU_TESS_WINDING_NONZERO:case libtess.windingRule.GLU_TESS_WINDING_POSITIVE:case libtess.windingRule.GLU_TESS_WINDING_NEGATIVE:case libtess.windingRule.GLU_TESS_WINDING_ABS_GEQ_TWO:return void(this.windingRule=i)}break;case libtess.gluEnum.GLU_TESS_BOUNDARY_ONLY:return void(this.boundaryOnly_=!!t);default:return void this.callErrorCallback(libtess.gluEnum.GLU_INVALID_ENUM)}this.callErrorCallback(libtess.gluEnum.GLU_INVALID_VALUE)},libtess.GluTesselator.prototype.gluGetTessProperty=function(e){switch(e){case libtess.gluEnum.GLU_TESS_TOLERANCE:return 0;case libtess.gluEnum.GLU_TESS_WINDING_RULE:return this.windingRule;case libtess.gluEnum.GLU_TESS_BOUNDARY_ONLY:return this.boundaryOnly_;default:this.callErrorCallback(libtess.gluEnum.GLU_INVALID_ENUM)}return!1},libtess.GluTesselator.prototype.gluTessNormal=function(e,t,i){this.normal_[0]=e,this.normal_[1]=t,this.normal_[2]=i},libtess.GluTesselator.prototype.gluTessCallback=function(e,t){var i=t||null;switch(e){case libtess.gluEnum.GLU_TESS_BEGIN:case libtess.gluEnum.GLU_TESS_BEGIN_DATA:return void(this.beginCallback_=i);case libtess.gluEnum.GLU_TESS_EDGE_FLAG:case libtess.gluEnum.GLU_TESS_EDGE_FLAG_DATA:return void(this.edgeFlagCallback_=i);case libtess.gluEnum.GLU_TESS_VERTEX:case libtess.gluEnum.GLU_TESS_VERTEX_DATA:return void(this.vertexCallback_=i);case libtess.gluEnum.GLU_TESS_END:case libtess.gluEnum.GLU_TESS_END_DATA:return void(this.endCallback_=i);case libtess.gluEnum.GLU_TESS_ERROR:case libtess.gluEnum.GLU_TESS_ERROR_DATA:return void(this.errorCallback_=i);case libtess.gluEnum.GLU_TESS_COMBINE:case libtess.gluEnum.GLU_TESS_COMBINE_DATA:return void(this.combineCallback_=i);case libtess.gluEnum.GLU_TESS_MESH:return void(this.meshCallback_=i);default:return void this.callErrorCallback(libtess.gluEnum.GLU_INVALID_ENUM)}},libtess.GluTesselator.prototype.gluTessVertex=function(e,t){var i=!1,n=[0,0,0];this.requireState_(libtess.GluTesselator.tessState_.T_IN_CONTOUR);for(var r=0;r<3;++r){var o=e[r];o<-libtess.GLU_TESS_MAX_COORD&&(o=-libtess.GLU_TESS_MAX_COORD,i=!0),o>libtess.GLU_TESS_MAX_COORD&&(o=libtess.GLU_TESS_MAX_COORD,i=!0),n[r]=o}i&&this.callErrorCallback(libtess.errorType.GLU_TESS_COORD_TOO_LARGE),this.addVertex_(n,t)},libtess.GluTesselator.prototype.gluTessBeginPolygon=function(e){this.requireState_(libtess.GluTesselator.tessState_.T_DORMANT),this.state_=libtess.GluTesselator.tessState_.T_IN_POLYGON,this.mesh=new libtess.GluMesh,this.polygonData_=e},libtess.GluTesselator.prototype.gluTessBeginContour=function(){this.requireState_(libtess.GluTesselator.tessState_.T_IN_POLYGON),this.state_=libtess.GluTesselator.tessState_.T_IN_CONTOUR,this.lastEdge_=null},libtess.GluTesselator.prototype.gluTessEndContour=function(){this.requireState_(libtess.GluTesselator.tessState_.T_IN_CONTOUR),this.state_=libtess.GluTesselator.tessState_.T_IN_POLYGON},libtess.GluTesselator.prototype.gluTessEndPolygon=function(){if(this.requireState_(libtess.GluTesselator.tessState_.T_IN_POLYGON),this.state_=libtess.GluTesselator.tessState_.T_DORMANT,libtess.normal.projectPolygon(this,this.normal_[0],this.normal_[1],this.normal_[2]),libtess.sweep.computeInterior(this),!this.fatalError){var e=this.mesh;if(this.boundaryOnly_?libtess.tessmono.setWindingNumber(e,1,!0):libtess.tessmono.tessellateInterior(e),this.mesh.checkMesh(),this.beginCallback_||this.endCallback_||this.vertexCallback_||this.edgeFlagCallback_)if(this.boundaryOnly_)libtess.render.renderBoundary(this,this.mesh);else{var t=!!this.edgeFlagCallback_;libtess.render.renderMesh(this,this.mesh,t)}if(this.meshCallback_)return libtess.tessmono.discardExterior(this.mesh),this.meshCallback_(this.mesh),this.mesh=null,void(this.polygonData_=null)}libtess.mesh.deleteMesh(this.mesh),this.polygonData_=null,this.mesh=null},libtess.GluTesselator.prototype.requireState_=function(e){this.state_!==e&&this.gotoState_(e)},libtess.GluTesselator.prototype.gotoState_=function(e){for(;this.state_!==e;)if(this.state_<e)switch(this.state_){case libtess.GluTesselator.tessState_.T_DORMANT:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_BEGIN_POLYGON),this.gluTessBeginPolygon(null);break;case libtess.GluTesselator.tessState_.T_IN_POLYGON:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_BEGIN_CONTOUR),this.gluTessBeginContour()}else switch(this.state_){case libtess.GluTesselator.tessState_.T_IN_CONTOUR:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_END_CONTOUR),this.gluTessEndContour();break;case libtess.GluTesselator.tessState_.T_IN_POLYGON:this.callErrorCallback(libtess.errorType.GLU_TESS_MISSING_END_POLYGON),this.gluTessEndPolygon()}},libtess.GluTesselator.prototype.addVertex_=function(e,t){var i=this.lastEdge_;null===i?(i=libtess.mesh.makeEdge(this.mesh),libtess.mesh.meshSplice(i,i.sym)):(libtess.mesh.splitEdge(i),i=i.lNext),i.org.data=t,i.org.coords[0]=e[0],i.org.coords[1]=e[1],i.org.coords[2]=e[2],i.winding=1,i.sym.winding=-1,this.lastEdge_=i},libtess.GluTesselator.prototype.callBeginCallback=function(e){this.beginCallback_&&this.beginCallback_(e,this.polygonData_)},libtess.GluTesselator.prototype.callVertexCallback=function(e){this.vertexCallback_&&this.vertexCallback_(e,this.polygonData_)},libtess.GluTesselator.prototype.callEdgeFlagCallback=function(e){this.edgeFlagCallback_&&this.edgeFlagCallback_(e,this.polygonData_)},libtess.GluTesselator.prototype.callEndCallback=function(){this.endCallback_&&this.endCallback_(this.polygonData_)},libtess.GluTesselator.prototype.callCombineCallback=function(e,t,i){return this.combineCallback_&&this.combineCallback_(e,t,i,this.polygonData_)||null},libtess.GluTesselator.prototype.callErrorCallback=function(e){this.errorCallback_&&this.errorCallback_(e,this.polygonData_)},libtess.GluFace=function(e,t){this.next=e||this,this.prev=t||this,this.anEdge=null,this.data=null,this.inside=!1},libtess.GluHalfEdge=function(e){this.next=e||this,this.sym=null,this.oNext=null,this.lNext=null,this.org=null,this.lFace=null,this.activeRegion=null,this.winding=0},libtess.GluHalfEdge.prototype.rFace=function(){return this.sym.lFace},libtess.GluHalfEdge.prototype.dst=function(){return this.sym.org},libtess.GluHalfEdge.prototype.oPrev=function(){return this.sym.lNext},libtess.GluHalfEdge.prototype.lPrev=function(){return this.oNext.sym},libtess.GluHalfEdge.prototype.dPrev=function(){return this.lNext.sym},libtess.GluHalfEdge.prototype.rPrev=function(){return this.sym.oNext},libtess.GluHalfEdge.prototype.dNext=function(){return this.rPrev().sym},libtess.GluHalfEdge.prototype.rNext=function(){return this.oPrev().sym},libtess.GluMesh=function(){this.vHead=new libtess.GluVertex,this.fHead=new libtess.GluFace,this.eHead=new libtess.GluHalfEdge,this.eHeadSym=new libtess.GluHalfEdge,this.eHead.sym=this.eHeadSym,this.eHeadSym.sym=this.eHead},libtess.GluMesh.prototype.checkMesh=function(){if(libtess.DEBUG){var e,t,i,n=this.fHead,r=this.vHead,o=this.eHead,s=n;for(s=n;(t=s.next)!==n;s=t){e=t.anEdge;do{e=e.lNext}while(e!==t.anEdge)}var a=r;for(a=r;(i=a.next)!==r;a=i){e=i.anEdge;do{e=e.oNext}while(e!==i.anEdge)}var u=o;for(u=o;(e=u.next)!==o;u=e);}},libtess.GluVertex=function(e,t){this.next=e||this,this.prev=t||this,this.anEdge=null,this.data=null,this.coords=[0,0,0],this.s=0,this.t=0,this.pqHandle=0},libtess.PriorityQ=function(){this.verts_=[],this.order_=null,this.size_=0,this.initialized_=!1,this.heap_=new libtess.PriorityQHeap},libtess.PriorityQ.prototype.deleteQ=function(){this.heap_=null,this.order_=null,this.verts_=null},libtess.PriorityQ.prototype.init=function(){this.order_=[];for(var e=0;e<this.size_;e++)this.order_[e]=e;var t,i=(t=this.verts_,function(e,i){return libtess.geom.vertLeq(t[e],t[i])?1:-1});if(this.order_.sort(i),this.initialized_=!0,this.heap_.init(),libtess.DEBUG){var n=0+this.size_-1;for(e=0;e<n;++e);}},libtess.PriorityQ.prototype.insert=function(e){if(this.initialized_)return this.heap_.insert(e);var t=this.size_++;return this.verts_[t]=e,-(t+1)},libtess.PriorityQ.prototype.extractMin=function(){if(0===this.size_)return this.heap_.extractMin();var e=this.verts_[this.order_[this.size_-1]];if(!this.heap_.isEmpty()){var t=this.heap_.minimum();if(libtess.geom.vertLeq(t,e))return this.heap_.extractMin()}do{--this.size_}while(this.size_>0&&null===this.verts_[this.order_[this.size_-1]]);return e},libtess.PriorityQ.prototype.minimum=function(){if(0===this.size_)return this.heap_.minimum();var e=this.verts_[this.order_[this.size_-1]];if(!this.heap_.isEmpty()){var t=this.heap_.minimum();if(libtess.geom.vertLeq(t,e))return t}return e},libtess.PriorityQ.prototype.remove=function(e){if(e>=0)this.heap_.remove(e);else for(e=-(e+1),this.verts_[e]=null;this.size_>0&&null===this.verts_[this.order_[this.size_-1]];)--this.size_},libtess.PriorityQHeap=function(){this.heap_=libtess.PriorityQHeap.reallocNumeric_([0],libtess.PriorityQHeap.INIT_SIZE_+1),this.verts_=[null,null],this.handles_=[0,0],this.size_=0,this.max_=libtess.PriorityQHeap.INIT_SIZE_,this.freeList_=0,this.initialized_=!1,this.heap_[1]=1},libtess.PriorityQHeap.INIT_SIZE_=32,libtess.PriorityQHeap.reallocNumeric_=function(e,t){for(var i=new Array(t),n=0;n<e.length;n++)i[n]=e[n];for(;n<t;n++)i[n]=0;return i},libtess.PriorityQHeap.prototype.init=function(){for(var e=this.size_;e>=1;--e)this.floatDown_(e);this.initialized_=!0},libtess.PriorityQHeap.prototype.insert=function(e){var t,i=++this.size_;return 2*i>this.max_&&(this.max_*=2,this.handles_=libtess.PriorityQHeap.reallocNumeric_(this.handles_,this.max_+1)),0===this.freeList_?t=i:(t=this.freeList_,this.freeList_=this.handles_[this.freeList_]),this.verts_[t]=e,this.handles_[t]=i,this.heap_[i]=t,this.initialized_&&this.floatUp_(i),t},libtess.PriorityQHeap.prototype.isEmpty=function(){return 0===this.size_},libtess.PriorityQHeap.prototype.minimum=function(){return this.verts_[this.heap_[1]]},libtess.PriorityQHeap.prototype.extractMin=function(){var e=this.heap_,t=this.verts_,i=this.handles_,n=e[1],r=t[n];return this.size_>0&&(e[1]=e[this.size_],i[e[1]]=1,t[n]=null,i[n]=this.freeList_,this.freeList_=n,--this.size_>0&&this.floatDown_(1)),r},libtess.PriorityQHeap.prototype.remove=function(e){var t=this.heap_,i=this.verts_,n=this.handles_,r=n[e];if(t[r]=t[this.size_],n[t[r]]=r,r<=--this.size_)if(r<=1)this.floatDown_(r);else{var o=i[t[r]],s=i[t[r>>1]];libtess.geom.vertLeq(s,o)?this.floatDown_(r):this.floatUp_(r)}i[e]=null,n[e]=this.freeList_,this.freeList_=e},libtess.PriorityQHeap.prototype.floatDown_=function(e){for(var t=this.heap_,i=this.verts_,n=this.handles_,r=e,o=t[r];;){var s=r<<1;s<this.size_&&libtess.geom.vertLeq(i[t[s+1]],i[t[s]])&&(s+=1);var a=t[s];if(s>this.size_||libtess.geom.vertLeq(i[o],i[a]))return t[r]=o,void(n[o]=r);t[r]=a,n[a]=r,r=s}},libtess.PriorityQHeap.prototype.floatUp_=function(e){for(var t=this.heap_,i=this.verts_,n=this.handles_,r=e,o=t[r];;){var s=r>>1,a=t[s];if(0===s||libtess.geom.vertLeq(i[a],i[o]))return t[r]=o,void(n[o]=r);t[r]=a,n[a]=r,r=s}},libtess.ActiveRegion=function(){this.eUp=null,this.nodeUp=null,this.windingNumber=0,this.inside=!1,this.sentinel=!1,this.dirty=!1,this.fixUpperEdge=!1},libtess.ActiveRegion.prototype.regionBelow=function(){return this.nodeUp.getPredecessor().getKey()},libtess.ActiveRegion.prototype.regionAbove=function(){return this.nodeUp.getSuccessor().getKey()},void 0!==module&&(module.exports=libtess),define("libtess",["libtess/libtess.cat"],(function(e){return e})),define("libtess/libtess.cat",(function(){})),define("standard/Math/Geometry/Triangle3",["standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","libtess"],(function(e,t){"use strict";return{area:function(){const t=new e(0,0,0),i=new e(0,0,0);return function(e,n,r){return t.assign(n).subtract(e).cross(i.assign(r).subtract(e)).abs()/2}}(),normal:function(e,t,i,n){const r=i.x-t.x,o=i.y-t.y,s=i.z-t.z,a=e.x-t.x,u=e.y-t.y,l=e.z-t.z;return n.set(o*l-s*u,s*a-r*l,r*u-o*a),n.normalize()},quadNormal:function(e,t,i,n,r){const o=i.x-e.x,s=i.y-e.y,a=i.z-e.z,u=n.x-t.x,l=n.y-t.y,c=n.z-t.z;return r.set(s*c-a*l,a*u-o*c,o*l-s*u),r.normalize()},triangulatePolygon:function(){const e=function(){const e=new libtess.GluTesselator;return e.gluTessCallback(libtess.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t[t.length]=e})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_BEGIN,(function(e){e!==libtess.primitiveType.GL_TRIANGLES&&console.log("expected TRIANGLES but got type: "+e)})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_ERROR,(function(e){console.log("error callback"),console.log("error number: "+e)})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_COMBINE,(function(e,t,i){return t[0]})),e.gluTessCallback(libtess.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e.gluTessProperty(libtess.gluEnum.GLU_TESS_TOLERANCE,0),e.gluTessProperty(libtess.gluEnum.GLU_TESS_WINDING_RULE,libtess.windingRule.GLU_TESS_WINDING_ODD),e}();return function(){const t=arguments[arguments.length-1];e.gluTessBeginPolygon(t);for(let t=0,i=arguments.length-1;t<i;++t){e.gluTessBeginContour();for(const i of arguments[t])e.gluTessVertex(i,i);e.gluTessEndContour()}return e.gluTessEndPolygon(),t}}(),triangulateConvexPolygon:function(e,t){for(let i=1,n=e.length-1;i<n;++i)t.push(e[0],e[i],e[i+1])},getPolygonNormal:function(e,t){t.set(0,0,0);var i=e[0];for(let r=0,o=e.length;r<o;++r){var n=i;i=e[(r+1)%o];t.x+=(n.y-i.y)*(n.z+i.z),t.y+=(n.z-i.z)*(n.x+i.x),t.z+=(n.x-i.x)*(n.y+i.y)}return t.normalize()}}})),define("standard/Math/Algorithms/SAT",[],(function(){"use strict";const e={min:0,max:0},t={min:0,max:0};function i(){}function n(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 r(e,t,i){return t<=e&&e<=i}return i.isSeparated=function(i,o,s){for(const c of i)if(n(o,c,e),n(s,c,t),l=t.max,!r(u=t.min,a=e.min,e.max)&&!r(a,u,l))return!0;var a,u,l;return!1},i})),define("standard/Math/Geometry/ViewVolume",["standard/Math/Geometry/Plane3","standard/Math/Geometry/Triangle3","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Algorithms/SAT"],(function(e,t,i,n,r,o){"use strict";function s(t,r,o){this.viewport=new n(0,0,0,0),this.scissor=new n(0,0,0,0),this.points=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],this.normals=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],this.edges=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],this.planes=[new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero),new e(i.Zero,i.Zero)],arguments.length&&this.set(t,r,o)}return s.prototype={constructor:s,set:function(){const e=new r;return function(i,n,r){try{this.viewport.assign(n),this.scissor.assign(r);const o=this.points,a=o[0],u=o[1],l=o[2],c=o[3],h=o[4],d=o[5],p=o[6],f=o[7],g=r[0],m=g+r[2],_=r[1],y=_+r[3];e.assign(i).inverse(),s.unProjectPointMatrix(g,_,0,e,n,a),s.unProjectPointMatrix(m,_,0,e,n,u),s.unProjectPointMatrix(m,y,0,e,n,l),s.unProjectPointMatrix(g,y,0,e,n,c),s.unProjectPointMatrix(g,_,1,e,n,h),s.unProjectPointMatrix(m,_,1,e,n,d),s.unProjectPointMatrix(m,y,1,e,n,p),s.unProjectPointMatrix(g,y,1,e,n,f);const x=this.normals;t.normal(a,u,l,x[0]),t.normal(f,h,a,x[1]),t.normal(p,l,u,x[2]),t.normal(l,p,f,x[3]),t.normal(u,a,h,x[4]),t.normal(h,f,p,x[5]);const w=this.planes;w[0].set(u,x[0]),w[1].set(h,x[1]),w[2].set(l,x[2]),w[3].set(p,x[3]),w[4].set(a,x[4]),w[5].set(f,x[5]),this.edges.tainted=!0,this.valid=!0}catch(e){this.valid=!1}return this}}(),getViewport:function(){return this.viewport},getScissor:function(){return this.scissor},getEdges:function(){const e=this.edges;if(e.tainted){const t=this.points;e[0].assign(t[0]).subtract(t[1]),e[1].assign(t[1]).subtract(t[2]),e[2].assign(t[2]).subtract(t[3]),e[3].assign(t[3]).subtract(t[0]),e[4].assign(t[0]).subtract(t[4]),e[5].assign(t[1]).subtract(t[5]),e[6].assign(t[2]).subtract(t[6]),e[7].assign(t[3]).subtract(t[7]),e.tainted=!1}return e},intersectsSphere:function(e,t){if(this.valid){const i=this.planes;if(i[0].getDistanceToPoint(t)>e)return!1;if(i[1].getDistanceToPoint(t)>e)return!1;if(i[2].getDistanceToPoint(t)>e)return!1;if(i[3].getDistanceToPoint(t)>e)return!1;if(i[4].getDistanceToPoint(t)>e)return!1;if(i[5].getDistanceToPoint(t)>e)return!1}return!0},intersectsBox:function(){const e=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],t=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],n=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],r=[];for(let e=0;e<24;++e)r.push(new i(0,0,0));return function(i){i.getPoints(e);const s=this.points;if(o.isSeparated(i.getNormals(t),e,s))return!1;if(o.isSeparated(this.normals,e,s))return!1;i.getAxes(n);const a=this.getEdges();for(let e=0;e<3;++e)for(let t=0;t<8;++t)r[3*e+t].assign(n[e]).cross(a[t]);return!o.isSeparated(r,e,s)}}()},Object.assign(s,{unProjectPoint:function(){const e=new r;return function(t,i,n,r,o,s,a){return e.assign(r).multRight(o).inverse(),this.unProjectPointMatrix(t,i,n,e,s,a)}}(),unProjectPointMatrix:function(){const e=new n(0,0,0,0);return function(t,i,n,r,o,s){if(e.set((t-o[0])/o[2]*2-1,(i-o[1])/o[3]*2-1,2*n-1,1),r.multVecMatrix(e),0===e.w)throw new Error("Couldn't unproject point: divisor is 0.");const a=1/e.w;return s.set(e.x*a,e.y*a,e.z*a)}}(),unProjectRay:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new r;return function(i,r,o,a,u,l){return n.assign(o).multRight(a).inverse(),s.unProjectPointMatrix(i,r,0,n,u,e),s.unProjectPointMatrix(i,r,.9,n,u,t),l.setPoints(e,t)}}(),projectPoint:function(){const e=new n(0,0,0,0);return function(t,i,n,r,o){if(e.set(t.x,t.y,t.z,1),n.multVecMatrix(i.multVecMatrix(e)),0===e.w)throw new Error("Couldn't project point: divisor is 0.");const s=1/(2*e.w);return o.set((e.x*s+.5)*r[2]+r[0],(e.y*s+.5)*r[3]+r[1],e.z*s+.5)}}(),projectLine:function(){const e=new i(0,0,0),t=new i(0,0,0);return function(n,r,o,a,u){return s.projectPoint(n.point,r,o,a,e),s.projectPoint(i.multiply(n.direction,1e9).add(n.point),r,o,a,t),e.z=0,t.z=0,u.setPoints(e,t)}}()}),s})),define("x_ite/Rendering/TextureBuffer",["standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i){"use strict";function n(e,t,i){const n=e.getContext();if(this.browser=e,this.width=t,this.height=i,this.array=new Uint8Array(t*i*4),this.lastBuffer=n.getParameter(n.FRAMEBUFFER_BINDING),this.buffer=n.createFramebuffer(),n.bindFramebuffer(n.FRAMEBUFFER,this.buffer),this.colorTexture=n.createTexture(),n.bindTexture(n.TEXTURE_2D,this.colorTexture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,t,i,0,n.RGBA,n.UNSIGNED_BYTE,null),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.colorTexture,0),n.getVersion()>=2||e.getExtension("WEBGL_depth_texture")){this.depthTexture=n.createTexture(),n.bindTexture(n.TEXTURE_2D,this.depthTexture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST);const e=n.getVersion()>=2?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT;n.texImage2D(n.TEXTURE_2D,0,e,t,i,0,n.DEPTH_COMPONENT,n.UNSIGNED_INT,null),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,this.depthTexture,0)}else this.depthBuffer=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this.depthBuffer),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t,i),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,this.depthBuffer);const r=n.checkFramebufferStatus(n.FRAMEBUFFER)===n.FRAMEBUFFER_COMPLETE;if(n.bindFramebuffer(n.FRAMEBUFFER,this.lastBuffer),!r)throw new Error("Couldn't create frame buffer.")}n.prototype={constructor:n,getWidth:function(){return this.width},getHeight:function(){return this.height},getColorTexture:function(){return this.colorTexture},getDepthTexture:function(){return this.depthTexture},readPixels:function(){const e=this.browser.getContext(),t=this.array,i=this.width,n=this.height;return e.readPixels(0,0,i,n,e.RGBA,e.UNSIGNED_BYTE,t),t},getDepth:function(){const n=new i,r=new t(0,0,0);return function(t,i){try{const o=this.browser.getContext(),s=this.array,a=this.width,u=this.height;let l=0,c=0,h=Number.POSITIVE_INFINITY;n.assign(t).inverse(),o.readPixels(0,0,a,u,o.RGBA,o.UNSIGNED_BYTE,s);for(let e=0,t=0;e<u;++e)for(let i=0;i<a;++i,t+=4){const n=s[t]/255+s[t+1]/65025+s[t+2]/16581375+s[t+3]/4228250625;n<h&&(l=i,c=e,h=n)}return e.unProjectPointMatrix(l,c,h,n,i,r),r.z}catch(e){return 0}}}(),bind:function(){const e=this.browser.getContext();this.lastBuffer=e.getParameter(e.FRAMEBUFFER_BINDING),e.bindFramebuffer(e.FRAMEBUFFER,this.buffer)},unbind:function(){const e=this.browser.getContext();e.bindFramebuffer(e.FRAMEBUFFER,this.lastBuffer)}};for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("standard/Math/Algorithms/MergeSort",[],(function(){"use strict";function e(e,t){this.array=e,this.auxiliary=[],t&&(this.compare=t)}return e.prototype={compare:function(e,t){return e<t},sort:function(e,t){this.mergeSort(e,t-1)},mergeSort:function(e,t){if(e<t){const i=e+t>>>1;this.mergeSort(e,i),this.mergeSort(i+1,t),this.merge(e,i,t)}},merge:function(e,t,i){let n,r,o;for(n=0,r=e;r<=t;)this.auxiliary[n++]=this.array[r++];for(n=0,o=e;o<r&&r<=i;)this.compare(this.array[r],this.auxiliary[n])?this.array[o++]=this.array[r++]:this.array[o++]=this.auxiliary[n++];for(;o<r;)this.array[o++]=this.auxiliary[n++]}},e})),define("standard/Math/Geometry/Box3",["standard/Math/Geometry/Triangle3","standard/Math/Numbers/Matrix4","standard/Math/Numbers/Vector3","standard/Math/Algorithms/SAT"],(function(e,t,i,n){"use strict";function r(e,i){switch(arguments.length){case 0:return void(this.matrix=new t(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));case 2:return void(this.matrix=new t(e.x/2,0,0,0,0,e.y/2,0,0,0,0,e.z/2,0,i.x,i.y,i.z,1));case 3:{const e=arguments[0],i=arguments[1],n=(i.x-e.x)/2,r=(i.y-e.y)/2,o=(i.z-e.z)/2,s=(i.x+e.x)/2,a=(i.y+e.y)/2,u=(i.z+e.z)/2;return void(this.matrix=new t(n,0,0,0,0,r,0,0,0,0,o,0,s,a,u,1))}}}return r.prototype={constructor:r,copy:function(){const e=Object.create(r.prototype);return e.matrix=this.matrix.copy(),e},assign:function(e){return this.matrix.assign(e.matrix),this},equals:function(e){return this.matrix.equals(e.matrix)},getMatrix:function(){return this.matrix},set:function(e,t){const i=this.matrix;switch(arguments.length){case 0:return i[0]=.5,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=.5,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=.5,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=0,this;case 2:return i[0]=e.x/2,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=e.y/2,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=e.z/2,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this;case 3:{const e=arguments[0],t=arguments[1],i=(t.x-e.x)/2,n=(t.y-e.y)/2,r=(t.z-e.z)/2,o=(t.x+e.x)/2,s=(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,r,0,o,s,a,1),this}}},setExtents:function(e,t){const i=this.matrix,n=(t.x-e.x)/2,r=(t.y-e.y)/2,o=(t.z-e.z)/2,s=(t.x+e.x)/2,a=(t.y+e.y)/2,u=(t.z+e.z)/2;return i[0]=n,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=r,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=o,i[11]=0,i[12]=s,i[13]=a,i[14]=u,i[15]=1,this},getExtents:function(e,t){this.getAbsoluteExtents(e,t),e.add(this.center),t.add(this.center)},getAbsoluteExtents:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0);return function(i,r){const o=this.matrix,s=o.xAxis,a=o.yAxis,u=o.zAxis;e.assign(a).add(u);const l=u.subtract(a);t.assign(s).add(e),n.assign(s).add(l);const c=e.subtract(s),h=l.subtract(s);i.assign(t),r.assign(t),i.min(c,h,n),r.max(c,h,n),t.negate(),c.negate(),h.negate(),n.negate(),i.min(t,c,h,n),r.max(t,c,h,n)}}(),getPoints:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0),r=new i(0,0,0);return function(i){const o=this.matrix;e.assign(o.xAxis),t.assign(o.yAxis),n.assign(o.zAxis),r.assign(t).add(n);const s=n.subtract(t);i[0].assign(e).add(r),i[1].assign(r).subtract(e),i[2].assign(s).subtract(e),i[3].assign(e).add(s),i[4].assign(i[2]).negate(),i[5].assign(i[3]).negate(),i[6].assign(i[0]).negate(),i[7].assign(i[1]).negate();const a=this.center;return i[0].add(a),i[1].add(a),i[2].add(a),i[3].add(a),i[4].add(a),i[5].add(a),i[6].add(a),i[7].add(a),i}}(),getAxes:function(e){const t=this.matrix;return e[0].assign(t.xAxis),e[1].assign(t.yAxis),e[2].assign(t.zAxis),e},getNormals:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0),r=[i.xAxis,i.yAxis,i.zAxis];return function(o){const s=this.matrix;if(e.assign(s.xAxis),t.assign(s.yAxis),n.assign(s.zAxis),0===e.norm()&&(e.assign(t).cross(n),0===e.norm())){for(const i of r)if(e.assign(i).cross(t),0!==e.norm())break;if(0===e.norm()){for(const t of r)if(e.assign(t).cross(n),0!==e.norm())break;0===e.norm()&&e.assign(i.xAxis)}}if(0===t.norm()&&(t.assign(n).cross(e),0===t.norm())){for(const e of r)if(t.assign(e).cross(n),0!==t.norm())break;if(0===t.norm()){for(const i of r)if(t.assign(i).cross(e),0!==t.norm())break;0===t.norm()&&t.assign(i.yAxis)}}if(0===n.norm()&&(n.assign(e).cross(t),0===n.norm())){for(const t of r)if(n.assign(t).cross(e),0!==n.norm())break;if(0===n.norm()){for(const e of r)if(n.assign(e).cross(t),0!==n.norm())break;0===n.norm()&&n.assign(i.zAxis)}}return o[0].assign(t).cross(n).normalize(),o[1].assign(n).cross(e).normalize(),o[2].assign(e).cross(t).normalize(),o}}(),isEmpty:function(){return 0===this.matrix[15]},add:function(){const e=new i(0,0,0),t=new i(0,0,0),n=new i(0,0,0),r=new i(0,0,0);return function(i){return this.isEmpty()?this.assign(i):i.isEmpty()?this:(this.getExtents(e,t),i.getExtents(n,r),this.set(e.min(n),t.max(r),!0))}}(),multLeft:function(e){return this.matrix.multLeft(e),this},multRight:function(e){return this.matrix.multRight(e),this},containsPoint:function(){const e=new i(0,0,0),t=new i(0,0,0);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:function(){const e=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],t=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],r=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],o=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],s=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],a=[new i(0,0,0),new i(0,0,0),new i(0,0,0)];return function(i){if(this.isEmpty())return!1;if(i.isEmpty())return!1;if(this.getPoints(e),i.getPoints(t),n.isSeparated(this.getNormals(a),e,t))return!1;if(n.isSeparated(i.getNormals(a),e,t))return!1;this.getAxes(r),i.getAxes(o);for(let e=0;e<3;++e)for(let t=0;t<3;++t)s[3*e+t].assign(r[e]).cross(o[t]);return!n.isSeparated(s,e,t)}}(),intersectsTriangle:function(){const t=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],r=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],o=[new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0),new i(0,0,0)],s=[new i(0,0,0),new i(0,0,0),new i(0,0,0)],a=[],u=[new i(0,0,0)],l=[new i(0,0,0),new i(0,0,0),new i(0,0,0)];return function(i,c,h){if(this.isEmpty())return!1;if(this.getPoints(t),a[0]=i,a[1]=c,a[2]=h,n.isSeparated(this.getNormals(s),t,a))return!1;if(e.normal(i,c,h,u[0]),n.isSeparated(u,t,a))return!1;this.getAxes(r),l[0].assign(i).subtract(c),l[1].assign(c).subtract(h),l[2].assign(h).subtract(i);for(let e=0;e<3;++e)for(let t=0;t<3;++t)o[3*e+t].assign(r[e]).cross(l[t]);return!n.isSeparated(o,t,a)}}(),toString:function(){return this.size+", "+this.center}},Object.defineProperty(r.prototype,"size",{get:function(){const e=new i(0,0,0),t=new i(0,0,0);return function(){return this.getAbsoluteExtents(e,t),t.subtract(e)}}(),enumerable:!0,configurable:!1}),Object.defineProperty(r.prototype,"center",{get:function(){return this.matrix.origin},enumerable:!0,configurable:!1}),r})),define("standard/Math/Utility/MatrixStack",[],(function(){"use strict";return function(e){return Object.assign([new e],{top:0,set:function(e){this[this.top].assign(e)},get:function(){return this[this.top]},push:function(){const e=++this.top;e<this.length?this[e].assign(this[e-1]):this[e]=this[e-1].copy()},pushMatrix:function(e){const t=++this.top;t<this.length?this[t].assign(e):this[t]=e.copy()},pop:function(){--this.top},clear:function(){this.top=0},size:function(){return this.top+1},identity:function(){this[this.top].identity()},multLeft:function(e){this[this.top].multLeft(e)},translate:function(e){this[this.top].translate(e)},rotate:function(e){this[this.top].rotate(e)},scale:function(e){this[this.top].scale(e)}})}})),define("x_ite/Rendering/X3DRenderObject",["x_ite/Rendering/TextureBuffer","x_ite/Rendering/TraverseType","standard/Math/Algorithm","standard/Math/Algorithms/MergeSort","standard/Math/Geometry/Camera","standard/Math/Geometry/Box3","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Utility/MatrixStack"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";function d(e,t){return e.distance<t.distance}function p(t){this.cameraSpaceMatrix=new h(c),this.viewMatrix=new h(c),this.projectionMatrix=new h(c),this.modelViewMatrix=new h(c),this.viewVolumes=[],this.globalObjects=[],this.localObjects=[],this.lights=[],this.shadow=[!1],this.localFogs=[],this.layouts=[],this.textureProjectors=[],this.generatedCubeMapTextures=[],this.shaders=new Set,this.collisions=[],this.numOpaqueShapes=0,this.numTransparentShapes=0,this.numCollisionShapes=0,this.numDepthShapes=0,this.opaqueShapes=[],this.transparentShapes=[],this.transparencySorter=new n(this.transparentShapes,d),this.collisionShapes=[],this.activeCollisions=new Set,this.depthShapes=[],this.speed=0;try{this.depthBuffer=new e(t.getBrowser(),16,16)}catch(e){console.error(e),this.getDepth=function(){return 0}}}function f(e,t){for(var i=0,n=t.length;i<n;++i)e[i]=t[i];e.length=n}return p.prototype={constructor:p,initialize:function(){},isIndependent:function(){return!0},getCameraSpaceMatrix:function(){return this.cameraSpaceMatrix},getViewMatrix:function(){return this.viewMatrix},getProjectionMatrix:function(){return this.projectionMatrix},getModelViewMatrix:function(){return this.modelViewMatrix},getViewVolumes:function(){return this.viewVolumes},getViewVolume:function(){return this.viewVolumes.at(-1)},getGlobalObjects:function(){return this.globalObjects},getLocalObjects:function(){return this.localObjects},getLights:function(){return this.lights},pushShadow:function(e){this.shadow.push(e||this.shadow.at(-1))},popShadow:function(){this.shadow.pop()},setGlobalFog:function(){const e=new c;return function(t){const i=this.localFogs[0]||t.getFogs().pop();e.assign(t.getModelMatrix()).multRight(this.getViewMatrix().get()),i.set(t,e),this.localFog=this.localFogs[0]=i}}(),pushLocalFog:function(e){this.localFogs.push(e),this.localFog=e},popLocalFog:function(){const e=this.localFogs.pop();return this.localFog=this.localFogs.at(-1),e},getLayouts:function(){return this.layouts},getParentLayout:function(){return this.layouts.at(-1)},getTextureProjectors:function(){return this.textureProjectors},getGeneratedCubeMapTextures:function(){return this.generatedCubeMapTextures},getShaders:function(){return this.shaders},getCollisions:function(){return this.collisions},setNumCollisionShapes:function(e){this.numCollisionShapes=e},getNumCollisionShapes:function(){return this.numCollisionShapes},getCollisionShapes:function(){return this.collisionShapes},setNumDepthShapes:function(e){this.numDepthShapes=e},getNumDepthShapes:function(){return this.numDepthShapes},getDepthShapes:function(){return this.depthShapes},setNumOpaqueShapes:function(e){this.numOpaqueShapes=e},getNumOpaqueShapes:function(){return this.numOpaqueShapes},getOpaqueShapes:function(){return this.opaqueShapes},setNumTransparentShapes:function(e){this.numTransparentShapes=e},getNumTransparentShapes:function(){return this.numTransparentShapes},getTransparentShapes:function(){return this.transparentShapes},constrainTranslation:function(e,t){const i=this.getDistance(e)-this.getNavigationInfo().getCollisionRadius();if(i>0){return e.abs()>i?e.normalize().multiply(i):e}return t?this.constrainTranslation(e.normalize().multiply(i),!1):e.assign(a.Zero)},getDistance:function(){const e=new c,t=new c,i=new l(0,0,1,0),n=new a(0,0,0),o=new l(0,0,1,0);return function(s){try{const u=performance.now(),l=this.getViewpoint(),c=this.getNavigationInfo(),h=c.getCollisionRadius(),d=c.getStepHeight()-c.getAvatarHeight(),p=c.getNearValue(),f=c.getAvatarHeight();r.ortho(-h,h,Math.min(d,-h),h,p,Math.max(2*h,2*f),e),i.assign(l._orientation.getValue()).inverse().multRight(l.getOrientation()),o.setFromToVec(a.zAxis,n.assign(s).negate()).multRight(i),l.straightenHorizon(o),t.assign(l.getModelMatrix()),t.translate(l.getUserPosition()),t.rotate(o),t.inverse(),t.multRight(e),t.multLeft(l.getCameraSpaceMatrix()),this.getProjectionMatrix().pushMatrix(t);const g=this.getDepth(e);return this.getProjectionMatrix().pop(),this.collisionTime+=performance.now()-u,-g}catch(e){console.error(e)}}}(),getDepth:function(){const e=new u(0,0,16,16),t=new s;return t.set(c.Identity,e,e),function(i){this.depthBuffer.bind(),this.viewVolumes.push(t),this.depth(this.collisionShapes,this.numCollisionShapes),this.viewVolumes.pop();const n=this.depthBuffer.getDepth(i,e);return this.depthBuffer.unbind(),n}}(),render:function(e,i,n){switch(e){case t.COLLISION:this.numCollisionShapes=0,i.call(n,e,this),this.collide(),this.gravite();break;case t.SHADOW:this.numDepthShapes=0,i.call(n,e,this),this.depth(this.depthShapes,this.numDepthShapes);break;case t.DISPLAY:this.lightIndex=0,this.numOpaqueShapes=0,this.numTransparentShapes=0,this.setGlobalFog(this.getFog()),i.call(n,e,this),this.draw()}},addCollisionShape:function(){const e=new a(0,0,0),t=new a(0,0,0);return function(i){const n=this.getModelViewMatrix().get();n.multDirMatrix(e.assign(i.getBBoxSize())),n.multVecMatrix(t.assign(i.getBBoxCenter()));const r=e.abs()/2,o=this.viewVolumes.at(-1);if(o.intersectsSphere(r,t)){const e=this.numCollisionShapes++;e===this.collisionShapes.length&&this.collisionShapes.push({renderer:this,browser:this.getBrowser(),modelViewMatrix:new Float32Array(16),collisions:[],clipPlanes:[]});const t=this.collisionShapes[e];return t.modelViewMatrix.set(n),t.shapeNode=i,t.scissor=o.getScissor(),f(t.collisions,this.collisions),f(t.clipPlanes,this.localObjects),!0}return!1}}(),addDepthShape:function(){const e=new a(0,0,0),t=new a(0,0,0);return function(i){const n=this.getModelViewMatrix().get();n.multDirMatrix(e.assign(i.getBBoxSize())),n.multVecMatrix(t.assign(i.getBBoxCenter()));const r=e.abs()/2,o=this.viewVolumes.at(-1);if(o.intersectsSphere(r,t)){const e=this.numDepthShapes++;e===this.depthShapes.length&&this.depthShapes.push({renderer:this,browser:this.getBrowser(),modelViewMatrix:new Float32Array(16),clipPlanes:[]});const t=this.depthShapes[e];return t.modelViewMatrix.set(n),t.shapeNode=i,t.scissor=o.getScissor(),f(t.clipPlanes,this.localObjects),!0}return!1}}(),addDisplayShape:function(){const e=new a(0,0,0),t=new a(0,0,0);return function(i){const n=this.getModelViewMatrix().get();n.multDirMatrix(e.assign(i.getBBoxSize())),n.multVecMatrix(t.assign(i.getBBoxCenter()));const r=e.abs()/2,o=this.viewVolumes.at(-1);if(o.intersectsSphere(r,t)){if(i.getTransparent()){const e=this.numTransparentShapes++;e===this.transparentShapes.length&&this.transparentShapes.push(this.createShapeContext(!0));var s=this.transparentShapes[e]}else{const e=this.numOpaqueShapes++;e===this.opaqueShapes.length&&this.opaqueShapes.push(this.createShapeContext(!1));s=this.opaqueShapes[e]}return s.modelViewMatrix.set(n),s.scissor.assign(o.getScissor()),s.shapeNode=i,s.textureNode=null,s.distance=t.z,s.fogNode=this.localFog,s.shadow=this.shadow.at(-1),f(s.localObjects,this.localObjects),!0}return!1}}(),createShapeContext:function(e){return{renderer:this,browser:this.getBrowser(),transparent:e,modelViewMatrix:new Float32Array(16),scissor:new u(0,0,0,0),localObjects:[]}},collide:function(){const e=new c,t=new c,n=new o(a.Zero,a.Zero),r=new a(0,0,0);return function(){const o=new Set,s=2.2*this.getNavigationInfo().getCollisionRadius();r.set(s,s,s);for(let i=0,s=this.numCollisionShapes;i<s;++i)try{const s=this.collisionShapes[i],u=s.collisions;if(u.length&&(n.set(r,a.Zero),n.multRight(e.assign(s.modelViewMatrix).inverse()),s.shapeNode.intersectsBox(n,s.clipPlanes,t.assign(s.modelViewMatrix))))for(const e of u)o.add(e)}catch(e){console.error(e)}if(this.activeCollisions.size){const e=o.size?i.set_difference(this.activeCollisions,o,new Set):this.activeCollisions;for(const t of e)t.set_active(!1)}this.activeCollisions=o;for(const e of o)e.set_active(!0)}}(),gravite:function(){const e=new c,t=new c,i=new a(0,0,0),n=new l(0,0,1,0);return function(){try{const o=this.getBrowser();if(o.getDepthShader().getValid()){if(o.getActiveLayer()===this){if("WALK"!==o.getCurrentViewer())return}else if("WALK"!==this.getNavigationInfo().getViewer())return;const s=this.getNavigationInfo(),u=this.getViewpoint(),l=s.getCollisionRadius(),c=s.getNearValue(),h=s.getAvatarHeight(),d=s.getStepHeight();r.ortho(-l,l,-l,l,c,Math.max(2*l,2*h),e);const p=u.getUpVector(),f=n.setFromToVec(a.zAxis,p);t.assign(u.getModelMatrix()),t.translate(u.getUserPosition()),t.rotate(f),t.inverse(),t.multRight(e),t.multLeft(u.getCameraSpaceMatrix()),this.getProjectionMatrix().pushMatrix(t);let g=-this.getDepth(e);this.getProjectionMatrix().pop(),g-=h;const m=n.setFromToVec(a.yAxis,p);if(g>0){const e=this.speed?o.getCurrentFrameRate():1e6;this.speed-=o.getBrowserOptions()._Gravity.getValue()/e;let t=this.speed/e;t<-g&&(t=-g,this.speed=0),u._positionOffset=u._positionOffset.getValue().add(m.multVecRot(i.set(0,t,0)))}else this.speed=0,g=-g,g>.01&&g<d&&(this.constrainTranslation(m.multVecRot(i.set(0,g,0)),!1),u._positionOffset=i.add(u._positionOffset.getValue()))}}catch(e){console.error(e)}}}(),depth:function(){const e=new Float32Array(16);return function(t,i){const n=this.getBrowser(),r=n.getContext(),o=this.getViewVolume().getViewport(),s=n.getDepthShader();if(s.getValid()){s.enable(r),e.set(this.getProjectionMatrix().get()),r.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,e),r.viewport(o[0],o[1],o[2],o[3]),r.scissor(o[0],o[1],o[2],o[3]),r.clearColor(1,0,0,0),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT),r.enable(r.DEPTH_TEST),r.depthMask(!0),r.disable(r.BLEND),r.disable(r.CULL_FACE);for(let e=0;e<i;++e){const i=t[e],n=i.scissor;r.scissor(n.x,n.y,n.z,n.w),s.setLocalObjects(r,i.clipPlanes),r.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,i.modelViewMatrix),i.shapeNode.depth(r,i,s)}}}}(),draw:function(){const e=new Int32Array(4),t=new Float32Array(16),i=new Float32Array(16);return function(){const n=this.getBrowser(),r=n.getContext(),o=this.getViewVolume().getViewport(),s=this.shaders,a=this.lights,u=this.textureProjectors,l=this.generatedCubeMapTextures;if(this.isIndependent()){for(const e of a)e.renderShadowMap(this);for(const e of l)e.renderTexture(this)}n.getHeadlight().setGlobalVariables(this);for(const e of a)e.setGlobalVariables(this);for(const e of u)e.setGlobalVariables(this);r.viewport(o[0],o[1],o[2],o[3]),r.scissor(o[0],o[1],o[2],o[3]),r.clear(r.DEPTH_BUFFER_BIT),this.getBackground().display(r,this,o),e.set(o),i.set(this.getCameraSpaceMatrix().get()),t.set(this.getProjectionMatrix().get());for(const e of n.getStandardShaders())s.add(e);for(const n of s)n.setGlobalUniforms(r,this,i,t,e);r.enable(r.DEPTH_TEST),r.depthMask(!0),r.disable(r.BLEND);const c=this.opaqueShapes;for(let e=0,t=this.numOpaqueShapes;e<t;++e){const t=c[e],i=t.scissor;r.scissor(i.x,i.y,i.z,i.w),t.shapeNode.display(r,t),n.resetTextureUnits()}r.depthMask(!1),r.enable(r.BLEND);const h=this.transparentShapes;this.transparencySorter.sort(0,this.numTransparentShapes);for(let e=0,t=this.numTransparentShapes;e<t;++e){const t=h[e],i=t.scissor;r.scissor(i.x,i.y,i.z,i.w),t.shapeNode.display(r,t),n.resetTextureUnits()}r.depthMask(!0),r.disable(r.BLEND);const d=this.globalObjects;if(this.isIndependent()){const e=n.getLocalObjects();for(const t of e)t.dispose();e.length=0;for(const e of d)e.dispose()}s.clear(),d.length=0,a.length=0,u.length=0,l.length=0}}()},p})),define("x_ite/Components/Grouping/X3DBoundedObject",["x_ite/Fields","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Box3"],(function(e,t,i,n,r,o){"use strict";function s(t){this.addType(i.X3DBoundedObject),this.addChildObjects("transformSensors_changed",new e.SFTime),this._bboxSize.setUnit("length"),this._bboxCenter.setUnit("length"),this.childBBox=new o,this.transformSensorNodes=new Set}return s.prototype={constructor:s,initialize:function(){},getDefaultBBoxSize:function(){const e=new n(-1,-1,-1);return function(){return e}}(),getBBox:function(e,t,i){const n=this.childBBox;t.set();for(var r=0,o=e.length;r<o;++r){const o=e[r];o.getBBox&&t.add(o.getBBox(n,i))}return t},displayBBox:function(){const e=new o,t=new r;return function(i,n){const r=n.getModelViewMatrix();this.getBBox(e),t.set(e.center,null,e.size),r.push(),r.multLeft(t),this.getBrowser().getBBoxNode().traverse(i,n),r.pop()}}(),addTransformSensor:function(e){this.transformSensorNodes.add(e),this._transformSensors_changed=this.getBrowser().getCurrentTime()},removeTransformSensor:function(e){this.transformSensorNodes.delete(e),this._transformSensors_changed=this.getBrowser().getCurrentTime()},getTransformSensors:function(){return this.transformSensorNodes}},s})),define("x_ite/Components/Grouping/X3DGroupingNode",["x_ite/Components/Core/X3DChildNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","x_ite/Base/X3DCast"],(function(e,t,i,n,r){"use strict";function o(i){e.call(this,i),t.call(this,i),this.addType(n.X3DGroupingNode),this.hidden=!1,this.allowedTypes=new Set,this.clipPlaneNodes=[],this.localFogNodes=[],this.lightNodes=[],this.textureProjectorNodes=[],this.pointingDeviceSensorNodes=[],this.maybeCameraObjects=[],this.cameraObjects=[],this.maybePickableSensorNodes=[],this.pickableSensorNodes=[],this.pickableObjects=[],this.childNodes=[],this.displayNodes=[],this.visibleNodes=[],this.boundedObjects=[],this.sensors=new Map}function s(e,t,i,n,r,o){const s=new Set;for(let e=r;e<o;++e)s.add(n[e]);return e.remove(t,i,(function(e){return s.has(e)}))}return o.prototype=Object.assign(Object.create(e.prototype),t.prototype,{constructor:o,initialize:function(){e.prototype.initialize.call(this),t.prototype.initialize.call(this),this._transformSensors_changed.addInterest("set_transformSensors__",this),this._addChildren.addInterest("set_addChildren__",this),this._removeChildren.addInterest("set_removeChildren__",this),this._children.addInterest("set_children__",this),this.set_children__()},getBBox:function(e,t){return this.getSubBBox(e,t)},getSubBBox:function(e,i){return this._bboxSize.getValue().equals(this.getDefaultBBoxSize())?t.prototype.getBBox.call(this,this.visibleNodes,e,i):e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},setHidden:function(e){e!==this.hidden&&(this.hidden=e,this.set_children__())},setAllowedTypes:function(){const e=this.allowedTypes;e.clear();for(const t of arguments)e.add(t)},set_addChildren__:function(){0!==this._addChildren.length&&(this._addChildren.setTainted(!0),this._addChildren.erase(s(this._addChildren,0,this._addChildren.length,this._children,0,this._children.length),this._addChildren.length),this._children.isTainted()||(this._children.removeInterest("set_children__",this),this._children.addInterest("connectChildren",this)),this._children.insert(this._children.length,this._addChildren,0,this._addChildren.length),this.add(this._addChildren),this._addChildren.length=0,this._addChildren.setTainted(!1))},set_removeChildren__:function(){0!==this._removeChildren.length&&(this._removeChildren.setTainted(!0),this._children.length>0&&(this._children.isTainted()||(this._children.removeInterest("set_children__",this),this._children.addInterest("connectChildren",this)),this._children.erase(s(this._children,0,this._children.length,this._removeChildren,0,this._removeChildren.length),this._children.length),this.remove(this._removeChildren)),this._removeChildren.length=0,this._removeChildren.setTainted(!1))},set_children__:function(){this.clear(),this.add(this._children)},connectChildren:function(){this._children.removeInterest("connectChildren",this),this._children.addInterest("set_children__",this)},clear:function(){for(const e of this.maybePickableSensorNodes)e._isPickableObject.removeInterest("set_pickableObjects__",this);for(const e of this.childNodes)e._isCameraObject.removeInterest("set_cameraObjects__",this),e._isPickableObject.removeInterest("set_pickableObjects__",this),r(n.X3DBoundedObject,e)&&(e._visible.removeInterest("set_visibles__",this),e._bboxDisplay.removeInterest("set_bboxDisplays__",this));this.clipPlaneNodes.length=0,this.localFogNodes.length=0,this.lightNodes.length=0,this.textureProjectorNodes.length=0,this.pointingDeviceSensorNodes.length=0,this.maybeCameraObjects.length=0,this.maybePickableSensorNodes.length=0,this.childNodes.length=0},add:function(e){if(!this.hidden){for(const t of e)if(t)try{const e=t.getValue().getInnerNode(),i=e.getType();for(let t=i.length-1;t>=0;--t){switch(i[t]){case n.X3DPointingDeviceSensorNode:this.pointingDeviceSensorNodes.push(e);break;case n.ClipPlane:this.clipPlaneNodes.push(e);break;case n.LocalFog:this.localFogNodes.push(e);break;case n.X3DTextureProjectorNode:this.textureProjectorNodes.push(e);break;case n.X3DLightNode:this.lightNodes.push(e);break;case n.X3DBindableNode:this.maybeCameraObjects.push(e);break;case n.TransformSensor:case n.X3DPickSensorNode:e._isPickableObject.addInterest("set_pickableObjects__",this),this.maybePickableSensorNodes.push(e);break;case n.X3DBackgroundNode:case n.X3DChildNode:e._isCameraObject.addInterest("set_cameraObjects__",this),e._isPickableObject.addInterest("set_pickableObjects__",this),r(n.X3DBoundedObject,e)&&(e._visible.addInterest("set_visibles__",this),e._bboxDisplay.addInterest("set_bboxDisplays__",this)),this.maybeCameraObjects.push(e),this.childNodes.push(e);break;case n.BooleanFilter:case n.BooleanToggle:case n.NurbsOrientationInterpolator:case n.NurbsPositionInterpolator:case n.NurbsSurfaceInterpolator:case n.TimeSensor:case n.X3DFollowerNode:case n.X3DInfoNode:case n.X3DInterpolatorNode:case n.X3DKeyDeviceSensorNode:case n.X3DLayoutNode:case n.X3DScriptNode:case n.X3DSequencerNode:case n.X3DTriggerNode:break;default:continue}break}}catch(e){}this.set_pickableObjects__(),this.set_displayNodes__(),this.set_visibles__(),this.set_bboxDisplays__()}},remove:function(e){for(const i of e)if(i)try{const e=i.getValue().getInnerNode(),o=e.getType();for(let i=o.length-1;i>=0;--i){switch(o[i]){case n.X3DPointingDeviceSensorNode:{const t=this.pointingDeviceSensorNodes.indexOf(e);t>=0&&this.pointingDeviceSensorNodes.splice(t,1);break}case n.ClipPlane:{const t=this.clipPlaneNodes.indexOf(e);t>=0&&this.clipPlaneNodes.splice(t,1);break}case n.LocalFog:{const t=this.localFogNodes.indexOf(e);t>=0&&this.localFogNodes.splice(t,1);break}case n.X3DTextureProjectorNode:{const t=this.textureProjectorNodes.indexOf(e);t>=0&&this.textureProjectorNodes.splice(t,1);break}case n.X3DLightNode:{const t=this.lightNodes.indexOf(e);t>=0&&this.lightNodes.splice(t,1);break}case n.X3DBindableNode:{const t=this.maybeCameraObjects.indexOf(e);t>=0&&this.maybeCameraObjects.splice(t,1);break}case n.TransformSensor:case n.X3DPickSensorNode:{e._isPickableObject.removeInterest("set_pickableObjects__",this);const t=this.maybePickableSensorNodes.indexOf(e);t>=0&&this.maybePickableSensorNodes.splice(t,1);break}case n.X3DBackgroundNode:case n.X3DChildNode:var t;e._isCameraObject.removeInterest("set_cameraObjects__",this),e._isPickableObject.removeInterest("set_pickableObjects__",this),r(n.X3DBoundedObject,e)&&(e._visible.removeInterest("set_visibles__",this),e._bboxDisplay.removeInterest("set_bboxDisplays__",this)),(t=this.maybeCameraObjects.indexOf(e))>=0&&this.maybeCameraObjects.splice(t,1),(t=this.childNodes.indexOf(e))>=0&&this.childNodes.splice(t,1);break;case n.BooleanFilter:case n.BooleanToggle:case n.NurbsOrientationInterpolator:case n.NurbsPositionInterpolator:case n.NurbsSurfaceInterpolator:case n.TimeSensor:case n.X3DFollowerNode:case n.X3DInfoNode:case n.X3DInterpolatorNode:case n.X3DKeyDeviceSensorNode:case n.X3DLayoutNode:case n.X3DScriptNode:case n.X3DSequencerNode:case n.X3DTriggerNode:break;default:continue}break}}catch(e){}this.set_pickableObjects__(),this.set_displayNodes__(),this.set_visibles__(),this.set_bboxDisplays__()},set_cameraObjects__:function(){const e=this.cameraObjects;e.length=0;for(const t of this.maybeCameraObjects)t.getCameraObject()&&(r(n.X3DBoundedObject,t)?t._visible.getValue()&&e.push(t):e.push(t));this.setCameraObject(Boolean(e.length))},set_pickableObjects__:function(){const e=this.pickableSensorNodes,t=this.pickableObjects;e.length=0,t.length=0;for(const t of this.maybePickableSensorNodes)t.getPickableObject()&&e.push(t);for(const e of this.childNodes)e.getPickableObject()&&t.push(e);this.set_transformSensors__()},set_transformSensors__:function(){this.setPickableObject(Boolean(this.getTransformSensors().size||this.pickableSensorNodes.length||this.pickableObjects.length))},set_displayNodes__:function(){const e=this.displayNodes;e.length=0;for(const t of this.clipPlaneNodes)e.push(t);for(const t of this.localFogNodes)e.push(t);for(const t of this.lightNodes)e.push(t);for(const t of this.textureProjectorNodes)e.push(t)},set_visibles__:function(){const e=this.childNodes,t=this.visibleNodes;t.length=0;for(const i of e)r(n.X3DBoundedObject,i)?i._visible.getValue()&&t.push(i):t.push(i);this.set_cameraObjects__()},set_bboxDisplays__:function(){const e=this.boundedObjects;e.length=0;for(const t of this.childNodes)r(n.X3DBoundedObject,t)&&t._bboxDisplay.getValue()&&e.push(t)},traverse:function(e,t){switch(e){case i.POINTER:{const i=this.pointingDeviceSensorNodes,n=this.clipPlaneNodes;if(i.length){const e=this.sensors;e.clear(),t.getBrowser().getSensors().push(e);for(const n of i)n.push(t,e)}for(const e of n)e.push(t);for(const i of this.childNodes)i.traverse(e,t);for(const e of n)e.pop(t);return void(i.length&&t.getBrowser().getSensors().pop())}case i.CAMERA:for(const i of this.cameraObjects)i.traverse(e,t);return;case i.PICKING:{if(this.getTransformSensors().size){const e=t.getModelViewMatrix().get();for(const t of this.getTransformSensors())t.collect(e)}for(const i of this.pickableSensorNodes)i.traverse(e,t);const i=t.getBrowser(),n=i.getPickingHierarchy();if(n.push(this),i.getPickable().at(-1))for(const i of this.childNodes)i.traverse(e,t);else for(const i of this.pickableObjects)i.traverse(e,t);return void n.pop()}case i.COLLISION:{const i=this.clipPlaneNodes;for(const e of i)e.push(t);for(const i of this.childNodes)i.traverse(e,t);for(const e of i)e.pop(t);return}case i.SHADOW:{const i=this.clipPlaneNodes;for(const e of i)e.push(t);for(const i of this.visibleNodes)i.traverse(e,t);for(const e of i)e.push(t);return}case i.DISPLAY:{const i=this.displayNodes;for(const e of i)e.push(t,this);for(const i of this.visibleNodes)i.traverse(e,t);for(const i of this.boundedObjects)i.displayBBox(e,t);for(const e of i)e.pop(t);return}}}}),o})),define("x_ite/Components/Layering/X3DViewportNode",["x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DViewportNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Execution/BindableStack",["x_ite/Base/X3DBaseNode"],(function(e){"use strict";function t(t,i){e.call(this,t),this.array=[i],this.transitionNode=i.create(t)}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"BindableStack"},get:function(){return this.array},top:function(){return this.transitionNode._transitionActive.getValue()?this.transitionNode:this.array.at(-1)},pushOnTop:function(e){e!==this.array[0]&&(this.array.at(-1)._isBound=!1,this.array.push(e)),e._isBound=!0,e._bindTime=this.getBrowser().getCurrentTime(),this.addNodeEvent()},update:function(e,t,i){if(0===t.length&&0===i.length)return;const n=this.top(),r=this.array.at(-1);for(const e of t){const t=this.array.indexOf(e);t>0&&this.array.splice(t,1)}r!==this.array[0]&&i.some((e=>!e._set_bind.getValue()&&e===r))&&this.array.pop();for(const e of i)if(e._set_bind.getValue()){const t=this.array.indexOf(e);t>-1&&this.array.splice(t,1),this.array.push(e)}const o=this.array.at(-1);o!==r&&(r._set_bind=!1,r._isBound=!1,o._set_bind=!0,o._isBound=!0,o._bindTime=this.getBrowser().getCurrentTime(),this.transitionNode=o.create(this.getExecutionContext()),this.transitionNode.setup(),this.transitionNode.transitionStart(e,n,o),this.transitionNode._transitionActive.getValue()&&this.transitionNode._transitionActive.addInterest("set_transitionActive__",this),this.addNodeEvent())},set_transitionActive__:function(e){e.getValue()||(this.transitionNode._transitionActive.removeInterest("set_transitionActive__",this),this.addNodeEvent())}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Execution/BindableList",["x_ite/Base/X3DBaseNode","x_ite/Components/Core/X3DPrototypeInstance"],(function(e,t){"use strict";function i(t,i){e.call(this,t),this.collected=[i],this.array=[i],this.updateTime=0,this.removedNodes=[]}i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTypeName:function(){return"BindableList"},get:function(){return this.array},getBound:function(e){if(this.array.length>1){const i=!1,n=this.getMainScene();if(e&&e.length)for(let r=1,o=this.array.length;r<o;++r){const o=this.array[r],s=o.getExecutionContext().getOuterNode(),a=s instanceof t?s.getScene():o.getScene();if((i||a===n)&&o.getName()==e)return o}for(let e=1,r=this.array.length;e<r;++e){const r=this.array[e],o=r.getExecutionContext().getOuterNode(),s=o instanceof t?o.getScene():r.getScene();if((i||s===n)&&r._isBound.getValue())return r}for(let e=1,r=this.array.length;e<r;++e){const r=this.array[e],o=r.getExecutionContext().getOuterNode(),s=o instanceof t?o.getScene():r.getScene();if(i||s===n)return r}}return this.array[0]},push:function(e){return this.collected.push(e)},update:function(e,t){const i=this.collected.filter((e=>e._set_bind.getModificationTime()>this.updateTime)),n=this.removedNodes;if(!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(this.collected,this.array)){for(const e of this.array)-1===this.collected.indexOf(e)&&n.push(e);const e=this.array;this.array=this.collected,this.collected=e}this.collected.length=1,t.update(e,n,i),n.length=0,this.updateTime=performance.now()}});for(const e of Reflect.ownKeys(i.prototype))Object.defineProperty(i.prototype,e,{enumerable:!1});return i})),define("x_ite/Components/Navigation/NavigationInfo",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DBindableNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";const s={TELEPORT:!0,LINEAR:!0,ANIMATE:!0};function a(t){n.call(this,t),this.addType(o.NavigationInfo),this.addChildObjects("transitionStart",new e.SFBool,"availableViewers",new e.MFString,"viewer",new e.SFString("EXAMINE")),this._avatarSize.setUnit("length"),this._speed.setUnit("speed"),this._visibilityLimit.setUnit("speed")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"type",new e.MFString("EXAMINE","ANY")),new t(o.inputOutput,"avatarSize",new e.MFFloat(.25,1.6,.75)),new t(o.inputOutput,"speed",new e.SFFloat(1)),new t(o.inputOutput,"headlight",new e.SFBool(!0)),new t(o.inputOutput,"visibilityLimit",new e.SFFloat),new t(o.inputOutput,"transitionType",new e.MFString("LINEAR")),new t(o.inputOutput,"transitionTime",new e.SFTime(1)),new t(o.outputOnly,"transitionComplete",new e.SFBool),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"NavigationInfo"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._type.addInterest("set_type__",this),this._headlight.addInterest("set_headlight__",this),this._transitionStart.addInterest("set_transitionStart__",this),this._transitionComplete.addInterest("set_transitionComplete__",this),this._isBound.addInterest("set_isBound__",this),this.set_type__(),this.set_headlight__()},getViewer:function(){return this._viewer.getValue()},getCollisionRadius:function(){return this._avatarSize.length>0&&this._avatarSize[0]>0?this._avatarSize[0]:.25},getAvatarHeight:function(){return this._avatarSize.length>1?this._avatarSize[1]:1.6},getStepHeight:function(){return this._avatarSize.length>2?this._avatarSize[2]:.75},getNearValue:function(){const e=this.getCollisionRadius();return 0===e?1e-5:e/2},getFarValue:function(e){return this._visibilityLimit.getValue()?this._visibilityLimit.getValue():e.getMaxFarValue()},getTransitionType:function(){for(const e of this._transitionType){if(s[e])return e}return"LINEAR"},set_type__:function(){this._viewer="EXAMINE";for(const e of this._type){switch(e){case"EXAMINE":case"WALK":case"FLY":case"LOOKAT":case"PLANE":case"NONE":this._viewer=e;break;case"PLANE_create3000.de":this._viewer="PLANE";break;default:continue}break}let e=!1,t=!1,i=!1,n=!1,r=!1,o=!1;if(this._type.length)for(const s of this._type){switch(s){case"EXAMINE":default:e=!0;continue;case"WALK":t=!0;continue;case"FLY":i=!0;continue;case"LOOKAT":o=!0;continue;case"PLANE":n=!0;continue;case"NONE":r=!0;continue;case"ANY":e=!0,t=!0,i=!0,n=!0,r=!0,o=!0}break}else e=!0,t=!0,i=!0,n=!0,r=!0,o=!0;this._availableViewers.length=0,e&&this._availableViewers.push("EXAMINE"),t&&this._availableViewers.push("WALK"),i&&this._availableViewers.push("FLY"),n&&this._availableViewers.push("PLANE"),o&&this._availableViewers.push("LOOKAT"),r&&this._availableViewers.push("NONE")},set_headlight__:function(){this._headlight.getValue()?delete this.enable:this.enable=Function.prototype},set_transitionStart__:function(){this._transitionActive.getValue()||(this._transitionActive=!0)},set_transitionComplete__:function(){this._transitionActive.getValue()&&(this._transitionActive=!1)},set_isBound__:function(){this._isBound.getValue()||this._transitionActive.getValue()&&(this._transitionActive=!1)},enable:function(e,t){e===r.DISPLAY&&this._headlight.getValue()&&t.getGlobalObjects().push(t.getBrowser().getHeadlight())},traverse:function(e,t){e===r.CAMERA&&t.getLayer().getNavigationInfos().push(this)}}),a})),define("standard/Utility/ObjectCache",[],(function(){"use strict";return function(e){return{stack:[],last:-1,pop:function(){if(this.last>-1){const e=this.stack[this.last];return this.last--,e}return new e},push:function(e){return this.last++,this.stack[this.last]=e},clear:function(){this.stack.length=0,this.last=-1}}}})),define("x_ite/Components/EnvironmentalEffects/X3DFogObject",["x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix3","standard/Utility/ObjectCache"],(function(e,t,i){"use strict";const n=i(r);function r(){this.fogMatrix=new Float32Array(9)}function o(t){this.addType(e.X3DFogObject),this._visibilityRange.setUnit("length"),this.hidden=!1}return r.prototype={constructor:r,set:function(e,i){this.fogNode=e;try{this.fogMatrix.set(i.submatrix.inverse())}catch(e){this.fogMatrix.set(t.Identity)}},setShaderUniforms:function(e,t){if(t.hasFog(this))return;const i=this.fogNode,n=Math.max(0,i._visibilityRange.getValue());if(i.getHidden()||0===n)e.uniform1i(t.x3d_FogType,0);else{const r=i._color.getValue();e.uniform1i(t.x3d_FogType,i.fogType),e.uniform3f(t.x3d_FogColor,r.r,r.g,r.b),e.uniform1f(t.x3d_FogVisibilityRange,n),e.uniformMatrix3fv(t.x3d_FogMatrix,!1,this.fogMatrix)}},dispose:function(){n.push(this)}},o.prototype={constructor:o,initialize:function(){this._fogType.addInterest("set_fogType__",this),this.set_fogType__()},set_fogType__:function(){if("EXPONENTIAL"===this._fogType.getValue())this.fogType=2;else this.fogType=1},setHidden:function(e){this.hidden=e,this.getBrowser().addBrowserEvent()},getHidden:function(){return this.hidden},getFogs:function(){return n}},o})),define("x_ite/Components/EnvironmentalEffects/Fog",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DBindableNode","x_ite/Components/EnvironmentalEffects/X3DFogObject","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),r.call(this,e),this.addType(s.Fog),this.modelMatrix=new a}return u.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOnly,"set_bind",new e.SFBool),new t(s.inputOutput,"fogType",new e.SFString("LINEAR")),new t(s.inputOutput,"color",new e.SFColor(1,1,1)),new t(s.inputOutput,"visibilityRange",new e.SFFloat),new t(s.outputOnly,"isBound",new e.SFBool),new t(s.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"Fog"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this)},getModelMatrix:function(){return this.modelMatrix},traverse:function(e,t){e===o.CAMERA&&(t.getLayer().getFogs().push(this),this.modelMatrix.assign(t.getModelViewMatrix().get()))}}),u})),define("standard/Math/Numbers/Complex",[],(function(){"use strict";function e(e,t){this.real=e,this.imag=t}return e.prototype={constructor:e,copy:function(){const t=Object.create(e.prototype);return t.real=this.real,t.imag=this.imag,t},assign:function(e){return this.real=e.real,this.imag=e.imag,this},equals:function(e){return this.real===e.real&&this.imag===e.imag},setRadius:function(e){return this.setPolar(e,this.getAngle())},getRadius:function(){return this.real?this.imag?Math.hypot(this.real,this.imag):Math.abs(this.real):Math.abs(this.imag)},setAngle:function(e){return this.setPolar(this.getRadius(),e)},getAngle:function(){return Math.atan2(this.imag,this.real)},setPolar:function(e,t){return this.real=e*Math.cos(t),this.imag=e*Math.sin(t),this},conjugate:function(){return this.imag=-this.imag,this},negate:function(){return this.real=-this.real,this.imag=-this.imag,this},inverse:function(){const e=this.real*this.real+this.imag*this.imag;return this.real/=e,this.imag/=-e,this},add:function(e){return this.real+=e.real,this.imag+=e.imag,this},subtract:function(e){return this.real-=e.real,this.imag-=e.imag,this},multiply:function(e){return this.real*=e,this.imag*=e,this},multComp:function(){const e=this.real,t=this.imag;return this.real=e*value.real-t*value.imag,this.imag=e*value.imag+t*value.real,this},divComp:function(e){const t=this.real,i=this.imag,n=e.real,r=e.imag,o=n*n+r*r;return this.real=(t*n+i*r)/o,this.imag=(i*n-t*r)/o,this},toString:function(){return this.imag?this.real+" "+this.imag+"i":""+this.real}},Object.assign(e,{Polar:function(t,i){const n=Object.create(e.prototype);return n.real=t*Math.cos(i),n.imag=t*Math.sin(i),n},multiply:function(e,t){return e.copy().multiply(t)},multComp:function(e,t){return e.copy().multComp(t)}}),e})),define("x_ite/Components/EnvironmentalEffects/X3DBackgroundNode",["x_ite/Components/Core/X3DBindableNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=Math.sqrt(.5),c=[1,1,0,1,0,1,0,1,0,0,0,1,1,1,0,1,0,0,0,1,1,0,0,1],h=[l,l,-l,1,-l,l,-l,1,-l,-l,-l,1,l,l,-l,1,-l,-l,-l,1,l,-l,-l,1],d=[-l,l,l,1,l,l,l,1,l,-l,l,1,-l,l,l,1,l,-l,l,1,-l,-l,l,1],p=[-l,l,-l,1,-l,l,l,1,-l,-l,l,1,-l,l,-l,1,-l,-l,l,1,-l,-l,-l,1],f=[l,l,l,1,l,l,-l,1,l,-l,-l,1,l,l,l,1,l,-l,-l,1,l,-l,l,1],g=[l,l,l,1,-l,l,l,1,-l,l,-l,1,l,l,l,1,-l,l,-l,1,l,l,-l,1],m=[l,-l,-l,1,-l,-l,-l,1,-l,-l,l,1,l,-l,-l,1,-l,-l,l,1,l,-l,l,1],_=new r(0,0),y=new r(0,0),x=new r(0,0),w=new r(0,0),b=new r(0,0),v=new r(0,0);function S(t){e.call(this,t),this.addType(i.X3DBackgroundNode),this._skyAngle.setUnit("angle"),this._groundAngle.setUnit("angle"),this.hidden=!1,this.projectionMatrixArray=new Float32Array(16),this.modelMatrix=new a,this.modelViewMatrixArray=new Float32Array(16),this.localObjects=[],this.colors=[],this.sphere=[],this.textures=0}return S.prototype=Object.assign(Object.create(e.prototype),{constructor:S,initialize:function(){e.prototype.initialize.call(this);const t=this.getBrowser().getContext();this.colorBuffer=t.createBuffer(),this.sphereBuffer=t.createBuffer(),this.texCoordBuffer=t.createBuffer(),this.cubeBuffer=t.createBuffer(),this.texCoordBuffers=[t.createBuffer()],this.frontBuffer=t.createBuffer(),this.backBuffer=t.createBuffer(),this.leftBuffer=t.createBuffer(),this.rightBuffer=t.createBuffer(),this.topBuffer=t.createBuffer(),this.bottomBuffer=t.createBuffer(),this._groundAngle.addInterest("build",this),this._groundColor.addInterest("build",this),this._skyAngle.addInterest("build",this),this._skyColor.addInterest("build",this),this._transparency.addInterest("build",this),this.build(),this.transferRectangle()},set_frontTexture__:function(e){this.setTexture("frontTexture",e,0)},set_backTexture__:function(e){this.setTexture("backTexture",e,1)},set_leftTexture__:function(e){this.setTexture("leftTexture",e,2)},set_rightTexture__:function(e){this.setTexture("rightTexture",e,3)},set_topTexture__:function(e){this.setTexture("topTexture",e,4)},set_bottomTexture__:function(e){this.setTexture("bottomTexture",e,5)},setTexture:function(e,t,i){this[e]&&this[e]._loadState.removeInterest("setTextureBit",this),this[e]=t,t?(t._loadState.addInterest("setTextureBit",this,t,i),this.setTextureBit(t,i,t._loadState)):this.textures&=~(1<<i)},setTextureBit:function(e,t,n){n.getValue()===i.COMPLETE_STATE||e&&e.getData()?this.textures|=1<<t:this.textures&=~(1<<t)},setHidden:function(e){this.hidden=e,this.getBrowser().addBrowserEvent()},getHidden:function(){return this.hidden},getTransparent:function(){return!!this.hidden||0!==this._transparency.getValue()&&(!(this.frontTexture&&!this.frontTexture._transparent.getValue())||(!(this.backTexture&&!this.backTexture._transparent.getValue())||(!(this.leftTexture&&!this.leftTexture._transparent.getValue())||(!(this.rightTexture&&!this.rightTexture._transparent.getValue())||(!(this.topTexture&&!this.topTexture._transparent.getValue())||!(this.bottomTexture&&!this.bottomTexture._transparent.getValue()))))))},getColor:function(e,t,i){return t[u.upperBound(i,0,i.length,e,u.less)]},build:function(){if(this.colors.length=0,this.sphere.length=0,this._transparency.getValue()>=1)return;const e=1-u.clamp(this._transparency.getValue(),0,1);if(0===this._groundColor.length&&1==this._skyColor.length){const t=l;this.sphere.vertices=36,this.sphere.push(t,t,-t,1,-t,t,-t,1,-t,-t,-t,1,t,t,-t,1,-t,-t,-t,1,t,-t,-t,1,-t,t,t,1,t,t,t,1,-t,-t,t,1,-t,-t,t,1,t,t,t,1,t,-t,t,1,-t,t,-t,1,-t,t,t,1,-t,-t,t,1,-t,t,-t,1,-t,-t,t,1,-t,-t,-t,1,t,t,t,1,t,t,-t,1,t,-t,t,1,t,-t,t,1,t,t,-t,1,t,-t,-t,1,t,t,t,1,-t,t,t,1,-t,t,-t,1,t,t,t,1,-t,t,-t,1,t,t,-t,1,-t,-t,t,1,t,-t,t,1,-t,-t,-t,1,-t,-t,-t,1,t,-t,t,1,t,-t,-t,1);const i=this._skyColor[0];for(let t=0,n=this.sphere.vertices;t<n;++t)this.colors.push(i.r,i.g,i.b,e)}else{if(this._skyColor.length>this._skyAngle.length){const t=this._skyAngle.slice();(0===t.length||t[0]>0)&&t.unshift(0),t.at(-1)<Math.PI&&t.push(Math.PI),2===t.length&&t.splice(1,0,(t[0]+t[1])/2),this.buildSphere(1,t,this._skyAngle,this._skyColor,e,!1)}if(this._groundColor.length>this._groundAngle.length){const t=this._groundAngle.slice().reverse();(0===t.length||t[0]<Math.PI/2)&&t.unshift(Math.PI/2),t.at(-1)>0&&t.push(0),this.buildSphere(1,t,this._groundAngle,this._groundColor,e,!0)}}this.transferSphere()},buildSphere:function(e,t,i,n,r,o){const s=o?Math.PI/2:Math.PI,a=t.length-1;for(let l=0;l<a;++l){let a=u.clamp(t[l],0,s),c=u.clamp(t[l+1],0,s);o&&(a=Math.PI-a,c=Math.PI-c),_.setPolar(e,a),y.setPolar(e,c);const h=this.getColor(t[l],n,i),d=this.getColor(t[l+1],n,i);for(let e=0;e<20;++e){const t=e<19?e+1:0;let i=2*Math.PI*(e/20);x.setPolar(-_.imag,i),w.setPolar(-y.imag,i),i=2*Math.PI*(t/20),b.setPolar(-y.imag,i),v.setPolar(-_.imag,i),this.colors.push(h.r,h.g,h.b,r,d.r,d.g,d.b,r,d.r,d.g,d.b,r,h.r,h.g,h.b,r,h.r,h.g,h.b,r,d.r,d.g,d.b,r),this.sphere.push(x.imag,_.real,x.real,1,b.imag,y.real,b.real,1,w.imag,y.real,w.real,1,x.imag,_.real,x.real,1,v.imag,_.real,v.real,1,b.imag,y.real,b.real,1)}}},transferSphere:function(){const e=this.getBrowser().getContext();e.bindBuffer(e.ARRAY_BUFFER,this.colorBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.colors),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.sphereBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.sphere),e.STATIC_DRAW),this.sphereCount=this.sphere.length/4},transferRectangle:function(){const e=this.getBrowser().getContext();e.bindBuffer(e.ARRAY_BUFFER,this.texCoordBuffers[0]),e.bufferData(e.ARRAY_BUFFER,new Float32Array(c),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.frontBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(h),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.backBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(d),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.leftBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(p),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.rightBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.topBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,this.bottomBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(m),e.STATIC_DRAW)},traverse:function(e,i){switch(e){case t.CAMERA:return i.getLayer().getBackgrounds().push(this),void this.modelMatrix.assign(i.getModelViewMatrix().get());case t.DISPLAY:{const e=i.getLocalObjects(),t=this.localObjects;for(let i=0,n=e.length;i<n;++i)t[i]=e[i];return void(t.length=e.length)}}},display:function(){const e=new a,t=new a,i=new s,r=new o(0,0,0),u=new o(0,0,0);return function(o,s,a){try{if(this.hidden)return;o.disable(o.DEPTH_TEST),o.depthMask(!1),o.enable(o.CULL_FACE),o.frontFace(o.CCW);const l=.8*-n.unProjectPointMatrix(0,0,1,e.assign(s.getProjectionMatrix().get()).inverse(),a,u).z;this.projectionMatrixArray.set(s.getProjectionMatrix().get()),t.assign(this.modelMatrix),t.multRight(s.getViewMatrix().get()),t.get(null,i),t.identity(),t.rotate(i),t.scale(r.set(l,l,l)),this.modelViewMatrixArray.set(t),this.drawSphere(s),this.textures&&this.drawCube(s)}catch(e){console.error(e)}}}(),drawSphere:function(e){const t=this._transparency.getValue();if(t>=1)return;const i=e.getBrowser(),n=i.getContext(),r=i.getBackgroundSphereShader();r.getValid()&&(r.enable(n),r.setLocalObjects(n,this.localObjects),r.enableColorAttribute(n,this.colorBuffer),r.enableVertexAttribute(n,this.sphereBuffer),n.uniformMatrix4fv(r.x3d_ProjectionMatrix,!1,this.projectionMatrixArray),n.uniformMatrix4fv(r.x3d_ModelViewMatrix,!1,this.modelViewMatrixArray),t?n.enable(n.BLEND):n.disable(n.BLEND),n.drawArrays(n.TRIANGLES,0,this.sphereCount),r.disableColorAttribute(n))},drawCube:function(){const e=new Float32Array(a.Identity),t=new Float32Array([1,1,1]);return function(i){const n=i.getBrowser(),r=n.getContext(),o=n.getUnlitShader();o.getValid()&&(o.enable(r),o.setLocalObjects(r,this.localObjects),o.enableTexCoordAttribute(r,this.texCoordBuffers),r.uniform1i(o.x3d_FogType,0),r.uniform1i(o.x3d_FillPropertiesFilled,!0),r.uniform1i(o.x3d_FillPropertiesHatched,!1),r.uniform1i(o.x3d_ColorMaterial,!1),r.uniform3fv(o.x3d_EmissiveColor,t),r.uniform1i(o.x3d_EmissiveTexture.textureType,0),r.uniform1f(o.x3d_Transparency,0),r.uniform1i(o.x3d_NumTextures,1),r.uniform1i(o.x3d_TextureCoordinateGeneratorMode[0],0),r.uniform1i(o.x3d_NumProjectiveTextures,0),r.uniformMatrix4fv(o.x3d_TextureMatrix[0],!1,e),r.uniformMatrix4fv(o.x3d_ProjectionMatrix,!1,this.projectionMatrixArray),r.uniformMatrix4fv(o.x3d_ModelViewMatrix,!1,this.modelViewMatrixArray),this.drawRectangle(r,n,o,i,this.frontTexture,this.frontBuffer),this.drawRectangle(r,n,o,i,this.backTexture,this.backBuffer),this.drawRectangle(r,n,o,i,this.leftTexture,this.leftBuffer),this.drawRectangle(r,n,o,i,this.rightTexture,this.rightBuffer),this.drawRectangle(r,n,o,i,this.topTexture,this.topBuffer),this.drawRectangle(r,n,o,i,this.bottomTexture,this.bottomBuffer),o.disableTexCoordAttribute(r))}}(),drawRectangle:function(e,t,n,r,o,s){o&&(o.checkLoadState()===i.COMPLETE_STATE||o.getData())&&(o.setShaderUniforms(e,n,r),o._transparent.getValue()?e.enable(e.BLEND):e.disable(e.BLEND),n.enableVertexAttribute(e,s),e.drawArrays(e.TRIANGLES,0,6),t.resetTextureUnits())}}),S})),define("x_ite/Components/Texturing/X3DTextureNode",["x_ite/Fields","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(n){t.call(this,n),this.addType(i.X3DTextureNode),this.addChildObjects("transparent",new e.SFBool),this._transparent.setAccessType(i.outputOnly)}return n.prototype=Object.assign(Object.create(t.prototype),{constructor:n,setTransparent:function(e){e!==this._transparent.getValue()&&(this._transparent=e)},getTransparent:function(){return this._transparent.getValue()}}),n})),define("x_ite/Components/Texturing/X3DSingleTextureNode",["x_ite/Components/Texturing/X3DTextureNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast","x_ite/Browser/Texturing/MultiTextureModeType","x_ite/Browser/Texturing/MultiTextureSourceType","x_ite/Browser/Texturing/MultiTextureFunctionType"],(function(e,t,i,n,r,o){"use strict";function s(i){e.call(this,i),this.addType(t.X3DSingleTextureNode)}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,initialize:function(){e.prototype.initialize.call(this),this._textureProperties.addInterest("set_textureProperties__",this);const t=this.getBrowser().getContext();this.texture=t.createTexture(),this.set_textureProperties__()},set_textureProperties__:function(){this.texturePropertiesNode&&this.texturePropertiesNode.removeInterest("updateTextureProperties",this),this.texturePropertiesNode=i(t.TextureProperties,this._textureProperties),this.texturePropertiesNode||(this.texturePropertiesNode=this.getBrowser().getDefaultTextureProperties()),this.texturePropertiesNode.addInterest("updateTextureProperties",this),this.updateTextureProperties()},getTexture:function(){return this.texture},updateTextureProperties:function(){const e=["EXT_texture_filter_anisotropic","MOZ_EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"];return function(t,i,n,r,o,s,a,u){const l=this.getBrowser().getContext();l.bindTexture(t,this.getTexture()),Math.max(r,o)<this.getBrowser().getMinTextureSize()&&!i?(l.texParameteri(t,l.TEXTURE_MIN_FILTER,l.NEAREST),l.texParameteri(t,l.TEXTURE_MAG_FILTER,l.NEAREST)):(n._generateMipMaps.getValue()&&l.generateMipmap(t),l.texParameteri(t,l.TEXTURE_MIN_FILTER,l[n.getMinificationFilter()]),l.texParameteri(t,l.TEXTURE_MAG_FILTER,l[n.getMagnificationFilter()])),i?(l.texParameteri(t,l.TEXTURE_WRAP_S,l[n.getBoundaryModeS()]),l.texParameteri(t,l.TEXTURE_WRAP_T,l[n.getBoundaryModeT()]),l.getVersion()>=2&&l.texParameteri(t,l.TEXTURE_WRAP_R,l[n.getBoundaryModeR()])):(l.texParameteri(t,l.TEXTURE_WRAP_S,s?l.REPEAT:l.CLAMP_TO_EDGE),l.texParameteri(t,l.TEXTURE_WRAP_T,a?l.REPEAT:l.CLAMP_TO_EDGE),l.getVersion()>=2&&l.texParameteri(t,l.TEXTURE_WRAP_R,u?l.REPEAT:l.CLAMP_TO_EDGE));for(const i of e){const e=l.getExtension(i);if(e){l.texParameterf(t,e.TEXTURE_MAX_ANISOTROPY_EXT,n._anisotropicDegree.getValue());break}}}}(),setShaderUniforms:function(e,t,i){this.setShaderUniformsToChannel(e,t,i,t.x3d_Textures[0]),e.uniform1i(t.x3d_NumTextures,1),e.uniform1i(t.x3d_MultiTextureMode[0],n.MODULATE),e.uniform1i(t.x3d_MultiTextureAlphaMode[0],n.MODULATE),e.uniform1i(t.x3d_MultiTextureSource[0],r.DEFAULT),e.uniform1i(t.x3d_MultiTextureFunction[0],o.DEFAULT)}}),s})),define("x_ite/Components/Texturing/X3DTexture2DNode",["x_ite/Components/Texturing/X3DSingleTextureNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";const i=new Uint8Array([255,255,255,255]);function n(i){e.call(this,i),this.addType(t.X3DTexture2DNode);const n=this.getBrowser().getContext();this.target=n.TEXTURE_2D,this.width=0,this.height=0,this.flipY=!1,this.data=null}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,initialize:function(){e.prototype.initialize.call(this),this._repeatS.addInterest("updateTextureProperties",this),this._repeatT.addInterest("updateTextureProperties",this);const t=this.getBrowser().getContext();t.bindTexture(t.TEXTURE_2D,this.getTexture()),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i)},getTarget:function(){return this.target},getTextureType:function(){return 2},getTextureTypeString:function(){return"2D"},getWidth:function(){return this.width},getHeight:function(){return this.height},getFlipY:function(){return this.flipY},getData:function(){return this.data},clearTexture:function(){this.setTexture(1,1,!1,i,!1),this.data=null},setTexture:function(e,t,i,n,r){try{this.width=e,this.height=t,this.flipY=r,this.data=n;const o=this.getBrowser().getContext();o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,r),o.pixelStorei(o.UNPACK_ALIGNMENT,1),o.bindTexture(o.TEXTURE_2D,this.getTexture()),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,e,t,0,o.RGBA,o.UNSIGNED_BYTE,n),this.setTransparent(i),this.updateTextureProperties(),this.addNodeEvent()}catch(e){}},updateTexture:function(e,t){try{this.data=e;const i=this.getBrowser().getContext();i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,t),i.bindTexture(i.TEXTURE_2D,this.getTexture()),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,e),this.texturePropertiesNode._generateMipMaps.getValue()&&i.generateMipmap(i.TEXTURE_2D),this.addNodeEvent()}catch(e){}},updateTextureProperties:function(){e.prototype.updateTextureProperties.call(this,this.target,this._textureProperties.getValue(),this.texturePropertiesNode,this.width,this.height,this._repeatS.getValue(),this._repeatT.getValue(),!1)},setShaderUniformsToChannel:function(e,t,i,n){const r=i.getBrowser().getTexture2DUnit();e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.getTexture()),e.uniform1i(n.textureType,2),e.uniform1i(n.texture2D,r)}}),n})),define("x_ite/Components/Texturing/ImageTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","standard/Math/Algorithm","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){r.call(this,e),o.call(this,e),this.addType(s.ImageTexture),this.urlStack=new t.MFString}return l.prototype=Object.assign(Object.create(r.prototype),o.prototype,{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(s.inputOutput,"metadata",new t.SFNode),new i(s.inputOutput,"description",new t.SFString),new i(s.inputOutput,"load",new t.SFBool(!0)),new i(s.inputOutput,"url",new t.MFString),new i(s.inputOutput,"autoRefresh",new t.SFTime),new i(s.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(s.initializeOnly,"repeatS",new t.SFBool(!0)),new i(s.initializeOnly,"repeatT",new t.SFBool(!0)),new i(s.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"ImageTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),o.prototype.initialize.call(this),this.canvas=e("<canvas></canvas>"),this.image=e("<img></img>"),this.image.on("load",this.setImage.bind(this)),this.image.on("error",this.setError.bind(this)),this.image.bind("abort",this.setError.bind(this)),this.image[0].crossOrigin="Anonymous",this.requestImmediateLoad()},unloadNow:function(){this.clearTexture()},loadNow:function(){this.urlStack.setValue(this._url),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.clearTexture(),void this.setLoadState(s.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.image.attr("src",this.URL.href)},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading image:",decodeURI(this.URL.href)),this.loadNext()},setImage:function(){u&&"data:"!==this.URL.protocol&&console.info("Done loading image:",decodeURI(this.URL.href));try{const e=this.getBrowser().getContext(),t=this.image[0],i=this.canvas[0],n=i.getContext("2d");let r=t.width,o=t.height;e.getVersion()>=2||a.isPowerOfTwo(r)&&a.isPowerOfTwo(o)?(i.width=r,i.height=o,n.clearRect(0,0,r,o),n.save(),n.translate(0,o),n.scale(1,-1),n.drawImage(t,0,0),n.restore()):(r=a.nextPowerOfTwo(r),o=a.nextPowerOfTwo(o),i.width=r,i.height=o,n.clearRect(0,0,r,o),n.save(),n.translate(0,o),n.scale(1,-1),n.drawImage(t,0,0,t.width,t.height,0,0,r,o),n.restore());const u=n.getImageData(0,0,r,o).data;let l=!1;for(let e=3,t=u.length;e<t;e+=4)if(255!==u[e]){l=!0;break}this.setTexture(r,o,l,new Uint8Array(u.buffer),!1),this.setLoadState(s.COMPLETE_STATE)}catch(e){console.log(e.message),this.setError()}}}),l})),define("x_ite/Components/EnvironmentalEffects/Background",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalEffects/X3DBackgroundNode","x_ite/Components/Texturing/ImageTexture","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.Background)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"frontUrl",new e.MFString),new t(o.inputOutput,"backUrl",new e.MFString),new t(o.inputOutput,"leftUrl",new e.MFString),new t(o.inputOutput,"rightUrl",new e.MFString),new t(o.inputOutput,"topUrl",new e.MFString),new t(o.inputOutput,"bottomUrl",new e.MFString),new t(o.inputOutput,"skyAngle",new e.MFFloat),new t(o.inputOutput,"skyColor",new e.MFColor(new e.SFColor)),new t(o.inputOutput,"groundAngle",new e.MFFloat),new t(o.inputOutput,"groundColor",new e.MFColor),new t(o.inputOutput,"transparency",new e.SFFloat),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"Background"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this);const e=new r(this.getExecutionContext()),t=new r(this.getExecutionContext()),i=new r(this.getExecutionContext()),o=new r(this.getExecutionContext()),s=new r(this.getExecutionContext()),a=new r(this.getExecutionContext()),u=this.getBrowser().getBackgroundTextureProperties();this._frontUrl.addFieldInterest(e._url),this._backUrl.addFieldInterest(t._url),this._leftUrl.addFieldInterest(i._url),this._rightUrl.addFieldInterest(o._url),this._topUrl.addFieldInterest(s._url),this._bottomUrl.addFieldInterest(a._url),e._url=this._frontUrl,t._url=this._backUrl,i._url=this._leftUrl,o._url=this._rightUrl,s._url=this._topUrl,a._url=this._bottomUrl,e._textureProperties=u,t._textureProperties=u,i._textureProperties=u,o._textureProperties=u,s._textureProperties=u,a._textureProperties=u,e.setup(),t.setup(),i.setup(),o.setup(),s.setup(),a.setup(),this.set_frontTexture__(e),this.set_backTexture__(t),this.set_leftTexture__(i),this.set_rightTexture__(o),this.set_topTexture__(s),this.set_bottomTexture__(a)}}),s})),define("x_ite/Components/Layering/X3DLayerNode",["x_ite/Components/Core/X3DNode","x_ite/Rendering/X3DRenderObject","x_ite/Components/Layering/X3DViewportNode","x_ite/Execution/BindableStack","x_ite/Execution/BindableList","x_ite/Components/Navigation/NavigationInfo","x_ite/Components/EnvironmentalEffects/Fog","x_ite/Components/EnvironmentalEffects/Background","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/Camera","standard/Math/Geometry/Box3","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f){"use strict";var g=new f;function m(i,u,l){e.call(this,i),t.call(this,i),this.addType(c.X3DLayerNode),this.groupNode=l,this.currentViewport=null,this.defaultNavigationInfo=new o(i),this.defaultViewpoint=u,this.defaultBackground=new a(i),this.defaultFog=new s(i),this.navigationInfoStack=new n(i,this.defaultNavigationInfo),this.viewpointStack=new n(i,this.defaultViewpoint),this.backgroundStack=new n(i,this.defaultBackground),this.fogStack=new n(i,this.defaultFog),this.navigationInfos=new r(i,this.defaultNavigationInfo),this.viewpoints=new r(i,this.defaultViewpoint),this.backgrounds=new r(i,this.defaultBackground),this.fogs=new r(i,this.defaultFog),this.defaultBackground.setHidden(!0),this.defaultFog.setHidden(!0),this.collisionTime=0}return m.prototype=Object.assign(Object.create(e.prototype),t.prototype,{constructor:m,layer0:!1,initialize:function(){e.prototype.initialize.call(this),t.prototype.initialize.call(this),this.defaultNavigationInfo.setup(),this.defaultViewpoint.setup(),this.defaultBackground.setup(),this.defaultFog.setup(),this.navigationInfoStack.setup(),this.viewpointStack.setup(),this.backgroundStack.setup(),this.fogStack.setup(),this.navigationInfos.setup(),this.viewpoints.setup(),this.backgrounds.setup(),this.fogs.setup(),this._viewport.addInterest("set_viewport__",this),this.set_viewport__()},isLayer0:function(e){this.layer0=e,this.defaultBackground.setHidden(!e)},getLayer:function(){return this},getGroup:function(){return this.groupNode},getViewport:function(){return this.currentViewport},getBackground:function(){return this.backgroundStack.top()},getFog:function(){return this.fogStack.top()},getNavigationInfo:function(){return this.navigationInfoStack.top()},getViewpoint:function(){return this.viewpointStack.top()},getBackgrounds:function(){return this.backgrounds},getFogs:function(){return this.fogs},getNavigationInfos:function(){return this.navigationInfos},getViewpoints:function(){return this.viewpoints},getUserViewpoints:function(){for(var e=[],t=0;t<this.viewpoints.get().length;++t){var i=this.viewpoints.get()[t];i._description.length&&e.push(i)}return e},getBackgroundStack:function(){return this.backgroundStack},getFogStack:function(){return this.fogStack},getNavigationInfoStack:function(){return this.navigationInfoStack},getViewpointStack:function(){return this.viewpointStack},getBBox:function(e,t){return this.groupNode.getBBox(e,t)},lookAt:function(e,t){this.getViewpoint().lookAtBBox(this.getBBox(new d),e,t)},set_viewport__:function(){this.currentViewport=u(c.X3DViewportNode,this._viewport),this.currentViewport||(this.currentViewport=this.getBrowser().getDefaultViewport())},bind:function(e){this.traverse(l.CAMERA,this);const t=this.navigationInfos.getBound(),i=this.backgrounds.getBound(),n=this.fogs.getBound(),r=this.viewpoints.getBound(e);this.navigationInfoStack.pushOnTop(t),this.viewpointStack.pushOnTop(r),this.backgroundStack.pushOnTop(i),this.fogStack.pushOnTop(n),r.resetUserOffsets()},traverse:function(e,t){t=t||this;var i=this.getViewpoint();switch(this.getProjectionMatrix().pushMatrix(i.getProjectionMatrix(this)),this.getCameraSpaceMatrix().pushMatrix(i.getCameraSpaceMatrix()),this.getViewMatrix().pushMatrix(i.getViewMatrix()),e){case l.POINTER:this.pointer(e,t);break;case l.CAMERA:this.camera(e,t);break;case l.PICKING:this.picking(e,t);break;case l.COLLISION:this.collision(e,t);break;case l.SHADOW:case l.DISPLAY:this.display(e,t)}this.getViewMatrix().pop(),this.getCameraSpaceMatrix().pop(),this.getProjectionMatrix().pop()},pointer:function(e,t){if(this._isPickable.getValue()){var i=this.getBrowser(),n=this.currentViewport.getRectangle(i);if(i.getSelectedLayer()){if(i.getSelectedLayer()!==this)return}else if(!i.isPointerInRectangle(n))return;i.setHitRay(this.getProjectionMatrix().get(),n),this.getModelViewMatrix().pushMatrix(this.getViewMatrix().get()),this.currentViewport.push(this),this.groupNode.traverse(e,t),this.currentViewport.pop(this),this.getModelViewMatrix().pop()}},camera:function(e,t){this.getModelViewMatrix().pushMatrix(f.Identity),this.currentViewport.push(this),this.groupNode.traverse(e,t),this.currentViewport.pop(this),this.getModelViewMatrix().pop(),this.navigationInfos.update(this,this.navigationInfoStack),this.viewpoints.update(this,this.viewpointStack),this.backgrounds.update(this,this.backgroundStack),this.fogs.update(this,this.fogStack),this.getViewpoint().update()},picking:function(e,t){this.getModelViewMatrix().pushMatrix(f.Identity),this.currentViewport.push(this),this.groupNode.traverse(e,t),this.currentViewport.pop(this),this.getModelViewMatrix().pop()},collision:function(e,t){var i=this.getNavigationInfo();if(!i._transitionActive.getValue()){var n=i.getCollisionRadius(),r=i.getAvatarHeight(),o=Math.max(2*n,2*r);this.collisionTime=0,h.ortho(-o,o,-o,o,-o,o,g),this.getProjectionMatrix().pushMatrix(g),this.getModelViewMatrix().pushMatrix(this.getViewMatrix().get()),this.currentViewport.push(this),t.render(e,this.groupNode.traverse,this.groupNode),this.currentViewport.pop(this),this.getModelViewMatrix().pop(),this.getProjectionMatrix().pop()}},display:function(e,t){this.getNavigationInfo().enable(e,t),this.getModelViewMatrix().pushMatrix(this.getViewMatrix().get()),this.currentViewport.push(this),t.render(e,this.groupNode.traverse,this.groupNode),this.currentViewport.pop(this),this.getModelViewMatrix().pop()}}),m})),define("x_ite/Components/Navigation/Viewpoint",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Navigation/X3DViewpointNode","x_ite/Components/Interpolation/ScalarInterpolator","x_ite/Base/X3DConstants","standard/Math/Geometry/Camera","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),this.addType(o.Viewpoint),this._position.setUnit("length"),this._centerOfRotation.setUnit("length"),this._fieldOfView.setUnit("angle"),this.projectionMatrix=new l,this.fieldOfViewInterpolator=new r(this.getBrowser().getPrivateScene())}var h,d;return c.prototype=Object.assign(Object.create(n.prototype),{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"description",new e.SFString),new t(o.inputOutput,"position",new e.SFVec3f(0,0,10)),new t(o.inputOutput,"orientation",new e.SFRotation),new t(o.inputOutput,"centerOfRotation",new e.SFVec3f),new t(o.inputOutput,"fieldOfView",new e.SFFloat(.7854)),new t(o.inputOutput,"jump",new e.SFBool(!0)),new t(o.inputOutput,"retainUserOffsets",new e.SFBool),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime)]),getTypeName:function(){return"Viewpoint"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.fieldOfViewInterpolator._key=new e.MFFloat(0,1),this.fieldOfViewInterpolator.setup(),this.getEaseInEaseOut()._modifiedFraction_changed.addFieldInterest(this.fieldOfViewInterpolator._set_fraction),this.fieldOfViewInterpolator._value_changed.addFieldInterest(this._fieldOfViewScale)},setInterpolators:function(t,i){if(t.getType().indexOf(o.Viewpoint)>=0){const n=t.getFieldOfView()/i.getFieldOfView();this.fieldOfViewInterpolator._keyValue=new e.MFFloat(n,i._fieldOfViewScale.getValue()),this._fieldOfViewScale=n}else this.fieldOfViewInterpolator._keyValue=new e.MFFloat(i._fieldOfViewScale.getValue(),i._fieldOfViewScale.getValue()),this._fieldOfViewScale=i._fieldOfViewScale.getValue()},getFieldOfView:function(){var e=this._fieldOfView.getValue()*this._fieldOfViewScale.getValue();return e>0&&e<Math.PI?e:Math.PI/4},getScreenScale:(d=new u(0,0,0),function(e,t){var i=t[2],n=t[3],r=Math.abs(e.z)*Math.tan(this.getFieldOfView()/2)*2;return r/=i>n?n:i,d.set(r,r,r)}),getViewportSize:(h=new a(0,0),function(e,t){var i=e[2],n=e[3],r=t*Math.tan(this.getFieldOfView()/2)*2,o=i/n;return o>1?h.set(r*o,r):h.set(r,r/o)}),getLookAtDistance:function(e){return e.size.abs()/2/Math.tan(this.getFieldOfView()/2)},getProjectionMatrixWithLimits:function(e,t,i){return s.perspective(this.getFieldOfView(),e,t,i[2],i[3],this.projectionMatrix)}}),c})),define("x_ite/Components/Grouping/Group",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Group)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Group"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"}}),o})),define("x_ite/Components/Layering/Layer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Layering/X3DLayerNode","x_ite/Components/Navigation/Viewpoint","x_ite/Components/Grouping/Group","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e,new r(e),new o(e)),this.addType(s.Layer)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"isPickable",new e.SFBool(!0)),new t(s.inputOutput,"viewport",new e.SFNode),new t(s.inputOnly,"addChildren",new e.MFNode),new t(s.inputOnly,"removeChildren",new e.MFNode),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Layer"},getComponentName:function(){return"Layering"},getContainerField:function(){return"layers"},initialize:function(){n.prototype.initialize.call(this),this._addChildren.addFieldInterest(this.getGroup()._addChildren),this._removeChildren.addFieldInterest(this.getGroup()._removeChildren),this._children.addFieldInterest(this.getGroup()._children),this.getGroup()._children=this._children,this.getGroup().setPrivate(!0),this.getGroup().setup()}}),a})),define("x_ite/Components/Layering/LayerSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Layering/Layer","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(a.LayerSet),this.layerNodes=[new r(e)],this.layerNode0=this.layerNodes[0],this.activeLayerNode=null}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(a.inputOutput,"metadata",new e.SFNode),new t(a.inputOutput,"activeLayer",new e.SFInt32),new t(a.inputOutput,"order",new e.MFInt32(0)),new t(a.inputOutput,"layers",new e.MFNode)]),getTypeName:function(){return"LayerSet"},getComponentName:function(){return"Layering"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.layerNode0.setPrivate(!0),this.layerNode0.setup(),this.layerNode0.isLayer0(!0),this._activeLayer.addInterest("set_activeLayer",this),this._order.addInterest("set_layers",this),this._layers.addInterest("set_layers",this),this.set_layers()},getActiveLayer:function(){return this.activeLayerNode},setLayer0:function(e){this.layerNode0=e,this.set_layers()},getLayer0:function(){return this.layerNode0},getLayers:function(){return this.layerNodes},set_activeLayer:function(){if(0===this._activeLayer.getValue())this.activeLayerNode!==this.layerNode0&&(this.activeLayerNode=this.layerNode0);else{const e=this._activeLayer-1;e>=0&&e<this._layers.length?this.activeLayerNode!==this._layers[e].getValue()&&(this.activeLayerNode=o(a.X3DLayerNode,this._layers[e])):null!==this.activeLayerNode&&(this.activeLayerNode=null)}},set_layers:function(){const e=this._layers.getValue();this.layerNodes.length=0;for(let t of this._order)if(0===t)this.layerNodes.push(this.layerNode0);else if(--t,t>=0&&t<e.length){const i=o(a.X3DLayerNode,e[t]);i&&this.layerNodes.push(i)}this.set_activeLayer()},bind:function(e){const t=this._layers.getValue();this.layerNode0.bind(e);for(let i=0,n=t.length;i<n;++i){const n=o(a.X3DLayerNode,t[i]);n&&n.bind(e)}},traverse:function(e,t){const i=this.layerNodes;if(e===s.POINTER)for(let n=0,r=i.length;n<r;++n)this.getBrowser().setLayerNumber(n),i[n].traverse(e,t);else for(const n of i)n.traverse(e,t)}}),u})),define("x_ite/Execution/X3DWorld",["x_ite/Configuration/SupportedNodes","x_ite/Fields/SFNode","x_ite/Base/X3DBaseNode","x_ite/Components/Layering/LayerSet","x_ite/Components/Layering/Layer","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){i.call(this,e),this.addType(s.X3DWorld),this.addChildObjects("activeLayer",new t(this.layer0)),this.defaultLayerSet=new n(e),this.layerSet=this.defaultLayerSet,this.layer0=new r(e)}e.addAbstractType("X3DWorld",a),a.prototype=Object.assign(Object.create(i.prototype),{constructor:a,getTypeName:function(){return"X3DWorld"},initialize:function(){i.prototype.initialize.call(this),this.layerSet.setPrivate(!0),this.layerSet.setup(),this.layerSet.setLayer0(this.layer0),this.layerSet._activeLayer.addInterest("set_rootNodes__",this),this.getExecutionContext().getRootNodes().addInterest("set_rootNodes__",this),this.set_rootNodes__(),this.layer0.setPrivate(!0),this.layer0.isLayer0(!0),this.layer0.setup(),this.set_activeLayer__()},getCache:function(){return!0},getLayerSet:function(){return this.layerSet},getActiveLayer:function(){return this._activeLayer.getValue()},set_rootNodes__:function(){const e=this.layerSet,t=this.getExecutionContext().getRootNodes();this.layerSet=this.defaultLayerSet,this.layer0._children=t;for(const e of t){const t=o(s.LayerSet,e);t&&(this.layerSet=t)}this.layerSet!==e&&(this.layerSet.setLayer0(this.layer0),e._activeLayer.removeInterest("set_activeLayer__",this),this.layerSet._activeLayer.addInterest("set_activeLayer__",this),this.set_activeLayer__())},set_activeLayer__:function(){this._activeLayer=this.layerSet.getActiveLayer()},bind:function(){const e=this.getExecutionContext().getWorldURL();this.layerSet.bind(decodeURIComponent(new URL(e,e).hash.substr(1)))},traverse:function(e,t){this.layerSet.traverse(e,t)}});for(const e of Reflect.ownKeys(a.prototype))Object.defineProperty(a.prototype,e,{enumerable:!1});return a})),define("standard/Networking/BinaryTransport",[],(function(){"use strict";return function(e){e.ajaxTransport("+binary",(function(e,t,i){if(e.dataType&&"binary"==e.dataType)return{send:function(t,i){const n=e.xhr();if(n.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(const t in e.xhrFields)n[t]=e.xhrFields[t];e.mimeType&&n.overrideMimeType&&n.overrideMimeType(e.mimeType);for(const e in t)n.setRequestHeader(e,t[e]);n.onload=function(){n.onload=n.onerror=null;const t={};t[e.dataType]=n.response,i(n.status||200,n.statusText,t,n.getAllResponseHeaders())},n.onerror=function(){n.onload=n.onerror=null,i(n.status||404,n.statusText)},n.responseType=e.responseType||"blob",n.send(e.hasContent&&e.data||null)},abort:function(){const t=e.xhr();t.onload=t.onerror=null,t.abort()}}}))}})),
|
|
70
70
|
/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */
|
|
71
71
|
function(e,t){"object"==typeof exports&&void 0!==module?t(exports):"function"==typeof define&&define.amd?define("pako_inflate/dist/pako_inflate",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).pako={})}(this,(function(e){"use strict";var t=(e,t,i,n)=>{let r=65535&e|0,o=e>>>16&65535|0,s=0;for(;0!==i;){s=i>2e3?2e3:i,i-=s;do{r=r+t[n++]|0,o=o+r|0}while(--s);r%=65521,o%=65521}return r|o<<16|0};const i=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var n=(e,t,n,r)=>{const o=i,s=r+n;e^=-1;for(let i=r;i<s;i++)e=e>>>8^o[255&(e^t[i])];return-1^e};var r=function(e,t){let i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w,b,v,S,T,C;const N=e.state;i=e.next_in,T=e.input,n=i+(e.avail_in-5),r=e.next_out,C=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),a=N.dmax,u=N.wsize,l=N.whave,c=N.wnext,h=N.window,d=N.hold,p=N.bits,f=N.lencode,g=N.distcode,m=(1<<N.lenbits)-1,_=(1<<N.distbits)-1;e:do{p<15&&(d+=T[i++]<<p,p+=8,d+=T[i++]<<p,p+=8),y=f[d&m];t:for(;;){if(x=y>>>24,d>>>=x,p-=x,x=y>>>16&255,0===x)C[r++]=65535&y;else{if(!(16&x)){if(0==(64&x)){y=f[(65535&y)+(d&(1<<x)-1)];continue t}if(32&x){N.mode=12;break e}e.msg="invalid literal/length code",N.mode=30;break e}w=65535&y,x&=15,x&&(p<x&&(d+=T[i++]<<p,p+=8),w+=d&(1<<x)-1,d>>>=x,p-=x),p<15&&(d+=T[i++]<<p,p+=8,d+=T[i++]<<p,p+=8),y=g[d&_];i:for(;;){if(x=y>>>24,d>>>=x,p-=x,x=y>>>16&255,!(16&x)){if(0==(64&x)){y=g[(65535&y)+(d&(1<<x)-1)];continue i}e.msg="invalid distance code",N.mode=30;break e}if(b=65535&y,x&=15,p<x&&(d+=T[i++]<<p,p+=8,p<x&&(d+=T[i++]<<p,p+=8)),b+=d&(1<<x)-1,b>a){e.msg="invalid distance too far back",N.mode=30;break e}if(d>>>=x,p-=x,x=r-o,b>x){if(x=b-x,x>l&&N.sane){e.msg="invalid distance too far back",N.mode=30;break e}if(v=0,S=h,0===c){if(v+=u-x,x<w){w-=x;do{C[r++]=h[v++]}while(--x);v=r-b,S=C}}else if(c<x){if(v+=u+c-x,x-=c,x<w){w-=x;do{C[r++]=h[v++]}while(--x);if(v=0,c<w){x=c,w-=x;do{C[r++]=h[v++]}while(--x);v=r-b,S=C}}}else if(v+=c-x,x<w){w-=x;do{C[r++]=h[v++]}while(--x);v=r-b,S=C}for(;w>2;)C[r++]=S[v++],C[r++]=S[v++],C[r++]=S[v++],w-=3;w&&(C[r++]=S[v++],w>1&&(C[r++]=S[v++]))}else{v=r-b;do{C[r++]=C[v++],C[r++]=C[v++],C[r++]=C[v++],w-=3}while(w>2);w&&(C[r++]=C[v++],w>1&&(C[r++]=C[v++]))}break}}break}}while(i<n&&r<s);w=p>>3,i-=w,p-=w<<3,d&=(1<<p)-1,e.next_in=i,e.next_out=r,e.avail_in=i<n?n-i+5:5-(i-n),e.avail_out=r<s?s-r+257:257-(r-s),N.hold=d,N.bits=p};const o=15,s=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),a=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),u=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),l=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var c=(e,t,i,n,r,c,h,d)=>{const p=d.bits;let f,g,m,_,y,x,w=0,b=0,v=0,S=0,T=0,C=0,N=0,F=0,O=0,E=0,D=null,M=0;const I=new Uint16Array(16),V=new Uint16Array(16);let B,A,P,R=null,L=0;for(w=0;w<=o;w++)I[w]=0;for(b=0;b<n;b++)I[t[i+b]]++;for(T=p,S=o;S>=1&&0===I[S];S--);if(T>S&&(T=S),0===S)return r[c++]=20971520,r[c++]=20971520,d.bits=1,0;for(v=1;v<S&&0===I[v];v++);for(T<v&&(T=v),F=1,w=1;w<=o;w++)if(F<<=1,F-=I[w],F<0)return-1;if(F>0&&(0===e||1!==S))return-1;for(V[1]=0,w=1;w<o;w++)V[w+1]=V[w]+I[w];for(b=0;b<n;b++)0!==t[i+b]&&(h[V[t[i+b]]++]=b);if(0===e?(D=R=h,x=19):1===e?(D=s,M-=257,R=a,L-=257,x=256):(D=u,R=l,x=-1),E=0,b=0,w=v,y=c,C=T,N=0,m=-1,O=1<<T,_=O-1,1===e&&O>852||2===e&&O>592)return 1;for(;;){B=w-N,h[b]<x?(A=0,P=h[b]):h[b]>x?(A=R[L+h[b]],P=D[M+h[b]]):(A=96,P=0),f=1<<w-N,g=1<<C,v=g;do{g-=f,r[y+(E>>N)+g]=B<<24|A<<16|P|0}while(0!==g);for(f=1<<w-1;E&f;)f>>=1;if(0!==f?(E&=f-1,E+=f):E=0,b++,0==--I[w]){if(w===S)break;w=t[i+h[b]]}if(w>T&&(E&_)!==m){for(0===N&&(N=T),y+=v,C=w-N,F=1<<C;C+N<S&&(F-=I[C+N],!(F<=0));)C++,F<<=1;if(O+=1<<C,1===e&&O>852||2===e&&O>592)return 1;m=E&_,r[m]=T<<24|C<<16|y-c|0}}return 0!==E&&(r[y+E]=w-N<<24|64<<16|0),d.bits=T,0},h={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{Z_FINISH:d,Z_BLOCK:p,Z_TREES:f,Z_OK:g,Z_STREAM_END:m,Z_NEED_DICT:_,Z_STREAM_ERROR:y,Z_DATA_ERROR:x,Z_MEM_ERROR:w,Z_BUF_ERROR:b,Z_DEFLATED:v}=h,S=12,T=30,C=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function N(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const F=e=>{if(!e||!e.state)return y;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,g},O=e=>{if(!e||!e.state)return y;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,F(e)},E=(e,t)=>{let i;if(!e||!e.state)return y;const n=e.state;return t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?y:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,O(e))},D=(e,t)=>{if(!e)return y;const i=new N;e.state=i,i.window=null;const n=E(e,t);return n!==g&&(e.state=null),n};let M,I,V=!0;const B=e=>{if(V){M=new Int32Array(512),I=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(c(1,e.lens,0,288,M,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;c(2,e.lens,0,32,I,0,e.work,{bits:5}),V=!1}e.lencode=M,e.lenbits=9,e.distcode=I,e.distbits=5},A=(e,t,i,n)=>{let r;const o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(t.subarray(i-o.wsize,i),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>n&&(r=n),o.window.set(t.subarray(i-n,i-n+r),o.wnext),(n-=r)?(o.window.set(t.subarray(i-n,i),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0};var P={inflateReset:O,inflateReset2:E,inflateResetKeep:F,inflateInit:e=>D(e,15),inflateInit2:D,inflate:(e,i)=>{let o,s,a,u,l,h,N,F,O,E,D,M,I,V,P,R,L,k,U,X,z,j,G=0;const q=new Uint8Array(4);let H,W;const Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return y;o=e.state,o.mode===S&&(o.mode=13),l=e.next_out,a=e.output,N=e.avail_out,u=e.next_in,s=e.input,h=e.avail_in,F=o.hold,O=o.bits,E=h,D=N,j=g;e:for(;;)switch(o.mode){case 1:if(0===o.wrap){o.mode=13;break}for(;O<16;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(2&o.wrap&&35615===F){o.check=0,q[0]=255&F,q[1]=F>>>8&255,o.check=n(o.check,q,2,0),F=0,O=0,o.mode=2;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&F)<<8)+(F>>8))%31){e.msg="incorrect header check",o.mode=T;break}if((15&F)!==v){e.msg="unknown compression method",o.mode=T;break}if(F>>>=4,O-=4,z=8+(15&F),0===o.wbits)o.wbits=z;else if(z>o.wbits){e.msg="invalid window size",o.mode=T;break}o.dmax=1<<o.wbits,e.adler=o.check=1,o.mode=512&F?10:S,F=0,O=0;break;case 2:for(;O<16;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(o.flags=F,(255&o.flags)!==v){e.msg="unknown compression method",o.mode=T;break}if(57344&o.flags){e.msg="unknown header flags set",o.mode=T;break}o.head&&(o.head.text=F>>8&1),512&o.flags&&(q[0]=255&F,q[1]=F>>>8&255,o.check=n(o.check,q,2,0)),F=0,O=0,o.mode=3;case 3:for(;O<32;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}o.head&&(o.head.time=F),512&o.flags&&(q[0]=255&F,q[1]=F>>>8&255,q[2]=F>>>16&255,q[3]=F>>>24&255,o.check=n(o.check,q,4,0)),F=0,O=0,o.mode=4;case 4:for(;O<16;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}o.head&&(o.head.xflags=255&F,o.head.os=F>>8),512&o.flags&&(q[0]=255&F,q[1]=F>>>8&255,o.check=n(o.check,q,2,0)),F=0,O=0,o.mode=5;case 5:if(1024&o.flags){for(;O<16;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}o.length=F,o.head&&(o.head.extra_len=F),512&o.flags&&(q[0]=255&F,q[1]=F>>>8&255,o.check=n(o.check,q,2,0)),F=0,O=0}else o.head&&(o.head.extra=null);o.mode=6;case 6:if(1024&o.flags&&(M=o.length,M>h&&(M=h),M&&(o.head&&(z=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Uint8Array(o.head.extra_len)),o.head.extra.set(s.subarray(u,u+M),z)),512&o.flags&&(o.check=n(o.check,s,M,u)),h-=M,u+=M,o.length-=M),o.length))break e;o.length=0,o.mode=7;case 7:if(2048&o.flags){if(0===h)break e;M=0;do{z=s[u+M++],o.head&&z&&o.length<65536&&(o.head.name+=String.fromCharCode(z))}while(z&&M<h);if(512&o.flags&&(o.check=n(o.check,s,M,u)),h-=M,u+=M,z)break e}else o.head&&(o.head.name=null);o.length=0,o.mode=8;case 8:if(4096&o.flags){if(0===h)break e;M=0;do{z=s[u+M++],o.head&&z&&o.length<65536&&(o.head.comment+=String.fromCharCode(z))}while(z&&M<h);if(512&o.flags&&(o.check=n(o.check,s,M,u)),h-=M,u+=M,z)break e}else o.head&&(o.head.comment=null);o.mode=9;case 9:if(512&o.flags){for(;O<16;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(F!==(65535&o.check)){e.msg="header crc mismatch",o.mode=T;break}F=0,O=0}o.head&&(o.head.hcrc=o.flags>>9&1,o.head.done=!0),e.adler=o.check=0,o.mode=S;break;case 10:for(;O<32;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}e.adler=o.check=C(F),F=0,O=0,o.mode=11;case 11:if(0===o.havedict)return e.next_out=l,e.avail_out=N,e.next_in=u,e.avail_in=h,o.hold=F,o.bits=O,_;e.adler=o.check=1,o.mode=S;case S:if(i===p||i===f)break e;case 13:if(o.last){F>>>=7&O,O-=7&O,o.mode=27;break}for(;O<3;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}switch(o.last=1&F,F>>>=1,O-=1,3&F){case 0:o.mode=14;break;case 1:if(B(o),o.mode=20,i===f){F>>>=2,O-=2;break e}break;case 2:o.mode=17;break;case 3:e.msg="invalid block type",o.mode=T}F>>>=2,O-=2;break;case 14:for(F>>>=7&O,O-=7&O;O<32;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if((65535&F)!=(F>>>16^65535)){e.msg="invalid stored block lengths",o.mode=T;break}if(o.length=65535&F,F=0,O=0,o.mode=15,i===f)break e;case 15:o.mode=16;case 16:if(M=o.length,M){if(M>h&&(M=h),M>N&&(M=N),0===M)break e;a.set(s.subarray(u,u+M),l),h-=M,u+=M,N-=M,l+=M,o.length-=M;break}o.mode=S;break;case 17:for(;O<14;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(o.nlen=257+(31&F),F>>>=5,O-=5,o.ndist=1+(31&F),F>>>=5,O-=5,o.ncode=4+(15&F),F>>>=4,O-=4,o.nlen>286||o.ndist>30){e.msg="too many length or distance symbols",o.mode=T;break}o.have=0,o.mode=18;case 18:for(;o.have<o.ncode;){for(;O<3;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}o.lens[Y[o.have++]]=7&F,F>>>=3,O-=3}for(;o.have<19;)o.lens[Y[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,H={bits:o.lenbits},j=c(0,o.lens,0,19,o.lencode,0,o.work,H),o.lenbits=H.bits,j){e.msg="invalid code lengths set",o.mode=T;break}o.have=0,o.mode=19;case 19:for(;o.have<o.nlen+o.ndist;){for(;G=o.lencode[F&(1<<o.lenbits)-1],P=G>>>24,R=G>>>16&255,L=65535&G,!(P<=O);){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(L<16)F>>>=P,O-=P,o.lens[o.have++]=L;else{if(16===L){for(W=P+2;O<W;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(F>>>=P,O-=P,0===o.have){e.msg="invalid bit length repeat",o.mode=T;break}z=o.lens[o.have-1],M=3+(3&F),F>>>=2,O-=2}else if(17===L){for(W=P+3;O<W;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}F>>>=P,O-=P,z=0,M=3+(7&F),F>>>=3,O-=3}else{for(W=P+7;O<W;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}F>>>=P,O-=P,z=0,M=11+(127&F),F>>>=7,O-=7}if(o.have+M>o.nlen+o.ndist){e.msg="invalid bit length repeat",o.mode=T;break}for(;M--;)o.lens[o.have++]=z}}if(o.mode===T)break;if(0===o.lens[256]){e.msg="invalid code -- missing end-of-block",o.mode=T;break}if(o.lenbits=9,H={bits:o.lenbits},j=c(1,o.lens,0,o.nlen,o.lencode,0,o.work,H),o.lenbits=H.bits,j){e.msg="invalid literal/lengths set",o.mode=T;break}if(o.distbits=6,o.distcode=o.distdyn,H={bits:o.distbits},j=c(2,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,H),o.distbits=H.bits,j){e.msg="invalid distances set",o.mode=T;break}if(o.mode=20,i===f)break e;case 20:o.mode=21;case 21:if(h>=6&&N>=258){e.next_out=l,e.avail_out=N,e.next_in=u,e.avail_in=h,o.hold=F,o.bits=O,r(e,D),l=e.next_out,a=e.output,N=e.avail_out,u=e.next_in,s=e.input,h=e.avail_in,F=o.hold,O=o.bits,o.mode===S&&(o.back=-1);break}for(o.back=0;G=o.lencode[F&(1<<o.lenbits)-1],P=G>>>24,R=G>>>16&255,L=65535&G,!(P<=O);){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(R&&0==(240&R)){for(k=P,U=R,X=L;G=o.lencode[X+((F&(1<<k+U)-1)>>k)],P=G>>>24,R=G>>>16&255,L=65535&G,!(k+P<=O);){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}F>>>=k,O-=k,o.back+=k}if(F>>>=P,O-=P,o.back+=P,o.length=L,0===R){o.mode=26;break}if(32&R){o.back=-1,o.mode=S;break}if(64&R){e.msg="invalid literal/length code",o.mode=T;break}o.extra=15&R,o.mode=22;case 22:if(o.extra){for(W=o.extra;O<W;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}o.length+=F&(1<<o.extra)-1,F>>>=o.extra,O-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=23;case 23:for(;G=o.distcode[F&(1<<o.distbits)-1],P=G>>>24,R=G>>>16&255,L=65535&G,!(P<=O);){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(0==(240&R)){for(k=P,U=R,X=L;G=o.distcode[X+((F&(1<<k+U)-1)>>k)],P=G>>>24,R=G>>>16&255,L=65535&G,!(k+P<=O);){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}F>>>=k,O-=k,o.back+=k}if(F>>>=P,O-=P,o.back+=P,64&R){e.msg="invalid distance code",o.mode=T;break}o.offset=L,o.extra=15&R,o.mode=24;case 24:if(o.extra){for(W=o.extra;O<W;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}o.offset+=F&(1<<o.extra)-1,F>>>=o.extra,O-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){e.msg="invalid distance too far back",o.mode=T;break}o.mode=25;case 25:if(0===N)break e;if(M=D-N,o.offset>M){if(M=o.offset-M,M>o.whave&&o.sane){e.msg="invalid distance too far back",o.mode=T;break}M>o.wnext?(M-=o.wnext,I=o.wsize-M):I=o.wnext-M,M>o.length&&(M=o.length),V=o.window}else V=a,I=l-o.offset,M=o.length;M>N&&(M=N),N-=M,o.length-=M;do{a[l++]=V[I++]}while(--M);0===o.length&&(o.mode=21);break;case 26:if(0===N)break e;a[l++]=o.length,N--,o.mode=21;break;case 27:if(o.wrap){for(;O<32;){if(0===h)break e;h--,F|=s[u++]<<O,O+=8}if(D-=N,e.total_out+=D,o.total+=D,D&&(e.adler=o.check=o.flags?n(o.check,a,D,l-D):t(o.check,a,D,l-D)),D=N,(o.flags?F:C(F))!==o.check){e.msg="incorrect data check",o.mode=T;break}F=0,O=0}o.mode=28;case 28:if(o.wrap&&o.flags){for(;O<32;){if(0===h)break e;h--,F+=s[u++]<<O,O+=8}if(F!==(4294967295&o.total)){e.msg="incorrect length check",o.mode=T;break}F=0,O=0}o.mode=29;case 29:j=m;break e;case T:j=x;break e;case 31:return w;default:return y}return e.next_out=l,e.avail_out=N,e.next_in=u,e.avail_in=h,o.hold=F,o.bits=O,(o.wsize||D!==e.avail_out&&o.mode<T&&(o.mode<27||i!==d))&&A(e,e.output,e.next_out,D-e.avail_out),E-=e.avail_in,D-=e.avail_out,e.total_in+=E,e.total_out+=D,o.total+=D,o.wrap&&D&&(e.adler=o.check=o.flags?n(o.check,a,D,e.next_out-D):t(o.check,a,D,e.next_out-D)),e.data_type=o.bits+(o.last?64:0)+(o.mode===S?128:0)+(20===o.mode||15===o.mode?256:0),(0===E&&0===D||i===d)&&j===g&&(j=b),j},inflateEnd:e=>{if(!e||!e.state)return y;let t=e.state;return t.window&&(t.window=null),e.state=null,g},inflateGetHeader:(e,t)=>{if(!e||!e.state)return y;const i=e.state;return 0==(2&i.wrap)?y:(i.head=t,t.done=!1,g)},inflateSetDictionary:(e,i)=>{const n=i.length;let r,o,s;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?y:11===r.mode&&(o=1,o=t(o,i,n,0),o!==r.check)?x:(s=A(e,i,n,n),s?(r.mode=31,w):(r.havedict=1,g))):y},inflateInfo:"pako inflate (from Nodeca project)"};const R=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var L=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)R(i,t)&&(e[t]=i[t])}}return e},k=e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,r=e.length;t<r;t++){let r=e[t];i.set(r,n),n+=r.length}return i};let U=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){U=!1}const X=new Uint8Array(256);for(let e=0;e<256;e++)X[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;X[254]=X[254]=1;var z=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,o,s=e.length,a=0;for(r=0;r<s;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<s&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),a+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(a),o=0,r=0;o<a;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<s&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[o++]=i:i<2048?(t[o++]=192|i>>>6,t[o++]=128|63&i):i<65536?(t[o++]=224|i>>>12,t[o++]=128|i>>>6&63,t[o++]=128|63&i):(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63,t[o++]=128|i>>>6&63,t[o++]=128|63&i);return t},j=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,r;const o=new Array(2*i);for(r=0,n=0;n<i;){let t=e[n++];if(t<128){o[r++]=t;continue}let s=X[t];if(s>4)o[r++]=65533,n+=s-1;else{for(t&=2===s?31:3===s?15:7;s>1&&n<i;)t=t<<6|63&e[n++],s--;s>1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&U)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(o,r)},G=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+X[e[i]]>t?i:t},q={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};var H=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};var W=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Y=Object.prototype.toString,{Z_NO_FLUSH:$,Z_FINISH:Z,Z_OK:K,Z_STREAM_END:Q,Z_NEED_DICT:J,Z_STREAM_ERROR:ee,Z_DATA_ERROR:te,Z_MEM_ERROR:ie}=h;function ne(e){this.options=L({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H,this.strm.avail_out=0;let i=P.inflateInit2(this.strm,t.windowBits);if(i!==K)throw new Error(q[i]);if(this.header=new W,P.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=z(t.dictionary):"[object ArrayBuffer]"===Y.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=P.inflateSetDictionary(this.strm,t.dictionary),i!==K)))throw new Error(q[i])}function re(e,t){const i=new ne(t);if(i.push(e),i.err)throw i.msg||q[i.err];return i.result}ne.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize,r=this.options.dictionary;let o,s,a;if(this.ended)return!1;for(s=t===~~t?t:!0===t?Z:$,"[object ArrayBuffer]"===Y.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),o=P.inflate(i,s),o===J&&r&&(o=P.inflateSetDictionary(i,r),o===K?o=P.inflate(i,s):o===te&&(o=J));i.avail_in>0&&o===Q&&i.state.wrap>0&&0!==e[i.next_in];)P.inflateReset(i),o=P.inflate(i,s);switch(o){case ee:case te:case J:case ie:return this.onEnd(o),this.ended=!0,!1}if(a=i.avail_out,i.next_out&&(0===i.avail_out||o===Q))if("string"===this.options.to){let e=G(i.output,i.next_out),t=i.next_out-e,r=j(i.output,e);i.next_out=t,i.avail_out=n-t,t&&i.output.set(i.output.subarray(e,e+t),0),this.onData(r)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(o!==K||0!==a){if(o===Q)return o=P.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},ne.prototype.onData=function(e){this.chunks.push(e)},ne.prototype.onEnd=function(e){e===K&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var oe=ne,se=re,ae=function(e,t){return(t=t||{}).raw=!0,re(e,t)},ue=re,le=h,ce={Inflate:oe,inflate:se,inflateRaw:ae,ungzip:ue,constants:le};e.Inflate=oe,e.constants=le,e.default=ce,e.inflate=se,e.inflateRaw=ae,e.ungzip=ue,Object.defineProperty(e,"__esModule",{value:!0})})),define("pako_inflate",["pako_inflate/dist/pako_inflate"],(function(e){return e})),define("x_ite/InputOutput/FileLoader",["jquery","x_ite/Base/X3DObject","x_ite/Fields","x_ite/Parser/GoldenGate","x_ite/Parser/JSONParser","x_ite/Parser/XMLParser","x_ite/Execution/X3DWorld","standard/Networking/BinaryTransport","pako_inflate","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";a(e);Symbol.for("X_ITE.dom");const c=/^\s*(?:vrmlscript|javascript|ecmascript)\:([^]*)$/,h=/^data:(.*?)(?:;charset=(.*?))?(?:;(base64))?,([^]*)$/,d=/^(?:(.*?);(.*?)$)/,p=new RegExp(".(?:html|xhtml)$"),f={"text/html":!0,"application/xhtml+xml":!0},g=new i.MFString;function m(e,i){t.call(this),this.node=e,this.browser=e.getBrowser(),this.external=void 0===i?this.browser.isExternal():i,this.executionContext=this.external?e.getExecutionContext():this.browser.currentScene,this.userAgent=this.browser.getName()+"/"+this.browser.getVersion()+" (X3D Browser; +"+this.browser.getProviderUrl()+")",this.target="",this.url=[],this.URL=new URL(this.getReferer(),this.getReferer()),this.fileReader=new FileReader,this.text=!0}m.prototype=Object.assign(Object.create(t.prototype),{constructor:m,abort:function(){this.callback=Function.prototype,this.bindViewpoint=Function.prototype,this.foreign=Function.prototype},getWorldURL:function(){return this.URL},createX3DFromString:function(e,t,i,r){try{const o=this.browser.createScene();return this.node instanceof s?o.loader=this:o.setExecutionContext(this.executionContext),o.setWorldURL(decodeURI(new URL(e,this.getReferer()).href)),i&&(i=this.setScene.bind(this,o,i,r)),new n(o).parseIntoScene(t,i,r),o}catch(e){if(!r)throw r;r(e)}},setScene:function(e,t,i){e._initLoadCount.addInterest("set_initLoadCount__",this,e,t,i),e._initLoadCount.addEvent()},set_initLoadCount__:function(e,t,i,n){if(!n.getValue()){e._initLoadCount.removeInterest("set_initLoadCount__",this),delete e.loader;try{t(e)}catch(e){if(!i)throw e;i(e)}l&&"data:"!==this.URL.protocol&&console.info("Done loading scene "+decodeURI(this.URL.href))}},createX3DFromURL:function(e,t,i,n,r){return this.bindViewpoint=n,this.foreign=r,this.target=this.getTarget(t||g),i?this.loadDocument(e,this.createX3DFromURLAsync.bind(this,i)):this.createX3DFromURLSync(e)},createX3DFromURLAsync:function(e,t){null===t?e(null):this.createX3DFromString(this.URL,t,e,this.loadDocumentError.bind(this))},createX3DFromURLSync:function(t){if(0===t.length)throw new Error("No URL given.");let i=null,n=!1;for(const r of t)if(this.URL=new URL(r,this.getReferer()),e.ajax({url:decodeURI(this.URL.href),dataType:"text",async:!1,cache:this.browser.getBrowserOptions().getCache()&&this.node.getCache(),global:!1,context:this,success:function(e){try{i=this.createX3DFromString(this.URL,e),n=!0}catch(e){this.error(e)}},error:function(e,t,i){}}),n)return i;throw new Error("Couldn't load any url of '"+Array.prototype.join.call(t,", ")+"'.")},loadScript:function(e,t){this.script=!0,this.loadDocument(e,t)},loadDocument:function(e,t){if(this.url=e.copy(),this.callback=t,0===e.length)return this.loadDocumentError(new Error("No URL given."));this.loadDocumentAsync(this.url.shift())},loadBinaryDocument:function(e,t){if(this.url=e.copy(),this.callback=t,this.text=!1,0===e.length)return this.loadDocumentError(new Error("No URL given."));this.loadDocumentAsync(this.url.shift())},getTarget:function(e){for(const t of e){const e=t.split("=");if(2===e.length&&"target"===e[0])return e[1]}return""},loadDocumentAsync:function(t){try{if(0===t.length)return void this.loadDocumentError(new Error("URL is empty."));if(this.script){const e=c.exec(t);if(e)return void this.callback(e[1])}{const e=h.exec(t);if(e){let t=e[4];return t="base64"===e[3]?atob(t):unescape(t),void this.callback(t)}}if(this.URL=new URL(t,this.getReferer()),this.bindViewpoint&&this.URL.href.substr(0,this.getReferer().length)===this.getReferer())return void this.bindViewpoint(decodeURIComponent(this.URL.hash.substr(1)));if(this.foreign){if(this.target.length&&"_self"!==this.target)return this.foreign(this.URL.href,this.target);if(this.URL.href.match(p))return this.foreign(this.URL.href,this.target)}e.ajax({url:decodeURI(this.URL.href),dataType:"binary",async:!0,cache:this.browser.getBrowserOptions().getCache()&&this.node.getCache(),global:!1,context:this,success:function(e,t,i){if(this.foreign&&f[this.getContentType(i)])return this.foreign(this.URL.href,this.target);this.text?(this.fileReader.onload=this.readAsArrayBuffer.bind(this,e),this.fileReader.readAsArrayBuffer(e)):(this.fileReader.onload=this.readAsBinaryString.bind(this),this.fileReader.readAsBinaryString(e))},error:function(e,t,i){this.loadDocumentError(new Error(i))}})}catch(e){return void this.loadDocumentError(e)}},readAsArrayBuffer:function(e){try{this.callback(u.ungzip(this.fileReader.result,{to:"string"}))}catch(t){this.fileReader.onload=this.readAsText.bind(this,e),this.fileReader.readAsText(e)}},readAsText:function(e){try{this.callback(this.fileReader.result)}catch(e){this.loadDocumentError(e)}},readAsBinaryString:function(){try{this.callback(this.fileReader.result)}catch(e){this.loadDocumentError(e)}},loadDocumentError:function(e){this.error(e),this.url.length?this.loadDocumentAsync(this.url.shift()):this.callback(null)},error:function(e){"data:"===this.URL.protocol?console.warn("Couldn't load URL 'data':",e.message):console.warn("Couldn't load URL '"+decodeURI(this.URL.href)+"':",e.message),l&&console.error(e)},getReferer:function(){return"X3DWorld"===this.node.getTypeName()&&this.external?this.browser.getLocation():this.executionContext.getWorldURL()},getContentType:function(e){const t=e.getResponseHeader("Content-Type"),i=d.exec(t);return i?i[1]:""}});for(const e of Reflect.ownKeys(m.prototype))Object.defineProperty(m.prototype,e,{enumerable:!1});return m})),define("x_ite/Components/Shaders/ShaderPart",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Browser/Shaders/Shader","x_ite/Components/Core/X3DNode","x_ite/Components/Networking/X3DUrlObject","x_ite/InputOutput/FileLoader","x_ite/Base/X3DConstants","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){r.call(this,e),o.call(this,e),this.addType(a.ShaderPart),this.valid=!1,this.options=[]}return l.prototype=Object.assign(Object.create(r.prototype),o.prototype,{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(a.inputOutput,"metadata",new e.SFNode),new t(a.initializeOnly,"type",new e.SFString("VERTEX")),new t(a.inputOutput,"load",new e.SFBool(!0)),new t(a.inputOutput,"url",new e.MFString),new t(a.inputOutput,"autoRefresh",new e.SFTime),new t(a.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600))]),getTypeName:function(){return"ShaderPart"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"parts"},initialize:function(){r.prototype.initialize.call(this),o.prototype.initialize.call(this);const e=this.getBrowser().getContext();this.shader=e.createShader(e[this.getShaderType()]),this.requestImmediateLoad()},isValid:function(){return this.valid},getShader:function(){return this.shader},getShaderType:function(){const e={VERTEX:"VERTEX_SHADER",TESS_CONTROL:"TESS_CONTROL_SHADER",TESS_EVALUATION:"TESS_EVALUATION_SHADER",GEOMETRY:"GEOMETRY_SHADER",FRAGMENT:"FRAGMENT_SHADER",COMPUTE:"COMPUTE_SHADER"};return function(){const t=e[this._type.getValue()];return t||"VERTEX_SHADER"}}(),getSourceText:function(){return this._url},setOptions:function(e){this.options=e},getOptions:function(){return this.options},unloadNow:function(){this.valid=!1},loadNow:function(){this.valid=!1,new s(this).loadDocument(this._url,function(e){if(null===e)this.setLoadState(a.FAILED_STATE);else{const t=this.getBrowser().getContext(),i=n.getShaderSource(this.getBrowser(),this.getName(),e,this.options);if(t.shaderSource(this.shader,i),t.compileShader(this.shader),this.valid=t.getShaderParameter(this.shader,t.COMPILE_STATUS),!this.valid)throw new Error(this.getTypeName()+" '"+this.getName()+"': "+t.getShaderInfoLog(this.shader));this.setLoadState(a.COMPLETE_STATE)}}.bind(this))}}),l})),define("x_ite/Browser/Shaders/ShaderTest",["x_ite/Rendering/TextureBuffer","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Camera"],(function(e,t,i,n,r){"use strict";return{verify:function(){const t=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1],o=[2,2,0,1,-2,2,0,1,-2,-2,0,1,2,2,0,1,-2,-2,0,1,2,-2,0,1];return function(s,a){const u=s.getContext(),l=new e(s,16,16),c=u.createBuffer(),h=u.createBuffer();l.bind(),a.enable(u),a.setLocalObjects(u,[]),u.bindBuffer(u.ARRAY_BUFFER,h),u.bufferData(u.ARRAY_BUFFER,new Float32Array(o),u.STATIC_DRAW),u.bindBuffer(u.ARRAY_BUFFER,c),u.bufferData(u.ARRAY_BUFFER,new Float32Array(t),u.STATIC_DRAW),u.uniformMatrix4fv(a.x3d_ProjectionMatrix,!1,new Float32Array(r.ortho(-1,1,-1,1,-1,1,new n))),u.uniformMatrix4fv(a.x3d_ModelViewMatrix,!1,new Float32Array(n.Identity)),u.uniformMatrix3fv(a.x3d_NormalMatrix,!1,new Float32Array(i.Identity)),u.uniform1i(a.x3d_FogType,0),u.uniform1f(a.x3d_AlphaCutoff,0),u.uniform1i(a.x3d_FillPropertiesFilled,!0),u.uniform1i(a.x3d_FillPropertiesHatched,!1),u.uniform1i(a.x3d_ColorMaterial,!1),u.uniform1i(a.x3d_NumLights,0),u.uniform1i(a.x3d_NumTextures,0),u.uniform1i(a.x3d_NumProjectiveTextures,0),u.uniform1i(a.x3d_NumClipPlanes,0),u.uniform1f(a.x3d_AmbientIntensity,0),u.uniform3f(a.x3d_DiffuseColor,1,0,0),u.uniform3f(a.x3d_SpecularColor,1,0,0),u.uniform3f(a.x3d_EmissiveColor,1,0,0),u.uniform1f(a.x3d_Shininess,0),u.uniform1f(a.x3d_Transparency,0),u.viewport(0,0,16,16),u.clearColor(0,0,0,0),u.clear(u.COLOR_BUFFER_BIT),u.disable(u.DEPTH_TEST),u.disable(u.BLEND),u.frontFace(u.CCW),u.enable(u.CULL_FACE),u.cullFace(u.BACK),a.enableNormalAttribute(u,c),a.enableVertexAttribute(u,h),u.drawArrays(u.TRIANGLES,0,6),a.disableNormalAttribute(u,c);l.readPixels();return l.unbind(),!0}}()}})),define("x_ite/Browser/Shaders/X3DShadersContext",["x_ite/Browser/Core/Shading","x_ite/Components/Shaders/ComposedShader","x_ite/Components/Shaders/ShaderPart","x_ite/Browser/Shaders/ShaderTest","x_ite/Browser/Networking/urls"],(function(e,t,i,n,r){"use strict";const o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),h=(Symbol(),Symbol()),d=Symbol(),p=(Symbol(),Symbol()),f=(Symbol(),Symbol()),g=Symbol();function m(){this[o]=new Set,this[a]=[]}return m.prototype={initialize:function(){this.setShading(this.getBrowserOptions().getShading())},getShadingLanguageVersion:function(){const e=this.getContext();return e.getParameter(e.SHADING_LANGUAGE_VERSION)},getMaxVertexUniformVectors:function(){const e=this.getContext();return e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)},getMaxFragmentUniformVectors:function(){const e=this.getContext();return e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)},getMaxVertexAttribs:function(){const e=this.getContext();return e.getParameter(e.MAX_VERTEX_ATTRIBS)},addShader:function(e){this[o].add(e),e.setShading(this.getBrowserOptions().getShading())},removeShader:function(e){this[o].delete(e)},getShaders:function(){return this[o]},getDefaultShader:function(){return this[s]},getStandardShaders:function(){return this[a]},getPointShader:function(){return this.getStandardShader("getPointShader",u,"PointShader","Point",[],"set_point_shader_valid__")},getLineShader:function(){return this.getStandardShader("getLineShader",l,"LineShader","Line",[],"set_line_shader_valid__")},getUnlitShader:function(){return this.getStandardShader("getUnlitShader",c,"UnlitShader","Unlit",[],"set_unlit_shader_valid__")},getGouraudShader:function(){return this.getStandardShader("getGouraudShader",h,"GouraudShader","Gouraud",[],"set_gouraud_shader_valid__")},getPhongShader:function(){return this.getStandardShader("getPhongShader",d,"PhongShader","Phong",[],"set_phong_shader_valid__")},getShadowShader:function(){return this.getStandardShader("getShadowShader",f,"ShadowShader","Phong",["X3D_SHADOWS","X3D_PCF_FILTERING"],"set_shadow_shader_valid__")},getPhysicalMaterialShader:function(){return this.getStandardShader("getPhysicalMaterialShader",p,"PhysicalMaterialShader","PBR",[],"set_physical_material_shader_valid__")},getDepthShader:function(){return this[g]=this.createShader("DepthShader","Depth"),this.getDepthShader=function(){return this[g]},Object.defineProperty(this,"getDepthShader",{enumerable:!1}),this[g]},setShading:function(t){if(t===e.PHONG)this[s]=this.getPhongShader();else this[s]=this.getGouraudShader();for(const e of this.getShaders())e.setShading(t)},getStandardShader:function(e,t,i,n,r,o){return this[t]=this.createShader(i,n,r),this[t]._isValid.addInterest(o,this),this[e]=function(){return this[t]},Object.defineProperty(this,e,{enumerable:!1}),this[t]},createShader:function(e,n,o=[]){this.getDebug()&&console.log("Initializing "+e);const s=this.getContext().getVersion(),u=new i(this.getPrivateScene());u.setName(e+"Vertex"),u._url.push(r.getShaderUrl("webgl"+s+"/"+n+".vs")),u.setOptions(o),u.setup();const l=new i(this.getPrivateScene());l.setName(e+"Fragment"),l._type="FRAGMENT",l._url.push(r.getShaderUrl("webgl"+s+"/"+n+".fs")),l.setOptions(o),l.setup();const c=new t(this.getPrivateScene());return c.setName(e),c._language="GLSL",c._parts.push(u),c._parts.push(l),c.setShading(this.getBrowserOptions().getShading()),c.setup(),this[a].push(c),this.addShader(c),c},set_point_shader_valid__:function(){},set_line_shader_valid__:function(){},set_unlit_shader_valid__:function(e){this[c]._isValid.removeInterest("set_unlit_shader_valid__",this),e.getValue()&&n.verify(this,this[c])||(console.error("X_ITE: Unlit shading is not available, using fallback VRML shader."),this[c]._parts[0].url=[r.getShaderUrl("webgl1/FallbackUnlit.vs")],this[c]._parts[1].url=[r.getShaderUrl("webgl1/FallbackUnlit.fs")])},set_gouraud_shader_valid__:function(e){this[h]._isValid.removeInterest("set_gouraud_shader_valid__",this),e.getValue()&&n.verify(this,this[h])||(console.warn("X_ITE: All else fails, using fallback VRML shader."),this[h]._parts[0].url=[r.getShaderUrl("webgl1/Fallback.vs")],this[h]._parts[1].url=[r.getShaderUrl("webgl1/Fallback.fs")])},set_phong_shader_valid__:function(e){this[d]._isValid.removeInterest("set_phong_shader_valid__",this),e.getValue()&&n.verify(this,this[d])||(console.warn("X_ITE: Phong shading is not available, using Gouraud shading."),this[d]=this.getGouraudShader(),this.setShading(this.getBrowserOptions().getShading()))},set_physical_material_shader_valid__:function(e){this[p]._isValid.removeInterest("set_physical_material_shader_valid__",this),e.getValue()&&n.verify(this,this[p])||(console.warn("X_ITE: Physical material shading is not available, using Gouraud shading."),this[p]=this.getGouraudShader(),this.setShading(this.getBrowserOptions().getShading()))},set_shadow_shader_valid__:function(e){this[f]._isValid.removeInterest("set_shadow_shader_valid__",this),e.getValue()&&n.verify(this,this[f])||(console.warn("X_ITE: Shadow shading is not available, using Gouraud shading."),this[f]=this.getGouraudShader())}},m})),function(e,t){"function"==typeof define&&define.amd?define("ResizeSensor/src/ResizeSensor",t):"object"==typeof exports?module.exports=t():e.ResizeSensor=t()}("undefined"!=typeof window?window:this,(function(){if("undefined"==typeof window)return null;var e="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||function(t){return e.setTimeout(t,20)},i=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||function(t){e.clearTimeout(t)};function n(e,t){var i=Object.prototype.toString.call(e),n="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"[object Object]"===i||"undefined"!=typeof jQuery&&e instanceof jQuery||"undefined"!=typeof Elements&&e instanceof Elements,r=0,o=e.length;if(n)for(;r<o;r++)t(e[r]);else t(e)}function r(e){if(!e.getBoundingClientRect)return{width:e.offsetWidth,height:e.offsetHeight};var t=e.getBoundingClientRect();return{width:Math.round(t.width),height:Math.round(t.height)}}function o(e,t){Object.keys(t).forEach((function(i){e.style[i]=t[i]}))}var s=function(e,a){var u=0;function l(){var e,t,i=[];this.add=function(e){i.push(e)},this.call=function(n){for(e=0,t=i.length;e<t;e++)i[e].call(this,n)},this.remove=function(n){var r=[];for(e=0,t=i.length;e<t;e++)i[e]!==n&&r.push(i[e]);i=r},this.length=function(){return i.length}}function c(e,i){if(e)if(e.resizedAttached)e.resizedAttached.add(i);else{e.resizedAttached=new l,e.resizedAttached.add(i),e.resizeSensor=document.createElement("div"),e.resizeSensor.dir="ltr",e.resizeSensor.className="resize-sensor";var n={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},s={position:"absolute",left:"0px",top:"0px",transition:"0s"};o(e.resizeSensor,n);var a=document.createElement("div");a.className="resize-sensor-expand",o(a,n);var c=document.createElement("div");o(c,s),a.appendChild(c);var h=document.createElement("div");h.className="resize-sensor-shrink",o(h,n);var d=document.createElement("div");o(d,s),o(d,{width:"200%",height:"200%"}),h.appendChild(d),e.resizeSensor.appendChild(a),e.resizeSensor.appendChild(h),e.appendChild(e.resizeSensor);var p=window.getComputedStyle(e),f=p?p.getPropertyValue("position"):null;"absolute"!==f&&"relative"!==f&&"fixed"!==f&&"sticky"!==f&&(e.style.position="relative");var g=!1,m=0,_=r(e),y=0,x=0,w=!0;u=0;var b=function(){if(w){if(0===e.offsetWidth&&0===e.offsetHeight)return void(u||(u=t((function(){u=0,b()}))));w=!1}var i,n;i=e.offsetWidth,n=e.offsetHeight,c.style.width=i+10+"px",c.style.height=n+10+"px",a.scrollLeft=i+10,a.scrollTop=n+10,h.scrollLeft=i+10,h.scrollTop=n+10};e.resizeSensor.resetSensor=b;var v=function(){m=0,g&&(y=_.width,x=_.height,e.resizedAttached&&e.resizedAttached.call(_))},S=function(){_=r(e),(g=_.width!==y||_.height!==x)&&!m&&(m=t(v)),b()},T=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)};T(a,"scroll",S),T(h,"scroll",S),u=t((function(){u=0,b()}))}}n(e,(function(e){c(e,a)})),this.detach=function(t){u||(i(u),u=0),s.detach(e,t)},this.reset=function(){e.resizeSensor.resetSensor()}};if(s.reset=function(e){n(e,(function(e){e.resizeSensor.resetSensor()}))},s.detach=function(e,t){n(e,(function(e){e&&(e.resizedAttached&&"function"==typeof t&&(e.resizedAttached.remove(t),e.resizedAttached.length())||e.resizeSensor&&(e.contains(e.resizeSensor)&&e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached))}))},"undefined"!=typeof MutationObserver){var a=new MutationObserver((function(e){for(var t in e)if(e.hasOwnProperty(t))for(var i=e[t].addedNodes,n=0;n<i.length;n++)i[n].resizeSensor&&s.reset(i[n])}));document.addEventListener("DOMContentLoaded",(function(e){a.observe(document.body,{childList:!0,subtree:!0})}))}return s})),define("ResizeSensor",["ResizeSensor/src/ResizeSensor"],(function(e){return e})),define("x_ite/Browser/Rendering/X3DRenderingContext",["jquery","ResizeSensor"],(function(e,t){"use strict";const i=Symbol(),n=Symbol(),r=Symbol();function o(){this[i]=[0,0,300,150],this[n]=[]}return o.prototype={initialize:function(){const i=this.getContext();i.enable(i.SCISSOR_TEST),i.cullFace(i.BACK),i.enable(i.DEPTH_TEST),i.depthFunc(i.LEQUAL),i.clearDepth(1),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA),i.blendEquationSeparate(i.FUNC_ADD,i.FUNC_ADD),i.enable(i.BLEND),e(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",this.onfullscreen.bind(this)),this[r]=new t(this.getSurface(),this.reshape.bind(this)),this.reshape()},getRenderer:function(){const e=this.getContext(),t=this.getExtension("WEBGL_debug_renderer_info");return t?e.getParameter(t.UNMASKED_RENDERER_WEBGL):e.getParameter(this.getContext().RENDERER)},getVendor:function(){const e=this.getContext(),t=this.getExtension("WEBGL_debug_renderer_info");return t?e.getParameter(t.UNMASKED_VENDOR_WEBGL):e.getParameter(this.getContext().VENDOR)},getWebGLVersion:function(){const e=this.getContext();return e.getParameter(e.VERSION)},getAntialiased:function(){const e=this.getContext();return e.getParameter(e.SAMPLES)>0},getMaxClipPlanes:function(){return 6},getDepthSize:function(){const e=this.getContext();return e.getParameter(e.DEPTH_BITS)},getColorDepth:function(){const e=this.getContext();return e.getParameter(e.RED_BITS)+e.getParameter(e.BLUE_BITS)+e.getParameter(e.GREEN_BITS)+e.getParameter(e.ALPHA_BITS)},getViewport:function(){return this[i]},getLocalObjects:function(){return this[n]},reshape:function(){const e=this.getContext(),t=this.getCanvas(),n=t.width(),r=t.height(),o=t[0];o.width=n,o.height=r,this[i][2]=n,this[i][3]=r,e.viewport(0,0,n,r),e.scissor(0,0,n,r),this.addBrowserEvent()},onfullscreen:function(){const e=this.getElement();e.fullScreen()?e.addClass("x_ite-fullscreen"):e.removeClass("x_ite-fullscreen")}},o})),define("x_ite/Components/Shape/X3DAppearanceNode",["x_ite/Fields","x_ite/Components/Core/X3DNode","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(n){t.call(this,n),this.addType(i.X3DAppearanceNode),this.addChildObjects("transparent",new e.SFBool),this._transparent.setAccessType(i.outputOnly)}return n.prototype=Object.assign(Object.create(t.prototype),{constructor:n,setTransparent:function(e){e!==this._transparent.getValue()&&(this._transparent=e)},getTransparent:function(){return this._transparent.getValue()}}),n})),define("x_ite/Browser/Shape/AlphaMode",[],(function(){"use strict";let e=0;return{AUTO:e++,OPAQUE:e++,MASK:e++,BLEND:e++}})),define("x_ite/Components/Shape/Appearance",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DAppearanceNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","x_ite/Browser/Shape/AlphaMode"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(o.Appearance),this.stylePropertiesNode=[],this.materialNode=null,this.backMaterialNode=null,this.textureNode=null,this.textureTransformNode=null,this.textureTransformMapping=new Map,this.shaderNodes=[],this.shaderNode=null,this.blendModeNode=null}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"alphaMode",new e.SFString("AUTO")),new t(o.inputOutput,"alphaCutoff",new e.SFFloat(.5)),new t(o.inputOutput,"acousticProperties",new e.SFNode),new t(o.inputOutput,"pointProperties",new e.SFNode),new t(o.inputOutput,"lineProperties",new e.SFNode),new t(o.inputOutput,"fillProperties",new e.SFNode),new t(o.inputOutput,"material",new e.SFNode),new t(o.inputOutput,"backMaterial",new e.SFNode),new t(o.inputOutput,"texture",new e.SFNode),new t(o.inputOutput,"textureTransform",new e.SFNode),new t(o.inputOutput,"shaders",new e.MFNode),new t(o.inputOutput,"blendMode",new e.SFNode)]),getTypeName:function(){return"Appearance"},getComponentName:function(){return"Shape"},getContainerField:function(){return"appearance"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._alphaMode.addInterest("set_alphaMode__",this),this._alphaCutoff.addInterest("set_alphaCutoff__",this),this._pointProperties.addInterest("set_pointProperties__",this),this._lineProperties.addInterest("set_lineProperties__",this),this._fillProperties.addInterest("set_fillProperties__",this),this._material.addInterest("set_material__",this),this._backMaterial.addInterest("set_backMaterial__",this),this._texture.addInterest("set_texture__",this),this._textureTransform.addInterest("set_textureTransform__",this),this._shaders.addInterest("set_shaders__",this),this._blendMode.addInterest("set_blendMode__",this),this._alphaMode.addInterest("set_transparent__",this),this._fillProperties.addInterest("set_transparent__",this),this._material.addInterest("set_transparent__",this),this._texture.addInterest("set_transparent__",this),this._blendMode.addInterest("set_transparent__",this),this.set_live__(),this.set_alphaMode__(),this.set_pointProperties__(),this.set_lineProperties__(),this.set_fillProperties__(),this.set_material__(),this.set_backMaterial__(),this.set_texture__(),this.set_textureTransform__(),this.set_shaders__(),this.set_blendMode__(),this.set_transparent__()},getAlphaMode:function(){return this.alphaMode},set_live__:function(){this.isLive().getValue()?(this.getBrowser().getBrowserOptions()._Shading.addInterest("set_shading__",this),this.shaderNode&&this.getBrowser().addShader(this.shaderNode)):(this.getBrowser().getBrowserOptions()._Shading.removeInterest("set_shading__",this),this.shaderNode&&this.getBrowser().removeShader(this.shaderNode))},set_alphaMode__:function(){this.alphaMode=s[this._alphaMode.getValue()]||s.AUTO,this.set_alphaCutoff__()},set_alphaCutoff__:function(){this.alphaCutoff=this.alphaMode===s.MASK?this._alphaCutoff.getValue():0},set_pointProperties__:function(){this.stylePropertiesNode[0]=r(o.PointProperties,this._pointProperties),this.stylePropertiesNode[0]||(this.stylePropertiesNode[0]=this.getBrowser().getDefaultPointProperties())},set_lineProperties__:function(){this.stylePropertiesNode[1]=r(o.LineProperties,this._lineProperties),this.stylePropertiesNode[1]||(this.stylePropertiesNode[1]=this.getBrowser().getDefaultLineProperties())},set_fillProperties__:function(){this.stylePropertiesNode[2]&&this.stylePropertiesNode[2]._transparent.removeInterest("set_transparent__",this),this.stylePropertiesNode[2]=r(o.FillProperties,this._fillProperties),this.stylePropertiesNode[2]||(this.stylePropertiesNode[2]=this.getBrowser().getDefaultFillProperties()),this.stylePropertiesNode[2]&&this.stylePropertiesNode[2]._transparent.addInterest("set_transparent__",this),this.stylePropertiesNode[3]=this.stylePropertiesNode[2]},set_material__:function(){this.materialNode&&this.materialNode._transparent.removeInterest("set_transparent__",this),this.materialNode=r(o.X3DMaterialNode,this._material),this.materialNode||(this.materialNode=this.getBrowser().getDefaultMaterial()),this.materialNode&&this.materialNode._transparent.addInterest("set_transparent__",this),"TwoSidedMaterial"===this.materialNode.getTypeName()&&(console.warn("TwoSidedMaterial is depreciated, please use Appearance backMaterial."),this.set_backMaterial__())},set_backMaterial__:function(){this.backMaterialNode&&this.backMaterialNode._transparent.removeInterest("set_transparent__",this),this.backMaterialNode=r(o.X3DOneSidedMaterialNode,this._backMaterial),this.backMaterialNode&&this.backMaterialNode._transparent.addInterest("set_transparent__",this),this.backMaterialNode||"TwoSidedMaterial"!==this.materialNode.getTypeName()||(this.backMaterialNode=this.materialNode)},set_texture__:function(){this.textureNode&&this.textureNode._transparent.removeInterest("set_transparent__",this),this.textureNode=r(o.X3DTextureNode,this._texture),this.textureNode&&this.textureNode._transparent.addInterest("set_transparent__",this)},set_textureTransform__:function(){this.textureTransformNode&&this.textureTransformNode.removeInterest("updateTextureTransformMapping",this),this.textureTransformNode=r(o.X3DTextureTransformNode,this._textureTransform),this.textureTransformNode||(this.textureTransformNode=this.getBrowser().getDefaultTextureTransform()),this.textureTransformNode.addInterest("updateTextureTransformMapping",this),this.updateTextureTransformMapping()},updateTextureTransformMapping:function(){this.textureTransformMapping.clear(),this.textureTransformNode.getTextureMapping(this.textureTransformMapping)},set_shaders__:function(){const e=this.shaderNodes;for(const t of e)t._isValid.removeInterest("set_shader__",this),t._activationTime.removeInterest("set_shader__",this);e.length=0;for(const t of this._shaders){const i=r(o.X3DShaderNode,t);i&&(e.push(i),i._isValid.addInterest("set_shader__",this),i._activationTime.addInterest("set_shader__",this))}this.set_shader__()},set_shader__:function(){const e=this.shaderNodes;this.shaderNode&&(this.getBrowser().removeShader(this.shaderNode),this.shaderNode.deselect()),this.shaderNode=null;for(const t of e)if(t._isValid.getValue()&&t._activationTime.getValue()===this.getBrowser().getCurrentTime()){this.shaderNode=t;break}if(!this.shaderNode)for(const t of e)if(t._isValid.getValue()){this.shaderNode=t;break}this.isLive().getValue()&&this.shaderNode&&(this.getBrowser().addShader(this.shaderNode),this.shaderNode.select())},set_shading__:function(){this.set_shader__()},set_blendMode__:function(){this.blendModeNode=r(o.BlendMode,this._blendMode)},set_transparent__:function(){switch(this.alphaMode){case s.AUTO:this.setTransparent(Boolean(this.stylePropertiesNode[3].getTransparent()||this.materialNode&&this.materialNode.getTransparent()||this.backMaterialNode&&this.backMaterialNode.getTransparent()||this.textureNode&&this.textureNode.getTransparent()||this.blendModeNode));break;case s.OPAQUE:case s.MASK:this.setTransparent(!1);break;case s.BLEND:this.setTransparent(!0)}},traverse:function(e,t){this.textureNode&&this.textureNode.traverse(e,t),this.shaderNode&&this.shaderNode.traverse(e,t)}}),a})),define("x_ite/Components/Shape/PointProperties",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.PointProperties),this.pointSizeAttenuation=new Float32Array(3)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"pointSizeScaleFactor",new e.SFFloat(1)),new t(r.inputOutput,"pointSizeMinValue",new e.SFFloat(1)),new t(r.inputOutput,"pointSizeMaxValue",new e.SFFloat(1)),new t(r.inputOutput,"pointSizeAttenuation",new e.MFFloat(1,0,0)),new t(r.inputOutput,"markerType",new e.SFInt32(1))]),getTypeName:function(){return"PointProperties"},getComponentName:function(){return"Shape"},getContainerField:function(){return"pointProperties"},initialize:function(){n.prototype.initialize.call(this),this._pointSizeScaleFactor.addInterest("set_pointSizeScaleFactor__",this),this._pointSizeMinValue.addInterest("set_pointSizeMinValue__",this),this._pointSizeMaxValue.addInterest("set_pointSizeMaxValue__",this),this._pointSizeAttenuation.addInterest("set_pointSizeAttenuation__",this),this._markerType.addInterest("set_markerType__",this),this.set_pointSizeScaleFactor__(),this.set_pointSizeMinValue__(),this.set_pointSizeMaxValue__(),this.set_pointSizeAttenuation__(),this.set_markerType__()},set_pointSizeScaleFactor__:function(){this.pointSizeScaleFactor=Math.max(1,this._pointSizeScaleFactor.getValue())},set_pointSizeMinValue__:function(){this.pointSizeMinValue=Math.max(0,this._pointSizeMinValue.getValue())},set_pointSizeMaxValue__:function(){this.pointSizeMaxValue=Math.max(0,this._pointSizeMaxValue.getValue())},set_pointSizeAttenuation__:function(){const e=this._pointSizeAttenuation.length;this.pointSizeAttenuation[0]=e>0?Math.max(0,this._pointSizeAttenuation[0]):1,this.pointSizeAttenuation[1]=e>1?Math.max(0,this._pointSizeAttenuation[1]):0,this.pointSizeAttenuation[2]=e>2?Math.max(0,this._pointSizeAttenuation[2]):0},set_markerType__:function(){},setShaderUniforms:function(e,t){e.uniform1f(t.x3d_PointPropertiesPointSizeScaleFactor,this.pointSizeScaleFactor),e.uniform1f(t.x3d_PointPropertiesPointSizeMinValue,this.pointSizeMinValue),e.uniform1f(t.x3d_PointPropertiesPointSizeMaxValue,this.pointSizeMaxValue),e.uniform3fv(t.x3d_PointPropertiesPointSizeAttenuation,this.pointSizeAttenuation)}}),o})),define("x_ite/Components/Shape/LineProperties",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.LineProperties)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"applied",new e.SFBool(!0)),new t(r.inputOutput,"linetype",new e.SFInt32(1)),new t(r.inputOutput,"linewidthScaleFactor",new e.SFFloat)]),getTypeName:function(){return"LineProperties"},getComponentName:function(){return"Shape"},getContainerField:function(){return"lineProperties"},initialize:function(){n.prototype.initialize.call(this),this._applied.addInterest("set_applied__",this),this._linewidthScaleFactor.addInterest("set_linewidthScaleFactor__",this),this.set_applied__(),this.set_linewidthScaleFactor__()},set_applied__:function(){this.applied=this._applied.getValue()},set_linewidthScaleFactor__:function(){this.linewidthScaleFactor=Math.max(1,this._linewidthScaleFactor.getValue())},setShaderUniforms:function(e,t){if(this.applied){const i=t.getBrowser(),n=i.getLinetype(this._linetype.getValue()),r=i.getTexture2DUnit();e.lineWidth(this.linewidthScaleFactor),e.uniform1i(t.x3d_LinePropertiesApplied,!0),e.uniform1f(t.x3d_LinePropertiesLinewidthScaleFactor,this.linewidthScaleFactor),e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,n.getTexture()),e.uniform1i(t.x3d_LinePropertiesLinetype,r)}else e.lineWidth(1),e.uniform1i(t.x3d_LinePropertiesApplied,!1),e.uniform1f(t.x3d_LinePropertiesLinewidthScaleFactor,1)}}),o})),define("x_ite/Components/Shape/FillProperties",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(t){n.call(this,t),this.addType(r.FillProperties),this.addChildObjects("transparent",new e.SFBool),this._transparent.setAccessType(r.outputOnly),this.hatchColor=new Float32Array(3)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"filled",new e.SFBool(!0)),new t(r.inputOutput,"hatched",new e.SFBool(!0)),new t(r.inputOutput,"hatchColor",new e.SFColor(1,1,1)),new t(r.inputOutput,"hatchStyle",new e.SFInt32(1))]),getTypeName:function(){return"FillProperties"},getComponentName:function(){return"Shape"},getContainerField:function(){return"fillProperties"},initialize:function(){n.prototype.initialize.call(this),this._filled.addInterest("set_filled__",this),this._hatched.addInterest("set_hatched__",this),this._hatchColor.addInterest("set_hatchColor__",this),this.set_filled__(),this.set_hatched__(),this.set_hatchColor__()},set_filled__:function(){this.filled=this._filled.getValue(),this.setTransparent(!this.filled)},set_hatched__:function(){this.hatched=this._hatched.getValue()},set_hatchColor__:function(){this.hatchColor[0]=this._hatchColor[0],this.hatchColor[1]=this._hatchColor[1],this.hatchColor[2]=this._hatchColor[2]},setTransparent:function(e){e!==this._transparent.getValue()&&(this._transparent=e)},getTransparent:function(){return this._transparent.getValue()},setShaderUniforms:function(e,t){const i=this.hatched;if(e.uniform1i(t.x3d_FillPropertiesFilled,this.filled),e.uniform1i(t.x3d_FillPropertiesHatched,i),i){const i=t.getBrowser(),n=i.getHatchStyle(this._hatchStyle.getValue()),r=i.getTexture2DUnit();e.uniform3fv(t.x3d_FillPropertiesHatchColor,this.hatchColor),e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,n.getTexture()),e.uniform1i(t.x3d_FillPropertiesHatchStyle,r)}}}),o})),define("x_ite/Components/Shape/X3DMaterialNode",["x_ite/Fields","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(n){t.call(this,n),this.addType(i.X3DMaterialNode),this.addChildObjects("transparent",new e.SFBool),this._transparent.setAccessType(i.outputOnly)}return n.prototype=Object.assign(Object.create(t.prototype),{constructor:n,setTransparent:function(e){e!==this._transparent.getValue()&&(this._transparent=e)},getTransparent:function(){return this._transparent.getValue()}}),n})),define("x_ite/Components/Shape/X3DOneSidedMaterialNode",["x_ite/Fields","x_ite/Components/Shape/X3DMaterialNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r){"use strict";function o(i){t.call(this,i),this.addType(n.X3DOneSidedMaterialNode),this.addChildObjects("textures",new e.SFTime),this.emissiveColor=new Float32Array(3),this.textures=0}return o.prototype=Object.assign(Object.create(t.prototype),{constructor:o,initialize:function(){t.prototype.initialize.call(this),this._emissiveColor.addInterest("set_emissiveColor__",this),this._emissiveTexture.addInterest("set_emissiveTexture__",this),this._emissiveTexture.addInterest("set_textures__",this),this._normalTexture.addInterest("set_normalTexture__",this),this._normalTexture.addInterest("set_textures__",this),this._transparency.addInterest("set_transparency__",this),this._transparency.addInterest("set_transparent__",this),this._textures.addInterest("set_textures__",this),this.set_emissiveColor__(),this.set_emissiveTexture__(),this.set_normalTexture__(),this.set_transparency__()},set_emissiveColor__:function(){const e=this.emissiveColor,t=this._emissiveColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_emissiveTexture__:function(){this.emissiveTextureNode=i(n.X3DSingleTextureNode,this._emissiveTexture),this.setTexture(this.getTextureIndices().EMISSIVE_TEXTURE,this.emissiveTextureNode)},set_normalTexture__:function(){this.normalTextureNode=i(n.X3DSingleTextureNode,this._normalTexture),this.setTexture(this.getTextureIndices().NORMAL_TEXTURE,this.normalTextureNode)},set_transparency__:function(){this.transparency=r.clamp(this._transparency.getValue(),0,1)},set_textures__:function(){},set_transparent__:function(){this.setTransparent(Boolean(this.transparency))},getEmissiveTexture:function(){return this.emissiveTextureNode},getNormalTexture:function(){return this.normalTextureNode},getTransparency:function(){return this.transparency},getTextures:function(){return this.textures},getTextureIndices:function(){const e={EMISSIVE_TEXTURE:0,NORMAL_TEXTURE:1};return function(){return e}}(),setTexture:function(e,t){t?this.textures|=1<<e:this.textures&=~(1<<e),this._textures=this.getBrowser().getCurrentTime()},setShaderUniforms:function(e,t,i,n,r){if(e.uniform3fv(t.x3d_EmissiveColor,this.emissiveColor),e.uniform1f(t.x3d_Transparency,this.transparency),this.textures){const o=t.x3d_EmissiveTexture,s=t.x3d_NormalTexture;this.emissiveTextureNode&&(this.emissiveTextureNode.setShaderUniformsToChannel(e,t,i,o),e.uniform1i(o.textureTransformMapping,n.get(this._emissiveTextureMapping.getValue())||0),e.uniform1i(o.textureCoordinateMapping,r.get(this._emissiveTextureMapping.getValue())||0)),this.normalTextureNode&&(e.uniform1f(t.x3d_NormalScale,this._normalScale.getValue()),this.normalTextureNode.setShaderUniformsToChannel(e,t,i,s),e.uniform1i(s.textureTransformMapping,n.get(this._normalTextureMapping.getValue())||0),e.uniform1i(s.textureCoordinateMapping,r.get(this._normalTextureMapping.getValue())||0))}}}),o})),define("x_ite/Components/Shape/UnlitMaterial",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DOneSidedMaterialNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.UnlitMaterial)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"emissiveColor",new e.SFColor(1,1,1)),new t(r.inputOutput,"emissiveTexture",new e.SFNode),new t(r.inputOutput,"emissiveTextureMapping",new e.SFString),new t(r.inputOutput,"normalScale",new e.SFFloat(1)),new t(r.inputOutput,"normalTexture",new e.SFNode),new t(r.inputOutput,"normalTextureMapping",new e.SFString),new t(r.inputOutput,"transparency",new e.SFFloat)]),getTypeName:function(){return"UnlitMaterial"},getComponentName:function(){return"Shape"},getContainerField:function(){return"material"},initialize:function(){n.prototype.initialize.call(this),this.shaderNode=this.getBrowser().getUnlitShader(),this.set_transparent__()},set_emissiveTexture__:function(){this.getEmissiveTexture()&&this.getEmissiveTexture()._transparent.removeInterest("set_transparent__",this),n.prototype.set_emissiveTexture__.call(this),this.getEmissiveTexture()&&this.getEmissiveTexture()._transparent.addInterest("set_transparent__",this)},set_transparent__:function(){this.setTransparent(Boolean(this.getTransparency()||this.getEmissiveTexture()&&this.getEmissiveTexture().getTransparent()))},set_textures__:function(){const e=this.getBrowser();if(this.getTextures()){const t=["X3D_MATERIAL_TEXTURES"];this.getEmissiveTexture()&&t.push("X3D_EMISSIVE_TEXTURE","X3D_EMISSIVE_TEXTURE_"+this.getEmissiveTexture().getTextureTypeString()),this.getNormalTexture()&&t.push("X3D_NORMAL_TEXTURE","X3D_NORMAL_TEXTURE_"+this.getNormalTexture().getTextureTypeString());const i=e.createShader("UnlitTexturesShader","Unlit",t);i._isValid.addInterest("set_shader__",this,i)}else this.shaderNode=e.getUnlitShader()},set_shader__:function(e){e._isValid.removeInterest("set_shader__",this),this.shaderNode=e},getShader:function(e,t){return this.shaderNode}}),o})),define("x_ite/Components/Texturing/TextureProperties",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.TextureProperties)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"borderColor",new e.SFColorRGBA),new t(r.inputOutput,"borderWidth",new e.SFInt32),new t(r.inputOutput,"anisotropicDegree",new e.SFFloat(1)),new t(r.initializeOnly,"generateMipMaps",new e.SFBool),new t(r.inputOutput,"minificationFilter",new e.SFString("FASTEST")),new t(r.inputOutput,"magnificationFilter",new e.SFString("FASTEST")),new t(r.inputOutput,"boundaryModeS",new e.SFString("REPEAT")),new t(r.inputOutput,"boundaryModeT",new e.SFString("REPEAT")),new t(r.inputOutput,"boundaryModeR",new e.SFString("REPEAT")),new t(r.inputOutput,"textureCompression",new e.SFString("FASTEST")),new t(r.inputOutput,"texturePriority",new e.SFFloat)]),getTypeName:function(){return"TextureProperties"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"textureProperties"},getBorderWidth:function(){return o.clamp(this._borderWidth.getValue(),0,1)},getBoundaryMode:function(){const e=new Map([["CLAMP","CLAMP_TO_EDGE"],["CLAMP_TO_EDGE","CLAMP_TO_EDGE"],["CLAMP_TO_BOUNDARY","CLAMP_TO_EDGE"],["MIRRORED_REPEAT","MIRRORED_REPEAT"],["REPEAT","REPEAT"]]);return function(t){const i=e.get(t);return void 0!==i?i:"REPEAT"}}(),getBoundaryModeS:function(){return this.getBoundaryMode(this._boundaryModeS.getValue())},getBoundaryModeT:function(){return this.getBoundaryMode(this._boundaryModeT.getValue())},getBoundaryModeR:function(){return this.getBoundaryMode(this._boundaryModeR.getValue())},getMinificationFilter:function(){const e=new Map([["AVG_PIXEL_AVG_MIPMAP","LINEAR_MIPMAP_LINEAR"],["AVG_PIXEL","LINEAR"],["AVG_PIXEL_NEAREST_MIPMAP","LINEAR_MIPMAP_NEAREST"],["NEAREST_PIXEL_AVG_MIPMAP","NEAREST_MIPMAP_LINEAR"],["NEAREST_PIXEL_NEAREST_MIPMAP","NEAREST_MIPMAP_NEAREST"],["NEAREST_PIXEL","NEAREST"],["NICEST","LINEAR_MIPMAP_LINEAR"],["FASTEST","NEAREST"]]);return function(){if(this._generateMipMaps.getValue()){const t=e.get(this._minificationFilter.getValue());return void 0!==t?t:this.getBrowser().getDefaultTextureProperties().getMinificationFilter()}return"LINEAR"}}(),getMagnificationFilter:function(){const e=new Map([["AVG_PIXEL","LINEAR"],["NEAREST_PIXEL","NEAREST"],["NICEST","LINEAR"],["FASTEST","NEAREST"]]);return function(){const t=e.get(this._magnificationFilter.getValue());return void 0!==t?t:this.getBrowser().getDefaultTextureProperties().getMagnificationFilter()}}(),getTextureCompression:function(){const e=new Map([["DEFAULT","RGBA"],["NICEST","RGBA"],["FASTEST","RGBA"],["LOW","RGBA"],["MEDIUM","RGBA"],["HIGH","RGBA"]]);return function(){const t=this.getBrowser(),i=t.getContext(),n=t.getExtension("WEBGL_compressed_texture_etc"),r=n?n[e.get(this._textureCompression.getValue())]:void 0;return void 0!==r?r:i.RGBA}}()}),s})),define("x_ite/Browser/Shape/X3DShapeContext",["x_ite/Components/Shape/Appearance","x_ite/Components/Shape/PointProperties","x_ite/Components/Shape/LineProperties","x_ite/Components/Shape/FillProperties","x_ite/Components/Shape/UnlitMaterial","x_ite/Components/Texturing/ImageTexture","x_ite/Components/Texturing/TextureProperties","x_ite/Browser/Networking/urls"],(function(e,t,i,n,r,o,s,a){"use strict";const u=Symbol(),l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol();function m(){this[u]=[],this[l]=[]}return m.prototype={initialize:function(){},getDefaultAppearance:function(){return this[c]=new e(this.getPrivateScene()),this[c].setup(),this.getDefaultAppearance=function(){return this[c]},Object.defineProperty(this,"getDefaultAppearance",{enumerable:!1}),this[c]},getDefaultPointProperties:function(){return this[h]=new t(this.getPrivateScene()),this[h].setup(),this.getDefaultPointProperties=function(){return this[h]},Object.defineProperty(this,"getDefaultPointProperties",{enumerable:!1}),this[h]},getDefaultLineProperties:function(){return this[d]=new i(this.getPrivateScene()),this[d]._applied=!1,this[d].setup(),this.getDefaultLineProperties=function(){return this[d]},Object.defineProperty(this,"getDefaultLineProperties",{enumerable:!1}),this[d]},getDefaultFillProperties:function(){return this[p]=new n(this.getPrivateScene()),this[p]._hatched=!1,this[p].setup(),this.getDefaultFillProperties=function(){return this[p]},Object.defineProperty(this,"getDefaultFillProperties",{enumerable:!1}),this[p]},getDefaultMaterial:function(){return this[f]=new r(this.getPrivateScene()),this[f].setup(),this.getDefaultMaterial=function(){return this[f]},Object.defineProperty(this,"getDefaultMaterial",{enumerable:!1}),this[f]},getLinetype:function(e){(e<1||e>15)&&(e=1);let t=this[u][e];return t||(t=this[u][e]=new o(this.getPrivateScene()),t._url[0]=a.getLinetypeUrl(e),t._textureProperties=this.getLineFillTextureProperties(),t.setup(),t)},getHatchStyle:function(e){(e<1||e>19)&&(e=1);let t=this[l][e];return t||(t=this[l][e]=new o(this.getPrivateScene()),t._url[0]=a.getHatchingUrl(e),t._textureProperties=this.getLineFillTextureProperties(),t.setup(),t)},getLineFillTextureProperties:function(){return this[g]=new s(this.getPrivateScene()),this[g].setup(),this.getLineFillTextureProperties=function(){return this[g]},Object.defineProperty(this,"getLineFillTextureProperties",{enumerable:!1}),this[g]}},m})),define("x_ite/Components/Shape/X3DShapeNode",["x_ite/Components/Core/X3DChildNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","x_ite/Browser/Shape/AlphaMode","standard/Math/Geometry/Box3","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";function a(i){e.call(this,i),t.call(this,i),this.addType(n.X3DShapeNode),this.bbox=new o,this.bboxSize=new s(0,0,0),this.bboxCenter=new s(0,0,0)}return a.prototype=Object.assign(Object.create(e.prototype),t.prototype,{constructor:a,initialize:function(){e.prototype.initialize.call(this),t.prototype.initialize.call(this),this._bboxSize.addInterest("set_bbox__",this),this._bboxCenter.addInterest("set_bbox__",this),this._appearance.addInterest("set_apparance__",this),this._geometry.addInterest("set_geometry__",this),this._appearance.addInterest("set_transparent__",this),this._geometry.addInterest("set_transparent__",this),this.set_apparance__(),this.set_geometry__(),this.set_transparent__()},getBBox:function(e,t){return t?this._castShadow.getValue()?e.assign(this.bbox):e.set():e.assign(this.bbox)},getBBoxSize:function(){return this.bboxSize},getBBoxCenter:function(){return this.bboxCenter},getAppearance:function(){return this.apparanceNode},getGeometry:function(){return this.geometryNode},setTransparent:function(e){this.transparent=e},getTransparent:function(){return this.transparent},set_bbox__:function(){this._bboxSize.getValue().equals(this.getDefaultBBoxSize())?this.getGeometry()?this.bbox.assign(this.getGeometry().getBBox()):this.bbox.set():this.bbox.set(this._bboxSize.getValue(),this._bboxCenter.getValue()),this.bboxSize.assign(this.bbox.size),this.bboxCenter.assign(this.bbox.center)},set_apparance__:function(){this.apparanceNode&&this.apparanceNode._transparent.removeInterest("set_transparent__",this),this.apparanceNode=i(n.X3DAppearanceNode,this._appearance),this.apparanceNode?(this.apparanceNode._alphaMode.addInterest("set_transparent__",this),this.apparanceNode._transparent.addInterest("set_transparent__",this)):this.apparanceNode=this.getBrowser().getDefaultAppearance()},set_geometry__:function(){this.geometryNode&&(this.geometryNode._transparent.addInterest("set_transparent__",this),this.geometryNode._bbox_changed.addInterest("set_bbox__",this)),this.geometryNode=i(n.X3DGeometryNode,this._geometry),this.geometryNode&&(this.geometryNode._transparent.addInterest("set_transparent__",this),this.geometryNode._bbox_changed.addInterest("set_bbox__",this)),this.set_bbox__()},set_transparent__:function(){this.apparanceNode.getAlphaMode()===r.AUTO?this.transparent=this.apparanceNode.getTransparent()||this.geometryNode&&this.geometryNode.getTransparent():this.transparent=this.apparanceNode.getTransparent()}}),a})),define("standard/Math/Geometry/Line3",["standard/Math/Numbers/Vector3"],(function(e){"use strict";function t(e,t){this.point=e.copy(),this.direction=t.copy()}return t.prototype={constructor:t,copy:function(){const e=Object.create(t.prototype);return e.point=this.point.copy(),e.direction=this.direction.copy(),e},assign:function(e){return this.point.assign(e.point),this.direction.assign(e.direction),this},set:function(e,t){return this.point.assign(e),this.direction.assign(t),this},setPoints:function(e,t){return this.point.assign(e),this.direction.assign(t).subtract(e).normalize(),this},multMatrixLine:function(e){return e.multMatrixVec(this.point),e.multMatrixDir(this.direction).normalize(),this},multLineMatrix:function(e){return e.multVecMatrix(this.point),e.multDirMatrix(this.direction).normalize(),this},getClosestPointToPoint:function(e,t){const i=t.assign(e).subtract(this.point).dot(this.direction);return t.assign(this.direction).multiply(i).add(this.point)},getClosestPointToLine:function(){const t=new e(0,0,0);return function(i,n){const r=this.point,o=i.point,s=this.direction,a=i.direction;let u=e.dot(s,a);return!(Math.abs(u)>=1)&&(t.assign(o).subtract(r),u=(t.dot(s)-u*t.dot(a))/(1-u*u),n.assign(s).multiply(u).add(r),!0)}}(),getPerpendicularVectorToPoint:function(){const t=new e(0,0,0);return function(e,i){const n=i;return n.assign(this.point).subtract(e),n.subtract(t.assign(this.direction).multiply(n.dot(this.direction)))}}(),getPerpendicularVectorToLine:function(){const t=new e(0,0,0),i=new e(0,0,0);return function(e,n){const r=n;t.assign(this.point).subtract(e.point);const o=t.dot(this.direction),s=t.dot(e.direction),a=this.direction.dot(e.direction),u=a*a,l=(o-s*a)/(1-u),c=-(s-o*a)/(1-u);return i.assign(this.direction).multiply(l),r.assign(e.direction).multiply(c),r.subtract(i).add(t)}}(),intersectsTriangle:function(){const t=new e(0,0,0),i=new e(0,0,0);return function(e,n,r,o){const s=n.subtract(e),a=r.subtract(e);t.assign(this.direction).cross(a);const u=s.dot(t);if(0===u)return!1;const l=1/u;i.assign(this.point).subtract(e);const c=i.dot(t)*l;if(c<0||c>1)return!1;const h=i.cross(s),d=this.direction.dot(h)*l;return!(d<0||c+d>1)&&(o.u=c,o.v=d,o.t=1-c-d,!0)}}(),toString:function(){return this.point+", "+this.direction}},t.Points=function(i,n){const r=Object.create(t.prototype);return r.point=i.copy(),r.direction=e.subtract(n,i).normalize(),r},t})),define("standard/Math/Algorithms/QuickSort",[],(function(){"use strict";function e(e,t){this.array=e,t&&(this.compare=t)}return e.prototype={compare:function(e,t){return e<t},sort:function(e,t){t-e>1&&this.quicksort(e,t-1)},quicksort:function(e,t){let i=e,n=t;const r=this.array,o=this.compare,s=r[e+t>>>1];for(;;){for(;o(r[i],s);)++i;for(;o(s,r[n]);)--n;if(!(i<n)){i===n&&(++i,--n);break}{const e=r[i];r[i]=r[n],r[n]=e,i++,n--}}e<n&&this.quicksort(e,n),i<t&&this.quicksort(i,t)}},e})),define("x_ite/Components/Shape/Shape",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DShapeNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Algorithm","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Box3","standard/Math/Geometry/Line3","standard/Math/Algorithms/QuickSort"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";function d(e){n.call(this,e),this.addType(o.Shape)}return d.prototype=Object.assign(Object.create(n.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"visible",new e.SFBool(!0)),new t(o.inputOutput,"castShadow",new e.SFBool(!0)),new t(o.inputOutput,"bboxDisplay",new e.SFBool),new t(o.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(o.initializeOnly,"bboxCenter",new e.SFVec3f),new t(o.inputOutput,"appearance",new e.SFNode),new t(o.inputOutput,"geometry",new e.SFNode)]),getTypeName:function(){return"Shape"},getComponentName:function(){return"Shape"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._transformSensors_changed.addInterest("set_transformSensors__",this),this.set_transformSensors__()},set_geometry__:function(){n.prototype.set_geometry__.call(this),this.getGeometry()?delete this.traverse:this.traverse=Function.prototype},set_transformSensors__:function(){this.setPickableObject(this.getTransformSensors().size)},intersectsBox:function(e,t,i){return this.getGeometry().intersectsBox(e,t,i)},traverse:function(e,t){switch(e){case r.POINTER:this.pointer(t);break;case r.PICKING:this.picking(t);break;case r.COLLISION:t.addCollisionShape(this);break;case r.SHADOW:this._castShadow.getValue()&&t.addDepthShape(this);break;case r.DISPLAY:t.addDisplayShape(this)&&this.getAppearance().traverse(e,t)}this.getGeometry().traverse(e,t)},pointer:function(){const e=new u,t=new u,i=new c(new a(0,0,0),new a(0,0,0)),n=[],r=new h(n,(function(e,t){return e.point.z>t.point.z}));return function(o){try{const a=o.getBrowser(),u=this.getGeometry();if(e.assign(o.getModelViewMatrix().get()),t.assign(e).inverse(),i.assign(a.getHitRay()).multLineMatrix(t),u.intersectsLine(i,o.getLocalObjects(),e,n)){for(const t of n)e.multVecMatrix(t.point);r.sort(0,n.length);const i=s.lowerBound(n,0,n.length,-o.getNavigationInfo().getNearValue(),(function(e,t){return e.point.z>t}));i!==n.length&&(t.multMatrixDir(n[i].normal).normalize(),a.addHit(n[i],o.getLayer(),this,e.multRight(o.getCameraSpaceMatrix().get()))),n.length=0}}catch(e){console.error(e)}}}(),picking:function(e){if(this.getTransformSensors().size){const t=e.getModelViewMatrix().get();for(const e of this.getTransformSensors())e.collect(t)}const t=e.getBrowser(),i=t.getPickSensors(),n=t.getPickingHierarchy();n.push(this);for(const n of i.at(-1))n.collect(this.getGeometry(),e.getModelViewMatrix().get(),t.getPickingHierarchy());n.pop()},depth:function(e,t,i){this.getGeometry().depth(e,t,i)},display:function(e,t){this.getGeometry().display(e,t)}}),d})),define("x_ite/Components/Rendering/X3DGeometryNode",["x_ite/Fields","x_ite/Components/Core/X3DNode","x_ite/Base/X3DConstants","x_ite/Browser/Core/Shading","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Box3","standard/Math/Geometry/Plane3","standard/Math/Geometry/Triangle3","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u,l,c){"use strict";const h=[new o(0,0,1),new o(0,0,-1),new o(0,1,0),new o(0,-1,0),new o(1,0,0)];function d(n){t.call(this,n),this.addType(i.X3DGeometryNode),this.addChildObjects("transparent",new e.SFBool,"bbox_changed",new e.SFTime,"rebuild",new e.SFTime),this._transparent.setAccessType(i.outputOnly),this._bbox_changed.setAccessType(i.outputOnly),this._rebuild.setAccessType(i.outputOnly);const r=this.getBrowser();this.min=new o(0,0,0),this.max=new o(0,0,0),this.bbox=new a(this.min,this.max,!0),this.solid=!0,this.geometryType=3,this.primitiveMode=r.getContext().TRIANGLES,this.flatShading=void 0,this.colorMaterial=!1,this.attribNodes=[],this.attribs=[],this.textureCoordinateNode=r.getDefaultTextureCoordinate(),this.textureCoordinateMapping=new Map,this.multiTexCoords=[],this.texCoords=d.createArray(),this.fogDepths=d.createArray(),this.colors=d.createArray(),this.normals=d.createArray(),this.flatNormals=d.createArray(),this.vertices=d.createArray(),this.vertexCount=0,this.depth=Function.prototype,this.display=Function.prototype,this.displayParticles=Function.prototype}return d.createArray=function(){const e=[];return e.typedArray=new Float32Array,e.assign=function(e){const t=e.length;for(let i=0;i<t;++i)this[i]=e[i];this.length=t},e.getValue=function(){return this.typedArray},e.shrinkToFit=function(){this.length!==this.typedArray.length?this.typedArray=new Float32Array(this):this.typedArray.set(this)},e},d.prototype=Object.assign(Object.create(t.prototype),{constructor:d,setup:function(){t.prototype.setup.call(this),this.rebuild()},initialize:function(){t.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this.addInterest("requestRebuild",this),this._rebuild.addInterest("rebuild",this);const e=this.getBrowser().getContext();this.frontFace=e.CCW,this.attribBuffers=[],this.texCoordBuffers=[],this.fogDepthBuffer=e.createBuffer(),this.colorBuffer=e.createBuffer(),this.normalBuffer=e.createBuffer(),this.vertexBuffer=e.createBuffer(),this.planes=[];for(let e=0;e<5;++e)this.planes[e]=new u(o.Zero,o.zAxis);this.set_live__()},setGeometryType:function(e){this.geometryType=e},getGeometryType:function(){return this.geometryType},setTransparent:function(e){e!==this._transparent.getValue()&&(this._transparent=e)},getTransparent:function(){return this._transparent.getValue()},getBBox:function(){return this.bbox},setBBox:function(e){if(!e.equals(this.bbox)){e.getExtents(this.min,this.max),this.bbox.assign(e);for(let e=0;e<5;++e)this.planes[e].set(e%2?this.min:this.max,h[e]);this._bbox_changed.addEvent()}},getMin:function(){return this.min},getMax:function(){return this.max},getMatrix:function(){return s.Identity},setPrimitiveMode:function(e){this.primitiveMode=e},getPrimitiveMode:function(){return this.primitiveMode},setSolid:function(e){this.solid=e},setCCW:function(e){this.frontFace=e?this.getBrowser().getContext().CCW:this.getBrowser().getContext().CW},getAttrib:function(){return this.attribNodes},getAttribs:function(){return this.attribs},setFogDepths:function(e){this.fogDepths.assign(e)},getFogDepths:function(){return this.fogDepths},setColors:function(e){this.colors.assign(e)},getColors:function(){return this.colors},setMultiTexCoords:function(e){const t=this.multiTexCoords,i=e.length;for(let n=0;n<i;++n)t[n]=e[n];t.length=i},getMultiTexCoords:function(){return this.multiTexCoords},getTexCoords:function(){return this.texCoords},setTextureCoordinate:function(e){this.textureCoordinateNode.removeInterest("updateTextureCoordinateMapping",this),this.textureCoordinateNode=e||this.getBrowser().getDefaultTextureCoordinate(),this.textureCoordinateNode.addInterest("updateTextureCoordinateMapping",this),this.updateTextureCoordinateMapping()},updateTextureCoordinateMapping:function(){this.textureCoordinateMapping.clear(),this.textureCoordinateNode.getTextureMapping(this.textureCoordinateMapping)},setNormals:function(e){this.normals.assign(e)},getNormals:function(){return this.normals},setVertices:function(e){this.vertices.assign(e)},getVertices:function(){return this.vertices},buildTexCoords:function(){const e=this.texCoords;if(0===e.length){const t=this.getTexCoordParams(),i=t.min,n=t.Sindex,r=t.Tindex,o=t.Ssize,s=i[n],a=i[r],u=this.vertices.getValue();for(let t=0,i=u.length;t<i;t+=4)e.push((u[t+n]-s)/o,(u[t+r]-a)/o,0,1);e.shrinkToFit()}return e},getTexCoordParams:function(){const e={min:new o(0,0,0),Ssize:0,Sindex:0,Tindex:0};return function(){const t=this.getBBox(),i=t.size,n=i.x,r=i.y,o=i.z;return e.min.assign(t.center).subtract(i.divide(2)),n>=r&&n>=o?(e.Ssize=n,e.Sindex=0,e.Tindex=r>=o?1:2):r>=n&&r>=o?(e.Ssize=r,e.Sindex=1,e.Tindex=n>=o?0:2):(e.Ssize=o,e.Sindex=2,e.Tindex=n>=r?0:1),e}}(),refineNormals:function(e,t,i){if(0===i)return t;const n=Math.cos(c.clamp(i,0,Math.PI)),r=[];for(const i in e){const s=e[i];for(const e of s){const i=t[e],a=new o(0,0,0);for(const e of s){const r=t[e];r.dot(i)>=n&&a.add(r)}r[e]=a.normalize()}}return r},isClipped:function(e,t){return t.some((function(t){return t.isClipped(e)}))},transformLine:function(e){},transformMatrix:function(e){},intersectsLine:function(){const e=new s,t={u:0,v:0,t:0},i=new o(0,0,0),n=new o(0,0,0),a=new o(0,0,0),u=new o(0,0,0);return function(s,l,c,h){try{if(this.intersectsBBox(s)){this.transformLine(s),this.transformMatrix(e.assign(c));const d=this.multiTexCoords[0].getValue(),p=this.normals.getValue(),f=this.vertices.getValue();for(let c=0,g=this.vertexCount;c<g;c+=3){const g=4*c;if(i.x=f[g],i.y=f[g+1],i.z=f[g+2],n.x=f[g+4],n.y=f[g+5],n.z=f[g+6],a.x=f[g+8],a.y=f[g+9],a.z=f[g+10],s.intersectsTriangle(i,n,a,t)){const i=t.u,n=t.v,s=t.t,a=new o(s*f[g]+i*f[g+4]+n*f[g+8],s*f[g+1]+i*f[g+5]+n*f[g+9],s*f[g+2]+i*f[g+6]+n*f[g+10]);if(this.isClipped(e.multVecMatrix(u.assign(a)),l))continue;const m=new r(s*d[g]+i*d[g+4]+n*d[g+8],s*d[g+1]+i*d[g+5]+n*d[g+9]),_=3*c,y=new o(s*p[_]+i*p[_+3]+n*p[_+6],s*p[_+1]+i*p[_+4]+n*p[_+7],s*p[_+2]+i*p[_+5]+n*p[_+8]);h.push({texCoord:m,normal:y,point:this.getMatrix().multVecMatrix(a)})}}}return h.length}catch(e){return console.log(e),!1}}}(),intersectsBBox:function(){const e=new o(0,0,0);return function(t,i=0){const n=this.planes,r=this.min,o=this.max,s=r.x-i,a=o.x+i,u=r.y-i,l=o.y+i,c=r.z-i,h=o.z+i;return!!(n[0].intersectsLine(t,e)&&e.x>=s&&e.x<=a&&e.y>=u&&e.y<=l)||(!!(n[1].intersectsLine(t,e)&&e.x>=s&&e.x<=a&&e.y>=u&&e.y<=l)||(!!(n[2].intersectsLine(t,e)&&e.x>=s&&e.x<=a&&e.z>=c&&e.z<=h)||(!!(n[3].intersectsLine(t,e)&&e.x>=s&&e.x<=a&&e.z>=c&&e.z<=h)||!!(n[4].intersectsLine(t,e)&&e.y>=u&&e.y<=l&&e.z>=c&&e.z<=h))))}}(),intersectsBox:function(){const e=new o(0,0,0),t=new o(0,0,0),i=new o(0,0,0),n=new s,r=new o(0,0,0);return function(o,s,a){try{if(o.intersectsBox(this.bbox)){o.multRight(n.assign(this.getMatrix()).inverse()),this.transformMatrix(a);const u=this.vertices.getValue();for(let n=0,l=this.vertexCount;n<l;n+=3){const l=4*n;if(e.x=u[l],e.y=u[l+1],e.z=u[l+2],t.x=u[l+4],t.y=u[l+5],t.z=u[l+6],i.x=u[l+8],i.y=u[l+9],i.z=u[l+10],o.intersectsTriangle(e,t,i)){if(s.length){if(this.isClipped(a.multVecMatrix(r.assign(e)),s))continue;if(this.isClipped(a.multVecMatrix(r.assign(t)),s))continue;if(this.isClipped(a.multVecMatrix(r.assign(i)),s))continue}return!0}}}return!1}catch(e){return console.log(e),!1}}}(),set_live__:function(){this.isLive().getValue()?this.getBrowser().getBrowserOptions()._Shading.addInterest("set_shading__",this):this.getBrowser().getBrowserOptions()._Shading.removeInterest("set_shading__",this)},set_shading__:function(){const e=new o(0,0,0),t=new o(0,0,0),i=new o(0,0,0),r=new o(0,0,0);return function(o){if(this.geometryType<2)return;const s=this.getBrowser().getBrowserOptions().getShading()===n.FLAT;if(s===this.flatShading)return;this.flatShading=s;const a=this.getBrowser().getContext();if(s&&!this.flatNormals.length){const n=this.frontFace===a.CW,o=this.flatNormals,s=this.vertices.getValue();for(let a=0,u=s.length;a<u;a+=12)l.normal(e.set(s[a],s[a+1],s[a+2]),t.set(s[a+4],s[a+5],s[a+6]),i.set(s[a+8],s[a+9],s[a+10]),r),n&&r.negate(),o.push(r.x,r.y,r.z,r.x,r.y,r.z,r.x,r.y,r.z);o.shrinkToFit()}a.bindBuffer(a.ARRAY_BUFFER,this.normalBuffer),a.bufferData(a.ARRAY_BUFFER,s?this.flatNormals.getValue():this.normals.getValue(),a.STATIC_DRAW)}}(),requestRebuild:function(){this._rebuild.addEvent()},rebuild:function(){const e=new o(0,0,0);return function(){this.clear(),this.build();for(const e of this.attribs)e.shrinkToFit();for(const e of this.multiTexCoords)e.shrinkToFit();this.fogDepths.shrinkToFit(),this.colors.shrinkToFit(),this.normals.shrinkToFit(),this.vertices.shrinkToFit();const t=this.min,i=this.max,n=this.vertices.getValue();if(n.length){if(t.x===Number.POSITIVE_INFINITY)for(let r=0,o=n.length;r<o;r+=4)e.set(n[r],n[r+1],n[r+2]),t.min(e),i.max(e);this.bbox.setExtents(t,i)}else this.bbox.setExtents(t.set(0,0,0),i.set(0,0,0));this._bbox_changed.addEvent();for(let e=0;e<5;++e)this.planes[e].set(e%2?t:i,h[e]);if(this.geometryType>1){0===this.multiTexCoords.length&&this.multiTexCoords.push(this.buildTexCoords());const e=this.multiTexCoords.length-1,t=this.getBrowser().getMaxTextures();for(let i=this.multiTexCoords.length;i<t;++i)this.multiTexCoords[i]=this.multiTexCoords[e];this.multiTexCoords.length=t}this.set_shading__(this.getBrowser().getBrowserOptions()._Shading),this.transfer()}}(),clear:function(){this.min.set(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),this.max.set(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);{const e=this.attribs;for(const t of e)t.length=0;const t=this.attribNodes.length;for(let i=e.length;i<t;++i)e[i]=d.createArray();e.length=t}this.flatShading=void 0,this.fogDepths.length=0,this.colors.length=0,this.multiTexCoords.length=0,this.texCoords.length=0,this.normals.length=0,this.flatNormals.length=0,this.vertices.length=0},transfer:function(){const e=this.getBrowser().getContext(),t=this.vertices.length/4;for(let t=this.attribBuffers.length,i=this.attribs.length;t<i;++t)this.attribBuffers.push(e.createBuffer());for(let t=0,i=this.attribs.length;t<i;++t)e.bindBuffer(e.ARRAY_BUFFER,this.attribBuffers[t]),e.bufferData(e.ARRAY_BUFFER,this.attribs[t].getValue(),e.STATIC_DRAW);e.bindBuffer(e.ARRAY_BUFFER,this.fogDepthBuffer),e.bufferData(e.ARRAY_BUFFER,this.fogDepths.getValue(),e.STATIC_DRAW),this.fogCoords=!!this.fogDepths.length,e.bindBuffer(e.ARRAY_BUFFER,this.colorBuffer),e.bufferData(e.ARRAY_BUFFER,this.colors.getValue(),e.STATIC_DRAW),this.colorMaterial=!!this.colors.length;for(let t=this.texCoordBuffers.length,i=this.multiTexCoords.length;t<i;++t)this.texCoordBuffers.push(e.createBuffer());for(let t=0,i=this.multiTexCoords.length;t<i;++t)e.bindBuffer(e.ARRAY_BUFFER,this.texCoordBuffers[t]),e.bufferData(e.ARRAY_BUFFER,this.multiTexCoords[t].getValue(),e.STATIC_DRAW);e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,this.vertices.getValue(),e.STATIC_DRAW),this.vertexCount=t,this.vertexCount?(delete this.depth,delete this.display,delete this.displayParticles):(this.depth=Function.prototype,this.display=Function.prototype,this.displayParticles=Function.prototype)},traverse:function(e,t){},depth:function(e,t,i){i.enableVertexAttribute(e,this.vertexBuffer),e.drawArrays(this.primitiveMode,0,this.vertexCount)},display:function(e,t){try{const i=t.shapeNode.getAppearance(),n=i.materialNode,r=i.backMaterialNode,o=i.shaderNode||n.getShader(t.browser,t.shadow);if(this.solid||!r||o.wireframe)this.displayGeometry(e,t,i,o,!0,!0);else{const n=i.shaderNode||r.getShader(t.browser,t.shadow);this.displayGeometry(e,t,i,n,!0,!1),this.displayGeometry(e,t,i,o,!1,!0)}}catch(e){console.log(e)}},displayGeometry:function(e,t,i,n,r,o){if(n.getValid()){const a=i.blendModeNode,u=this.attribNodes,l=this.attribBuffers;a&&a.enable(e),n.enable(e),n.setLocalUniforms(e,t,o);for(let t=0,i=u.length;t<i;++t)u[t].enable(e,n,l[t]);if(this.fogCoords&&n.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&n.enableColorAttribute(e,this.colorBuffer),n.enableTexCoordAttribute(e,this.texCoordBuffers),n.enableNormalAttribute(e,this.normalBuffer),n.enableVertexAttribute(e,this.vertexBuffer),n.wireframe)if(n.primitiveMode===e.POINTS)e.drawArrays(n.primitiveMode,0,this.vertexCount);else for(let t=0,i=this.vertexCount;t<i;t+=3)e.drawArrays(n.primitiveMode,t,3);else{const i=s.prototype.determinant3.call(t.modelViewMatrix)>0;e.frontFace(i?this.frontFace:this.frontFace===e.CCW?e.CW:e.CCW),t.transparent||r!==o?(e.enable(e.CULL_FACE),r&&!this.solid&&(e.cullFace(e.FRONT),e.drawArrays(n.primitiveMode,0,this.vertexCount)),o&&(e.cullFace(e.BACK),e.drawArrays(n.primitiveMode,0,this.vertexCount))):(this.solid?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),e.drawArrays(n.primitiveMode,0,this.vertexCount))}for(const t of u)t.disable(e,n);this.fogCoords&&n.disableFogDepthAttribute(e),this.colorMaterial&&n.disableColorAttribute(e),n.disableTexCoordAttribute(e),n.disableNormalAttribute(e),a&&a.disable(e)}},displayParticlesDepth:function(e,t,i,n,r){i.enableVertexAttribute(e,this.vertexBuffer);const o=t.modelViewMatrix,a=o[12],u=o[13],l=o[14];for(let t=0;t<r;++t){const r=n[t];o[12]=a,o[13]=u,o[14]=l,s.prototype.translate.call(o,r.position),i.setParticle(e,r,o),e.drawArrays(i.primitiveMode,0,this.vertexCount)}},displayParticles:function(e,t,i,n){try{const r=t.shapeNode.getAppearance(),o=r.materialNode,s=r.backMaterialNode,a=r.shaderNode||o.getShader(t.browser,t.shadow);if(this.solid||!s||a.wireframe)this.displayParticlesGeometry(e,t,r,a,!0,!0,i,n);else{const o=r.shaderNode||s.getShader(t.browser,t.shadow);this.displayParticlesGeometry(e,t,r,o,!0,!1,i,n),this.displayParticlesGeometry(e,t,r,a,!1,!0,i,n)}}catch(e){console.log(e)}},displayParticlesGeometry:function(e,t,i,n,r,o,a,u){if(n.getValid()){const l=i.blendModeNode,c=this.attribNodes,h=this.attribBuffers;l&&l.enable(e),n.enable(e),n.setLocalUniforms(e,t,o);for(let t=0,i=c.length;t<i;++t)c[t].enable(e,n,h[t]);this.fogCoords&&n.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&n.enableColorAttribute(e,this.colorBuffer),n.enableTexCoordAttribute(e,this.texCoordBuffers),n.enableNormalAttribute(e,this.normalBuffer),n.enableVertexAttribute(e,this.vertexBuffer);const d=t.modelViewMatrix,p=d[12],f=d[13],g=d[14];if(n.wireframe)for(let t=0;t<u;++t){const i=a[t];if(d[12]=p,d[13]=f,d[14]=g,s.prototype.translate.call(d,i.position),n.setParticle(e,i,d),n.primitiveMode===e.POINTS)e.drawArrays(n.primitiveMode,0,this.vertexCount);else for(let t=0,i=this.vertexCount;t<i;t+=3)e.drawArrays(n.primitiveMode,t,3)}else{const i=s.prototype.determinant3.call(t.modelViewMatrix)>0;if(e.frontFace(i?this.frontFace:this.frontFace===e.CCW?e.CW:e.CCW),t.transparent||r!==o)for(let t=0;t<u;++t){const i=a[t];d[12]=p,d[13]=f,d[14]=g,s.prototype.translate.call(d,i.position),n.setParticle(e,i,d),e.enable(e.CULL_FACE),r&&!this.solid&&(e.cullFace(e.FRONT),e.drawArrays(n.primitiveMode,0,this.vertexCount)),o&&(e.cullFace(e.BACK),e.drawArrays(n.primitiveMode,0,this.vertexCount))}else{this.solid?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE);for(let t=0;t<u;++t){const i=a[t];d[12]=p,d[13]=f,d[14]=g,s.prototype.translate.call(d,i.position),n.setParticle(e,i,d),e.drawArrays(n.primitiveMode,0,this.vertexCount)}}}for(const t of c)t.disable(e,n);this.fogCoords&&n.disableFogDepthAttribute(e),this.colorMaterial&&n.disableColorAttribute(e),n.disableTexCoordAttribute(e),n.disableNormalAttribute(e),l&&l.disable(e)}}}),d})),define("x_ite/Components/Rendering/X3DLineGeometryNode",["x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Geometry/Line3","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r){"use strict";function o(t){this.getExecutionContext()||e.call(this,t);const i=this.getBrowser();this.setGeometryType(1),this.setPrimitiveMode(i.getContext().LINES),this.setSolid(!1)}return o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,intersectsLine:function(){const e=new n(0,0,0),r=new n(0,0,0),o=new t(n.Zero,n.zAxis),s=new n(0,0,0),a=new n(0,0,0),u=new n(0,0,0);return function(t,l,c,h){if(this.intersectsBBox(t,1)){const d=this.getVertices();for(let p=0,f=d.length;p<f;p+=8)if(e.set(d[p+0],d[p+1],d[p+2]),r.set(d[p+4],d[p+5],d[p+6]),o.setPoints(e,r),o.getClosestPointToLine(t,s)&&o.getPerpendicularVectorToLine(t,a).abs()<.0033333333333333335*t.point.distance(s)){const t=e.distance(r);if(e.distance(s)<=t&&r.distance(s)<=t){if(this.isClipped(c.multVecMatrix(u.assign(s)),l))continue;return h.push({texCoord:new i(0,0),normal:new n(0,0,0),point:s.copy()}),!0}}}return!1}}(),intersectsBox:function(e,t,i){return!1},transfer:function(){const t=this.getTexCoords(),i=this.getVertices();this.getMultiTexCoords().push(t);for(let e=0,n=i.length;e<n;e+=8)t.push(i[e],i[e+1],i[e+2],i[e+3],i[e],i[e+1],i[e+2],i[e+3]);t.shrinkToFit(),e.prototype.transfer.call(this)},display:function(e,t){try{const i=t.browser,n=t.shapeNode.getAppearance(),r=n.shaderNode||i.getLineShader();if(r.getValid()){const i=n.blendModeNode,o=this.attribNodes,s=this.attribBuffers;i&&i.enable(e),r.enable(e),r.setLocalUniforms(e,t);for(let t=0,i=o.length;t<i;++t)o[t].enable(e,r,s[t]);this.fogCoords&&r.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&r.enableColorAttribute(e,this.colorBuffer),this.getMultiTexCoords().length&&r.enableTexCoordAttribute(e,this.texCoordBuffers,!0),r.enableVertexAttribute(e,this.vertexBuffer),e.drawArrays(r.primitiveMode===e.POINTS?e.POINTS:this.primitiveMode,0,this.vertexCount);for(const t of o)t.disable(e,r);this.fogCoords&&r.disableFogDepthAttribute(e),this.colorMaterial&&r.disableColorAttribute(e),this.getMultiTexCoords().length&&r.disableTexCoordAttribute(e),i&&i.disable(e)}}catch(e){console.error(e)}},displayParticles:function(e,t,i,n){try{const o=t.browser,s=t.shapeNode.getAppearance(),a=s.shaderNode||this.getShader(o);if(a.getValid()){const o=s.blendModeNode,u=this.attribNodes,l=this.attribBuffers;o&&o.enable(e),a.enable(e),a.setLocalUniforms(e,t);for(let t=0,i=u.length;t<i;++t)u[t].enable(e,a,l[t]);this.fogCoords&&a.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&a.enableColorAttribute(e,this.colorBuffer),this.getMultiTexCoords().length&&a.enableTexCoordAttribute(e,this.texCoordBuffers),a.enableVertexAttribute(e,this.vertexBuffer);const c=t.modelViewMatrix,h=c[12],d=c[13],p=c[14],f=a.primitiveMode===e.POINTS?e.POINTS:this.primitiveMode;for(let t=0;t<n;++t){const n=i[t];c[12]=h,c[13]=d,c[14]=p,r.prototype.translate.call(c,n.position),a.setParticle(e,n,c),e.drawArrays(f,0,this.vertexCount)}for(const t of u)t.disable(e,a);this.fogCoords&&a.disableFogDepthAttribute(e),this.colorMaterial&&a.disableColorAttribute(e),a.disableTexCoordAttribute(e),o&&o.disable(e)}}catch(e){console.error(e)}}}),o})),define("x_ite/Components/Rendering/IndexedLineSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.IndexedLineSet),this.fogCoordNode=null,this.colorNode=null,this.coordNode=null}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_colorIndex",new e.MFInt32),new t(o.inputOnly,"set_coordIndex",new e.MFInt32),new t(o.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"colorIndex",new e.MFInt32),new t(o.initializeOnly,"coordIndex",new e.MFInt32),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedLineSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_colorIndex.addFieldInterest(this._colorIndex),this._set_coordIndex.addFieldInterest(this._coordIndex),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._coord.addInterest("set_coord__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_coord__()},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const t of this._attrib){const i=r(o.X3DVertexAttributeNode,t);i&&e.push(i)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=r(o.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&(this.colorNode.removeInterest("requestRebuild",this),this.colorNode._transparent.removeInterest("set_transparent__",this)),this.colorNode=r(o.X3DColorNode,this._color),this.colorNode?(this.colorNode.addInterest("requestRebuild",this),this.colorNode._transparent.addInterest("set_transparent__",this),this.set_transparent__()):this.setTransparent(!1)},set_transparent__:function(){this.setTransparent(this.colorNode.getTransparent())},set_coord__:function(){this.coordNode&&this.coordNode.removeInterest("requestRebuild",this),this.coordNode=r(o.X3DCoordinateNode,this._coord),this.coordNode&&this.coordNode.addInterest("requestRebuild",this)},getColorPerVertexIndex:function(e){return e<this._colorIndex.length?this._colorIndex[e]:this._coordIndex[e]},getColorIndex:function(e){return e<this._colorIndex.length?this._colorIndex[e]:e},getPolylineIndices:function(){const e=this._coordIndex,t=[];let i=[];if(e.length){for(let n=0,r=e.length;n<r;++n){e[n]>=0?i.push(n):(t.push(i),i=[])}e[e.length-1]>=0&&t.push(i)}return t},build:function(){if(!this.coordNode||this.coordNode.isEmpty())return;const e=this._coordIndex,t=this.getPolylineIndices(),i=this._colorPerVertex.getValue(),n=this.getAttrib(),r=n.length,o=this.getAttribs(),s=this.fogCoordNode,a=this.colorNode,u=this.coordNode,l=this.getFogDepths(),c=this.getColors(),h=this.getVertices();let d=0;for(const p of t){if(p.length>1)for(let t=0,f=p.length-1;t<f;++t)for(let f=t,g=t+2;f<g;++f){const t=p[f],g=e[t];for(let e=0;e<r;++e)n[e].addValue(g,o[e]);s&&s.addDepth(g,l),a&&(i?a.addColor(this.getColorPerVertexIndex(t),c):a.addColor(this.getColorIndex(d),c)),u.addPoint(g,h)}++d}}}),s})),define("x_ite/Components/Rendering/X3DGeometricPropertyNode",["x_ite/Components/Core/X3DNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DGeometricPropertyNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Rendering/X3DColorNode",["x_ite/Fields","x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(n){t.call(this,n),this.addType(i.X3DColorNode),this.addChildObjects("transparent",new e.SFBool),this._transparent.setAccessType(i.outputOnly)}return n.prototype=Object.assign(Object.create(t.prototype),{constructor:n,setTransparent:function(e){e!==this._transparent.getValue()&&(this._transparent=e)},getTransparent:function(){return this._transparent.getValue()}}),n})),define("x_ite/Components/Rendering/Color",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DColorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector4"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.Color)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"color",new e.MFColor)]),getTypeName:function(){return"Color"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"color"},initialize:function(){n.prototype.initialize.call(this),this._color.addInterest("set_color__",this),this.set_color__()},set_color__:function(){this.color=this._color.getValue(),this.length=this._color.length},addColor:function(e,t){if(e>=0&&e<this.length){const i=this.color;e*=3,t.push(i[e],i[e+1],i[e+2],1)}else if(this.length){const i=this.color;e=3*(this.length-1),t.push(i[e],i[e+1],i[e+2],1)}else t.push(1,1,1,1)},addColors:function(e,t){if(this.length){const r=this.color;for(var i=0,n=3*this.length;i<n;i+=3)e.push(r[i],r[i+1],r[i+2],1);const o=r[i=3*(this.length-1)],s=r[i+1],a=r[i+2];for(i=n,n=3*t;i<n;i+=3)e.push(o,s,a,1)}else for(let i=0;i<t;++i)e.push(1,1,1,1)},getVectors:function(e){const t=this._color;for(var i=0,n=t.length;i<n;++i){const n=t[i];e[i]=new o(n.r,n.g,n.b,1)}return e.length=n,e}}),s})),define("x_ite/Components/Rendering/X3DCoordinateNode",["x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants","standard/Math/Geometry/Triangle3","standard/Math/Numbers/Vector3"],(function(e,t,i,n){"use strict";function r(i){e.call(this,i),this.addType(t.X3DCoordinateNode)}return r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,initialize:function(){e.prototype.initialize.call(this),this._point.addInterest("set_point__",this),this.set_point__()},set_point__:function(){this.point=this._point.getValue(),this.length=this._point.length},isEmpty:function(){return 0===this.length},getSize:function(){return this.length},set1Point:function(e,t){this._point[e]=t},get1Point:function(e,t){if(e<this.length){const i=this.point;return e*=3,t.set(i[e],i[e+1],i[e+2])}return t.set(0,0,0)},addPoint:function(e,t){if(e<this.length){const i=this.point;e*=3,t.push(i[e],i[e+1],i[e+2],1)}else t.push(0,0,0,1)},addPoints:function(e,t){const i=this.point;for(var n=0,r=3*this.length;n<r;n+=3)e.push(i[n],i[n+1],i[n+2],1);for(n=r,r=3*t;n<r;n+=3)e.push(0,0,0,1)},getNormal:function(){const e=new n(0,0,0),t=new n(0,0,0),r=new n(0,0,0);return function(o,s,a){const u=this.length;return o<u&&s<u&&a<u?i.normal(this.get1Point(o,e),this.get1Point(s,t),this.get1Point(a,r),new n(0,0,0)):new n(0,0,0)}}(),getQuadNormal:function(){const e=new n(0,0,0),t=new n(0,0,0),r=new n(0,0,0),o=new n(0,0,0);return function(s,a,u,l){const c=this.length;return s<c&&a<c&&u<c&&l<c?i.quadNormal(this.get1Point(s,e),this.get1Point(a,t),this.get1Point(u,r),this.get1Point(l,o),new n(0,0,0)):new n(0,0,0)}}()}),r})),define("x_ite/Components/Rendering/Coordinate",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DCoordinateNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Coordinate),this._point.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"point",new e.MFVec3f)]),getTypeName:function(){return"Coordinate"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"coord"}}),o})),define("x_ite/Browser/Grouping/X3DGroupingContext",["x_ite/Fields","x_ite/Components/Shape/Shape","x_ite/Components/Rendering/IndexedLineSet","x_ite/Components/Rendering/Color","x_ite/Components/Rendering/Coordinate"],(function(e,t,i,n,r){"use strict";const o=Symbol();function s(){}return s.prototype={initialize:function(){},getBBoxNode:function(){const s=new t(this.getPrivateScene()),a=new i(this.getPrivateScene()),u=new n(this.getPrivateScene()),l=new r(this.getPrivateScene());return s._geometry=a,a._coordIndex=new e.MFFloat(0,1,2,3,0,-1,4,5,6,7,4,-1,0,4,-1,1,5,-1,2,6,-1,3,7,-1),a._color=u,a._coord=l,u._color=new e.MFColor(new e.SFColor(1,1,1)),l._point=new e.MFVec3f(new e.SFVec3f(.5,.5,.5),new e.SFVec3f(-.5,.5,.5),new e.SFVec3f(-.5,-.5,.5),new e.SFVec3f(.5,-.5,.5),new e.SFVec3f(.5,.5,-.5),new e.SFVec3f(-.5,.5,-.5),new e.SFVec3f(-.5,-.5,-.5),new e.SFVec3f(.5,-.5,-.5)),l.setup(),u.setup(),a.setup(),s.setup(),this[o]=s,this.getBBoxNode=function(){return this[o]},Object.defineProperty(this,"getBBoxNode",{enumerable:!1}),s}},s})),define("x_ite/Components/Rendering/X3DComposedGeometryNode",["x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n){"use strict";function r(t){e.call(this,t),this.addType(i.X3DComposedGeometryNode),this.fogCoordNode=null,this.colorNode=null,this.texCoordNode=null,this.normalNode=null,this.coordNode=null}return r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,initialize:function(){e.prototype.initialize.call(this),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._texCoord.addInterest("set_texCoord__",this),this._normal.addInterest("set_normal__",this),this._coord.addInterest("set_coord__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_texCoord__(),this.set_normal__(),this.set_coord__()},getFogCoord:function(){return this.fogCoordNode},getColor:function(){return this.colorNode},getTexCoord:function(){return this.texCoordNode},getNormal:function(){return this.normalNode},getCoord:function(){return this.coordNode},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const n of this._attrib){const r=t(i.X3DVertexAttributeNode,n);r&&e.push(r)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=t(i.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&(this.colorNode.removeInterest("requestRebuild",this),this.colorNode._transparent.removeInterest("set_transparent__",this)),this.colorNode=t(i.X3DColorNode,this._color),this.colorNode?(this.colorNode.addInterest("requestRebuild",this),this.colorNode._transparent.addInterest("set_transparent__",this),this.set_transparent__()):this.setTransparent(!1)},set_transparent__:function(){this.setTransparent(this.colorNode.getTransparent())},set_texCoord__:function(){this.texCoordNode&&this.texCoordNode.removeInterest("requestRebuild",this),this.texCoordNode=t(i.X3DTextureCoordinateNode,this._texCoord),this.texCoordNode&&this.texCoordNode.addInterest("requestRebuild",this),this.setTextureCoordinate(this.texCoordNode)},set_normal__:function(){this.normalNode&&this.normalNode.removeInterest("requestRebuild",this),this.normalNode=t(i.X3DNormalNode,this._normal),this.normalNode&&this.normalNode.addInterest("requestRebuild",this)},set_coord__:function(){this.coordNode&&this.coordNode.removeInterest("requestRebuild",this),this.coordNode=t(i.X3DCoordinateNode,this._coord),this.coordNode&&this.coordNode.addInterest("requestRebuild",this)},getPolygonIndex:function(e){return e},getTriangleIndex:function(e){return e},build:function(e,t,i,n){if(!this.coordNode||this.coordNode.isEmpty())return;t-=t%e,n-=n%i;const r=this._colorPerVertex.getValue(),o=this._normalPerVertex.getValue(),s=this.getAttrib(),a=s.length,u=this.getAttribs(),l=this.getFogCoord(),c=this.getColor(),h=this.getTexCoord(),d=this.getNormal(),p=this.getCoord(),f=this.getFogDepths(),g=this.getColors(),m=this.getMultiTexCoords(),_=this.getNormals(),y=this.getVertices();h&&h.init(m);for(let e=0;e<n;++e){const t=Math.floor(e/i),n=this.getPolygonIndex(this.getTriangleIndex(e));for(let e=0;e<a;++e)s[e].addValue(n,u[e]);l&&l.addDepth(n,f),c&&(r?c.addColor(n,g):c.addColor(t,g)),h&&h.addTexCoord(n,m),d&&(o?d.addVector(n,_):d.addVector(t,_)),p.addPoint(n,y)}this.getNormal()||this.buildNormals(e,t,n),this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())},buildNormals:function(e,t,i){const n=this.createNormals(e,t),r=this.getNormals();for(let e=0;e<i;++e){const t=n[this.getTriangleIndex(e)];r.push(t.x,t.y,t.z)}},createNormals:function(e,t){const i=this.createFaceNormals(e,t);if(this._normalPerVertex.getValue()){const e=[];for(let i=0;i<t;++i){const t=this.getPolygonIndex(i);let n=e[t];n||(n=e[t]=[]),n.push(i)}return this.refineNormals(e,i,Math.PI)}return i},createFaceNormals:function(e,t){const i=!this._ccw.getValue(),n=this.coordNode,r=[];for(let o=0;o<t;o+=e){const t=this.getPolygonNormal(o,e,n);i&&t.negate();for(let i=0;i<e;++i)r.push(t)}return r},getPolygonNormal:function(){let e=new n(0,0,0),t=new n(0,0,0);return function(i,r,o){const s=new n(0,0,0);o.get1Point(this.getPolygonIndex(i),t);for(let n=0;n<r;++n){const a=e;e=t,t=a,o.get1Point(this.getPolygonIndex(i+(n+1)%r),t),s.x+=(e.y-t.y)*(e.z+t.z),s.y+=(e.z-t.z)*(e.x+t.x),s.z+=(e.x-t.x)*(e.y+t.y)}return s.normalize()}}()}),r})),define("x_ite/Components/Geometry3D/IndexedFaceSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Triangle3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(r.IndexedFaceSet),this._creaseAngle.setUnit("angle")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_colorIndex",new e.MFInt32),new t(r.inputOnly,"set_texCoordIndex",new e.MFInt32),new t(r.inputOnly,"set_normalIndex",new e.MFInt32),new t(r.inputOnly,"set_coordIndex",new e.MFInt32),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"convex",new e.SFBool(!0)),new t(r.initializeOnly,"creaseAngle",new e.SFFloat),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"colorIndex",new e.MFInt32),new t(r.initializeOnly,"texCoordIndex",new e.MFInt32),new t(r.initializeOnly,"normalIndex",new e.MFInt32),new t(r.initializeOnly,"coordIndex",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedFaceSet"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_colorIndex.addFieldInterest(this._colorIndex),this._set_texCoordIndex.addFieldInterest(this._texCoordIndex),this._set_normalIndex.addFieldInterest(this._normalIndex),this._set_coordIndex.addFieldInterest(this._coordIndex)},getTexCoordPerVertexIndex:function(e){return e<this._texCoordIndex.length?this._texCoordIndex[e]:this._coordIndex[e]},getColorPerVertexIndex:function(e){return e<this._colorIndex.length?this._colorIndex[e]:this._coordIndex[e]},getColorIndex:function(e){return e<this._colorIndex.length?this._colorIndex[e]:e},getNormalPerVertexIndex:function(e){return e<this._normalIndex.length?this._normalIndex[e]:this._coordIndex[e]},getNormalIndex:function(e){return e<this._normalIndex.length?this._normalIndex[e]:e},build:function(){const e=this.triangulate();if(0===e.length)return;const t=this._colorPerVertex.getValue(),i=this._normalPerVertex.getValue(),n=this._coordIndex.getValue(),r=this.getAttrib(),o=r.length,s=this.getAttribs(),a=this.getFogCoord(),u=this.getColor(),l=this.getTexCoord(),c=this.getNormal(),h=this.getCoord(),d=this.getFogDepths(),p=this.getColors(),f=this.getMultiTexCoords(),g=this.getNormals(),m=this.getVertices();l&&l.init(f);for(const _ of e){const e=_.triangles,y=_.face;for(const _ of e){const e=n[_];for(let t=0;t<o;++t)r[t].addValue(e,s[t]);a&&a.addDepth(e,d),u&&(t?u.addColor(this.getColorPerVertexIndex(_),p):u.addColor(this.getColorIndex(y),p)),l&&l.addTexCoord(this.getTexCoordPerVertexIndex(_),f),c&&(i?c.addVector(this.getNormalPerVertexIndex(_),g):c.addVector(this.getNormalIndex(y),g)),h.addPoint(e,m)}}this.getNormal()||this.buildNormals(e),this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())},triangulate:function(){const e=this._convex.getValue(),t=this._coordIndex.length,i=[];if(!this.getCoord())return i;if(t&&this._coordIndex[t-1]>-1&&this._coordIndex.push(-1),t){const t=this._coordIndex.getValue(),n=this._coordIndex.length;let r=[];for(let o=0,s=0;o<n;++o){if(t[o]>-1)r.push(o);else{if(r.length)switch(r.length){case 0:case 1:case 2:r.length=0;break;case 3:i.push({vertices:r,triangles:r,face:s}),r=[];break;default:{const t=[],n={vertices:r,triangles:t,face:s};e?this.triangulateConvexPolygon(r,t):this.triangulatePolygon(r,t),t.length<3?r.length=0:(i.push(n),r=[]);break}}++s}}}return i},triangulatePolygon:function(){const e=[];return function(t,i){const n=this._coordIndex.getValue(),r=this.getCoord(),s=t.length;for(let i=0;i<s;++i){const s=t[i];let a=e[i];a||(a=e[i]=new o(0,0,0)),a.index=s,r.get1Point(n[s],a)}e.length=s,a.triangulatePolygon(e,i);for(let e=0,t=i.length;e<t;++e)i[e]=i[e].index}}(),triangulateConvexPolygon:function(e,t){for(let i=1,n=e.length-1;i<n;++i)t.push(e[0],e[i],e[i+1])},buildNormals:function(e){const t=this.createNormals(e),i=this.getNormals();for(const n of e)for(const e of n.triangles){const n=t[e];i.push(n.x,n.y,n.z)}},createNormals:function(){const e=[],t=[];return function(i){const n=!this._ccw.getValue(),r=this._coordIndex.getValue(),o=this.getCoord();e.length=0,t.length=0;for(const a of i){const i=a.vertices,u=i.length;switch(u){case 3:var s=o.getNormal(r[i[0]],r[i[1]],r[i[2]]);break;case 4:s=o.getQuadNormal(r[i[0]],r[i[1]],r[i[2]],r[i[3]]);break;default:s=this.getPolygonNormal(i,r,o)}for(let e=0;e<u;++e){const n=i[e],o=r[n];let s=t[o];s||(s=t[o]=[]),s.push(n)}n&&s.negate();for(let t=0;t<u;++t)e[i[t]]=s}return this.refineNormals(t,e,this._creaseAngle.getValue())}}(),getPolygonNormal:function(){let e=new o(0,0,0),t=new o(0,0,0);return function(i,n,r){const s=new o(0,0,0);r.get1Point(n[i[0]],t);for(let o=0,a=i.length;o<a;++o){const u=e;e=t,t=u,r.get1Point(n[i[(o+1)%a]],t),s.x+=(e.y-t.y)*(e.z+t.z),s.y+=(e.z-t.z)*(e.x+t.x),s.z+=(e.x-t.x)*(e.y+t.y)}return s.normalize()}}()}),u})),define("x_ite/Components/Texturing/X3DTextureCoordinateNode",["x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DTextureCoordinateNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,setShaderUniformsToChannel:function(e,t,i){e.uniform1i(t.x3d_TextureCoordinateGeneratorMode[i],0)}}),i})),define("x_ite/Components/Texturing/X3DSingleTextureCoordinateNode",["x_ite/Components/Texturing/X3DTextureCoordinateNode","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(n){e.call(this,n),this.addType(i.X3DSingleTextureCoordinateNode),this.texCoordArray=t.createArray()}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,init:function(e){this.texCoordArray.length=0,e.push(this.texCoordArray)},addTexCoord:function(e,t){this.addTexCoordToChannel(e,t[0])},getTextureMapping:function(e,t=0){this._mapping.getValue()&&e.set(this._mapping.getValue(),t)},setShaderUniforms:function(e,t){for(let i=0,n=t.x3d_MaxTextures;i<n;++i)this.setShaderUniformsToChannel(e,t,i)}}),n})),define("x_ite/Components/Texturing/TextureCoordinate",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DSingleTextureCoordinateNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector4"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.TextureCoordinate)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"mapping",new e.SFString),new t(r.inputOutput,"point",new e.MFVec2f)]),getTypeName:function(){return"TextureCoordinate"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texCoord"},initialize:function(){n.prototype.initialize.call(this),this._point.addInterest("set_point__",this),this.set_point__()},set_point__:function(){this.point=this._point.getValue(),this.length=this._point.length},isEmpty:function(){return 0===this.length},getSize:function(){return this.length},get1Point:function(e,t){if(e>=0&&e<this.length){const i=this.point;return e*=2,t.set(i[e],i[e+1],0,1)}if(e>=0&&this.length){const i=this.point;return e%=this.length,e*=2,t.set(i[e],i[e+1],0,1)}return t.set(0,0,0,1)},addTexCoordToChannel:function(e,t){if(e>=0&&e<this.length){const i=this.point;e*=2,t.push(i[e],i[e+1],0,1)}else if(e>=0&&this.length){const i=this.point;e%=this.length,e*=2,t.push(i[e],i[e+1],0,1)}else t.push(0,0,0,1)},getTexCoord:function(e){const t=this.point;for(let i=0,n=0,r=this.length;i<r;++i,n+=2)e[i]=new o(t[n],t[n+1],0,1);return e.length=this.length,e}}),s})),define("x_ite/Browser/Geometry3D/BoxOptions",["x_ite/Fields","x_ite/Base/X3DBaseNode","x_ite/Components/Geometry3D/IndexedFaceSet","x_ite/Components/Rendering/Coordinate","x_ite/Components/Texturing/TextureCoordinate"],(function(e,t,i,n,r){"use strict";function o(e){t.call(this,e)}return o.prototype=Object.assign(Object.create(t.prototype),{constructor:o,getTypeName:function(){return"BoxOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"boxOptions"},initialize:function(){t.prototype.initialize.call(this)},getGeometry:function(){if(this.geometry)return this.geometry;this.geometry=new i(this.getExecutionContext()),this.geometry._texCoord=new r(this.getExecutionContext()),this.geometry._coord=new n(this.getExecutionContext());const t=this.geometry,o=this.geometry._texCoord.getValue(),s=this.geometry._coord.getValue();return t._texCoordIndex=new e.MFInt32(0,1,2,3,-1,0,1,2,3,-1,0,1,2,3,-1,0,1,2,3,-1,0,1,2,3,-1,0,1,2,3,-1),t._coordIndex=new e.MFInt32(0,1,2,3,-1,5,4,7,6,-1,1,5,6,2,-1,4,0,3,7,-1,4,5,1,0,-1,3,2,6,7,-1),o._point=new e.MFVec2f(new e.SFVec2f(1,1),new e.SFVec2f(0,1),new e.SFVec2f(0,0),new e.SFVec2f(1,0)),s._point=new e.MFVec3f(new e.SFVec3f(1,1,1),new e.SFVec3f(-1,1,1),new e.SFVec3f(-1,-1,1),new e.SFVec3f(1,-1,1),new e.SFVec3f(1,1,-1),new e.SFVec3f(-1,1,-1),new e.SFVec3f(-1,-1,-1),new e.SFVec3f(1,-1,-1)),o.setup(),s.setup(),t.setup(),this.geometry}}),o})),define("x_ite/Browser/Geometry3D/ConeOptions",["x_ite/Fields","x_ite/Base/X3DBaseNode"],(function(e,t){"use strict";function i(i){t.call(this,i),this.addChildObjects("xDimension",new e.SFInt32(20),"yDimension",new e.SFInt32(1))}return i.prototype=Object.assign(Object.create(t.prototype),{constructor:i,getTypeName:function(){return"ConeOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"coneOptions"}}),i})),define("x_ite/Browser/Geometry3D/CylinderOptions",["x_ite/Fields","x_ite/Base/X3DBaseNode"],(function(e,t){"use strict";function i(i){t.call(this,i),this.addChildObjects("xDimension",new e.SFInt32(20),"yDimension",new e.SFInt32(1))}return i.prototype=Object.assign(Object.create(t.prototype),{constructor:i,getTypeName:function(){return"CylinderOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"cylinderOptions"}}),i})),define("x_ite/Browser/Geometry3D/QuadSphereOptions",["x_ite/Fields","x_ite/Base/X3DBaseNode","x_ite/Components/Geometry3D/IndexedFaceSet","x_ite/Components/Rendering/Coordinate","x_ite/Components/Texturing/TextureCoordinate","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(i){t.call(this,i),this.addChildObjects("xDimension",new e.SFInt32(32),"yDimension",new e.SFInt32(15))}return u.prototype=Object.assign(Object.create(t.prototype),{constructor:u,getTypeName:function(){return"QuadSphereOptions"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"quadSphereOptions"},initialize:function(){t.prototype.initialize.call(this),this.addInterest("eventsProcessed",this)},getGeometry:function(){return this.geometry||this.eventsProcessed(),this.geometry},createTexCoordIndex:function(){const e=this._xDimension.getValue()+1,t=this._yDimension.getValue(),i=this.geometry._texCoordIndex;for(let t=0,n=e-1;t<n;++t)i.push(t),i.push(t+e-1),i.push(t+e),i.push(-1);for(let n=e-1,r=0,o=t-3;r<o;++r,++n)for(let t=0,r=e-1;t<r;++t,++n)i.push(n),i.push(n+e),i.push(n+e+1),i.push(n+1),i.push(-1);let n=(t-2)*e-1;for(let t=0,r=e-1;t<r;++t,++n)i.push(n+e),i.push(n+1),i.push(n),i.push(-1)},createTexCoord:function(){const e=this._xDimension.getValue()+1,t=this._yDimension.getValue(),i=this.geometry._texCoord.getValue()._point,n=-.5/(e-1);for(let t=1;t<e;++t){const r=t/(e-1)+n;i.push(new s(r,1))}for(let n=1,r=t-1;n<r;++n){const r=1-n/(t-1);for(let t=0;t<e;++t){const n=t/(e-1);i.push(new s(n,r))}}for(let t=1;t<e;++t){const r=t/(e-1)+n;i.push(new s(r,0))}},createCoordIndex:function(){const e=this._xDimension.getValue()+1,t=this._yDimension.getValue(),i=this.geometry._coordIndex;let n=1;for(const t=e-1;n<t;++n)i.push(0),i.push(n),i.push(n+1),i.push(-1);i.push(0),i.push(n),i.push(1),i.push(-1);let r=1;for(let n=0,o=t-3;n<o;++n,++r){for(let t=0,n=e-2;t<n;++t,++r)i.push(r),i.push(r+e-1),i.push(r+e),i.push(r+1),i.push(-1);i.push(r),i.push(r+e-1),i.push(r+1),i.push(r-e+2),i.push(-1)}const o=r+e-1;for(let t=0,n=e-2;t<n;++t,++r)i.push(o),i.push(r+1),i.push(r),i.push(-1);i.push(o),i.push(o-e+1),i.push(r),i.push(-1)},createPoints:function(){const e=this._xDimension.getValue()+1,t=this._yDimension.getValue(),i=this.geometry._coord.getValue()._point;i.push(new a(0,1,0));for(let n=1,r=t-1;n<r;++n){const t=o.Polar(1,-Math.PI*n/r);for(let n=0,r=e-1;n<r;++n){const e=o.Polar(t.imag,2*Math.PI*n/r);i.push(new a(e.imag,t.real,e.real))}}i.push(new a(0,-1,0))},eventsProcessed:function(){this.geometry=new i(this.getExecutionContext()),this.geometry._texCoord=new r(this.getExecutionContext()),this.geometry._coord=new n(this.getExecutionContext()),this.createTexCoordIndex(),this.createTexCoord(),this.createCoordIndex(),this.createPoints();const e=this.geometry,t=this.geometry._texCoord.getValue(),o=this.geometry._coord.getValue();e._creaseAngle=Math.PI,t.setup(),o.setup(),e.setup()}}),u})),define("x_ite/Browser/Geometry3D/X3DGeometry3DContext",["x_ite/Browser/Geometry3D/BoxOptions","x_ite/Browser/Geometry3D/ConeOptions","x_ite/Browser/Geometry3D/CylinderOptions","x_ite/Browser/Geometry3D/QuadSphereOptions"],(function(e,t,i,n){"use strict";function r(){}function o(e,t){const i=new t(this.getPrivateScene());return i.setup(),this[e]=function(){return i},Object.defineProperty(this,e,{enumerable:!1}),i}return r.prototype={initialize:function(){},getBoxOptions:function(){return o.call(this,"getBoxOptions",e)},getConeOptions:function(){return o.call(this,"getConeOptions",t)},getCylinderOptions:function(){return o.call(this,"getCylinderOptions",i)},getSphereOptions:function(){return o.call(this,"getSphereOptions",n)}},r})),define("x_ite/Browser/PointingDeviceSensor/PointingDevice",["jquery","x_ite/Base/X3DBaseNode"],(function(e,t){"use strict";function i(e){t.call(this,e),this.cursor="DEFAULT",this.isOver=!1,this.motionTime=0}return i.prototype=Object.assign(Object.create(t.prototype),{constructor:i,getTypeName:function(){return"PointingDevice"},initialize:function(){const e=this.getBrowser().getSurface();e.bind("mousedown.PointingDevice"+this.getId(),this.mousedown.bind(this)),e.bind("mouseup.PointingDevice"+this.getId(),this.mouseup.bind(this)),e.bind("dblclick.PointingDevice"+this.getId(),this.dblclick.bind(this)),e.bind("mousemove.PointingDevice"+this.getId(),this.mousemove.bind(this)),e.bind("mouseout.PointingDevice"+this.getId(),this.onmouseout.bind(this)),e.bind("touchstart.PointingDevice"+this.getId(),this.touchstart.bind(this)),e.bind("touchend.PointingDevice"+this.getId(),this.touchend.bind(this))},mousewheel:function(e){},mousedown:function(t){const i=this.getBrowser();if(i.getElement().focus(),!i.getContextMenu().getActive()&&!(i.getShiftKey()&&i.getControlKey()||0!==t.button)){const n=i.getSurface(),r=n.offset(),o=t.pageX-r.left-parseFloat(n.css("borderLeftWidth")),s=n.innerHeight()-(t.pageY-r.top-parseFloat(n.css("borderTopWidth")));n.unbind("mousemove.PointingDevice"+this.getId()),e(document).bind("mouseup.PointingDevice"+this.getId(),this.mouseup.bind(this)),e(document).bind("mousemove.PointingDevice"+this.getId(),this.mousemove.bind(this)),e(document).bind("touchend.PointingDevice"+this.getId(),this.touchend.bind(this)),e(document).bind("touchmove.PointingDevice"+this.getId(),this.touchmove.bind(this)),i.buttonPressEvent(o,s)&&(t.preventDefault(),t.stopImmediatePropagation(),i.setCursor("HAND"),i.finished().addInterest("onverifymotion",this,o,s))}},mouseup:function(t){if(t.preventDefault(),0===t.button){const i=this.getBrowser(),n=i.getSurface(),r=n.offset(),o=t.pageX-r.left-parseFloat(n.css("borderLeftWidth")),s=n.innerHeight()-(t.pageY-r.top-parseFloat(n.css("borderTopWidth")));e(document).unbind(".PointingDevice"+this.getId()),n.bind("mousemove.PointingDevice"+this.getId(),this.mousemove.bind(this)),i.buttonReleaseEvent(),i.setCursor(this.isOver?"HAND":"DEFAULT"),i.finished().addInterest("onverifymotion",this,o,s),i.addBrowserEvent(),this.cursor="DEFAULT"}},dblclick:function(e){this.isOver&&e.stopImmediatePropagation()},mousemove:function(e){e.preventDefault();const t=this.getBrowser();if(this.motionTime===t.getCurrentTime())return;this.motionTime=t.getCurrentTime();const i=t.getSurface(),n=i.offset(),r=e.pageX-n.left-parseFloat(i.css("borderLeftWidth")),o=i.innerHeight()-(e.pageY-n.top-parseFloat(i.css("borderTopWidth")));this.onmotion(r,o)},touchstart:function(e){const t=e.originalEvent.touches;switch(t.length){case 1:e.button=0,e.pageX=t[0].pageX,e.pageY=t[0].pageY,this.mousedown(e);break;case 2:this.touchend(e)}},touchend:function(e){e.button=0,this.mouseup(e)},touchmove:function(e){const t=e.originalEvent.touches;if(1===t.length)e.button=0,e.pageX=t[0].pageX,e.pageY=t[0].pageY,this.mousemove(e)},onmotion:function(e,t){const i=this.getBrowser();i.motionNotifyEvent(e,t)?this.isOver||(this.isOver=!0,this.cursor=i.getCursor(),i.setCursor("HAND")):this.isOver&&(this.isOver=!1,i.setCursor(this.cursor))},onmouseout:function(e){this.getBrowser().leaveNotifyEvent()},onverifymotion:function(e,t){this.getBrowser().finished().removeInterest("onverifymotion",this),this.onmotion(e,t)}}),i})),define("x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext",["x_ite/Browser/PointingDeviceSensor/PointingDevice","x_ite/Rendering/TraverseType","standard/Math/Geometry/Line3","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Algorithms/MergeSort","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol(),m=Symbol(),_=Symbol(),y=Symbol(),x=Symbol(),w=Symbol(),b=Symbol(),v=new i(o.Zero,o.Zero);function S(){this[l]=new e(this),this[h]=new r(0,0),this[d]=new i(o.Zero,o.Zero),this[p]=[],this[f]=[new Map],this[g]=null,this[m]=new Map,this[_]=new Map,this[y]=new a(this[p],(function(e,t){return e.intersection.point.z<t.intersection.point.z})),this[w]=new a(this[p],(function(e,t){return e.layerNumber<t.layerNumber})),this[b]=0}return S.prototype={initialize:function(){this.getElement().attr("tabindex",this.getElement().attr("tabindex")||0),this.setCursor("DEFAULT"),this[l].setup()},setCursor:function(e){const t=this.getSurface();switch(this[c]=e,e){case"HAND":t.css("cursor","pointer");break;case"MOVE":t.css("cursor","move");break;case"CROSSHAIR":t.css("cursor","crosshair");break;default:this._loadCount.getValue()?t.css("cursor","wait"):this[l]&&this[l].isOver?t.css("cursor","pointer"):t.css("cursor","default")}},getCursor:function(){return this[c]},isPointerInRectangle:function(e){return this[h].x>e.x&&this[h].x<e.x+e.z&&this[h].y>e.y&&this[h].y<e.y+e.w},setLayerNumber:function(e){this[x]=e},getSelectedLayer:function(){return this[g]},setHitRay:function(e,t){try{n.unProjectRay(this[h].x,this[h].y,s.Identity,e,t,this[d])}catch(e){this[d].set(o.Zero,o.Zero)}},getHitRay:function(){return this[d]},getSensors:function(){return this[f]},addHit:function(e,t,i,n){const r=this[f].at(-1);this[p].push({pointer:this[h],hitRay:this[d].copy(),intersection:e,sensors:r.size?new Map(r):r,layer:t,layerNumber:this[x],shape:i,modelViewMatrix:n.copy()})},getHits:function(){return this[p]},getNearestHit:function(){return this[p].at(-1)},buttonPressEvent:function(e,t){if(this.touch(e,t),0===this[p].length)return!1;const i=this.getNearestHit();this[g]=i.layer,this[_]=i.sensors;for(const e of this[_].values())e.set_active__(!0,i);return!!i.sensors.size},buttonReleaseEvent:function(){this[g]=null;for(const e of this[_].values())e.set_active__(!1,null);return this[_]=new Map,!0},motionNotifyEvent:function(e,t){return this.touch(e,t),this.motion(),!(!this[p].length||!this[p].at(-1).sensors.size)},leaveNotifyEvent:function(){},touch:function(e,i){if(this.getViewer()._isActive.getValue())return void(this[b]=0);const n=performance.now();this[h].set(e,i),this[p].length=0,this.getWorld().traverse(t.POINTER,null),this[y].sort(0,this[p].length),this[w].sort(0,this[p].length),this.addBrowserEvent(),this[b]=performance.now()-n},motion:function(){if(this[p].length)var e=this[p].at(-1);else e={pointer:this[h],modelViewMatrix:new s,hitRay:this[g]?this[d]:v,intersection:null,sensors:new Map,shape:null,layer:null,layerNumber:0};if(this[p].length)var t=u.map_difference(this[m],e.sensors,new Map);else t=new Map(this[m]);for(const i of t.values())i.set_over__(!1,e);if(this[p].length){this[m]=e.sensors;for(const t of this[m].values())t.set_over__(!0,e)}else this[m]=new Map;for(const t of this[_].values())t.set_motion__(e)},getPointerTime:function(){return this[b]}},S})),define("x_ite/Browser/Navigation/X3DViewer",["x_ite/Base/X3DBaseNode","x_ite/Components/Navigation/OrthoViewpoint","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Box3","standard/Math/Geometry/ViewVolume"],(function(e,t,i,n,r,o){"use strict";function s(t){e.call(this,t)}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,getTypeName:function(){return"X3DViewer"},initialize:function(){},initShaders:function(){},getActiveLayer:function(){return this.getBrowser().getActiveLayer()},getViewport:function(){return this.getBrowser().getActiveLayer().getViewport()},getNavigationInfo:function(){return this.getBrowser().getActiveLayer().getNavigationInfo()},getActiveViewpoint:function(){return this.getBrowser().getActiveLayer().getViewpoint()},getStraightenHorizon:function(){return this.getBrowser().getBrowserOption("StraightenHorizon")},getButton:function(e){return 0===e&&this.getBrowser().getAltKey()?1:e},getPointOnCenterPlane:function(){const e=new i(0,0,-1),r=new i(0,0,0),s=new i(0,0,0);return function(i,a,u){try{const l=this.getNavigationInfo(),c=this.getActiveViewpoint(),h=this.getViewport().getRectangle(this.getBrowser()),d=c.getProjectionMatrixWithLimits(l.getNearValue(),l.getFarValue(c),h);if(o.unProjectPoint(i,this.getBrowser().getViewport()[3]-a,.9,n.Identity,d,h,s),c instanceof t)return u.set(s.x,s.y,-this.getDistanceToCenter(r).abs());const p=s.normalize();return u.assign(p).multiply(this.getDistanceToCenter(r).abs()/p.dot(e))}catch(e){return console.error(e),u.set(0,0,0)}}}(),getDistanceToCenter:function(e,t){const i=this.getActiveViewpoint();return e.assign(i.getPosition()).add(t||i._positionOffset.getValue()).subtract(i.getUserCenterOfRotation())},trackballProjectToSphere:function(e,t,i){const n=this.getViewport().getRectangle(this.getBrowser());return t=this.getBrowser().getViewport()[3]-t,e=(e-n[0])/n[2]-.5,t=(t-n[1])/n[3]-.5,i.set(e,t,function(e,t,i){const n=Math.hypot(t,i);if(n<e*Math.sqrt(.5))return Math.sqrt(e*e-n*n);const r=e/Math.sqrt(2);return r*r/n}(.5,e,t))},lookAtPoint:function(e,t,i){if(!this.touch(e,t))return;const n=this.getBrowser().getNearestHit();this.getActiveViewpoint().lookAtPoint(this.getActiveLayer(),n.intersection.point,.381966,i)},lookAtBBox:function(){const e=new r;return function(t,i,n){if(!this.touch(t,i))return;const r=this.getBrowser().getNearestHit();r.shape.getBBox(e).multRight(r.modelViewMatrix),this.getActiveViewpoint().lookAtBBox(this.getActiveLayer(),e,.381966,n)}}(),touch:function(e,t){return this.getBrowser().touch(e,t),this.getBrowser().getHits().length},dispose:function(){}}),s})),define("x_ite/Components/Followers/X3DFollowerNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DFollowerNode),this.buffer=[],this.a=this.getVector(),this.vector=this.getVector()}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,initialize:function(){e.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this)},getBuffer:function(){return this.buffer},getValue:function(){return this._set_value.getValue()},getDestination:function(){return this._set_destination.getValue()},getInitialValue:function(){return this._initialValue.getValue()},getInitialDestination:function(){return this._initialDestination.getValue()},setValue:function(e){this._value_changed=e},setDestination:function(e){this.destination.assign(e)},duplicate:function(e){return e.copy()},assign:function(e,t,i){e[t].assign(i)},equals:function(e,t,i){return this.a.assign(e).subtract(t).abs()<i},interpolate:function(e,t,i){return this.vector.assign(e).lerp(t,i)},set_live__:function(){(this.isLive().getValue()||this.getPrivate())&&this._isActive.getValue()?(this.getBrowser().prepareEvents().addInterest("prepareEvents",this),this.getBrowser().addBrowserEvent()):this.getBrowser().prepareEvents().removeInterest("prepareEvents",this)},set_active:function(e){e!==this._isActive.getValue()&&(this._isActive=e,this.set_live__())}}),i})),define("x_ite/Components/Followers/X3DChaserNode",["x_ite/Components/Followers/X3DFollowerNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DChaserNode),this.destination=null,this.previousValue=null,this.bufferEndTime=0,this.stepTime=0,this.deltaOut=this.getVector()}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,initialize:function(){e.prototype.initialize.call(this),this._set_value.addInterest("set_value__",this),this._set_destination.addInterest("set_destination__",this),this._duration.addInterest("set_duration__",this),this.set_duration__();var t=this.getBuffer(),i=this.getInitialValue(),n=this.getInitialDestination(),r=this.getNumBuffers();this.bufferEndTime=this.getBrowser().getCurrentTime(),this.previousValue=this.duplicate(i),t[0]=this.duplicate(n);for(var o=1;o<r;++o)t[o]=this.duplicate(i);this.destination=this.duplicate(n),this.equals(n,i,this.getTolerance())?this.setValue(n):this.set_active(!0)},getNumBuffers:function(){return 60},getTolerance:function(){return 1e-8},getArray:function(){return this.getVector()},setPreviousValue:function(e){this.previousValue.assign(e)},step:function(e,t,i){this.output.add(this.deltaOut.assign(e).subtract(t).multiply(i))},stepResponse:function(e){if(e<=0)return 0;var t=this._duration.getValue();return e>=t?1:.5-.5*Math.cos(e/t*Math.PI)},set_value__:function(){this._isActive.getValue()||(this.bufferEndTime=this.getBrowser().getCurrentTime());for(var e=this.getBuffer(),t=this.getValue(),i=0,n=e.length;i<n;++i)this.assign(e,i,t);this.setPreviousValue(t),this.setValue(t),this.set_active(!0)},set_destination__:function(){this.setDestination(this.getDestination()),this._isActive.getValue()||(this.bufferEndTime=this.getBrowser().getCurrentTime()),this.set_active(!0)},set_duration__:function(){this.stepTime=this._duration.getValue()/this.getNumBuffers()},prepareEvents:function(){try{var e=this.getBuffer(),t=e.length,i=this.updateBuffer();this.output=this.interpolate(this.previousValue,e[t-1],this.stepResponse((t-1+i)*this.stepTime));for(var n=t-2;n>=0;--n)this.step(e[n],e[n+1],this.stepResponse((n+i)*this.stepTime));this.setValue(this.output),this.equals(this.output,this.destination,this.getTolerance())&&this.set_active(!1)}catch(e){}},updateBuffer:function(){var e=this.getBuffer(),t=e.length,i=(this.getBrowser().getCurrentTime()-this.bufferEndTime)/this.stepTime;if(i>=1){var n=Math.floor(i);if(i-=n,n<t){this.setPreviousValue(e[t-n]);for(var r=t-1;r>=n;--r)this.assign(e,r,e[r-n]);for(r=0;r<n;++r)try{var o=r/n;this.assign(e,r,this.interpolate(this.destination,e[n],o))}catch(e){}}else{this.setPreviousValue(n==t?e[0]:this.destination);for(r=0;r<t;++r)this.assign(e,r,this.destination)}this.bufferEndTime+=n*this.stepTime}return i}}),i})),define("x_ite/Components/Followers/PositionChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionChaser)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFVec3f),new t(r.inputOnly,"set_destination",new e.SFVec3f),new t(r.initializeOnly,"initialValue",new e.SFVec3f),new t(r.initializeOnly,"initialDestination",new e.SFVec3f),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFVec3f)]),getTypeName:function(){return"PositionChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0,0)}}),s})),define("x_ite/Components/Followers/OrientationChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r,o){"use strict";var s=new o(0,0,1,0),a=new o(0,0,1,0);function u(e){n.call(this,e),this.addType(r.OrientationChaser),this._set_value.setUnit("angle"),this._set_destination.setUnit("angle"),this._initialValue.setUnit("angle"),this._initialDestination.setUnit("angle"),this._value_changed.setUnit("angle")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFRotation),new t(r.inputOnly,"set_destination",new e.SFRotation),new t(r.initializeOnly,"initialValue",new e.SFRotation),new t(r.initializeOnly,"initialDestination",new e.SFRotation),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFRotation)]),getTypeName:function(){return"OrientationChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0,1,0)},equals:function(e,t,i){return s.assign(e).inverse().multRight(t),Math.abs(s.angle)<i},interpolate:function(e,t,i){return a.assign(e).slerp(t,i)},step:function(e,t,i){this.deltaOut.assign(t).inverse().multRight(e).multLeft(this.output),this.output.slerp(this.deltaOut,i)}}),u})),
|
|
72
72
|
/*!
|
|
@@ -77,4 +77,4 @@ function(e,t){"object"==typeof exports&&void 0!==module?t(exports):"function"==t
|
|
|
77
77
|
* http://jquery.org/license
|
|
78
78
|
*/
|
|
79
79
|
function(e){"function"==typeof define&&define.amd?define("jquery-mousewheel/jquery.mousewheel",["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}((function(e){var t,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(e.event.fixHooks)for(var s=n.length;s;)e.event.fixHooks[n[--s]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],u,!1);else this.onmousewheel=u;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],u,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function u(n){var r=n||window.event,s=o.call(arguments,1),u=0,h=0,d=0,p=0,f=0,g=0;if((n=e.event.fix(r)).type="mousewheel","detail"in r&&(d=-1*r.detail),"wheelDelta"in r&&(d=r.wheelDelta),"wheelDeltaY"in r&&(d=r.wheelDeltaY),"wheelDeltaX"in r&&(h=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(h=-1*d,d=0),u=0===d?h:d,"deltaY"in r&&(u=d=-1*r.deltaY),"deltaX"in r&&(h=r.deltaX,0===d&&(u=-1*h)),0!==d||0!==h){if(1===r.deltaMode){var m=e.data(this,"mousewheel-line-height");u*=m,d*=m,h*=m}else if(2===r.deltaMode){var _=e.data(this,"mousewheel-page-height");u*=_,d*=_,h*=_}if(p=Math.max(Math.abs(d),Math.abs(h)),(!i||p<i)&&(i=p,c(r,p)&&(i/=40)),c(r,p)&&(u/=40,h/=40,d/=40),u=Math[u>=1?"floor":"ceil"](u/i),h=Math[h>=1?"floor":"ceil"](h/i),d=Math[d>=1?"floor":"ceil"](d/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=n.clientX-y.left,g=n.clientY-y.top}return n.deltaX=h,n.deltaY=d,n.deltaFactor=i,n.offsetX=f,n.offsetY=g,n.deltaMode=0,s.unshift(n,u,h,d),t&&clearTimeout(t),t=setTimeout(l,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function l(){i=null}function c(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})),define("jquery-mousewheel",["jquery-mousewheel/jquery.mousewheel"],(function(e){return e})),define("x_ite/Browser/Navigation/ExamineViewer",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/X3DConstants","x_ite/Browser/Navigation/X3DViewer","x_ite/Components/Followers/PositionChaser","x_ite/Components/Followers/OrientationChaser","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","jquery-mousewheel"],(function(e,t,i,n,r,o,s,a,u,l,c){"use strict";var h,d,p,f,g,m,_,y,x,w,b,v,S,T,C,N=/Mac OS X/i.test(navigator.userAgent),F=N?1/120:.05;function O(e){o.call(this,e),this.button=-1,this.orientationOffset=new c(0,0,1,0),this.fromVector=new l(0,0,0),this.toVector=new l(0,0,0),this.fromPoint=new l(0,0,0),this.toPoint=new l(0,0,0),this.rotation=new c(0,0,1,0),this.pressTime=0,this.motionTime=0,this.touchMode=0,this.touch1=new u(0,0),this.touch2=new u(0,0),this.tapStart=0,this.dblTapInterval=.4,this.initialPositionOffset=new l(0,0,0),this.initialOrientationOffset=new c(0,0,1,0),this.positionChaser=new s(e),this.centerOfRotationChaser=new s(e),this.rotationChaser=new a(e)}return O.prototype=Object.assign(Object.create(o.prototype),{constructor:O,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(r.outputOnly,"isActive",new t.SFBool)]),initialize:function(){o.prototype.initialize.call(this);var e=this.getBrowser(),t=e.getSurface();this.getNavigationInfo()._transitionStart.addInterest("disconnect",this),e._activeViewpoint.addInterest("set_activeViewpoint__",this),t.bind("mousedown.ExamineViewer",this.mousedown.bind(this)),t.bind("mouseup.ExamineViewer",this.mouseup.bind(this)),t.bind("dblclick.ExamineViewer",this.dblclick.bind(this)),t.bind("mousewheel.ExamineViewer",this.mousewheel.bind(this)),t.bind("touchstart.ExamineViewer",this.touchstart.bind(this)),t.bind("touchend.ExamineViewer",this.touchend.bind(this)),this.positionChaser._duration=.2,this.positionChaser.setPrivate(!0),this.positionChaser.setup(),this.centerOfRotationChaser._duration=.2,this.centerOfRotationChaser.setPrivate(!0),this.centerOfRotationChaser.setup(),this.rotationChaser._duration=.2,this.rotationChaser.setPrivate(!0),this.rotationChaser.setup(),this.set_activeViewpoint__()},set_activeViewpoint__:function(){if(this.getStraightenHorizon()){var e=this.getActiveViewpoint();e&&(e._orientationOffset=this.getOrientationOffset(c.Identity,e._orientationOffset.getValue(),!1))}this.disconnect()},mousedown:function(t){if(!(this.getBrowser().getContextMenu().getActive()||this.button>=0)){this.pressTime=performance.now();var i=this.getBrowser().getSurface().offset(),n=t.pageX-i.left,r=t.pageY-i.top;switch(this.getButton(t.button)){case 0:t.preventDefault(),t.stopImmediatePropagation(),this.button=t.button,e(document).bind("mouseup.ExamineViewer"+this.getId(),this.mouseup.bind(this)),e(document).bind("mousemove.ExamineViewer"+this.getId(),this.mousemove.bind(this)),e(document).bind("touchend.ExamineViewer"+this.getId(),this.touchend.bind(this)),e(document).bind("touchmove.ExamineViewer"+this.getId(),this.touchmove.bind(this)),this.disconnect(),this.getActiveViewpoint().transitionStop(),this.getBrowser().setCursor("MOVE"),this.trackballProjectToSphere(n,r,this.fromVector),this.rotation.assign(c.Identity),this.motionTime=0,this._isActive=!0;break;case 1:t.preventDefault(),t.stopImmediatePropagation(),this.button=t.button,e(document).bind("mouseup.ExamineViewer"+this.getId(),this.mouseup.bind(this)),e(document).bind("mousemove.ExamineViewer"+this.getId(),this.mousemove.bind(this)),e(document).bind("touchend.ExamineViewer"+this.getId(),this.touchend.bind(this)),e(document).bind("touchmove.ExamineViewer"+this.getId(),this.touchmove.bind(this)),this.disconnect(),this.getActiveViewpoint().transitionStop(),this.getBrowser().setCursor("MOVE"),this.getPointOnCenterPlane(n,r,this.fromPoint),this._isActive=!0}}},mouseup:function(t){if(t.button===this.button)switch(this.button=-1,e(document).unbind(".ExamineViewer"+this.getId()),this.getButton(t.button)){case 0:t.preventDefault(),t.stopImmediatePropagation();var i=this.getActiveViewpoint();this.getBrowser().setCursor("DEFAULT"),Math.abs(this.rotation.angle)>.003&&performance.now()-this.motionTime<40&&(this.getStraightenHorizon()&&"GeoViewpoint"!==i.getTypeName()&&(this.rotation=this.getHorizonRotation(this.rotation)),this.addSpinning(this.rotation)),this._isActive=!1;break;case 1:t.preventDefault(),t.stopImmediatePropagation(),this.getBrowser().setCursor("DEFAULT"),this._isActive=!1}},dblclick:function(e){e.preventDefault(),e.stopImmediatePropagation();const t=this.getBrowser().getSurface(),i=t.offset(),n=e.pageX-i.left-parseFloat(t.css("borderLeftWidth")),r=t.innerHeight()-(e.pageY-i.top-parseFloat(t.css("borderTopWidth")));this.disconnect(),this.lookAtBBox(n,r,this.getStraightenHorizon())},mousemove:(C=new l(0,0,0),function(e){var t=this.getBrowser().getSurface().offset(),i=e.pageX-t.left,n=e.pageY-t.top;switch(this.getButton(this.button)){case 0:e.preventDefault(),e.stopImmediatePropagation();var r=this.trackballProjectToSphere(i,n,this.toVector);if(this.rotation.setFromToVec(r,this.fromVector),Math.abs(this.rotation.angle)<.003&&performance.now()-this.pressTime<50)return;this.addRotate(this.rotation),this.fromVector.assign(r),this.motionTime=performance.now();break;case 1:e.preventDefault(),e.stopImmediatePropagation();var o=this.getActiveViewpoint(),s=this.getPointOnCenterPlane(i,n,this.toPoint),a=o.getUserOrientation().multVecRot(C.assign(this.fromPoint).subtract(s));this.addMove(a,a),this.fromPoint.assign(s)}}),mousewheel:(S=new l(0,0,0),T=new l(0,0,0),function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.getBrowser(),i=this.getActiveViewpoint();t.prepareEvents().removeInterest("spin",this),i.transitionStop(),S=this.getDistanceToCenter(S).multiply(e.zoomFactor||F),T=i.getUserOrientation().multVecRot(T.set(0,0,S.abs())),e.deltaY>0?this.addMove(T.negate(),l.Zero):e.deltaY<0&&this.addMove(T,l.Zero)}),touchstart:function(e){var t=e.originalEvent.touches;switch(t.length){case 1:e.button=0,e.pageX=t[0].pageX,e.pageY=t[0].pageY,this.mousedown(e),this.touch1.set(t[0].pageX,t[0].pageY);break;case 2:this.touchend(e),e.button=1,e.pageX=(t[0].pageX+t[1].pageX)/2,e.pageY=(t[0].pageY+t[1].pageY)/2,this.mousedown(e),this.touch1.set(t[0].pageX,t[0].pageY),this.touch2.set(t[1].pageX,t[1].pageY);break;case 3:this.touchend(e)}},touchend:function(e){switch(this.button){case 0:e.button=0,this.mouseup(e),this.getBrowser().getCurrentTime()-this.tapStart<this.dblTapInterval&&(e.button=0,e.pageX=this.touch1.x,e.pageY=this.touch1.y,this.dblclick(e)),this.tapStart=this.getBrowser().getCurrentTime();break;case 1:this.touchMode=0,e.button=1,this.mouseup(e)}},touchmove:(b=new u(0,0),v=new u(0,0),function(t){var i=t.originalEvent.touches;switch(i.length){case 1:t.pageX=i[0].pageX,t.pageY=i[0].pageY,this.mousemove(t);break;case 2:b.set(i[0].pageX,i[0].pageY).subtract(this.touch1).normalize(),v.set(i[1].pageX,i[1].pageY).subtract(this.touch2).normalize();var n=b.dot(v)>.7,r=b.dot(v)<-.7;switch(this.touchMode||(n?1:r?2:0)){case 1:this.touchMode=1,t.pageX=(i[0].pageX+i[1].pageX)/2,t.pageY=(i[0].pageY+i[1].pageY)/2,this.mousemove(t);break;case 2:this.touchMode=2;var o=this.touch1.distance(this.touch2);this.touch1.set(i[0].pageX,i[0].pageY),this.touch2.set(i[1].pageX,i[1].pageY);var s=this.touch1.distance(this.touch2)-o;t.deltaY=s,t.zoomFactor=Math.abs(s)/e(window).width(),this.mousewheel(t)}this.touch1.set(i[0].pageX,i[0].pageY),this.touch2.set(i[1].pageX,i[1].pageY)}}),spin:function(){var e=this.getActiveViewpoint();this.orientationOffset.assign(e._orientationOffset.getValue()),e._orientationOffset=this.getOrientationOffset(this.rotation,this.orientationOffset),e._positionOffset=this.getPositionOffset(e._positionOffset.getValue(),this.orientationOffset,e._orientationOffset.getValue())},set_positionOffset__:function(e){this.getActiveViewpoint()._positionOffset=e},set_centerOfRotationOffset__:function(e){this.getActiveViewpoint()._centerOfRotationOffset=e},set_rotation__:function(e){var t=this.getActiveViewpoint();t._orientationOffset=this.getOrientationOffset(e.getValue(),this.initialOrientationOffset,!1),t._positionOffset=this.getPositionOffset(this.initialPositionOffset,this.initialOrientationOffset,t._orientationOffset.getValue())},addRotate:(w=new c,function(e){var t=this.getActiveViewpoint();if(this.rotationChaser._isActive.getValue()&&this.rotationChaser._value_changed.hasInterest("set_rotation__",this))try{w.assign(this.rotationChaser._set_destination.getValue()).multLeft(e),this.getOrientationOffset(w,this.initialOrientationOffset,!0),this.rotationChaser._set_destination=w}catch(t){e=this.getHorizonRotation(e),w.assign(this.rotationChaser._set_destination.getValue()).multLeft(e),this.rotationChaser._set_destination=w}else try{this.initialOrientationOffset.assign(t._orientationOffset.getValue()),this.initialPositionOffset.assign(t._positionOffset.getValue()),this.getOrientationOffset(e,this.initialOrientationOffset,!0),this.rotationChaser._set_value=c.Identity,this.rotationChaser._set_destination=e}catch(t){this.rotationChaser._set_value=c.Identity,this.rotationChaser._set_destination=this.getHorizonRotation(e)}this.disconnect(),this.rotationChaser._value_changed.addInterest("set_rotation__",this)}),addSpinning:(x=new c(0,0,1,0),function(e){try{this.disconnect(),this.getBrowser().prepareEvents().addInterest("spin",this),this.rotation.assign(x.assign(c.Identity).slerp(e,.6))}catch(e){console.error(e)}}),addMove:(_=new l(0,0,0),y=new l(0,0,0),function(e,t){var i=this.getActiveViewpoint();this.positionChaser._isActive.getValue()&&this.positionChaser._value_changed.hasInterest("set_positionOffset__",this)?(_.assign(this.positionChaser._set_destination.getValue()).add(e),this.positionChaser._set_destination=_):(_.assign(i._positionOffset.getValue()).add(e),this.positionChaser._set_value=i._positionOffset,this.positionChaser._set_destination=_),this.centerOfRotationChaser._isActive.getValue()&&this.centerOfRotationChaser._value_changed.hasInterest("set_centerOfRotationOffset__",this)?(y.assign(this.centerOfRotationChaser._set_destination.getValue()).add(t),this.centerOfRotationChaser._set_destination=y):(y.assign(i._centerOfRotationOffset.getValue()).add(t),this.centerOfRotationChaser._set_value=i._centerOfRotationOffset,this.centerOfRotationChaser._set_destination=y),this.disconnect(),this.positionChaser._value_changed.addInterest("set_positionOffset__",this),this.centerOfRotationChaser._value_changed.addInterest("set_centerOfRotationOffset__",this)}),getPositionOffset:(f=new l(0,0,0),g=new l(0,0,0),m=new c(0,0,1,0),function(e,t,i){return this.getDistanceToCenter(f,e),m.assign(t).inverse().multRight(i).multVecRot(g.assign(f)).subtract(f).add(e)}),getOrientationOffset:(h=new c(0,0,1,0),d=new c(0,0,1,0),p=new l(0,0,0),function(e,t,i){var n=this.getActiveViewpoint(),r=this.getStraightenHorizon();h.assign(e).multRight(n.getOrientation()).multRight(t),r&&"GeoViewpoint"!==n.getTypeName()&&n.straightenHorizon(h);var o=d.assign(n.getOrientation()).inverse().multRight(h);if(r&&"GeoViewpoint"!==n.getTypeName()){if(!i)return o;var s=h.multVecRot(p.assign(l.zAxis));if(Math.abs(n.getUpVector().dot(s))<.97)return o;throw new Error("Critical angle")}return o}),getHorizonRotation:function(){var e=new l(0,0,0);return function(t){var i=this.getActiveViewpoint(),n=t.multVecRot(e.assign(l.zAxis)).normalize(),r=l.cross(i.getUpVector(),n).normalize(),o=l.cross(r,i.getUpVector()).normalize();return new c(l.zAxis,o)}}(),disconnect:function(){var e=this.getBrowser();this.positionChaser._value_changed.removeInterest("set_positionOffset__",this),this.centerOfRotationChaser._value_changed.removeInterest("set_centerOfRotationOffset__",this),this.rotationChaser._value_changed.removeInterest("set_rotation__",this),e.prepareEvents().removeInterest("spin",this)},dispose:function(){var t=this.getBrowser();this.disconnect(),t._activeViewpoint.removeInterest("set_activeViewpoint__",this),t.getSurface().unbind(".ExamineViewer"),e(document).unbind(".ExamineViewer"+this.getId())}}),O})),define("x_ite/Browser/Navigation/X3DFlyViewer",["jquery","x_ite/Browser/Navigation/X3DViewer","x_ite/Components/Followers/OrientationChaser","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Camera","jquery-mousewheel"],(function(e,t,i,n,r,o,s){"use strict";var a,u,l,c,h,d,p,f,g=/Mac OS X/i.test(navigator.userAgent),m=.007,_=g?Math.PI/512:Math.PI/32;function y(e){t.call(this,e);var r=this.getBrowser().getContext();this.button=-1,this.fromVector=new n(0,0,0),this.toVector=new n(0,0,0),this.direction=new n(0,0,0),this.startTime=0,this.lineBuffer=r.createBuffer(),this.lineCount=2,this.lineVertices=new Array(4*this.lineCount),this.lineArray=new Float32Array(this.lineVertices),this.event=null,this.lookAround=!1,this.orientationChaser=new i(e)}return y.prototype=Object.assign(Object.create(t.prototype),{constructor:y,initialize:function(){t.prototype.initialize.call(this);const e=this.getBrowser(),i=e.getSurface();i.bind("mousedown.X3DFlyViewer",this.mousedown.bind(this)),i.bind("mouseup.X3DFlyViewer",this.mouseup.bind(this)),i.bind("mousewheel.X3DFlyViewer",this.mousewheel.bind(this)),i.bind("touchstart.X3DFlyViewer",this.touchstart.bind(this)),i.bind("touchend.X3DFlyViewer",this.touchend.bind(this)),e._controlKey.addInterest("set_controlKey__",this),this.orientationChaser._duration=.3,this.orientationChaser.setPrivate(!0),this.orientationChaser.setup(),this.initShaders()},initShaders:function(){const e=this.getBrowser();e.getBrowserOption("Rubberband")&&(e.getLineShader(),e.getDepthShader())},addCollision:function(){},removeCollision:function(){},set_controlKey__:function(){this.event&&0===this.event.button&&(this.button=-1,this.mousedown(this.event))},mousedown:function(t){if(!(this.getBrowser().getContextMenu().getActive()||this.button>=0)){this.event=t;var i=this.getBrowser().getSurface().offset(),n=t.pageX-i.left,r=t.pageY-i.top;switch(this.getButton(t.button)){case 0:t.preventDefault(),t.stopImmediatePropagation(),this.button=t.button,e(document).bind("mouseup.X3DFlyViewer"+this.getId(),this.mouseup.bind(this)),e(document).bind("mousemove.X3DFlyViewer"+this.getId(),this.mousemove.bind(this)),e(document).bind("touchend.X3DFlyViewer"+this.getId(),this.touchend.bind(this)),e(document).bind("touchmove.X3DFlyViewer"+this.getId(),this.touchmove.bind(this)),this.disconnect(),this.getActiveViewpoint().transitionStop(),this.getBrowser().setCursor("MOVE"),this.addCollision(),this.getBrowser().getControlKey()||this.lookAround?this.trackballProjectToSphere(n,r,this.fromVector):(this.fromVector.set(n,0,r),this.toVector.assign(this.fromVector),this.getFlyDirection(this.fromVector,this.toVector,this.direction),this.addFly(),this.getBrowser().getBrowserOption("Rubberband")&&this.getBrowser().finished().addInterest("display",this,0)),this._isActive=!0;break;case 1:t.preventDefault(),t.stopImmediatePropagation(),this.button=t.button,e(document).bind("mouseup.X3DFlyViewer"+this.getId(),this.mouseup.bind(this)),e(document).bind("mousemove.X3DFlyViewer"+this.getId(),this.mousemove.bind(this)),this.disconnect(),this.getActiveViewpoint().transitionStop(),this.getBrowser().setCursor("MOVE"),this.addCollision(),this.fromVector.set(n,-r,0),this.toVector.assign(this.fromVector),this.direction.set(0,0,0),this.addPan(),this.getBrowser().getBrowserOption("Rubberband")&&this.getBrowser().finished().addInterest("display",this,1),this._isActive=!0}}},mouseup:function(t){t.preventDefault(),t.button===this.button&&(this.event=null,this.button=-1,e(document).unbind(".X3DFlyViewer"+this.getId()),this.disconnect(),this.getBrowser().setCursor("DEFAULT"),this.removeCollision(),this._isActive=!1)},mousemove:function(e){this.getBrowser().addBrowserEvent(),this.event=e;var t=this.getBrowser().getSurface().offset(),i=e.pageX-t.left,n=e.pageY-t.top;switch(this.getButton(this.button)){case 0:if(this.getBrowser().getControlKey()||this.lookAround){e.preventDefault(),e.stopImmediatePropagation();var r=this.trackballProjectToSphere(i,n,this.toVector);this.addRotation(this.fromVector,r),this.fromVector.assign(r);break}this.toVector.set(i,0,n),this.getFlyDirection(this.fromVector,this.toVector,this.direction);break;case 1:e.preventDefault(),e.stopImmediatePropagation(),this.toVector.set(i,-n,0),this.direction.assign(this.toVector).subtract(this.fromVector)}},mousewheel:function(e){e.preventDefault(),e.stopImmediatePropagation(),this.getActiveViewpoint().transitionStop(),e.deltaY>0?this.addRoll(-_):e.deltaY<0&&this.addRoll(_)},touchstart:function(e){var t=e.originalEvent.touches;switch(t.length){case 1:e.button=0,e.pageX=t[0].pageX,e.pageY=t[0].pageY,this.mousedown(e);break;case 2:this.touchend(e),this.lookAround=!0,e.button=0,e.pageX=(t[0].pageX+t[1].pageX)/2,e.pageY=(t[0].pageY+t[1].pageY)/2,this.mousedown(e);break;case 3:this.touchend(e)}},touchend:function(e){if(0===this.button)this.lookAround=!1,e.button=0,this.mouseup(e)},touchmove:function(e){var t=e.originalEvent.touches;switch(t.length){case 1:e.button=0,e.pageX=t[0].pageX,e.pageY=t[0].pageY,this.mousemove(e);break;case 2:e.button=0,e.pageX=(t[0].pageX+t[1].pageX)/2,e.pageY=(t[0].pageY+t[1].pageY)/2,this.mousemove(e)}},fly:(a=new n(0,0,0),u=new n(0,0,0),l=new n(0,0,0),c=new r(0,0,1,0),h=new r(0,0,1,0),d=new r(0,0,1,0),p=new r(0,0,1,0),f=new r(0,0,1,0),function(){var e=this.getNavigationInfo(),t=this.getActiveViewpoint(),i=performance.now(),o=(i-this.startTime)/1e3;a.assign(t.getUpVector()),p.setFromToVec(n.yAxis,a),this.direction.z>0?d.setFromToVec(p.multVecRot(u.assign(this.direction)),p.multVecRot(l.set(0,0,1))):d.setFromToVec(p.multVecRot(l.set(0,0,-1)),p.multVecRot(u.assign(this.direction)));var s=this.direction.abs(),g=1-d.angle/(Math.PI/2);g*=e._speed.getValue(),g*=t.getSpeedFactor(),g*=this.getBrowser().getShiftKey()?.028:m,g*=o;var _=this.getTranslationOffset(u.assign(this.direction).multiply(g));this.getActiveLayer().constrainTranslation(_,!0),t._positionOffset=_.add(t._positionOffset.getValue());var y=1.4*o*Math.pow(s/(s+40),2);c.assign(r.Identity).slerp(d,y).multRight(t.getUserOrientation()),"GeoViewpoint"!==t.getTypeName()&&this.getStraightenHorizon()&&t.straightenHorizon(c),h.assign(t.getOrientation()).inverse().multRight(c),t._orientationOffset=h,f.setFromToVec(a,t.getUpVector()),t._orientationOffset=f.multLeft(t._orientationOffset.getValue()),this.startTime=i}),pan:function(){var e=new n(0,0,0),t=new n(0,0,0);return function(){var i=this.getNavigationInfo(),o=this.getActiveViewpoint(),s=performance.now(),a=(s-this.startTime)/1e3,u=o.getUpVector();this.constrainPanDirection(e.assign(this.direction));var l=1;l*=i._speed.getValue(),l*=o.getSpeedFactor(),l*=this.getBrowser().getShiftKey()?.0098:.007,l*=a;var c=o.getUserOrientation().multRight(new r(o.getUserOrientation().multVecRot(t.assign(n.yAxis)),u)).multVecRot(e.multiply(l));this.getActiveLayer().constrainTranslation(c,!0),o._positionOffset=c.add(o._positionOffset.getValue()),this.startTime=s}}(),set_orientationOffset__:function(e){this.getActiveViewpoint()._orientationOffset=e},addFly:function(){this.startTime||(this.getBrowser().prepareEvents().addInterest("fly",this),this.getBrowser().addBrowserEvent(),this.startTime=performance.now())},addPan:function(){this.startTime||(this.disconnect(),this.getBrowser().prepareEvents().addInterest("pan",this),this.getBrowser().addBrowserEvent(),this.startTime=performance.now())},addRoll:function(){var e=new r(0,0,1,0),t=new r(0,0,1,0);return function(i){var n=this.getActiveViewpoint();this.orientationChaser._isActive.getValue()&&this.orientationChaser._value_changed.hasInterest("set_orientationOffset__",this)?(e.assign(n.getOrientation()).inverse().multRight(t.set(1,0,0,i)).multRight(n.getOrientation()).multRight(this.orientationChaser._set_destination.getValue()),this.orientationChaser._set_destination=e):(e.assign(n.getOrientation()).inverse().multRight(t.set(1,0,0,i)).multRight(n.getUserOrientation()),this.orientationChaser._set_value=n._orientationOffset,this.orientationChaser._set_destination=e),this.disconnect(),this.orientationChaser._value_changed.addInterest("set_orientationOffset__",this)}}(),addRotation:function(){var e=new r(0,0,1,0),t=new r(0,0,1,0);return function(i,n){var r=this.getActiveViewpoint();this.orientationChaser._isActive.getValue()&&this.orientationChaser._value_changed.hasInterest("set_orientationOffset__",this)?(e.setFromToVec(n,i).multRight(r.getOrientation()).multRight(this.orientationChaser._set_destination.getValue()),"GeoViewpoint"!==r.getTypeName()&&this.getStraightenHorizon()&&r.straightenHorizon(e),t.assign(r.getOrientation()).inverse().multRight(e),this.orientationChaser._set_destination=t):(e.setFromToVec(n,i).multRight(r.getUserOrientation()),"GeoViewpoint"!==r.getTypeName()&&this.getStraightenHorizon()&&r.straightenHorizon(e),t.assign(r.getOrientation()).inverse().multRight(e),this.orientationChaser._set_value=r._orientationOffset,this.orientationChaser._set_destination=t),this.disconnect(),this.orientationChaser._value_changed.addInterest("set_orientationOffset__",this)}}(),display:function(){const e=new n(0,0,0),t=new n(0,0,0),i=new o,r=new Float32Array(o.Identity),a=new Float32Array(o.Identity);return function(n){const o=this.getBrowser(),u=o.getViewport(),l=u[2],c=u[3];s.ortho(0,l,0,c,-1,1,i),r.set(i),0===n?(e.set(this.fromVector.x,c-this.fromVector.z,0),t.set(this.toVector.x,c-this.toVector.z,0)):(e.set(this.fromVector.x,c+this.fromVector.y,0),t.set(this.toVector.x,c+this.toVector.y,0)),this.transfer(e,t);const h=o.getContext(),d=o.getLineShader(),p=h.getParameter(h.LINE_WIDTH);d.getValid()&&(d.enable(h),d.enableVertexAttribute(h,this.lineBuffer),h.uniform1i(d.x3d_NumClipPlanes,0),h.uniform1i(d.x3d_FogType,0),h.uniform1i(d.x3d_ColorMaterial,!1),h.uniform1i(d.x3d_LinePropertiesApplied,!1),h.uniformMatrix4fv(d.x3d_ProjectionMatrix,!1,r),h.uniformMatrix4fv(d.x3d_ModelViewMatrix,!1,a),h.disable(h.DEPTH_TEST),h.lineWidth(2),h.uniform3f(d.x3d_EmissiveColor,0,0,0),h.uniform1f(d.x3d_Transparency,0),h.drawArrays(h.LINES,0,this.lineCount),h.lineWidth(1),h.uniform3f(d.x3d_EmissiveColor,1,1,1),h.drawArrays(h.LINES,0,this.lineCount),h.enable(h.DEPTH_TEST),h.lineWidth(p))}}(),transfer:function(e,t){const i=this.getBrowser().getContext(),n=this.lineVertices;n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=1,n[4]=t.x,n[5]=t.y,n[6]=t.z,n[7]=1,this.lineArray.set(n),i.bindBuffer(i.ARRAY_BUFFER,this.lineBuffer),i.bufferData(i.ARRAY_BUFFER,this.lineArray,i.STATIC_DRAW)},disconnect:function(){var e=this.getBrowser();e.addBrowserEvent(),e.prepareEvents().removeInterest("fly",this),e.prepareEvents().removeInterest("pan",this),e.finished().removeInterest("display",this),this.orientationChaser._value_changed.removeInterest("set_orientationOffset__",this),this.startTime=0},dispose:function(){this.disconnect(),this.getBrowser()._controlKey.removeInterest("set_controlKey__",this),this.getBrowser().getSurface().unbind(".X3DFlyViewer"),e(document).unbind(".X3DFlyViewer"+this.getId())}}),y})),define("x_ite/Browser/Navigation/WalkViewer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Browser/Navigation/X3DFlyViewer","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e)}var u,l,c;return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.outputOnly,"isActive",new e.SFBool)]),initialize:function(){n.prototype.initialize.call(this),this.getBrowser().addCollision(this)},getStraightenHorizon:function(){return!0},getFlyDirection:function(e,t,i){return i.assign(t).subtract(e)},getTranslationOffset:(u=new o(0,0,0),l=new s(0,0,1,0),c=new s(0,0,1,0),function(e){var t=this.getActiveViewpoint(),i=t.getUpVector();return l.assign(t.getUserOrientation()),l.multVecRot(u.assign(o.yAxis)),c.setFromToVec(u,i),l.multRight(c).multVecRot(e)}),constrainPanDirection:function(e){return e.y<0&&(e.y=0),e},dispose:function(){this.getBrowser().removeCollision(this),n.prototype.dispose.call(this)}}),a})),define("x_ite/Browser/Navigation/FlyViewer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/X3DConstants","x_ite/Browser/Navigation/X3DFlyViewer","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r,o,s){"use strict";function a(e){r.call(this,e)}return a.prototype=Object.assign(Object.create(r.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(n.outputOnly,"isActive",new e.SFBool)]),addCollision:function(){this.getBrowser().addCollision(this)},removeCollision:function(){this.getBrowser().removeCollision(this)},getFlyDirection:function(e,t,i){return i.assign(t).subtract(e)},getTranslationOffset:function(e){return this.getActiveViewpoint().getUserOrientation().multVecRot(e)},constrainPanDirection:function(e){return e}}),a})),define("x_ite/Browser/Navigation/PlaneViewer",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/X3DConstants","x_ite/Browser/Navigation/X3DViewer","x_ite/Components/Navigation/Viewpoint","standard/Math/Numbers/Vector3","jquery-mousewheel"],(function(e,t,i,n,r,o,s,a){"use strict";var u=/Mac OS X/i.test(navigator.userAgent)?1/160:.05,l=new a(0,0,0),c=new a(0,0,0),h=new a(0,0,0);function d(e){o.call(this,e),this.button=-1,this.fromPoint=new a(0,0,0),this.toPoint=new a(0,0,0)}return d.prototype=Object.assign(Object.create(o.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(r.outputOnly,"isActive",new t.SFBool)]),initialize:function(){o.prototype.initialize.call(this);var e=this.getBrowser().getSurface();e.bind("mousedown.PlaneViewer",this.mousedown.bind(this)),e.bind("mouseup.PlaneViewer",this.mouseup.bind(this)),e.bind("mousemove.PlaneViewer",this.mousemove.bind(this)),e.bind("mousewheel.PlaneViewer",this.mousewheel.bind(this))},mousedown:function(t){if(!(this.getBrowser().getContextMenu().getActive()||this.button>=0)){var i=this.getBrowser().getSurface().offset(),n=t.pageX-i.left,r=t.pageY-i.top;if(1===this.getButton(t.button))t.preventDefault(),t.stopImmediatePropagation(),this.button=t.button,this.getBrowser().getSurface().unbind("mousemove.PlaneViewer"),e(document).bind("mouseup.PlaneViewer"+this.getId(),this.mouseup.bind(this)),e(document).bind("mousemove.PlaneViewer"+this.getId(),this.mousemove.bind(this)),this.getActiveViewpoint().transitionStop(),this.getBrowser().setCursor("MOVE"),this.getPointOnCenterPlane(n,r,this.fromPoint),this._isActive=!0}},mouseup:function(t){t.preventDefault(),t.stopImmediatePropagation(),t.button===this.button&&(this.button=-1,e(document).unbind(".PlaneViewer"+this.getId()),this.getBrowser().getSurface().bind("mousemove.PlaneViewer",this.mousemove.bind(this)),this.getBrowser().setCursor("DEFAULT"),this._isActive=!1)},mousemove:function(e){var t=this.getBrowser().getSurface().offset(),i=e.pageX-t.left,n=e.pageY-t.top;if(1===this.getButton(this.button)){e.preventDefault(),e.stopImmediatePropagation();var r=this.getActiveViewpoint(),o=this.getPointOnCenterPlane(i,n,this.toPoint),s=r.getUserOrientation().multVecRot(this.fromPoint.subtract(o));r._positionOffset=c.assign(r._positionOffset.getValue()).add(s),r._centerOfRotationOffset=h.assign(r._centerOfRotationOffset.getValue()).add(s),this.fromPoint.assign(o)}},mousewheel:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.getBrowser().getSurface().offset(),i=e.pageX-t.left,n=e.pageY-t.top,r=this.getActiveViewpoint(),o=this.getPointOnCenterPlane(i,n,this.fromPoint);r.transitionStop(),e.deltaY>0?r._fieldOfViewScale=Math.max(1e-5,r._fieldOfViewScale.getValue()*(1-u)):e.deltaY<0&&(r._fieldOfViewScale=r._fieldOfViewScale.getValue()*(1+u),this.constrainFieldOfViewScale()),r.set_fieldOfView___&&r.set_fieldOfView___();var s=this.getPointOnCenterPlane(i,n,this.toPoint),a=r.getUserOrientation().multVecRot(l.assign(o).subtract(s));r._positionOffset=c.assign(r._positionOffset.getValue()).add(a),r._centerOfRotationOffset=h.assign(r._centerOfRotationOffset.getValue()).add(a)},constrainFieldOfViewScale:function(){var e=this.getActiveViewpoint();(e instanceof s||"GeoViewpoint"===e.getTypeName())&&e._fieldOfView.getValue()*e._fieldOfViewScale.getValue()>=Math.PI&&(e._fieldOfViewScale=(Math.PI-.001)/e._fieldOfView.getValue())},dispose:function(){this.getBrowser().getSurface().unbind(".PlaneViewer"),e(document).unbind(".PlaneViewer"+this.getId())}}),d})),define("x_ite/Browser/Navigation/NoneViewer",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/X3DConstants","x_ite/Browser/Navigation/X3DViewer"],(function(e,t,i,n,r){"use strict";function o(e){r.call(this,e)}return o.prototype=Object.assign(Object.create(r.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(n.outputOnly,"isActive",new e.SFBool)])}),o})),define("x_ite/Browser/Navigation/LookAtViewer",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/X3DConstants","x_ite/Browser/Navigation/X3DViewer","x_ite/Components/Followers/PositionChaser","x_ite/Components/Followers/OrientationChaser","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r,o,s,a,u,l,c){"use strict";var h,d,p,f,g,m,_,y,x=/Mac OS X/i.test(navigator.userAgent)?1/120:.05;function w(e){o.call(this,e),this.button=-1,this.fromVector=new l(0,0,0),this.toVector=new l(0,0,0),this.touch1=new u(0,0),this.touch2=new u(0,0),this.tapStart=0,this.dblTapInterval=.4,this.positionChaser=new s(e),this.centerOfRotationChaser=new s(e),this.orientationChaser=new a(e)}return w.prototype=Object.assign(Object.create(o.prototype),{constructor:w,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(r.outputOnly,"isActive",new t.SFBool)]),initialize:function(){o.prototype.initialize.call(this);var e=this.getBrowser().getSurface();e.bind("mousedown.LookAtViewer",this.mousedown.bind(this)),e.bind("mouseup.LookAtViewer",this.mouseup.bind(this)),e.bind("dblclick.LookAtViewer",this.dblclick.bind(this)),e.bind("mousewheel.LookAtViewer",this.mousewheel.bind(this)),e.bind("touchstart.LookAtViewer",this.touchstart.bind(this)),e.bind("touchend.LookAtViewer",this.touchend.bind(this)),this.positionChaser._duration=.3,this.positionChaser.setPrivate(!0),this.positionChaser.setup(),this.centerOfRotationChaser._duration=.3,this.centerOfRotationChaser.setPrivate(!0),this.centerOfRotationChaser.setup(),this.orientationChaser._duration=.3,this.orientationChaser.setPrivate(!0),this.orientationChaser.setup()},mousedown:function(t){if(!(this.getBrowser().getContextMenu().getActive()||this.button>=0)){var i=this.getBrowser().getSurface().offset(),n=t.pageX-i.left,r=t.pageY-i.top;if(0===t.button)t.preventDefault(),t.stopImmediatePropagation(),this.button=t.button,e(document).bind("mouseup.LookAtViewer"+this.getId(),this.mouseup.bind(this)),e(document).bind("mousemove.LookAtViewer"+this.getId(),this.mousemove.bind(this)),e(document).bind("touchend.LookAtViewer"+this.getId(),this.mouseup.bind(this)),e(document).bind("touchmove.LookAtViewer"+this.getId(),this.touchmove.bind(this)),this.getActiveViewpoint().transitionStop(),this.trackballProjectToSphere(n,r,this.fromVector),this._isActive=!0}},mouseup:function(t){if(t.button===this.button&&(this.button=-1,e(document).unbind(".LookAtViewer"+this.getId()),0===t.button))t.preventDefault(),t.stopImmediatePropagation(),this._isActive=!1},dblclick:function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.getBrowser().getSurface(),i=t.offset(),n=e.pageX-i.left-parseFloat(t.css("borderLeftWidth")),r=t.innerHeight()-(e.pageY-i.top-parseFloat(t.css("borderTopWidth")));this.disconnect(),this.lookAtPoint(n,r,this.getStraightenHorizon())},mousemove:function(e){this.getBrowser().addBrowserEvent(),this.event=e;var t=this.getBrowser().getSurface().offset(),i=e.pageX-t.left,n=e.pageY-t.top;if(0===this.button){e.preventDefault(),e.stopImmediatePropagation();var r=this.trackballProjectToSphere(i,n,this.toVector);this.addRotation(this.fromVector,r),this.fromVector.assign(r)}},mousewheel:(_=new l(0,0,0),y=new l(0,0,0),function(e){e.preventDefault(),e.stopImmediatePropagation();var t=this.getActiveViewpoint();t.transitionStop(),_=this.getDistanceToCenter(_).multiply(e.zoomFactor||x),y=t.getUserOrientation().multVecRot(y.set(0,0,_.abs())),e.deltaY>0?this.addMove(y.negate(),l.Zero):e.deltaY<0&&this.addMove(y,l.Zero)}),touchstart:function(e){var t=e.originalEvent.touches;switch(t.length){case 1:this.touch1.set(t[0].pageX,t[0].pageY);break;case 2:this.touchend(e),e.button=0,e.pageX=(t[0].pageX+t[1].pageX)/2,e.pageY=(t[0].pageY+t[1].pageY)/2,this.mousedown(e),this.touch1.set(t[0].pageX,t[0].pageY),this.touch2.set(t[1].pageX,t[1].pageY);break;case 3:this.touchend(e)}},touchend:function(e){if(0===this.button)this.mouseup(e);this.getBrowser().getCurrentTime()-this.tapStart<this.dblTapInterval&&(e.button=1,e.pageX=this.touch1.x,e.pageY=this.touch1.y,this.dblclick(e)),this.tapStart=this.getBrowser().getCurrentTime()},touchmove:(g=new u(0,0),m=new u(0,0),function(t){var i=t.originalEvent.touches;switch(i.length){case 1:break;case 2:g.set(i[0].pageX,i[0].pageY).subtract(this.touch1).normalize(),m.set(i[1].pageX,i[1].pageY).subtract(this.touch2).normalize();var n=g.dot(m)>.7,r=g.dot(m)<-.7;if(n)t.button=0,t.pageX=(i[0].pageX+i[1].pageX)/2,t.pageY=(i[0].pageY+i[1].pageY)/2,this.mousemove(t);else if(r){var o=this.touch1.distance(this.touch2);this.touch1.set(i[0].pageX,i[0].pageY),this.touch2.set(i[1].pageX,i[1].pageY);var s=this.touch1.distance(this.touch2)-o;t.deltaY=s,t.zoomFactor=Math.abs(s)/e(window).width(),this.mousewheel(t)}this.touch1.set(i[0].pageX,i[0].pageY),this.touch2.set(i[1].pageX,i[1].pageY)}}),set_positionOffset__:function(e){this.getActiveViewpoint()._positionOffset=e},set_centerOfRotationOffset__:function(e){this.getActiveViewpoint()._centerOfRotationOffset=e},set_orientationOffset__:function(e){this.getActiveViewpoint()._orientationOffset=e},addMove:(p=new l(0,0,0),f=new l(0,0,0),function(e,t){var i=this.getActiveViewpoint();this.positionChaser._isActive.getValue()&&this.positionChaser._value_changed.hasInterest("set_positionOffset__",this)?(p.assign(this.positionChaser._set_destination.getValue()).add(e),this.positionChaser._set_destination=p):(p.assign(i._positionOffset.getValue()).add(e),this.positionChaser._set_value=i._positionOffset,this.positionChaser._set_destination=p),this.centerOfRotationChaser._isActive.getValue()&&this.centerOfRotationChaser._value_changed.hasInterest("set_centerOfRotationOffset__",this)?(f.assign(this.centerOfRotationChaser._set_destination.getValue()).add(t),this.centerOfRotationChaser._set_destination=f):(f.assign(i._centerOfRotationOffset.getValue()).add(t),this.centerOfRotationChaser._set_value=i._centerOfRotationOffset,this.centerOfRotationChaser._set_destination=f),this.disconnect(),this.positionChaser._value_changed.addInterest("set_positionOffset__",this),this.centerOfRotationChaser._value_changed.addInterest("set_centerOfRotationOffset__",this)}),addRotation:(h=new c(0,0,1,0),d=new c(0,0,1,0),function(e,t){var i=this.getActiveViewpoint();this.orientationChaser._isActive.getValue()&&this.orientationChaser._value_changed.hasInterest("set_orientationOffset__",this)?(h.setFromToVec(t,e).multRight(i.getOrientation()).multRight(this.orientationChaser._set_destination.getValue()),i.straightenHorizon(h),d.assign(i.getOrientation()).inverse().multRight(h),this.orientationChaser._set_destination=d):(h.setFromToVec(t,e).multRight(i.getUserOrientation()),i.straightenHorizon(h),d.assign(i.getOrientation()).inverse().multRight(h),this.orientationChaser._set_value=i._orientationOffset,this.orientationChaser._set_destination=d),this.disconnect(),this.orientationChaser._value_changed.addInterest("set_orientationOffset__",this)}),disconnect:function(){this.orientationChaser._value_changed.removeInterest("set_orientationOffset__",this),this.positionChaser._value_changed.removeInterest("set_positionOffset__",this),this.centerOfRotationChaser._value_changed.removeInterest("set_centerOfRotationOffset__",this)},dispose:function(){this.getBrowser().getSurface().unbind(".LookAtViewer"),e(document).unbind(".LookAtViewer"+this.getId())}}),w})),define("x_ite/Components/Lighting/X3DLightNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4","standard/Math/Algorithm"],(function(e,t,i,n){"use strict";function r(i){e.call(this,i),this.addType(t.X3DLightNode)}return r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,initialize:function(){e.prototype.initialize.call(this),this._on.addInterest("set_on__",this),this._intensity.addInterest("set_on__",this),this.set_on__()},set_on__:function(){this._on.getValue()&&this.getIntensity()>0?(delete this.push,delete this.pop):(this.push=Function.prototype,this.pop=Function.prototype)},getGlobal:function(){return this._global.getValue()},getColor:function(){return this._color.getValue()},getIntensity:function(){return Math.max(this._intensity.getValue(),0)},getAmbientIntensity:function(){return n.clamp(this._ambientIntensity.getValue(),0,1)},getDirection:function(){return this._direction.getValue()},getShadows:function(){return this._shadows.getValue()},getShadowColor:function(){return this._shadowColor.getValue()},getShadowIntensity:function(){return this.getShadows()?n.clamp(this._shadowIntensity.getValue(),0,1):0},getShadowBias:function(){return n.clamp(this._shadowBias.getValue(),0,1)},getShadowMapSize:function(){return Math.min(this._shadowMapSize.getValue(),this.getBrowser().getMaxTextureSize())},getBiasMatrix:function(){const e=new i(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1);return function(){return e}}(),push:function(e,t){if(e.isIndependent()){const i=this.getLights().pop();this._global.getValue()?(i.set(e.getBrowser(),this,e.getLayer().getGroup(),e.getModelViewMatrix().get()),e.getGlobalObjects().push(i),e.getLights().push(i)):(i.set(e.getBrowser(),this,t,e.getModelViewMatrix().get()),e.getLocalObjects().push(i),e.getLights().push(i))}else{const t=e.getLightContainer();this._global.getValue()?(t.getModelViewMatrix().pushMatrix(e.getModelViewMatrix().get()),e.getGlobalObjects().push(t),e.getLights().push(t)):(t.getModelViewMatrix().pushMatrix(e.getModelViewMatrix().get()),e.getLocalObjects().push(t),e.getLights().push(t))}e.pushShadow(this.getShadowIntensity())},pop:function(e){this._global.getValue()||(e.isIndependent()?e.getBrowser().getLocalObjects().push(e.getLocalObjects().pop()):e.getLocalObjects().pop(),e.popShadow())}}),r})),define("x_ite/Components/Lighting/DirectionalLight",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Lighting/X3DLightNode","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/Box3","standard/Math/Geometry/Camera","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Utility/MatrixStack","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g){"use strict";const m=g(_);function _(){this.direction=new c(0,0,0),this.shadowBuffer=null,this.bbox=new a,this.viewVolume=new l,this.viewport=new h(0,0,0,0),this.projectionMatrix=new p,this.modelViewMatrix=new f(p),this.modelMatrix=new p,this.invLightSpaceMatrix=new p,this.invLightSpaceProjectionMatrix=new p,this.shadowMatrix=new p,this.shadowMatrixArray=new Float32Array(16),this.rotation=new d,this.textureUnit=void 0}function y(e){n.call(this,e),this.addType(s.DirectionalLight),"2.0"===e.getSpecificationVersion()&&(this._global=!0)}return _.prototype={constructor:_,getModelViewMatrix:function(){return this.modelViewMatrix},set:function(e,t,i,n){const r=t.getShadowMapSize();this.browser=e,this.lightNode=t,this.groupNode=i,this.modelViewMatrix.pushMatrix(n),t.getShadowIntensity()>0&&r>0&&(this.shadowBuffer=e.popShadowBuffer(r),this.shadowBuffer||console.warn("Couldn't create shadow buffer."))},renderShadowMap:function(e){try{if(!this.shadowBuffer)return;const t=this.lightNode,i=e.getCameraSpaceMatrix().get(),n=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),s=this.invLightSpaceMatrix.assign(t.getGlobal()?n:p.Identity);s.rotate(this.rotation.setFromToVec(c.zAxis,this.direction.assign(t.getDirection()).negate())),s.inverse();const a=this.groupNode.getSubBBox(this.bbox,!0).multRight(s),l=t.getShadowMapSize(),h=this.viewport.set(0,0,l,l),d=u.orthoBox(a,this.projectionMatrix);this.shadowBuffer.bind(),e.getViewVolumes().push(this.viewVolume.set(d,h,h)),e.getProjectionMatrix().pushMatrix(d),e.getModelViewMatrix().pushMatrix(s),e.render(o.SHADOW,r.prototype.traverse,this.groupNode),e.getModelViewMatrix().pop(),e.getProjectionMatrix().pop(),e.getViewVolumes().pop(),this.shadowBuffer.unbind(),t.getGlobal()||s.multLeft(n.inverse()),this.invLightSpaceProjectionMatrix.assign(s).multRight(d).multRight(t.getBiasMatrix())}catch(e){console.error(e)}},setGlobalVariables:function(e){this.modelViewMatrix.get().multDirMatrix(this.direction.assign(this.lightNode.getDirection())).normalize(),this.shadowMatrix.assign(e.getCameraSpaceMatrix().get()).multRight(this.invLightSpaceProjectionMatrix),this.shadowMatrixArray.set(this.shadowMatrix)},setShaderUniforms:function(e,t){const i=t.numLights++;if(t.hasLight(i,this))return;const n=this.lightNode,r=n.getColor(),o=this.direction;if(e.uniform1i(t.x3d_LightType[i],1),e.uniform3f(t.x3d_LightColor[i],r.r,r.g,r.b),e.uniform1f(t.x3d_LightIntensity[i],n.getIntensity()),e.uniform1f(t.x3d_LightAmbientIntensity[i],n.getAmbientIntensity()),e.uniform3f(t.x3d_LightDirection[i],o.x,o.y,o.z),this.shadowBuffer){const r=this.browser,o=n.getShadowColor();e.uniform3f(t.x3d_ShadowColor[i],o.r,o.g,o.b),e.uniform1f(t.x3d_ShadowIntensity[i],n.getShadowIntensity()),e.uniform1f(t.x3d_ShadowBias[i],n.getShadowBias()),e.uniformMatrix4fv(t.x3d_ShadowMatrix[i],!1,this.shadowMatrixArray),e.uniform1i(t.x3d_ShadowMapSize[i],n.getShadowMapSize()),this.textureUnit=n.getGlobal()?void 0===this.textureUnit?r.popTexture2DUnit():this.textureUnit:r.getTexture2DUnit(),void 0!==this.textureUnit?(e.activeTexture(e.TEXTURE0+this.textureUnit),e.getVersion()>=2||r.getExtension("WEBGL_depth_texture")?e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getDepthTexture()):e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getColorTexture()),e.uniform1i(t.x3d_ShadowMap[i],this.textureUnit)):console.warn("Not enough combined texture units for shadow map available.")}},dispose:function(){this.browser.pushShadowBuffer(this.shadowBuffer),this.lightNode.getGlobal()&&this.browser.pushTexture2DUnit(this.textureUnit),this.modelViewMatrix.clear(),this.browser=null,this.lightNode=null,this.groupNode=null,this.shadowBuffer=null,this.textureUnit=void 0,m.push(this)}},y.prototype=Object.assign(Object.create(n.prototype),{constructor:y,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"global",new e.SFBool(!1)),new t(s.inputOutput,"on",new e.SFBool(!0)),new t(s.inputOutput,"color",new e.SFColor(1,1,1)),new t(s.inputOutput,"intensity",new e.SFFloat(1)),new t(s.inputOutput,"ambientIntensity",new e.SFFloat),new t(s.inputOutput,"direction",new e.SFVec3f(0,0,-1)),new t(s.inputOutput,"shadows",new e.SFBool),new t(s.inputOutput,"shadowColor",new e.SFColor),new t(s.inputOutput,"shadowIntensity",new e.SFFloat(1)),new t(s.inputOutput,"shadowBias",new e.SFFloat(.005)),new t(s.initializeOnly,"shadowMapSize",new e.SFInt32(1024))]),getTypeName:function(){return"DirectionalLight"},getComponentName:function(){return"Lighting"},getContainerField:function(){return"children"},getLights:function(){return m}}),y})),define("x_ite/Browser/Navigation/X3DNavigationContext",["x_ite/Fields","x_ite/Browser/Navigation/ExamineViewer","x_ite/Browser/Navigation/WalkViewer","x_ite/Browser/Navigation/FlyViewer","x_ite/Browser/Navigation/PlaneViewer","x_ite/Browser/Navigation/NoneViewer","x_ite/Browser/Navigation/LookAtViewer","x_ite/Components/Lighting/DirectionalLight","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=Symbol(),c=Symbol(),h=Symbol();function d(){this.addChildObjects("activeLayer",new e.SFNode,"activeNavigationInfo",new e.SFNode,"activeViewpoint",new e.SFNode,"availableViewers",new e.MFString,"viewer",new e.SFString("EXAMINE")),this[l]=new Set,this[c]=new o(this)}return d.prototype={initialize:function(){this._viewer.addInterest("set_viewer__",this),this.initialized().addInterest("set_world__",this),this.shutdown().addInterest("remove_world__",this),this[h]=function(e){const t=new a(e.getPrivateScene());t.setup();const i=t.getLights().pop();return i.set(e,t,null,u.Identity),i.dispose=Function.prototype,i}(this),this[c].setup()},getHeadlight:function(){return this[h]},getActiveLayer:function(){return this._activeLayer.getValue()},getActiveNavigationInfo:function(){return this._activeNavigationInfo.getValue()},getActiveViewpoint:function(){return this._activeViewpoint.getValue()},getCurrentViewer:function(){return this._viewer.getValue()},getViewer:function(){return this[c]},addCollision:function(e){this[l].add(e)},removeCollision:function(e){this[l].delete(e)},getCollisionCount:function(){return this[l].size},remove_world__:function(){this.getWorld()._activeLayer.removeInterest("set_activeLayer__",this)},set_world__:function(){this.getWorld()._activeLayer.addInterest("set_activeLayer__",this),this.set_activeLayer__()},set_activeLayer__:function(){this._activeLayer.getValue()&&(this._activeLayer.getValue().getNavigationInfoStack().removeInterest("set_activeNavigationInfo__",this),this._activeLayer.getValue().getViewpointStack().removeInterest("set_activeViewpoint__",this)),this._activeLayer=this.getWorld().getActiveLayer(),this._activeLayer.getValue()&&(this._activeLayer.getValue().getNavigationInfoStack().addInterest("set_activeNavigationInfo__",this),this._activeLayer.getValue().getViewpointStack().addInterest("set_activeViewpoint__",this)),this.set_activeNavigationInfo__(),this.set_activeViewpoint__()},set_activeNavigationInfo__:function(){this._activeNavigationInfo.getValue()&&this._activeNavigationInfo.getValue()._viewer.removeFieldInterest(this._viewer),this._activeLayer.getValue()?(this._activeNavigationInfo=this._activeLayer.getValue().getNavigationInfo(),this._activeNavigationInfo.getValue()._viewer.addFieldInterest(this._viewer),this._viewer=this._activeNavigationInfo.getValue()._viewer):(this._activeNavigationInfo=null,this._viewer="NONE")},set_activeViewpoint__:function(){this._activeLayer.getValue()?this._activeViewpoint=this._activeLayer.getValue().getViewpoint():this._activeViewpoint=null},set_viewer__:function(e){switch(this._activeNavigationInfo.getValue()?this._availableViewers=this._activeNavigationInfo.getValue()._availableViewers:this._availableViewers.length=0,this[c]&&this[c].dispose(),e.getValue()){case"EXAMINE":default:this[c]=new t(this);break;case"WALK":this[c]=new i(this);break;case"FLY":this[c]=new n(this);break;case"PLANE":case"PLANE_create3000.de":this[c]=new r(this);break;case"NONE":this[c]=new o(this);break;case"LOOKAT":this[c]=new s(this)}this[c].setup()}},d})),define("x_ite/Components/Layering/Viewport",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Layering/X3DViewportNode","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType","standard/Utility/ObjectCache","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector4"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=s(a);function c(e){n.call(this,e),this.addType(r.Viewport),this.rectangle=new u(0,0,0,0)}return c.prototype=Object.assign(Object.create(n.prototype),{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"clipBoundary",new e.MFFloat(0,1,0,1)),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Viewport"},getComponentName:function(){return"Layering"},getContainerField:function(){return"viewport"},getRectangle:function(e){const t=e.getViewport(),i=Math.floor(t[2]*this.getLeft()),n=Math.floor(t[2]*this.getRight()),r=Math.floor(t[3]*this.getBottom()),o=Math.floor(t[3]*this.getTop());return this.rectangle.set(i,r,Math.max(0,n-i),Math.max(0,o-r)),this.rectangle},getLeft:function(){return this._clipBoundary.length>0?this._clipBoundary[0]:0},getRight:function(){return this._clipBoundary.length>1?this._clipBoundary[1]:1},getBottom:function(){return this._clipBoundary.length>2?this._clipBoundary[2]:0},getTop:function(){return this._clipBoundary.length>3?this._clipBoundary[3]:1},traverse:function(e,t){if(this.push(t),e===o.POINTER)t.getBrowser().isPointerInRectangle(this.rectangle)&&n.prototype.traverse.call(this,e,t);else n.prototype.traverse.call(this,e,t);this.pop(t)},push:function(e){const t=e.getViewVolumes(),i=this.getRectangle(e.getBrowser()),n=t.length?t.at(-1).getViewport():i,r=l.pop();r.set(e.getProjectionMatrix().get(),n,i),t.push(r)},pop:function(e){l.push(e.getViewVolumes().pop())}}),c})),define("x_ite/Browser/Layering/X3DLayeringContext",["x_ite/Components/Layering/Viewport"],(function(e){"use strict";const t=Symbol();function i(){this[t]=new e(this.getPrivateScene())}return i.prototype={initialize:function(){this[t].setup()},getDefaultViewport:function(){return this[t]}},i})),define("x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext",["x_ite/Components/Texturing/TextureProperties"],(function(e){"use strict";const t=Symbol(),i=Symbol();function n(){}return n.prototype={initialize:function(){},getBackgroundSphereShader:function(){return this[t]=this.createShader("BackgroundSphereShader","Background"),this.getBackgroundSphereShader=function(){return this[t]},Object.defineProperty(this,"getBackgroundSphereShader",{enumerable:!1}),this[t]},getBackgroundTextureProperties:function(){return this[i]=new e(this.getPrivateScene()),this[i]._boundaryModeS="CLAMP_TO_EDGE",this[i]._boundaryModeT="CLAMP_TO_EDGE",this[i]._boundaryModeR="CLAMP_TO_EDGE",this[i]._minificationFilter="NICEST",this[i]._magnificationFilter="NICEST",this[i].setup(),this.getBackgroundTextureProperties=function(){return this[i]},Object.defineProperty(this,"getBackgroundTextureProperties",{enumerable:!1}),this[i]}},n})),define("x_ite/Browser/Lighting/X3DLightingContext",["x_ite/Rendering/TextureBuffer"],(function(e){"use strict";const t=Symbol(),i=Symbol();function n(){const e=this.getContext(),n=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS);this[t]=n>16?8:n>8?4:2,this[i]=[]}return n.prototype={initialize:function(){},getMaxLights:function(){return this[t]},popShadowBuffer:function(t){try{const n=this[i][t];if(n){if(n.length)return n.pop()}else this[i][t]=[];return new e(this,t,t)}catch(e){return console.error(e),null}},pushShadowBuffer:function(e){e&&this[i][e.getWidth()].push(e)}},n})),define("x_ite/Browser/Picking/X3DPickingContext",["x_ite/Rendering/TraverseType"],(function(e){"use strict";const t=Symbol(),i=Symbol(),n=Symbol(),r=Symbol(),o=Symbol();function s(){this[t]=new Set,this[i]=[new Set],this[n]=[],this[r]=[!1],this[o]=0}return s.prototype={initialize:function(){},addTransformSensor:function(e){this[t].add(e),this.enablePicking()},removeTransformSensor:function(e){this[t].delete(e),this.enablePicking()},addPickSensor:function(e){this[i][0].add(e),this.enablePicking()},removePickSensor:function(e){this[i][0].delete(e),this.enablePicking()},getPickSensors:function(){return this[i]},getPickingHierarchy:function(){return this[n]},getPickable:function(){return this[r]},enablePicking:function(){this[t].size||this[i][0].size?this._sensorEvents.addInterest("picking",this):this._sensorEvents.removeInterest("picking",this)},picking:function(){const n=performance.now();this.getWorld().traverse(e.PICKING,null);for(const e of this[t])e.process();for(const e of this[i][0])e.process();this[o]=performance.now()-n},getPickingTime:function(){return this[o]}},s})),define("x_ite/Browser/Sound/X3DSoundContext",["x_ite/Fields"],(function(e){"use strict";function t(){this.addChildObjects("volume",new e.SFFloat(1),"mute",new e.SFBool)}return t.prototype={initialize:function(){}},t})),define("x_ite/Browser/Text/TextAlignment",[],(function(){"use strict";let e=0;return{BEGIN:++e,FIRST:++e,MIDDLE:++e,END:++e}})),define("x_ite/Components/Text/X3DFontStyleNode",["x_ite/Fields","x_ite/Components/Core/X3DNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Browser/Text/TextAlignment","x_ite/InputOutput/FileLoader","x_ite/Base/X3DConstants","x_ite/Browser/Networking/urls"],(function(e,t,i,n,r,o,s){"use strict";const a={SERIF:{PLAIN:s.getFontsUrl("DroidSerif-Regular.ttf"),ITALIC:s.getFontsUrl("DroidSerif-Italic.ttf"),BOLD:s.getFontsUrl("DroidSerif-Bold.ttf"),BOLDITALIC:s.getFontsUrl("DroidSerif-BoldItalic.ttf")},SANS:{PLAIN:s.getFontsUrl("Ubuntu-R.ttf"),ITALIC:s.getFontsUrl("Ubuntu-RI.ttf"),BOLD:s.getFontsUrl("Ubuntu-B.ttf"),BOLDITALIC:s.getFontsUrl("Ubuntu-BI.ttf")},TYPEWRITER:{PLAIN:s.getFontsUrl("UbuntuMono-R.ttf"),ITALIC:s.getFontsUrl("UbuntuMono-RI.ttf"),BOLD:s.getFontsUrl("UbuntuMono-B.ttf"),BOLDITALIC:s.getFontsUrl("UbuntuMono-BI.ttf")}};function u(n){t.call(this,n),i.call(this,n),this.addType(o.X3DFontStyleNode),this.addChildObjects("load",new e.SFBool(!0),"autoRefresh",new e.SFTime,"autoRefreshTimeLimit",new e.SFTime(3600)),this.addAlias("url",this._family),this.familyStack=[],this.alignments=[],this.loader=new r(this)}return u.prototype=Object.assign(Object.create(t.prototype),i.prototype,{constructor:u,initialize:function(){t.prototype.initialize.call(this),i.prototype.initialize.call(this),this._style.addInterest("set_style__",this),this._justify.addInterest("set_justify__",this),this.font=null,this.familyIndex=0,this.set_justify__(),this.set_style__(),this.requestImmediateLoad()},set_style__:function(){this._load.getValue()&&(this.setLoadState(o.NOT_STARTED_STATE),this.requestImmediateLoad())},set_justify__:function(){const e=this._horizontal.getValue()?this._leftToRight.getValue():this._topToBottom.getValue();this.alignments[0]=this._justify.length>0?this.getAlignment(0,e):e?n.BEGIN:n.END;const t=this._horizontal.getValue()?this._topToBottom.getValue():this._leftToRight.getValue();this.alignments[1]=this._justify.length>1?this.getAlignment(1,t):t?n.FIRST:n.END},getMajorAlignment:function(){return this.alignments[0]},getMinorAlignment:function(){return this.alignments[1]},getAlignment:function(e,t){if(t)switch(this._justify[e]){case"FIRST":return n.FIRST;case"BEGIN":return n.BEGIN;case"MIDDLE":return n.MIDDLE;case"END":return n.END}else switch(this._justify[e]){case"FIRST":case"BEGIN":return n.END;case"MIDDLE":return n.MIDDLE;case"END":return n.BEGIN}return e?n.FIRST:n.BEGIN},getDefaultFont:function(e){const t=a[e];if(t)return t[this._style.getValue()]||t.PLAIN},loadNow:function(){const e=this._url.copy();e.push("SERIF"),this.familyStack.length=0;for(const t of e)this.familyStack.push(this.getDefaultFont(t)||t);this.loadNext()},loadNext:function(){try{if(0===this.familyStack.length)return this.setLoadState(o.FAILED_STATE),void(this.font=null);this.family=this.familyStack.shift(),this.URL=new URL(this.family,this.loader.getReferer()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.getBrowser().getFont(this.URL).done(this.setFont.bind(this)).fail(this.setError.bind(this))}catch(e){this.setError(e.message)}},setError:function(e){"data:"!==this.URL.protocol&&console.warn("Error loading font '"+decodeURI(this.URL.href)+"':",e),this.loadNext()},setFont:function(e){this.font=e,this.setLoadState(o.COMPLETE_STATE),this.addNodeEvent()},getFont:function(){return this.font}}),u})),define("standard/Math/Geometry/Box2",["standard/Math/Numbers/Matrix3","standard/Math/Numbers/Vector2"],(function(e,t){"use strict";function i(t,i){switch(arguments.length){case 0:return void(this.matrix=new e(0,0,0,0,0,0,0,0,0));case 2:return void(this.matrix=new e(t.x/2,0,0,0,t.y/2,0,i.x,i.y,1));case 3:{const t=arguments[0],i=arguments[1],n=(i.x-t.x)/2,r=(i.y-t.y)/2,o=(i.x+t.x)/2,s=(i.y+t.y)/2;return void(this.matrix=new e(n,0,0,0,r,0,o,s,1))}}}return i.prototype={constructor:i,copy:function(){const e=Object.create(i.prototype);return e.matrix=this.matrix.copy(),e},assign:function(e){return this.matrix.assign(e.matrix),this},equals:function(e){return this.matrix.equals(e.matrix)},set:function(e,t){const i=this.matrix;switch(arguments.length){case 0:return i[0]=.5,i[1]=0,i[2]=0,i[3]=0,i[4]=.5,i[5]=0,i[6]=0,i[7]=0,i[8]=0,this;case 2:return i[0]=e.x/2,i[1]=0,i[2]=0,i[3]=0,i[4]=e.y/2,i[5]=0,i[6]=t.x,i[7]=t.y,i[8]=1,this;case 3:{const e=arguments[0],t=arguments[1],i=(t.x-e.x)/2,n=(t.y-e.y)/2,r=(t.x+e.x)/2,o=(t.y+e.y)/2;return this.matrix.set(i,0,0,0,n,0,r,o,1),this}}},setExtents:function(e,t){const i=this.matrix,n=(t.x-e.x)/2,r=(t.y-e.y)/2,o=(t.x+e.x)/2,s=(t.y+e.y)/2;return i[0]=n,i[1]=0,i[2]=0,i[3]=0,i[4]=r,i[5]=0,i[6]=o,i[7]=s,i[8]=1,this},isEmpty:function(){return 0===this.matrix[8]},add:function(){const e=new t(0,0),i=new t(0,0),n=new t(0,0),r=new t(0,0);return function(t){return this.isEmpty()?this.assign(t):t.isEmpty()?this:(this.getExtents(e,i),t.getExtents(n,r),this.set(e.min(n),i.max(r),!0))}}(),multLeft:function(e){return this.matrix.multLeft(e),this},multRight:function(e){return this.matrix.multRight(e),this},getExtents:function(e,t){this.getAbsoluteExtents(e,t),e.add(this.center),t.add(this.center)},getAbsoluteExtents:function(){const e=new t(0,0);return function(t,i){const n=this.matrix,r=n.xAxis,o=n.yAxis;e.assign(r).add(o);const s=o.subtract(r);t.assign(e).min(s),i.assign(e).max(s),e.negate(),s.negate(),t.min(e,s),i.max(e,s)}}(),containsPoint:function(){const e=new t(0,0),i=new t(0,0);return function(t){return this.getExtents(e,i),e.x<=t.x&&i.x>=t.x&&e.y<=t.y&&i.y>=t.y}}(),toString:function(){return this.size+", "+this.center}},Object.defineProperty(i.prototype,"size",{get:function(){const e=new t(0,0),i=new t(0,0);return function(){return this.getAbsoluteExtents(e,i),i.subtract(e)}}(),enumerable:!0,configurable:!1}),Object.defineProperty(i.prototype,"center",{get:function(){return this.matrix.origin},enumerable:!0,configurable:!1}),i})),define("x_ite/Browser/Text/X3DTextGeometry",["x_ite/Browser/Text/TextAlignment","standard/Math/Geometry/Box2","standard/Math/Geometry/Box3","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r){"use strict";var o=new t,s=new t,a=new n(0,0),u=new n(0,0),l=new n(0,0),c=new n(0,0),h=new r(0,0,0),d=new r(0,0,0),p=new n(0,0),f=new n(0,0),g=new n(0,0),m=new n(0,0),_=new n(0,0),y=new r(0,0,0),x=new n(0,0),w=new t,b=new n(0,0),v=new r(0,0,0);function S(e,t){this.text=e,this.fontStyle=t,this.glyphs=[],this.minorAlignment=new n(0,0),this.translations=[],this.charSpacings=[],this.bearing=new n(0,0),this.yPad=[],this.bbox=new i}return S.prototype={constructor:S,getBrowser:function(){return this.text.getBrowser()},getText:function(){return this.text},getFontStyle:function(){return this.fontStyle},getGlyphs:function(){return this.glyphs},getMinorAlignment:function(){return this.minorAlignment},getTranslations:function(){return this.translations},getCharSpacings:function(){return this.charSpacings},getBearing:function(){return this.bearing},getBBox:function(){return this.bbox},update:function(){var e=this.text,t=this.fontStyle,i=e._string.length;if(e._lineBounds.length=i,this.glyphs.length=0,0===i||!t.getFont())return e._origin.setValue(v),e._textBounds.setValue(b),void this.bbox.set();if(t._horizontal.getValue())this.resizeArray(this.translations,i),this.resizeArray(this.charSpacings,i),this.horizontal(e,t);else{for(var n=e._string,r=0,o=0,s=n.length;o<s;++o)r+=n[o].length;this.resizeArray(this.translations,r),this.resizeArray(this.charSpacings,r),this.vertical(e,t)}},resizeArray:function(e,t){for(var i=e.length;i<t;++i)e.push(new n(0,0));e.length=t},horizontal:function(t,i){var n=i.getFont(),r=t._string,s=r.length,l=Math.max(0,t._maxExtent.getValue()),c=i._topToBottom.getValue(),m=i.getScale(),x=i._spacing.getValue();o.set();for(var b=c?s:-1,v=c?1:-1,S=c?0:s-1,T=0;S!==b;S+=v,++T){var C=r[S],N=this.getHorizontalLineExtents(i,C,a,u,T);p.assign(u).subtract(a);var F=0,O=t.getLength(S);switch(_.set(p.x*m,0==T?u.y-n.descender/n.unitsPerEm*m:x),l&&(O=O?Math.min(l,O):Math.min(l,p.x*m)),O&&(F=(O-_.x)/(N.length-1),_.x=O,p.x=O/m),this.charSpacings[T]=F,t._lineBounds[S]=_,i.getMajorAlignment()){case e.BEGIN:case e.FIRST:this.translations[T].set(0,-T*x);break;case e.MIDDLE:this.translations[T].set(-a.x-p.x/2,-T*x);break;case e.END:this.translations[T].set(-a.x-p.x,-T*x)}this.translations[T].multiply(m),f.assign(a).add(g.assign(p).divide(2)),o.add(w.set(p.multiply(m),f.multiply(m).add(this.translations[T])))}switch(o.getExtents(a,u),p.assign(u).subtract(a),t._textBounds=p,this.bearing.set(0,-u.y),i.getMinorAlignment()){case e.BEGIN:this.minorAlignment.assign(this.bearing);break;case e.FIRST:this.minorAlignment.set(0,0);break;case e.MIDDLE:this.minorAlignment.set(0,p.y/2-u.y);break;case e.END:this.minorAlignment.set(0,(s-1)*x*m)}a.add(this.minorAlignment),u.add(this.minorAlignment),t._origin.setValue(y.set(a.x,u.y,0)),this.bbox.setExtents(h.set(a.x,a.y,0),d.set(u.x,u.y,0))},vertical:function(t,i){var r=i.getFont(),c=t._string,b=c.length,v=Math.max(0,t._maxExtent.getValue()),S=i._leftToRight.getValue(),T=i._topToBottom.getValue(),C=i.getScale(),N=i._spacing.getValue(),F=this.yPad,O=this.getBrowser().getBrowserOptions().getPrimitiveQuality();o.set();for(var E=S?b:-1,D=S?1:-1,M=0,I=S?0:b-1;I!==E;I+=D){var V=this.stringToGlyphs(r,c[I],!0,I),B=M,A=V.length;s.set();for(var P=T?A:-1,R=T?1:-1,L=T?0:A-1;L!==P;L+=R,++M){var k=V[L];this.getGlyphExtents(r,k,O,a,u),p.assign(u).subtract(a);var U=T?L:A-L-1;this.translations[M].set((N-p.x-a.x)/2,-U),f.assign(a).add(g.assign(p).divide(2)).add(this.translations[M]),s.add(w.set(p,f))}s.getExtents(a,u),p.assign(u).subtract(a);var X=S?I:b-I-1,z=(N-p.x)/2,j=0,G=t.getLength(I);switch(_.set(0===I?N-z:N,A?p.y:0).multiply(C),v&&(G=G?Math.min(v,G):Math.min(v,p.y*C)),G&&(j=(G-_.y)/(V.length-1)/C,_.y=G,p.y=G/C,a.y=u.y-p.y),t._lineBounds[I]=_,i.getMajorAlignment()){case e.BEGIN:case e.FIRST:m.set(X*N,-1);break;case e.MIDDLE:m.set(X*N,p.y/2-u.y);break;case e.END:A&&this.getGlyphExtents(r,V[T?A-1:0],O,l.assign(n.Zero),x),m.set(X*N,p.y-u.y+l.y)}for(var q=0,H=B;H<M;++H)this.translations[H].add(m),this.translations[H].y-=q,this.translations[H].multiply(C),q+=j;switch(i.getMajorAlignment()){case e.BEGIN:case e.FIRST:F[I]=u.y+m.y;break;case e.MIDDLE:F[I]=0;break;case e.END:F[I]=a.y+m.y}f.assign(a).add(g.assign(p).divide(2)),o.add(w.set(p.multiply(C),f.add(m).multiply(C)))}switch(o.getExtents(a,u),p.assign(u).subtract(a),i.getMajorAlignment()){case e.BEGIN:case e.FIRST:var W=0;for(G=(Y=t._lineBounds).length;W<G;++W)Y[W].y+=u.y-F[W]*C;break;case e.MIDDLE:break;case e.END:var Y;for(W=0,G=(Y=t._lineBounds).length;W<G;++W)Y[W].y+=F[W]*C-a.y}switch(t._textBounds=p,i.getMajorAlignment()){case e.BEGIN:case e.FIRST:this.bearing.set(-a.x,u.y);break;case e.MIDDLE:this.bearing.set(-a.x,0);break;case e.END:this.bearing.set(-a.x,a.y)}switch(i.getMinorAlignment()){case e.BEGIN:case e.FIRST:this.minorAlignment.set(-a.x,0);break;case e.MIDDLE:this.minorAlignment.set(-a.x-p.x/2,0);break;case e.END:this.minorAlignment.set(-a.x-p.x,0)}a.add(this.minorAlignment),u.add(this.minorAlignment),t._origin.setValue(y.set(a.x,u.y,0)),this.bbox.set(h.set(a.x,a.y,0),d.set(u.x,u.y,0),!0)},stringToGlyphs:function(e,t,i,n){var r=this.glyphs[n];r||(r=this.glyphs[n]=[]),r.length=t.length;for(var o=i?0:t.length-1,s=i?t.length:-1,a=i?1:-1,u=o,l=0;u!==s;u+=a,++l)r[l]=e.charToGlyph(t[u]);return r},getHorizontalLineExtents:function(t,i,n,r,o){for(var s=t.getFont(),a=t._horizontal.getValue()?t._leftToRight.getValue():t._topToBottom.getValue(),u=this.stringToGlyphs(s,i,a,o),h=this.getBrowser().getBrowserOptions().getPrimitiveQuality(),d=0,p=0,f=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=0,_=u.length;m<_;++m){var y=u[m],x=m+1<_?s.getKerningValue(y,u[m+1]):0;this.getGlyphExtents(s,y,h,l,c),p+=y.advanceWidth+x,f=Math.min(f,l.y),g=Math.max(g,c.y)}switch(u.length?(this.getGlyphExtents(s,u[0],h,l,c),d=l.x):(f=0,g=0),n.set(d,f),r.set(p/s.unitsPerEm,g),t.getMajorAlignment()){case e.BEGIN:case e.FIRST:n.x=0}return u},traverse:function(e,t){}},S})),define("standard/Math/Algorithms/Bezier",["standard/Math/Algorithm"],(function(e){"use strict";const t=e.lerp;function i(e,t,i,n,r,o,s,a){this.x0=e,this.y0=t,this.x1=i,this.y1=n,this.x2=r,this.y2=o,this.x3=s,this.y3=a,this.order=arguments.length/2-1}function n(e,i,n,r,o,s,a){const u=t(e,n,a),l=t(i,r,a),c=t(n,o,a),h=t(r,s,a);return{x:t(u,c,a),y:t(l,h,a)}}function r(e,i,n,r,o,s,a,u,l){const c=t(e,n,l),h=t(i,r,l),d=t(n,o,l),p=t(r,s,l),f=t(o,a,l),g=t(s,u,l),m=t(c,d,l),_=t(h,p,l),y=t(d,f,l),x=t(p,g,l);return{x:t(m,y,l),y:t(_,x,l)}}return i.prototype={getLUT:function(e){const t=this.x0,i=this.y0,o=this.x1,s=this.y1,a=this.x2,u=this.y2,l=this.x3,c=this.y3,h=[];switch(this.order){case 2:for(let r=0,l=e-1;r<e;++r)h.push(n(t,i,o,s,a,u,r/l));break;case 3:for(let n=0,d=e-1;n<e;++n)h.push(r(t,i,o,s,a,u,l,c,n/d))}return h}},i})),define("x_ite/Browser/Text/PolygonText",["x_ite/Browser/Core/PrimitiveQuality","x_ite/Browser/Text/X3DTextGeometry","x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Triangle3","standard/Math/Algorithms/Bezier"],(function(e,t,i,n,r,o,s){"use strict";function a(e,n){t.call(this,e,n),e._transparent=!1,this.texCoordArray=i.createArray()}var u,l,c,h,d;return a.prototype=Object.assign(Object.create(t.prototype),{constructor:a,getTransparent:function(){return!1},getMatrix:function(){return r.Identity},build:(h=new n(0,0,0),d=new n(0,0,0),function(){var e=this.getFontStyle(),t=e.getFont();if(t){var i=this.getText(),n=this.getGlyphs(),r=this.getMinorAlignment(),o=this.getTranslations(),s=this.getCharSpacings(),a=e.getScale(),u=e._spacing.getValue(),l=i._origin.getValue(),c=a/t.unitsPerEm,p=this.getBrowser().getBrowserOptions().getPrimitiveQuality(),f=this.texCoordArray,g=i.getNormals(),m=i.getVertices();if(i.getMultiTexCoords().push(f),this.getBBox().getExtents(h,d),i.getMin().assign(h),i.getMax().assign(d),e._horizontal.getValue())for(var _=0,y=n.length;_<y;++_)for(var x=n[_],w=s[_],b=o[_],v=0,S=0,T=x.length;S<T;++S){for(var C=x[S],N=this.getGlyphGeometry(t,C,p),F=r.x+b.x+v+S*w,O=r.y+b.y,E=0,D=N.length;E<D;++E){var M=N[E].x*a+F,I=N[E].y*a+O;f.push((M-l.x)/u,(I-l.y)/u,0,1),g.push(0,0,1),m.push(M,I,0,1)}var V=0;S+1<x.length&&(V=t.getKerningValue(C,x[S+1])),v+=(C.advanceWidth+V)*c}else for(var B=e._leftToRight.getValue(),A=e._topToBottom.getValue(),P=B?0:i._string.length-1,R=B?i._string.length:-1,L=B?1:-1,k=(_=P,0);_!==R;_+=L){var U=(x=n[_]).length,X=A?U:-1,z=A?1:-1;for(S=A?0:U-1;S!==X;S+=z,++k)for(b=o[k],E=0,D=(N=this.getGlyphGeometry(t,x[S],p)).length;E<D;++E)M=N[E].x*a+r.x+b.x,I=N[E].y*a+r.y+b.y,f.push((M-l.x)/u,(I-l.y)/u,0,1),g.push(0,0,1),m.push(M,I,0,1)}}}),getGlyphExtents:function(e,t,i,n,r){var o=this.getBrowser().getGlyph(e,i,t.index);if(s=o.extents)return n.assign(s.min),void r.assign(s.max);var s,a=this.getGlyphGeometry(e,t,i);if(a.length){var u=a[0];n.assign(u),r.assign(u);for(var l=1,c=a.length;l<c;++l){u=a[l];n.min(u),r.max(u)}}else n.set(0,0,0),r.set(0,0,0);(s=o.extents={}).min=n.copy(),s.max=r.copy()},getGlyphGeometry:function(e,t,i){var n=this.getBrowser().getGlyph(e,i,t.index),r=n.geometry;return r||(r=n.geometry=[],this.createGlyphGeometry(t,r,i),r)},createGlyphGeometry:(u=[],l=[],c=new n(0,0,0),function(e,t,i){var r=this.getBezierDimension(i),a=e.getPath(0,0,1).commands,h=0,d=0;u.length=0,l.length=0;for(var p=0,f=a.length;p<f;++p){var g=a[p];switch(g.type){case"M":case"Z":u.length>2&&(u[0].x===u.at(-1).x&&u[0].y===u.at(-1).y&&u.pop(),l.push(u)),u=[],"M"===g.type&&u.push(new n(g.x,-g.y,0));break;case"L":u.push(new n(g.x,-g.y,0));break;case"Q":for(var m=1,_=(y=new s(h,-d,g.x1,-g.y1,g.x,-g.y).getLUT(r)).length;m<_;++m)u.push(new n(y[m].x,y[m].y,0));break;case"C":var y;for(m=1,_=(y=new s(h,-d,g.x1,-g.y1,g.x2,-g.y2,g.x,-g.y).getLUT(r)).length;m<_;++m)u.push(new n(y[m].x,y[m].y,0));break;default:continue}h=g.x,d=g.y}l=l.map((function(e){return o.getPolygonNormal(e,c),c.dot(n.zAxis)>0?e:e.reverse()})),l.push(t),o.triangulatePolygon.apply(o,l)}),getBezierDimension:function(t){switch(t){case e.LOW:return 3;case e.HIGH:return 7;default:return 5}},display:function(e,t){},transformLine:function(e){},transformMatrix:function(e){}}),a})),define("x_ite/Components/Text/FontStyle",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Text/X3DFontStyleNode","x_ite/Browser/Text/PolygonText","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.FontStyle),this._size.setUnit("length")}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"language",new e.SFString),new t(o.inputOutput,"family",new e.MFString("SERIF")),new t(o.inputOutput,"style",new e.SFString("PLAIN")),new t(o.inputOutput,"size",new e.SFFloat(1)),new t(o.inputOutput,"spacing",new e.SFFloat(1)),new t(o.inputOutput,"horizontal",new e.SFBool(!0)),new t(o.inputOutput,"leftToRight",new e.SFBool(!0)),new t(o.inputOutput,"topToBottom",new e.SFBool(!0)),new t(o.inputOutput,"justify",new e.MFString("BEGIN"))]),getTypeName:function(){return"FontStyle"},getComponentName:function(){return"Text"},getContainerField:function(){return"fontStyle"},getTextGeometry:function(e){return new r(e,this)},getScale:function(){return this._size.getValue()}}),s})),function(e,t){"object"==typeof exports&&void 0!==module?t(exports):"function"==typeof define&&define.amd?define("opentype/dist/opentype",["exports"],t):t((e=e||self).opentype={})}(this,(function(e){"use strict";
|
|
80
|
-
/*! https://mths.be/codepointat v0.2.0 by @mathias */var t,i;String.prototype.codePointAt||(t=function(){try{var e={},t=Object.defineProperty,i=t(e,e,e)&&t}catch(e){}return i}(),i=function(e){if(null==this)throw TypeError();var t=String(this),i=t.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||n>=i)){var r,o=t.charCodeAt(n);return o>=55296&&o<=56319&&i>n+1&&(r=t.charCodeAt(n+1))>=56320&&r<=57343?1024*(o-55296)+r-56320+65536:o}},t?t(String.prototype,"codePointAt",{value:i,configurable:!0,writable:!0}):String.prototype.codePointAt=i);function n(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function r(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new n,this.dtree=new n}var o=new n,s=new n,a=new Uint8Array(30),u=new Uint16Array(30),l=new Uint8Array(30),c=new Uint16Array(30),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new n,p=new Uint8Array(320);function f(e,t,i,n){var r,o;for(r=0;r<i;++r)e[r]=0;for(r=0;r<30-i;++r)e[r+i]=r/i|0;for(o=n,r=0;r<30;++r)t[r]=o,o+=1<<e[r]}var g=new Uint16Array(16);function m(e,t,i,n){var r,o;for(r=0;r<16;++r)e.table[r]=0;for(r=0;r<n;++r)e.table[t[i+r]]++;for(e.table[0]=0,o=0,r=0;r<16;++r)g[r]=o,o+=e.table[r];for(r=0;r<n;++r)t[i+r]&&(e.trans[g[t[i+r]]++]=r)}function _(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function y(e,t,i){if(!t)return i;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,n+i}function x(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var i=0,n=0,r=0,o=e.tag;do{n=2*n+(1&o),o>>>=1,++r,i+=t.table[r],n-=t.table[r]}while(n>=0);return e.tag=o,e.bitcount-=r,t.trans[i+n]}function w(e,t,i){var n,r,o,s,a,u;for(n=y(e,5,257),r=y(e,5,1),o=y(e,4,4),s=0;s<19;++s)p[s]=0;for(s=0;s<o;++s){var l=y(e,3,0);p[h[s]]=l}for(m(d,p,0,19),a=0;a<n+r;){var c=x(e,d);switch(c){case 16:var f=p[a-1];for(u=y(e,2,3);u;--u)p[a++]=f;break;case 17:for(u=y(e,3,3);u;--u)p[a++]=0;break;case 18:for(u=y(e,7,11);u;--u)p[a++]=0;break;default:p[a++]=c}}m(t,p,0,n),m(i,p,n,r)}function b(e,t,i){for(;;){var n,r,o,s,h=x(e,t);if(256===h)return 0;if(h<256)e.dest[e.destLen++]=h;else for(n=y(e,a[h-=257],u[h]),r=x(e,i),s=o=e.destLen-y(e,l[r],c[r]);s<o+n;++s)e.dest[e.destLen++]=e.dest[s]}}function v(e){for(var t,i;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,i=t;i;--i)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}!function(e,t){var i;for(i=0;i<7;++i)e.table[i]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,i=0;i<24;++i)e.trans[i]=256+i;for(i=0;i<144;++i)e.trans[24+i]=i;for(i=0;i<8;++i)e.trans[168+i]=280+i;for(i=0;i<112;++i)e.trans[176+i]=144+i;for(i=0;i<5;++i)t.table[i]=0;for(t.table[5]=32,i=0;i<32;++i)t.trans[i]=i}(o,s),f(a,u,4,3),f(l,c,2,1),a[28]=0,u[28]=258;var S=function(e,t){var i,n,a=new r(e,t);do{switch(i=_(a),y(a,2,0)){case 0:n=v(a);break;case 1:n=b(a,o,s);break;case 2:w(a,a.ltree,a.dtree),n=b(a,a.ltree,a.dtree);break;default:n=-3}if(0!==n)throw new Error("Data error")}while(!i);return a.destLen<a.dest.length?"function"==typeof a.dest.slice?a.dest.slice(0,a.destLen):a.dest.subarray(0,a.destLen):a.dest};function T(e,t,i,n,r){return Math.pow(1-r,3)*e+3*Math.pow(1-r,2)*r*t+3*(1-r)*Math.pow(r,2)*i+Math.pow(r,3)*n}function C(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function N(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function F(e){throw new Error(e)}function O(e,t){e||F(t)}C.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},C.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},C.prototype.addX=function(e){this.addPoint(e,null)},C.prototype.addY=function(e){this.addPoint(null,e)},C.prototype.addBezier=function(e,t,i,n,r,o,s,a){var u=[e,t],l=[i,n],c=[r,o],h=[s,a];this.addPoint(e,t),this.addPoint(s,a);for(var d=0;d<=1;d++){var p=6*u[d]-12*l[d]+6*c[d],f=-3*u[d]+9*l[d]-9*c[d]+3*h[d],g=3*l[d]-3*u[d];if(0!==f){var m=Math.pow(p,2)-4*g*f;if(!(m<0)){var _=(-p+Math.sqrt(m))/(2*f);0<_&&_<1&&(0===d&&this.addX(T(u[d],l[d],c[d],h[d],_)),1===d&&this.addY(T(u[d],l[d],c[d],h[d],_)));var y=(-p-Math.sqrt(m))/(2*f);0<y&&y<1&&(0===d&&this.addX(T(u[d],l[d],c[d],h[d],y)),1===d&&this.addY(T(u[d],l[d],c[d],h[d],y)))}}else{if(0===p)continue;var x=-g/p;0<x&&x<1&&(0===d&&this.addX(T(u[d],l[d],c[d],h[d],x)),1===d&&this.addY(T(u[d],l[d],c[d],h[d],x)))}}},C.prototype.addQuad=function(e,t,i,n,r,o){var s=e+2/3*(i-e),a=t+2/3*(n-t),u=s+1/3*(r-e),l=a+1/3*(o-t);this.addBezier(e,t,s,a,u,l,r,o)},N.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},N.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},N.prototype.curveTo=N.prototype.bezierCurveTo=function(e,t,i,n,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:i,y2:n,x:r,y:o})},N.prototype.quadTo=N.prototype.quadraticCurveTo=function(e,t,i,n){this.commands.push({type:"Q",x1:e,y1:t,x:i,y:n})},N.prototype.close=N.prototype.closePath=function(){this.commands.push({type:"Z"})},N.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof C){var t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},N.prototype.getBoundingBox=function(){for(var e=new C,t=0,i=0,n=0,r=0,o=0;o<this.commands.length;o++){var s=this.commands[o];switch(s.type){case"M":e.addPoint(s.x,s.y),t=n=s.x,i=r=s.y;break;case"L":e.addPoint(s.x,s.y),n=s.x,r=s.y;break;case"Q":e.addQuad(n,r,s.x1,s.y1,s.x,s.y),n=s.x,r=s.y;break;case"C":e.addBezier(n,r,s.x1,s.y1,s.x2,s.y2,s.x,s.y),n=s.x,r=s.y;break;case"Z":n=t,r=i;break;default:throw new Error("Unexpected path command "+s.type)}}return e.isEmpty()&&e.addPoint(0,0),e},N.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var i=this.commands[t];"M"===i.type?e.moveTo(i.x,i.y):"L"===i.type?e.lineTo(i.x,i.y):"C"===i.type?e.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y):"Q"===i.type?e.quadraticCurveTo(i.x1,i.y1,i.x,i.y):"Z"===i.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},N.prototype.toPathData=function(e){function t(t){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function i(){for(var e=arguments,i="",n=0;n<arguments.length;n+=1){var r=e[n];r>=0&&n>0&&(i+=" "),i+=t(r)}return i}e=void 0!==e?e:2;for(var n="",r=0;r<this.commands.length;r+=1){var o=this.commands[r];"M"===o.type?n+="M"+i(o.x,o.y):"L"===o.type?n+="L"+i(o.x,o.y):"C"===o.type?n+="C"+i(o.x1,o.y1,o.x2,o.y2,o.x,o.y):"Q"===o.type?n+="Q"+i(o.x1,o.y1,o.x,o.y):"Z"===o.type&&(n+="Z")}return n},N.prototype.toSVG=function(e){var t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>"},N.prototype.toDOMElement=function(e){var t=this.toPathData(e),i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i};var E={fail:F,argument:O,assert:O},D=2147483648,M={},I={},V={};function B(e){return function(){return e}}I.BYTE=function(e){return E.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},V.BYTE=B(1),I.CHAR=function(e){return[e.charCodeAt(0)]},V.CHAR=B(1),I.CHARARRAY=function(e){void 0===e&&(e="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var t=[],i=0;i<e.length;i+=1)t[i]=e.charCodeAt(i);return t},V.CHARARRAY=function(e){return void 0===e?0:e.length},I.USHORT=function(e){return[e>>8&255,255&e]},V.USHORT=B(2),I.SHORT=function(e){return e>=32768&&(e=-(65536-e)),[e>>8&255,255&e]},V.SHORT=B(2),I.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},V.UINT24=B(3),I.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},V.ULONG=B(4),I.LONG=function(e){return e>=D&&(e=-(2*D-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},V.LONG=B(4),I.FIXED=I.ULONG,V.FIXED=V.ULONG,I.FWORD=I.SHORT,V.FWORD=V.SHORT,I.UFWORD=I.USHORT,V.UFWORD=V.USHORT,I.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},V.LONGDATETIME=B(8),I.TAG=function(e){return E.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},V.TAG=B(4),I.Card8=I.BYTE,V.Card8=V.BYTE,I.Card16=I.USHORT,V.Card16=V.USHORT,I.OffSize=I.BYTE,V.OffSize=V.BYTE,I.SID=I.USHORT,V.SID=V.USHORT,I.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?I.NUMBER16(e):I.NUMBER32(e)},V.NUMBER=function(e){return I.NUMBER(e).length},I.NUMBER16=function(e){return[28,e>>8&255,255&e]},V.NUMBER16=B(3),I.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},V.NUMBER32=B(5),I.REAL=function(e){var t=e.toString(),i=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(i){var n=parseFloat("1e"+((i[2]?+i[2]:0)+i[1].length));t=(Math.round(e*n)/n).toString()}for(var r="",o=0,s=t.length;o<s;o+=1){var a=t[o];r+="e"===a?"-"===t[++o]?"c":"b":"."===a?"a":"-"===a?"e":a}for(var u=[30],l=0,c=(r+=1&r.length?"f":"ff").length;l<c;l+=2)u.push(parseInt(r.substr(l,2),16));return u},V.REAL=function(e){return I.REAL(e).length},I.NAME=I.CHARARRAY,V.NAME=V.CHARARRAY,I.STRING=I.CHARARRAY,V.STRING=V.CHARARRAY,M.UTF8=function(e,t,i){for(var n=[],r=i,o=0;o<r;o++,t+=1)n[o]=e.getUint8(t);return String.fromCharCode.apply(null,n)},M.UTF16=function(e,t,i){for(var n=[],r=i/2,o=0;o<r;o++,t+=2)n[o]=e.getUint16(t);return String.fromCharCode.apply(null,n)},I.UTF16=function(e){for(var t=[],i=0;i<e.length;i+=1){var n=e.charCodeAt(i);t[t.length]=n>>8&255,t[t.length]=255&n}return t},V.UTF16=function(e){return 2*e.length};var A={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};M.MACSTRING=function(e,t,i,n){var r=A[n];if(void 0!==r){for(var o="",s=0;s<i;s++){var a=e.getUint8(t+s);o+=a<=127?String.fromCharCode(a):r[127&a]}return o}};var P,R="function"==typeof WeakMap&&new WeakMap;function L(e){return e>=-128&&e<=127}function k(e,t,i){for(var n=0,r=e.length;t<r&&n<64&&0===e[t];)++t,++n;return i.push(128|n-1),t}function U(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var s=e[o];if(!L(s))break;if(0===s&&o+1<r&&0===e[o+1])break;++o,++n}i.push(n-1);for(var a=t;a<o;++a)i.push(e[a]+256&255);return o}function X(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var s=e[o];if(0===s)break;if(L(s)&&o+1<r&&L(e[o+1]))break;++o,++n}i.push(64|n-1);for(var a=t;a<o;++a){var u=e[a];i.push(u+65536>>8&255,u+256&255)}return o}I.MACSTRING=function(e,t){var i=function(e){if(!P)for(var t in P={},A)P[t]=new String(t);var i=P[e];if(void 0!==i){if(R){var n=R.get(i);if(void 0!==n)return n}var r=A[e];if(void 0!==r){for(var o={},s=0;s<r.length;s++)o[r.charCodeAt(s)]=s+128;return R&&R.set(i,o),o}}}(t);if(void 0!==i){for(var n=[],r=0;r<e.length;r++){var o=e.charCodeAt(r);if(o>=128&&void 0===(o=i[o]))return;n[r]=o}return n}},V.MACSTRING=function(e,t){var i=I.MACSTRING(e,t);return void 0!==i?i.length:0},I.VARDELTAS=function(e){for(var t=0,i=[];t<e.length;){var n=e[t];t=0===n?k(e,t,i):n>=-128&&n<=127?U(e,t,i):X(e,t,i)}return i},I.INDEX=function(e){for(var t=1,i=[t],n=[],r=0;r<e.length;r+=1){var o=I.OBJECT(e[r]);Array.prototype.push.apply(n,o),t+=o.length,i.push(t)}if(0===n.length)return[0,0];for(var s=[],a=1+Math.floor(Math.log(t)/Math.log(2))/8|0,u=[void 0,I.BYTE,I.USHORT,I.UINT24,I.ULONG][a],l=0;l<i.length;l+=1){var c=u(i[l]);Array.prototype.push.apply(s,c)}return Array.prototype.concat(I.Card16(e.length),I.OffSize(a),s,n)},V.INDEX=function(e){return I.INDEX(e).length},I.DICT=function(e){for(var t=[],i=Object.keys(e),n=i.length,r=0;r<n;r+=1){var o=parseInt(i[r],0),s=e[o];t=(t=t.concat(I.OPERAND(s.value,s.type))).concat(I.OPERATOR(o))}return t},V.DICT=function(e){return I.DICT(e).length},I.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},I.OPERAND=function(e,t){var i=[];if(Array.isArray(t))for(var n=0;n<t.length;n+=1)E.argument(e.length===t.length,"Not enough arguments given for type"+t),i=i.concat(I.OPERAND(e[n],t[n]));else if("SID"===t)i=i.concat(I.NUMBER(e));else if("offset"===t)i=i.concat(I.NUMBER32(e));else if("number"===t)i=i.concat(I.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);i=i.concat(I.REAL(e))}return i},I.OP=I.BYTE,V.OP=V.BYTE;var z="function"==typeof WeakMap&&new WeakMap;function j(e,t,i){if(t.length&&("coverageFormat"!==t[0].name||1===t[0].value))for(var n=0;n<t.length;n+=1){var r=t[n];this[r.name]=r.value}if(this.tableName=e,this.fields=t,i)for(var o=Object.keys(i),s=0;s<o.length;s+=1){var a=o[s],u=i[a];void 0!==this[a]&&(this[a]=u)}}function G(e,t,i){void 0===i&&(i=t.length);var n=new Array(t.length+1);n[0]={name:e+"Count",type:"USHORT",value:i};for(var r=0;r<t.length;r++)n[r+1]={name:e+r,type:"USHORT",value:t[r]};return n}function q(e,t,i){var n=t.length,r=new Array(n+1);r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r[o+1]={name:e+o,type:"TABLE",value:i(t[o],o)};return r}function H(e,t,i){var n=t.length,r=[];r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r=r.concat(i(t[o],o));return r}function W(e){1===e.format?j.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(G("glyph",e.glyphs))):2===e.format?j.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(H("rangeRecord",e.ranges,(function(e){return[{name:"startGlyphID",type:"USHORT",value:e.start},{name:"endGlyphID",type:"USHORT",value:e.end},{name:"startCoverageIndex",type:"USHORT",value:e.index}]})))):E.assert(!1,"Coverage format must be 1 or 2.")}function Y(e){j.call(this,"scriptListTable",H("scriptRecord",e,(function(e,t){var i=e.script,n=i.defaultLangSys;return E.assert(!!n,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new j("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new j("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(G("featureIndex",n.featureIndexes)))}].concat(H("langSys",i.langSysRecords,(function(e,t){var i=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new j("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(G("featureIndex",i.featureIndexes)))}]}))))}]})))}function $(e){j.call(this,"featureListTable",H("featureRecord",e,(function(e,t){var i=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new j("featureTable",[{name:"featureParams",type:"USHORT",value:i.featureParams}].concat(G("lookupListIndex",i.lookupListIndexes)))}]})))}function Z(e,t){j.call(this,"lookupListTable",q("lookup",e,(function(e){var i=t[e.lookupType];return E.assert(!!i,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new j("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(q("subtable",e.subtables,i)))})))}I.CHARSTRING=function(e){if(z){var t=z.get(e);if(void 0!==t)return t}for(var i=[],n=e.length,r=0;r<n;r+=1){var o=e[r];i=i.concat(I[o.type](o.value))}return z&&z.set(e,i),i},V.CHARSTRING=function(e){return I.CHARSTRING(e).length},I.OBJECT=function(e){var t=I[e.type];return E.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},V.OBJECT=function(e){var t=V[e.type];return E.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},I.TABLE=function(e){for(var t=[],i=e.fields.length,n=[],r=[],o=0;o<i;o+=1){var s=e.fields[o],a=I[s.type];E.argument(void 0!==a,"No encoding function for field type "+s.type+" ("+s.name+")");var u=e[s.name];void 0===u&&(u=s.value);var l=a(u);"TABLE"===s.type?(r.push(t.length),t=t.concat([0,0]),n.push(l)):t=t.concat(l)}for(var c=0;c<n.length;c+=1){var h=r[c],d=t.length;E.argument(d<65536,"Table "+e.tableName+" too big."),t[h]=d>>8,t[h+1]=255&d,t=t.concat(n[c])}return t},V.TABLE=function(e){for(var t=0,i=e.fields.length,n=0;n<i;n+=1){var r=e.fields[n],o=V[r.type];E.argument(void 0!==o,"No sizeOf function for field type "+r.type+" ("+r.name+")");var s=e[r.name];void 0===s&&(s=r.value),t+=o(s),"TABLE"===r.type&&(t+=2)}return t},I.RECORD=I.TABLE,V.RECORD=V.TABLE,I.LITERAL=function(e){return e},V.LITERAL=function(e){return e.length},j.prototype.encode=function(){return I.TABLE(this)},j.prototype.sizeOf=function(){return V.TABLE(this)},W.prototype=Object.create(j.prototype),W.prototype.constructor=W,Y.prototype=Object.create(j.prototype),Y.prototype.constructor=Y,$.prototype=Object.create(j.prototype),$.prototype.constructor=$,Z.prototype=Object.create(j.prototype),Z.prototype.constructor=Z;var K={Table:j,Record:j,Coverage:W,ScriptList:Y,FeatureList:$,LookupList:Z,ushortList:G,tableList:q,recordList:H};function Q(e,t){return e.getUint8(t)}function J(e,t){return e.getUint16(t,!1)}function ee(e,t){return e.getUint32(t,!1)}function te(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var ie={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function ne(e,t){this.data=e,this.offset=t,this.relativeOffset=0}ne.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},ne.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},ne.prototype.parseCard8=ne.prototype.parseByte,ne.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},ne.prototype.parseCard16=ne.prototype.parseUShort,ne.prototype.parseSID=ne.prototype.parseUShort,ne.prototype.parseOffset16=ne.prototype.parseUShort,ne.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},ne.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},ne.prototype.parseULong=function(){var e=ee(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},ne.prototype.parseOffset32=ne.prototype.parseULong,ne.prototype.parseFixed=function(){var e=te(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},ne.prototype.parseString=function(e){var t=this.data,i=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var r=0;r<e;r++)n+=String.fromCharCode(t.getUint8(i+r));return n},ne.prototype.parseTag=function(){return this.parseString(4)},ne.prototype.parseLongDateTime=function(){var e=ee(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},ne.prototype.parseVersion=function(e){var t=J(this.data,this.offset+this.relativeOffset),i=J(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+i/e/10},ne.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=ie[e]*t},ne.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint32(n),n+=4;return this.relativeOffset+=4*e,t},ne.prototype.parseOffset16List=ne.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint16(n),n+=2;return this.relativeOffset+=2*e,t},ne.prototype.parseShortList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getInt16(n),n+=2;return this.relativeOffset+=2*e,t},ne.prototype.parseByteList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint8(n++);return this.relativeOffset+=e,t},ne.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},ne.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},ne.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],u=t[a];o[a]=u.call(this)}i[r]=o}return i},ne.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],u=t[a];o[a]=u.call(this)}i[r]=o}return i},ne.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n],o=e[r];i[r]=o.call(this)}return i},ne.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0!==e){var t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t}},ne.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),i=new Array(t),n=0;n<t;n++)i[n]=this.parseValueRecord(e);return i},ne.prototype.parsePointer=function(e){var t=this.parseOffset16();if(t>0)return new ne(this.data,this.offset+t).parseStruct(e)},ne.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(t>0)return new ne(this.data,this.offset+t).parseStruct(e)},ne.prototype.parseListOfLists=function(e){for(var t=this.parseOffset16List(),i=t.length,n=this.relativeOffset,r=new Array(i),o=0;o<i;o++){var s=t[o];if(0!==s)if(this.relativeOffset=s,e){for(var a=this.parseOffset16List(),u=new Array(a.length),l=0;l<a.length;l++)this.relativeOffset=s+a[l],u[l]=e.call(this);r[o]=u}else r[o]=this.parseUShortList();else r[o]=void 0}return this.relativeOffset=n,r},ne.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort(),i=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(i)};if(2===t){for(var n=new Array(i),r=0;r<i;r++)n[r]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},ne.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:ne.uShort,end:ne.uShort,classId:ne.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},ne.list=function(e,t){return function(){return this.parseList(e,t)}},ne.list32=function(e,t){return function(){return this.parseList32(e,t)}},ne.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},ne.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},ne.pointer=function(e){return function(){return this.parsePointer(e)}},ne.pointer32=function(e){return function(){return this.parsePointer32(e)}},ne.tag=ne.prototype.parseTag,ne.byte=ne.prototype.parseByte,ne.uShort=ne.offset16=ne.prototype.parseUShort,ne.uShortList=ne.prototype.parseUShortList,ne.uLong=ne.offset32=ne.prototype.parseULong,ne.uLongList=ne.prototype.parseULongList,ne.struct=ne.prototype.parseStruct,ne.coverage=ne.prototype.parseCoverage,ne.classDef=ne.prototype.parseClassDef;var re={reserved:ne.uShort,reqFeatureIndex:ne.uShort,featureIndexes:ne.uShortList};ne.prototype.parseScriptList=function(){return this.parsePointer(ne.recordList({tag:ne.tag,script:ne.pointer({defaultLangSys:ne.pointer(re),langSysRecords:ne.recordList({tag:ne.tag,langSys:ne.pointer(re)})})}))||[]},ne.prototype.parseFeatureList=function(){return this.parsePointer(ne.recordList({tag:ne.tag,feature:ne.pointer({featureParams:ne.offset16,lookupListIndexes:ne.uShortList})}))||[]},ne.prototype.parseLookupList=function(e){return this.parsePointer(ne.list(ne.pointer((function(){var t=this.parseUShort();E.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");var i=this.parseUShort(),n=16&i;return{lookupType:t,lookupFlag:i,subtables:this.parseList(ne.pointer(e[t])),markFilteringSet:n?this.parseUShort():void 0}}))))||[]},ne.prototype.parseFeatureVariationsList=function(){return this.parsePointer32((function(){var e=this.parseUShort(),t=this.parseUShort();return E.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:ne.offset32,featureTableSubstitutionOffset:ne.offset32})}))||[]};var oe={getByte:Q,getCard8:Q,getUShort:J,getCard16:J,getShort:function(e,t){return e.getInt16(t,!1)},getULong:ee,getFixed:te,getTag:function(e,t){for(var i="",n=t;n<t+4;n+=1)i+=String.fromCharCode(e.getInt8(n));return i},getOffset:function(e,t,i){for(var n=0,r=0;r<i;r+=1)n<<=8,n+=e.getUint8(t+r);return n},getBytes:function(e,t,i){for(var n=[],r=t;r<i;r+=1)n.push(e.getUint8(r));return n},bytesToString:function(e){for(var t="",i=0;i<e.length;i+=1)t+=String.fromCharCode(e[i]);return t},Parser:ne};function se(e,t,i){e.segments.push({end:t,start:t,delta:-(t-i),offset:0,glyphIndex:i})}var ae={parse:function(e,t){var i={};i.version=oe.getUShort(e,t),E.argument(0===i.version,"cmap table version should be 0."),i.numTables=oe.getUShort(e,t+2);for(var n=-1,r=i.numTables-1;r>=0;r-=1){var o=oe.getUShort(e,t+4+8*r),s=oe.getUShort(e,t+4+8*r+2);if(3===o&&(0===s||1===s||10===s)||0===o&&(0===s||1===s||2===s||3===s||4===s)){n=oe.getULong(e,t+4+8*r+4);break}}if(-1===n)throw new Error("No valid cmap sub-tables found.");var a=new oe.Parser(e,t+n);if(i.format=a.parseUShort(),12===i.format)!function(e,t){var i;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=i=t.parseULong(),e.glyphIndexMap={};for(var n=0;n<i;n+=1)for(var r=t.parseULong(),o=t.parseULong(),s=t.parseULong(),a=r;a<=o;a+=1)e.glyphIndexMap[a]=s,s++}(i,a);else{if(4!==i.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+i.format+").");!function(e,t,i,n,r){var o;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=o=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};for(var s=new oe.Parser(i,n+r+14),a=new oe.Parser(i,n+r+16+2*o),u=new oe.Parser(i,n+r+16+4*o),l=new oe.Parser(i,n+r+16+6*o),c=n+r+16+8*o,h=0;h<o-1;h+=1)for(var d=void 0,p=s.parseUShort(),f=a.parseUShort(),g=u.parseShort(),m=l.parseUShort(),_=f;_<=p;_+=1)0!==m?(c=l.offset+l.relativeOffset-2,c+=m,c+=2*(_-f),0!==(d=oe.getUShort(i,c))&&(d=d+g&65535)):d=_+g&65535,e.glyphIndexMap[_]=d}(i,a,e,t,n)}return i},make:function(e){var t,i=!0;for(t=e.length-1;t>0;t-=1){if(e.get(t).unicode>65535){console.log("Adding CMAP format 12 (needed!)"),i=!1;break}}var n=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:i?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:i?12:20}];i||(n=n.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),n=n.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var r=new K.Table("cmap",n);for(r.segments=[],t=0;t<e.length;t+=1){for(var o=e.get(t),s=0;s<o.unicodes.length;s+=1)se(r,o.unicodes[s],t);r.segments=r.segments.sort((function(e,t){return e.start-t.start}))}!function(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}(r);var a=r.segments.length,u=0,l=[],c=[],h=[],d=[],p=[],f=[];for(t=0;t<a;t+=1){var g=r.segments[t];g.end<=65535&&g.start<=65535?(l=l.concat({name:"end_"+t,type:"USHORT",value:g.end}),c=c.concat({name:"start_"+t,type:"USHORT",value:g.start}),h=h.concat({name:"idDelta_"+t,type:"SHORT",value:g.delta}),d=d.concat({name:"idRangeOffset_"+t,type:"USHORT",value:g.offset}),void 0!==g.glyphId&&(p=p.concat({name:"glyph_"+t,type:"USHORT",value:g.glyphId}))):u+=1,i||void 0===g.glyphIndex||(f=(f=(f=f.concat({name:"cmap12Start_"+t,type:"ULONG",value:g.start})).concat({name:"cmap12End_"+t,type:"ULONG",value:g.end})).concat({name:"cmap12Glyph_"+t,type:"ULONG",value:g.glyphIndex}))}if(r.segCountX2=2*(a-u),r.searchRange=2*Math.pow(2,Math.floor(Math.log(a-u)/Math.log(2))),r.entrySelector=Math.log(r.searchRange/2)/Math.log(2),r.rangeShift=r.segCountX2-r.searchRange,r.fields=r.fields.concat(l),r.fields.push({name:"reservedPad",type:"USHORT",value:0}),r.fields=r.fields.concat(c),r.fields=r.fields.concat(h),r.fields=r.fields.concat(d),r.fields=r.fields.concat(p),r.cmap4Length=14+2*l.length+2+2*c.length+2*h.length+2*d.length+2*p.length,!i){var m=16+4*f.length;r.cmap12Offset=20+r.cmap4Length,r.fields=r.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:m},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:f.length/3}]),r.fields=r.fields.concat(f)}return r}},ue=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],le=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],ce=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],he=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function de(e){this.font=e}function pe(e){this.cmap=e}function fe(e,t){this.encoding=e,this.charset=t}function ge(e){switch(e.version){case 1:this.names=he.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<he.length?this.names[t]=he[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-he.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var i=0;i<e.numberOfGlyphs;i++)this.names[i]=he[i+e.glyphNameIndex[i]];break;default:this.names=[]}}function me(e,t){t.lowMemory?function(e){e._IndexToUnicodeMap={};for(var t=e.tables.cmap.glyphIndexMap,i=Object.keys(t),n=0;n<i.length;n+=1){var r=i[n],o=t[r];void 0===e._IndexToUnicodeMap[o]?e._IndexToUnicodeMap[o]={unicodes:[parseInt(r)]}:e._IndexToUnicodeMap[o].unicodes.push(parseInt(r))}}(e):function(e){for(var t,i=e.tables.cmap.glyphIndexMap,n=Object.keys(i),r=0;r<n.length;r+=1){var o=n[r],s=i[o];(t=e.glyphs.get(s)).addUnicode(parseInt(o))}for(var a=0;a<e.glyphs.length;a+=1)t=e.glyphs.get(a),e.cffEncoding?e.isCIDFont?t.name="gid"+a:t.name=e.cffEncoding.charset[a]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(a))}(e)}de.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.font.glyphs;if(i)for(var n=0;n<i.length;n+=1)for(var r=i.get(n),o=0;o<r.unicodes.length;o+=1)if(r.unicodes[o]===t)return n;return null},pe.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},fe.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.encoding[t];return this.charset.indexOf(i)},ge.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},ge.prototype.glyphIndexToName=function(e){return this.names[e]};var _e={line:function(e,t,i,n,r){e.beginPath(),e.moveTo(t,i),e.lineTo(n,r),e.stroke()}};function ye(e){this.bindConstructorValues(e)}function xe(e,t,i){Object.defineProperty(e,t,{get:function(){return e.path,e[i]},set:function(t){e[i]=t},enumerable:!0,configurable:!0})}function we(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var i=0;i<t.length;i++){var n=t[i];n.path.unitsPerEm=e.unitsPerEm,this.glyphs[i]=n}this.length=t&&t.length||0}ye.prototype.bindConstructorValues=function(e){var t,i;this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],"xMin"in e&&(this.xMin=e.xMin),"yMin"in e&&(this.yMin=e.yMin),"xMax"in e&&(this.xMax=e.xMax),"yMax"in e&&(this.yMax=e.yMax),"advanceWidth"in e&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",(t=e.path,i=t||new N,{configurable:!0,get:function(){return"function"==typeof i&&(i=i()),i},set:function(e){i=e}}))},ye.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},ye.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},ye.prototype.getPath=function(e,t,i,n,r){var o,s;e=void 0!==e?e:0,t=void 0!==t?t:0,i=void 0!==i?i:72,n||(n={});var a=n.xScale,u=n.yScale;if(n.hinting&&r&&r.hinting&&(s=this.path&&r.hinting.exec(this,i)),s)o=r.hinting.getCommands(s),e=Math.round(e),t=Math.round(t),a=u=1;else{o=this.path.commands;var l=1/(this.path.unitsPerEm||1e3)*i;void 0===a&&(a=l),void 0===u&&(u=l)}for(var c=new N,h=0;h<o.length;h+=1){var d=o[h];"M"===d.type?c.moveTo(e+d.x*a,t+-d.y*u):"L"===d.type?c.lineTo(e+d.x*a,t+-d.y*u):"Q"===d.type?c.quadraticCurveTo(e+d.x1*a,t+-d.y1*u,e+d.x*a,t+-d.y*u):"C"===d.type?c.curveTo(e+d.x1*a,t+-d.y1*u,e+d.x2*a,t+-d.y2*u,e+d.x*a,t+-d.y*u):"Z"===d.type&&c.closePath()}return c},ye.prototype.getContours=function(){if(void 0===this.points)return[];for(var e=[],t=[],i=0;i<this.points.length;i+=1){var n=this.points[i];t.push(n),n.lastPointOfContour&&(e.push(t),t=[])}return E.argument(0===t.length,"There are still points left in the current contour."),e},ye.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];"Z"!==r.type&&(t.push(r.x),i.push(r.y)),"Q"!==r.type&&"C"!==r.type||(t.push(r.x1),i.push(r.y1)),"C"===r.type&&(t.push(r.x2),i.push(r.y2))}var o={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,i),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,i),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o},ye.prototype.draw=function(e,t,i,n,r){this.getPath(t,i,n,r).draw(e)},ye.prototype.drawPoints=function(e,t,i,n){function r(t,i,n,r){e.beginPath();for(var o=0;o<t.length;o+=1)e.moveTo(i+t[o].x*r,n+t[o].y*r),e.arc(i+t[o].x*r,n+t[o].y*r,2,0,2*Math.PI,!1);e.closePath(),e.fill()}t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24;for(var o=1/this.path.unitsPerEm*n,s=[],a=[],u=this.path,l=0;l<u.commands.length;l+=1){var c=u.commands[l];void 0!==c.x&&s.push({x:c.x,y:-c.y}),void 0!==c.x1&&a.push({x:c.x1,y:-c.y1}),void 0!==c.x2&&a.push({x:c.x2,y:-c.y2})}e.fillStyle="blue",r(s,t,i,o),e.fillStyle="red",r(a,t,i,o)},ye.prototype.drawMetrics=function(e,t,i,n){var r;t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24,r=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",_e.line(e,t,-1e4,t,1e4),_e.line(e,-1e4,i,1e4,i);var o=this.xMin||0,s=this.yMin||0,a=this.xMax||0,u=this.yMax||0,l=this.advanceWidth||0;e.strokeStyle="blue",_e.line(e,t+o*r,-1e4,t+o*r,1e4),_e.line(e,t+a*r,-1e4,t+a*r,1e4),_e.line(e,-1e4,i+-s*r,1e4,i+-s*r),_e.line(e,-1e4,i+-u*r,1e4,i+-u*r),e.strokeStyle="green",_e.line(e,t+l*r,-1e4,t+l*r,1e4)},we.prototype.get=function(e){if(void 0===this.glyphs[e]){this.font._push(e),"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());var t=this.glyphs[e],i=this.font._IndexToUnicodeMap[e];if(i)for(var n=0;n<i.unicodes.length;n++)t.addUnicode(i.unicodes[n]);this.font.cffEncoding?this.font.isCIDFont?t.name="gid"+e:t.name=this.font.cffEncoding.charset[e]:this.font.glyphNames.names&&(t.name=this.font.glyphNames.glyphIndexToName(e)),this.glyphs[e].advanceWidth=this.font._hmtxTableData[e].advanceWidth,this.glyphs[e].leftSideBearing=this.font._hmtxTableData[e].leftSideBearing}else"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());return this.glyphs[e]},we.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var be={GlyphSet:we,glyphLoader:function(e,t){return new ye({index:t,font:e})},ttfGlyphLoader:function(e,t,i,n,r,o){return function(){var s=new ye({index:t,font:e});return s.path=function(){i(s,n,r);var t=o(e.glyphs,s);return t.unitsPerEm=e.unitsPerEm,t},xe(s,"xMin","_xMin"),xe(s,"xMax","_xMax"),xe(s,"yMin","_yMin"),xe(s,"yMax","_yMax"),s}},cffGlyphLoader:function(e,t,i,n){return function(){var r=new ye({index:t,font:e});return r.path=function(){var t=i(e,r,n);return t.unitsPerEm=e.unitsPerEm,t},r}}};function ve(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i+=1)if(!ve(e[i],t[i]))return!1;return!0}return!1}function Se(e){return e.length<1240?107:e.length<33900?1131:32768}function Te(e,t,i){var n,r,o=[],s=[],a=oe.getCard16(e,t);if(0!==a){var u=oe.getByte(e,t+2);n=t+(a+1)*u+2;for(var l=t+3,c=0;c<a+1;c+=1)o.push(oe.getOffset(e,l,u)),l+=u;r=n+o[a]}else r=t+2;for(var h=0;h<o.length-1;h+=1){var d=oe.getBytes(e,n+o[h],n+o[h+1]);i&&(d=i(d)),s.push(d)}return{objects:s,startOffset:t,endOffset:r}}function Ce(e,t){if(28===t)return e.parseByte()<<8|e.parseByte();if(29===t)return e.parseByte()<<24|e.parseByte()<<16|e.parseByte()<<8|e.parseByte();if(30===t)return function(e){for(var t="",i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var n=e.parseByte(),r=n>>4,o=15&n;if(15===r)break;if(t+=i[r],15===o)break;t+=i[o]}return parseFloat(t)}(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return 256*(t-247)+e.parseByte()+108;if(t>=251&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function Ne(e,t,i){t=void 0!==t?t:0;var n=new oe.Parser(e,t),r=[],o=[];for(i=void 0!==i?i:e.length;n.relativeOffset<i;){var s=n.parseByte();s<=21?(12===s&&(s=1200+n.parseByte()),r.push([s,o]),o=[]):o.push(Ce(n,s))}return function(e){for(var t={},i=0;i<e.length;i+=1){var n=e[i][0],r=e[i][1],o=void 0;if(o=1===r.length?r[0]:r,t.hasOwnProperty(n)&&!isNaN(t[n]))throw new Error("Object "+t+" already has key "+n);t[n]=o}return t}(r)}function Fe(e,t){return t=t<=390?ue[t]:e[t-391]}function Oe(e,t,i){for(var n,r={},o=0;o<t.length;o+=1){var s=t[o];if(Array.isArray(s.type)){var a=[];a.length=s.type.length;for(var u=0;u<s.type.length;u++)void 0===(n=void 0!==e[s.op]?e[s.op][u]:void 0)&&(n=void 0!==s.value&&void 0!==s.value[u]?s.value[u]:null),"SID"===s.type[u]&&(n=Fe(i,n)),a[u]=n;r[s.name]=a}else void 0===(n=e[s.op])&&(n=void 0!==s.value?s.value:null),"SID"===s.type&&(n=Fe(i,n)),r[s.name]=n}return r}var Ee=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],De=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Me(e,t){return Oe(Ne(e,0,e.byteLength),Ee,t)}function Ie(e,t,i,n){return Oe(Ne(e,t,i),De,n)}function Ve(e,t,i,n){for(var r=[],o=0;o<i.length;o+=1){var s=Me(new DataView(new Uint8Array(i[o]).buffer),n);s._subrs=[],s._subrsBias=0,s._defaultWidthX=0,s._nominalWidthX=0;var a=s.private[0],u=s.private[1];if(0!==a&&0!==u){var l=Ie(e,u+t,a,n);if(s._defaultWidthX=l.defaultWidthX,s._nominalWidthX=l.nominalWidthX,0!==l.subrs){var c=Te(e,u+l.subrs+t);s._subrs=c.objects,s._subrsBias=Se(s._subrs)}s._privateDict=l}r.push(s)}return r}function Be(e,t,i){var n,r,o,s,a,u,l,c,h=new N,d=[],p=0,f=!1,g=!1,m=0,_=0;if(e.isCIDFont){var y=e.tables.cff.topDict._fdSelect[t.index],x=e.tables.cff.topDict._fdArray[y];a=x._subrs,u=x._subrsBias,l=x._defaultWidthX,c=x._nominalWidthX}else a=e.tables.cff.topDict._subrs,u=e.tables.cff.topDict._subrsBias,l=e.tables.cff.topDict._defaultWidthX,c=e.tables.cff.topDict._nominalWidthX;var w=l;function b(e,t){g&&h.closePath(),h.moveTo(e,t),g=!0}function v(){d.length%2!=0&&!f&&(w=d.shift()+c),p+=d.length>>1,d.length=0,f=!0}return function i(l){for(var y,x,S,T,C,N,F,O,E,D,M,I,V=0;V<l.length;){var B=l[V];switch(V+=1,B){case 1:case 3:case 18:case 23:v();break;case 4:d.length>1&&!f&&(w=d.shift()+c,f=!0),_+=d.pop(),b(m,_);break;case 5:for(;d.length>0;)m+=d.shift(),_+=d.shift(),h.lineTo(m,_);break;case 6:for(;d.length>0&&(m+=d.shift(),h.lineTo(m,_),0!==d.length);)_+=d.shift(),h.lineTo(m,_);break;case 7:for(;d.length>0&&(_+=d.shift(),h.lineTo(m,_),0!==d.length);)m+=d.shift(),h.lineTo(m,_);break;case 8:for(;d.length>0;)n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+d.shift(),h.curveTo(n,r,o,s,m,_);break;case 10:C=d.pop()+u,(N=a[C])&&i(N);break;case 11:return;case 12:switch(B=l[V],V+=1,B){case 35:n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s+d.shift(),E=F+d.shift(),D=O+d.shift(),M=E+d.shift(),I=D+d.shift(),m=M+d.shift(),_=I+d.shift(),d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;case 34:n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s,E=F+d.shift(),D=s,M=E+d.shift(),I=_,m=M+d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;case 36:n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s,E=F+d.shift(),D=s,M=E+d.shift(),I=D+d.shift(),m=M+d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;case 37:n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s+d.shift(),E=F+d.shift(),D=O+d.shift(),M=E+d.shift(),I=D+d.shift(),Math.abs(M-m)>Math.abs(I-_)?m=M+d.shift():_=I+d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+B),d.length=0}break;case 14:d.length>0&&!f&&(w=d.shift()+c,f=!0),g&&(h.closePath(),g=!1);break;case 19:case 20:v(),V+=p+7>>3;break;case 21:d.length>2&&!f&&(w=d.shift()+c,f=!0),_+=d.pop(),b(m+=d.pop(),_);break;case 22:d.length>1&&!f&&(w=d.shift()+c,f=!0),b(m+=d.pop(),_);break;case 24:for(;d.length>2;)n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+d.shift(),h.curveTo(n,r,o,s,m,_);m+=d.shift(),_+=d.shift(),h.lineTo(m,_);break;case 25:for(;d.length>6;)m+=d.shift(),_+=d.shift(),h.lineTo(m,_);n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+d.shift(),h.curveTo(n,r,o,s,m,_);break;case 26:for(d.length%2&&(m+=d.shift());d.length>0;)n=m,r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o,_=s+d.shift(),h.curveTo(n,r,o,s,m,_);break;case 27:for(d.length%2&&(_+=d.shift());d.length>0;)n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s,h.curveTo(n,r,o,s,m,_);break;case 28:y=l[V],x=l[V+1],d.push((y<<24|x<<16)>>16),V+=2;break;case 29:C=d.pop()+e.gsubrsBias,(N=e.gsubrs[C])&&i(N);break;case 30:for(;d.length>0&&(n=m,r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_),0!==d.length);)n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),_=s+d.shift(),m=o+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_);break;case 31:for(;d.length>0&&(n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),_=s+d.shift(),m=o+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_),0!==d.length);)n=m,r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_);break;default:B<32?console.log("Glyph "+t.index+": unknown operator "+B):B<247?d.push(B-139):B<251?(y=l[V],V+=1,d.push(256*(B-247)+y+108)):B<255?(y=l[V],V+=1,d.push(256*-(B-251)-y-108)):(y=l[V],x=l[V+1],S=l[V+2],T=l[V+3],V+=4,d.push((y<<24|x<<16|S<<8|T)/65536))}}}(i),t.advanceWidth=w,h}function Ae(e,t){var i,n=ue.indexOf(e);return n>=0&&(i=n),(n=t.indexOf(e))>=0?i=n+ue.length:(i=ue.length+t.length,t.push(e)),i}function Pe(e,t,i){for(var n={},r=0;r<e.length;r+=1){var o=e[r],s=t[o.name];void 0===s||ve(s,o.value)||("SID"===o.type&&(s=Ae(s,i)),n[o.op]={name:o.name,type:o.type,value:s})}return n}function Re(e,t){var i=new K.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return i.dict=Pe(Ee,e,t),i}function Le(e){var t=new K.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function ke(e){var t=[],i=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,r=0,o=0;o<i.commands.length;o+=1){var s=void 0,a=void 0,u=i.commands[o];if("Q"===u.type){var l=1/3,c=2/3;u={type:"C",x:u.x,y:u.y,x1:Math.round(l*n+c*u.x1),y1:Math.round(l*r+c*u.y1),x2:Math.round(l*u.x+c*u.x1),y2:Math.round(l*u.y+c*u.y1)}}if("M"===u.type)s=Math.round(u.x-n),a=Math.round(u.y-r),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:a}),t.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(u.x),r=Math.round(u.y);else if("L"===u.type)s=Math.round(u.x-n),a=Math.round(u.y-r),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:a}),t.push({name:"rlineto",type:"OP",value:5}),n=Math.round(u.x),r=Math.round(u.y);else if("C"===u.type){var h=Math.round(u.x1-n),d=Math.round(u.y1-r),p=Math.round(u.x2-u.x1),f=Math.round(u.y2-u.y1);s=Math.round(u.x-u.x2),a=Math.round(u.y-u.y2),t.push({name:"dx1",type:"NUMBER",value:h}),t.push({name:"dy1",type:"NUMBER",value:d}),t.push({name:"dx2",type:"NUMBER",value:p}),t.push({name:"dy2",type:"NUMBER",value:f}),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:a}),t.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(u.x),r=Math.round(u.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}var Ue={parse:function(e,t,i,n){i.tables.cff={};var r=function(e,t){var i={};return i.formatMajor=oe.getCard8(e,t),i.formatMinor=oe.getCard8(e,t+1),i.size=oe.getCard8(e,t+2),i.offsetSize=oe.getCard8(e,t+3),i.startOffset=t,i.endOffset=t+4,i}(e,t),o=Te(e,r.endOffset,oe.bytesToString),s=Te(e,o.endOffset),a=Te(e,s.endOffset,oe.bytesToString),u=Te(e,a.endOffset);i.gsubrs=u.objects,i.gsubrsBias=Se(i.gsubrs);var l=Ve(e,t,s.objects,a.objects);if(1!==l.length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);var c=l[0];if(i.tables.cff.topDict=c,c._privateDict&&(i.defaultWidthX=c._privateDict.defaultWidthX,i.nominalWidthX=c._privateDict.nominalWidthX),void 0!==c.ros[0]&&void 0!==c.ros[1]&&(i.isCIDFont=!0),i.isCIDFont){var h=c.fdArray,d=c.fdSelect;if(0===h||0===d)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");var p=Te(e,h+=t),f=Ve(e,t,p.objects,a.objects);c._fdArray=f,d+=t,c._fdSelect=function(e,t,i,n){var r,o=[],s=new oe.Parser(e,t),a=s.parseCard8();if(0===a)for(var u=0;u<i;u++){if((r=s.parseCard8())>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");o.push(r)}else{if(3!==a)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+a);var l,c=s.parseCard16(),h=s.parseCard16();if(0!==h)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+h);for(var d=0;d<c;d++){if(r=s.parseCard8(),l=s.parseCard16(),r>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");if(l>i)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+l);for(;h<l;h++)o.push(r);h=l}if(l!==i)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+l)}return o}(e,d,i.numGlyphs,f.length)}var g,m=t+c.private[1],_=Ie(e,m,c.private[0],a.objects);if(i.defaultWidthX=_.defaultWidthX,i.nominalWidthX=_.nominalWidthX,0!==_.subrs){var y=m+_.subrs,x=Te(e,y);i.subrs=x.objects,i.subrsBias=Se(i.subrs)}else i.subrs=[],i.subrsBias=0;n.lowMemory?(g=function(e,t){var i,n,r=[],o=oe.getCard16(e,t);if(0!==o){var s=oe.getByte(e,t+2);i=t+(o+1)*s+2;for(var a=t+3,u=0;u<o+1;u+=1)r.push(oe.getOffset(e,a,s)),a+=s;n=i+r[o]}else n=t+2;return{offsets:r,startOffset:t,endOffset:n}}(e,t+c.charStrings),i.nGlyphs=g.offsets.length):(g=Te(e,t+c.charStrings),i.nGlyphs=g.objects.length);var w=function(e,t,i,n){var r,o,s=new oe.Parser(e,t);i-=1;var a=[".notdef"],u=s.parseCard8();if(0===u)for(var l=0;l<i;l+=1)r=s.parseSID(),a.push(Fe(n,r));else if(1===u)for(;a.length<=i;){r=s.parseSID(),o=s.parseCard8();for(var c=0;c<=o;c+=1)a.push(Fe(n,r)),r+=1}else{if(2!==u)throw new Error("Unknown charset format "+u);for(;a.length<=i;){r=s.parseSID(),o=s.parseCard16();for(var h=0;h<=o;h+=1)a.push(Fe(n,r)),r+=1}}return a}(e,t+c.charset,i.nGlyphs,a.objects);if(0===c.encoding?i.cffEncoding=new fe(le,w):1===c.encoding?i.cffEncoding=new fe(ce,w):i.cffEncoding=function(e,t,i){var n,r={},o=new oe.Parser(e,t),s=o.parseCard8();if(0===s)for(var a=o.parseCard8(),u=0;u<a;u+=1)r[n=o.parseCard8()]=u;else{if(1!==s)throw new Error("Unknown encoding format "+s);var l=o.parseCard8();n=1;for(var c=0;c<l;c+=1)for(var h=o.parseCard8(),d=o.parseCard8(),p=h;p<=h+d;p+=1)r[p]=n,n+=1}return new fe(r,i)}(e,t+c.encoding,w),i.encoding=i.encoding||i.cffEncoding,i.glyphs=new be.GlyphSet(i),n.lowMemory)i._push=function(n){var r=function(e,t,i,n,r){var o=oe.getCard16(i,n),s=0;0!==o&&(s=n+(o+1)*oe.getByte(i,n+2)+2);var a=oe.getBytes(i,s+t[e],s+t[e+1]);return r&&(a=r(a)),a}(n,g.offsets,e,t+c.charStrings);i.glyphs.push(n,be.cffGlyphLoader(i,n,Be,r))};else for(var b=0;b<i.nGlyphs;b+=1){var v=g.objects[b];i.glyphs.push(b,be.cffGlyphLoader(i,b,Be,v))}},make:function(e,t){for(var i,n=new K.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),r=1/t.unitsPerEm,o={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[r,0,0,r,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},s=[],a=1;a<e.length;a+=1)i=e.get(a),s.push(i.name);var u=[];n.header=new K.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),n.nameIndex=function(e){var t=new K.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var i=0;i<e.length;i+=1)t.names.push({name:"name_"+i,type:"NAME",value:e[i]});return t}([t.postScriptName]);var l=Re(o,u);n.topDictIndex=Le(l),n.globalSubrIndex=new K.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),n.charsets=function(e,t){for(var i=new K.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var r=Ae(e[n],t);i.fields.push({name:"glyph_"+n,type:"SID",value:r})}return i}(s,u),n.charStringsIndex=function(e){for(var t=new K.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),i=0;i<e.length;i+=1){var n=e.get(i),r=ke(n);t.charStrings.push({name:n.name,type:"CHARSTRING",value:r})}return t}(e),n.privateDict=function(e,t){var i=new K.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return i.dict=Pe(De,e,t),i}({},u),n.stringIndex=function(e){var t=new K.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var i=0;i<e.length;i+=1)t.strings.push({name:"string_"+i,type:"STRING",value:e[i]});return t}(u);var c=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return o.charset=c,o.encoding=0,o.charStrings=o.charset+n.charsets.sizeOf(),o.private[1]=o.charStrings+n.charStringsIndex.sizeOf(),l=Re(o,u),n.topDictIndex=Le(l),n}};var Xe={parse:function(e,t){var i={},n=new oe.Parser(e,t);return i.version=n.parseVersion(),i.fontRevision=Math.round(1e3*n.parseFixed())/1e3,i.checkSumAdjustment=n.parseULong(),i.magicNumber=n.parseULong(),E.argument(1594834165===i.magicNumber,"Font header has wrong magic number."),i.flags=n.parseUShort(),i.unitsPerEm=n.parseUShort(),i.created=n.parseLongDateTime(),i.modified=n.parseLongDateTime(),i.xMin=n.parseShort(),i.yMin=n.parseShort(),i.xMax=n.parseShort(),i.yMax=n.parseShort(),i.macStyle=n.parseUShort(),i.lowestRecPPEM=n.parseUShort(),i.fontDirectionHint=n.parseShort(),i.indexToLocFormat=n.parseShort(),i.glyphDataFormat=n.parseShort(),i},make:function(e){var t=Math.round((new Date).getTime()/1e3)+2082844800,i=t;return e.createdTimestamp&&(i=e.createdTimestamp+2082844800),new K.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:i},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}};var ze={parse:function(e,t){var i={},n=new oe.Parser(e,t);return i.version=n.parseVersion(),i.ascender=n.parseShort(),i.descender=n.parseShort(),i.lineGap=n.parseShort(),i.advanceWidthMax=n.parseUShort(),i.minLeftSideBearing=n.parseShort(),i.minRightSideBearing=n.parseShort(),i.xMaxExtent=n.parseShort(),i.caretSlopeRise=n.parseShort(),i.caretSlopeRun=n.parseShort(),i.caretOffset=n.parseShort(),n.relativeOffset+=8,i.metricDataFormat=n.parseShort(),i.numberOfHMetrics=n.parseUShort(),i},make:function(e){return new K.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}};var je={parse:function(e,t,i,n,r,o,s){s.lowMemory?function(e,t,i,n,r){var o,s;e._hmtxTableData={};for(var a=new oe.Parser(t,i),u=0;u<r;u+=1)u<n&&(o=a.parseUShort(),s=a.parseShort()),e._hmtxTableData[u]={advanceWidth:o,leftSideBearing:s}}(e,t,i,n,r):function(e,t,i,n,r){for(var o,s,a=new oe.Parser(e,t),u=0;u<n;u+=1){u<i&&(o=a.parseUShort(),s=a.parseShort());var l=r.get(u);l.advanceWidth=o,l.leftSideBearing=s}}(t,i,n,r,o)},make:function(e){for(var t=new K.Table("hmtx",[]),i=0;i<e.length;i+=1){var n=e.get(i),r=n.advanceWidth||0,o=n.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+i,type:"USHORT",value:r}),t.fields.push({name:"leftSideBearing_"+i,type:"SHORT",value:o})}return t}};var Ge={make:function(e){for(var t=new K.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),i="",n=12+4*e.length,r=0;r<e.length;++r){var o=i.indexOf(e[r]);o<0&&(o=i.length,i+=e[r]),t.fields.push({name:"offset "+r,type:"USHORT",value:n+o}),t.fields.push({name:"length "+r,type:"USHORT",value:e[r].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),t},parse:function(e,t){var i=new oe.Parser(e,t),n=i.parseULong();E.argument(1===n,"Unsupported ltag table version."),i.skip("uLong",1);for(var r=i.parseULong(),o=[],s=0;s<r;s++){for(var a="",u=t+i.parseUShort(),l=i.parseUShort(),c=u;c<u+l;++c)a+=String.fromCharCode(e.getInt8(c));o.push(a)}return o}};var qe={parse:function(e,t){var i={},n=new oe.Parser(e,t);return i.version=n.parseVersion(),i.numGlyphs=n.parseUShort(),1===i.version&&(i.maxPoints=n.parseUShort(),i.maxContours=n.parseUShort(),i.maxCompositePoints=n.parseUShort(),i.maxCompositeContours=n.parseUShort(),i.maxZones=n.parseUShort(),i.maxTwilightPoints=n.parseUShort(),i.maxStorage=n.parseUShort(),i.maxFunctionDefs=n.parseUShort(),i.maxInstructionDefs=n.parseUShort(),i.maxStackElements=n.parseUShort(),i.maxSizeOfInstructions=n.parseUShort(),i.maxComponentElements=n.parseUShort(),i.maxComponentDepth=n.parseUShort()),i},make:function(e){return new K.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}},He=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],We={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},Ye={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},$e={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function Ze(e,t,i){switch(e){case 0:if(65535===t)return"und";if(i)return i[t];break;case 1:return We[t];case 3:return $e[t]}}var Ke="utf-16",Qe={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},Je={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function et(e,t,i){switch(e){case 0:return Ke;case 1:return Je[i]||Qe[t];case 3:if(1===t||10===t)return Ke}}function tt(e){var t={};for(var i in e)t[e[i]]=parseInt(i);return t}function it(e,t,i,n,r,o){return new K.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:i},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:r},{name:"offset",type:"USHORT",value:o}])}function nt(e,t){var i=function(e,t){var i=e.length,n=t.length-i+1;e:for(var r=0;r<n;r++)for(;r<n;r++){for(var o=0;o<i;o++)if(t[r+o]!==e[o])continue e;return r}return-1}(e,t);if(i<0){i=t.length;for(var n=0,r=e.length;n<r;++n)t.push(e[n])}return i}var rt={parse:function(e,t,i){for(var n={},r=new oe.Parser(e,t),o=r.parseUShort(),s=r.parseUShort(),a=r.offset+r.parseUShort(),u=0;u<s;u++){var l=r.parseUShort(),c=r.parseUShort(),h=r.parseUShort(),d=r.parseUShort(),p=He[d]||d,f=r.parseUShort(),g=r.parseUShort(),m=Ze(l,h,i),_=et(l,c,h);if(void 0!==_&&void 0!==m){var y=void 0;if(y=_===Ke?M.UTF16(e,a+g,f):M.MACSTRING(e,a+g,f,_)){var x=n[p];void 0===x&&(x=n[p]={}),x[m]=y}}}return 1===o&&r.parseUShort(),n},make:function(e,t){var i,n=[],r={},o=tt(He);for(var s in e){var a=o[s];if(void 0===a&&(a=s),i=parseInt(a),isNaN(i))throw new Error('Name table entry "'+s+'" does not exist, see nameTableNames for complete list.');r[i]=e[s],n.push(i)}for(var u=tt(We),l=tt($e),c=[],h=[],d=0;d<n.length;d++){var p=r[i=n[d]];for(var f in p){var g=p[f],m=1,_=u[f],y=Ye[_],x=et(m,y,_),w=I.MACSTRING(g,x);void 0===w&&(m=0,(_=t.indexOf(f))<0&&(_=t.length,t.push(f)),y=4,w=I.UTF16(g));var b=nt(w,h);c.push(it(m,y,_,i,w.length,b));var v=l[f];if(void 0!==v){var S=I.UTF16(g),T=nt(S,h);c.push(it(3,1,v,i,S.length,T))}}}c.sort((function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID}));for(var C=new K.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:c.length},{name:"stringOffset",type:"USHORT",value:6+12*c.length}]),N=0;N<c.length;N++)C.fields.push({name:"record_"+N,type:"RECORD",value:c[N]});return C.fields.push({name:"strings",type:"LITERAL",value:h}),C}},ot=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];var st={parse:function(e,t){var i={},n=new oe.Parser(e,t);i.version=n.parseUShort(),i.xAvgCharWidth=n.parseShort(),i.usWeightClass=n.parseUShort(),i.usWidthClass=n.parseUShort(),i.fsType=n.parseUShort(),i.ySubscriptXSize=n.parseShort(),i.ySubscriptYSize=n.parseShort(),i.ySubscriptXOffset=n.parseShort(),i.ySubscriptYOffset=n.parseShort(),i.ySuperscriptXSize=n.parseShort(),i.ySuperscriptYSize=n.parseShort(),i.ySuperscriptXOffset=n.parseShort(),i.ySuperscriptYOffset=n.parseShort(),i.yStrikeoutSize=n.parseShort(),i.yStrikeoutPosition=n.parseShort(),i.sFamilyClass=n.parseShort(),i.panose=[];for(var r=0;r<10;r++)i.panose[r]=n.parseByte();return i.ulUnicodeRange1=n.parseULong(),i.ulUnicodeRange2=n.parseULong(),i.ulUnicodeRange3=n.parseULong(),i.ulUnicodeRange4=n.parseULong(),i.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),i.fsSelection=n.parseUShort(),i.usFirstCharIndex=n.parseUShort(),i.usLastCharIndex=n.parseUShort(),i.sTypoAscender=n.parseShort(),i.sTypoDescender=n.parseShort(),i.sTypoLineGap=n.parseShort(),i.usWinAscent=n.parseUShort(),i.usWinDescent=n.parseUShort(),i.version>=1&&(i.ulCodePageRange1=n.parseULong(),i.ulCodePageRange2=n.parseULong()),i.version>=2&&(i.sxHeight=n.parseShort(),i.sCapHeight=n.parseShort(),i.usDefaultChar=n.parseUShort(),i.usBreakChar=n.parseUShort(),i.usMaxContent=n.parseUShort()),i},make:function(e){return new K.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},unicodeRanges:ot,getUnicodeRange:function(e){for(var t=0;t<ot.length;t+=1){var i=ot[t];if(e>=i.begin&&e<i.end)return t}return-1}};var at={parse:function(e,t){var i={},n=new oe.Parser(e,t);switch(i.version=n.parseVersion(),i.italicAngle=n.parseFixed(),i.underlinePosition=n.parseShort(),i.underlineThickness=n.parseShort(),i.isFixedPitch=n.parseULong(),i.minMemType42=n.parseULong(),i.maxMemType42=n.parseULong(),i.minMemType1=n.parseULong(),i.maxMemType1=n.parseULong(),i.version){case 1:i.names=he.slice();break;case 2:i.numberOfGlyphs=n.parseUShort(),i.glyphNameIndex=new Array(i.numberOfGlyphs);for(var r=0;r<i.numberOfGlyphs;r++)i.glyphNameIndex[r]=n.parseUShort();i.names=[];for(var o=0;o<i.numberOfGlyphs;o++)if(i.glyphNameIndex[o]>=he.length){var s=n.parseChar();i.names.push(n.parseString(s))}break;case 2.5:i.numberOfGlyphs=n.parseUShort(),i.offset=new Array(i.numberOfGlyphs);for(var a=0;a<i.numberOfGlyphs;a++)i.offset[a]=n.parseChar()}return i},make:function(){return new K.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}},ut=new Array(9);ut[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(ne.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(ne.coverage),substitute:this.parseOffset16List()}:void E.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},ut[2]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),sequences:this.parseListOfLists()}},ut[3]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),alternateSets:this.parseListOfLists()}},ut[4]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),ligatureSets:this.parseListOfLists((function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}}))}};var lt={sequenceIndex:ne.uShort,lookupListIndex:ne.uShort};ut[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{substFormat:t,coverage:this.parsePointer(ne.coverage),ruleSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lt)}}))};if(2===t)return{substFormat:t,coverage:this.parsePointer(ne.coverage),classDef:this.parsePointer(ne.classDef),classSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lt)}}))};if(3===t){var i=this.parseUShort(),n=this.parseUShort();return{substFormat:t,coverages:this.parseList(i,ne.pointer(ne.coverage)),lookupRecords:this.parseRecordList(n,lt)}}E.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},ut[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(ne.coverage),chainRuleSets:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lt)}}))}:2===t?{substFormat:2,coverage:this.parsePointer(ne.coverage),backtrackClassDef:this.parsePointer(ne.classDef),inputClassDef:this.parsePointer(ne.classDef),lookaheadClassDef:this.parsePointer(ne.classDef),chainClassSet:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lt)}}))}:3===t?{substFormat:3,backtrackCoverage:this.parseList(ne.pointer(ne.coverage)),inputCoverage:this.parseList(ne.pointer(ne.coverage)),lookaheadCoverage:this.parseList(ne.pointer(ne.coverage)),lookupRecords:this.parseRecordList(lt)}:void E.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},ut[7]=function(){var e=this.parseUShort();E.argument(1===e,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),i=new ne(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:ut[t].call(i)}},ut[8]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),backtrackCoverage:this.parseList(ne.pointer(ne.coverage)),lookaheadCoverage:this.parseList(ne.pointer(ne.coverage)),substitutes:this.parseUShortList()}};var ct=new Array(9);ct[1]=function(e){return 1===e.substFormat?new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.ushortList("substitute",e.substitute)))},ct[2]=function(e){return E.assert(1===e.substFormat,"Lookup type 2 substFormat must be 1."),new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("seqSet",e.sequences,(function(e){return new K.Table("sequenceSetTable",K.ushortList("sequence",e))}))))},ct[3]=function(e){return E.assert(1===e.substFormat,"Lookup type 3 substFormat must be 1."),new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("altSet",e.alternateSets,(function(e){return new K.Table("alternateSetTable",K.ushortList("alternate",e))}))))},ct[4]=function(e){return E.assert(1===e.substFormat,"Lookup type 4 substFormat must be 1."),new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("ligSet",e.ligatureSets,(function(e){return new K.Table("ligatureSetTable",K.tableList("ligature",e,(function(e){return new K.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:e.ligGlyph}].concat(K.ushortList("component",e.components,e.components.length+1)))})))}))))},ct[6]=function(e){if(1===e.substFormat){var t=new K.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:e.substFormat},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("chainRuleSet",e.chainRuleSets,(function(e){return new K.Table("chainRuleSetTable",K.tableList("chainRule",e,(function(e){var t=K.ushortList("backtrackGlyph",e.backtrack,e.backtrack.length).concat(K.ushortList("inputGlyph",e.input,e.input.length+1)).concat(K.ushortList("lookaheadGlyph",e.lookahead,e.lookahead.length)).concat(K.ushortList("substitution",[],e.lookupRecords.length));return e.lookupRecords.forEach((function(e,i){t=t.concat({name:"sequenceIndex"+i,type:"USHORT",value:e.sequenceIndex}).concat({name:"lookupListIndex"+i,type:"USHORT",value:e.lookupListIndex})})),new K.Table("chainRuleTable",t)})))}))));return t}if(2===e.substFormat)E.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(3===e.substFormat){var i=[{name:"substFormat",type:"USHORT",value:e.substFormat}];return i.push({name:"backtrackGlyphCount",type:"USHORT",value:e.backtrackCoverage.length}),e.backtrackCoverage.forEach((function(e,t){i.push({name:"backtrackCoverage"+t,type:"TABLE",value:new K.Coverage(e)})})),i.push({name:"inputGlyphCount",type:"USHORT",value:e.inputCoverage.length}),e.inputCoverage.forEach((function(e,t){i.push({name:"inputCoverage"+t,type:"TABLE",value:new K.Coverage(e)})})),i.push({name:"lookaheadGlyphCount",type:"USHORT",value:e.lookaheadCoverage.length}),e.lookaheadCoverage.forEach((function(e,t){i.push({name:"lookaheadCoverage"+t,type:"TABLE",value:new K.Coverage(e)})})),i.push({name:"substitutionCount",type:"USHORT",value:e.lookupRecords.length}),e.lookupRecords.forEach((function(e,t){i=i.concat({name:"sequenceIndex"+t,type:"USHORT",value:e.sequenceIndex}).concat({name:"lookupListIndex"+t,type:"USHORT",value:e.lookupListIndex})})),new K.Table("chainContextTable",i)}E.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};var ht={parse:function(e,t){var i=new ne(e,t=t||0),n=i.parseVersion(1);return E.argument(1===n||1.1===n,"Unsupported GSUB table version."),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(ut)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(ut),variations:i.parseFeatureVariationsList()}},make:function(e){return new K.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new K.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new K.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new K.LookupList(e.lookups,ct)}])}};var dt={parse:function(e,t){var i=new oe.Parser(e,t),n=i.parseULong();E.argument(1===n,"Unsupported META table version."),i.parseULong(),i.parseULong();for(var r=i.parseULong(),o={},s=0;s<r;s++){var a=i.parseTag(),u=i.parseULong(),l=i.parseULong(),c=M.UTF8(e,t+u,l);o[a]=c}return o},make:function(e){var t=Object.keys(e).length,i="",n=16+12*t,r=new K.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:t}]);for(var o in e){var s=i.length;i+=e[o],r.fields.push({name:"tag "+o,type:"TAG",value:o}),r.fields.push({name:"offset "+o,type:"ULONG",value:n+s}),r.fields.push({name:"length "+o,type:"ULONG",value:e[o].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),r}};function pt(e){return Math.log(e)/Math.log(2)|0}function ft(e){for(;e.length%4!=0;)e.push(0);for(var t=0,i=0;i<e.length;i+=4)t+=(e[i]<<24)+(e[i+1]<<16)+(e[i+2]<<8)+e[i+3];return t%=Math.pow(2,32)}function gt(e,t,i,n){return new K.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==e?e:""},{name:"checkSum",type:"ULONG",value:void 0!==t?t:0},{name:"offset",type:"ULONG",value:void 0!==i?i:0},{name:"length",type:"ULONG",value:void 0!==n?n:0}])}function mt(e){var t=new K.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);t.tables=e,t.numTables=e.length;var i=Math.pow(2,pt(t.numTables));t.searchRange=16*i,t.entrySelector=pt(i),t.rangeShift=16*t.numTables-t.searchRange;for(var n=[],r=[],o=t.sizeOf()+gt().sizeOf()*t.numTables;o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0});for(var s=0;s<e.length;s+=1){var a=e[s];E.argument(4===a.tableName.length,"Table name"+a.tableName+" is invalid.");var u=a.sizeOf(),l=gt(a.tableName,ft(a.encode()),o,u);for(n.push({name:l.tag+" Table Record",type:"RECORD",value:l}),r.push({name:a.tableName+" table",type:"RECORD",value:a}),o+=u,E.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0})}return n.sort((function(e,t){return e.value.tag>t.value.tag?1:-1})),t.fields=t.fields.concat(n),t.fields=t.fields.concat(r),t}function _t(e,t,i){for(var n=0;n<t.length;n+=1){var r=e.charToGlyphIndex(t[n]);if(r>0)return e.glyphs.get(r).getMetrics()}return i}function yt(e){for(var t=0,i=0;i<e.length;i+=1)t+=e[i];return t/e.length}var xt={make:mt,fontToTable:function(e){for(var t,i=[],n=[],r=[],o=[],s=[],a=[],u=[],l=0,c=0,h=0,d=0,p=0,f=0;f<e.glyphs.length;f+=1){var g=e.glyphs.get(f),m=0|g.unicode;if(isNaN(g.advanceWidth))throw new Error("Glyph "+g.name+" ("+f+"): advanceWidth is not a number.");(t>m||void 0===t)&&m>0&&(t=m),l<m&&(l=m);var _=st.getUnicodeRange(m);if(_<32)c|=1<<_;else if(_<64)h|=1<<_-32;else if(_<96)d|=1<<_-64;else{if(!(_<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");p|=1<<_-96}if(".notdef"!==g.name){var y=g.getMetrics();i.push(y.xMin),n.push(y.yMin),r.push(y.xMax),o.push(y.yMax),a.push(y.leftSideBearing),u.push(y.rightSideBearing),s.push(g.advanceWidth)}}var x={xMin:Math.min.apply(null,i),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,o),advanceWidthMax:Math.max.apply(null,s),advanceWidthAvg:yt(s),minLeftSideBearing:Math.min.apply(null,a),maxLeftSideBearing:Math.max.apply(null,a),minRightSideBearing:Math.min.apply(null,u)};x.ascender=e.ascender,x.descender=e.descender;var w=Xe.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:x.xMin,yMin:x.yMin,xMax:x.xMax,yMax:x.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),b=ze.make({ascender:x.ascender,descender:x.descender,advanceWidthMax:x.advanceWidthMax,minLeftSideBearing:x.minLeftSideBearing,minRightSideBearing:x.minRightSideBearing,xMaxExtent:x.maxLeftSideBearing+(x.xMax-x.xMin),numberOfHMetrics:e.glyphs.length}),v=qe.make(e.glyphs.length),S=st.make(Object.assign({xAvgCharWidth:Math.round(x.advanceWidthAvg),usFirstCharIndex:t,usLastCharIndex:l,ulUnicodeRange1:c,ulUnicodeRange2:h,ulUnicodeRange3:d,ulUnicodeRange4:p,sTypoAscender:x.ascender,sTypoDescender:x.descender,sTypoLineGap:0,usWinAscent:x.yMax,usWinDescent:Math.abs(x.yMin),ulCodePageRange1:1,sxHeight:_t(e,"xyvw",{yMax:Math.round(x.ascender/2)}).yMax,sCapHeight:_t(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",x).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0},e.tables.os2)),T=je.make(e.glyphs),C=ae.make(e.glyphs),N=e.getEnglishName("fontFamily"),F=e.getEnglishName("fontSubfamily"),O=N+" "+F,E=e.getEnglishName("postScriptName");E||(E=N.replace(/\s/g,"")+"-"+F);var D={};for(var M in e.names)D[M]=e.names[M];D.uniqueID||(D.uniqueID={en:e.getEnglishName("manufacturer")+":"+O}),D.postScriptName||(D.postScriptName={en:E}),D.preferredFamily||(D.preferredFamily=e.names.fontFamily),D.preferredSubfamily||(D.preferredSubfamily=e.names.fontSubfamily);var I=[],V=rt.make(D,I),B=I.length>0?Ge.make(I):void 0,A=at.make(),P=Ue.make(e.glyphs,{version:e.getEnglishName("version"),fullName:O,familyName:N,weightName:F,postScriptName:E,unitsPerEm:e.unitsPerEm,fontBBox:[0,x.yMin,x.ascender,x.advanceWidthMax]}),R=e.metas&&Object.keys(e.metas).length>0?dt.make(e.metas):void 0,L=[w,b,v,S,V,C,A,P,T];B&&L.push(B),e.tables.gsub&&L.push(ht.make(e.tables.gsub)),R&&L.push(R);for(var k=mt(L),U=ft(k.encode()),X=k.fields,z=!1,j=0;j<X.length;j+=1)if("head table"===X[j].name){X[j].value.checkSumAdjustment=2981146554-U,z=!0;break}if(!z)throw new Error("Could not find head table with checkSum to adjust.");return k},computeCheckSum:ft};function wt(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r].tag;if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function bt(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r];if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function vt(e,t){for(var i,n=0,r=e.length-1;n<=r;){var o=n+r>>>1,s=(i=e[o]).start;if(s===t)return i;s<t?n=o+1:r=o-1}if(n>0)return t>(i=e[n-1]).end?0:i}function St(e,t){this.font=e,this.tableName=t}function Tt(e){St.call(this,e,"gpos")}function Ct(e){St.call(this,e,"gsub")}function Nt(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Ft(e,t,i){for(var n=e.subtables,r=0;r<n.length;r++){var o=n[r];if(o.substFormat===t)return o}if(i)return n.push(i),i}function Ot(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;++n)i[n]=e[n];return t}function Et(e,t){if(!e)throw t}function Dt(e,t,i,n,r){var o;return(t&n)>0?(o=e.parseByte(),0==(t&r)&&(o=-o),o=i+o):o=(t&r)>0?i:i+e.parseShort(),o}function Mt(e,t,i){var n,r,o=new oe.Parser(t,i);if(e.numberOfContours=o.parseShort(),e._xMin=o.parseShort(),e._yMin=o.parseShort(),e._xMax=o.parseShort(),e._yMax=o.parseShort(),e.numberOfContours>0){for(var s=e.endPointIndices=[],a=0;a<e.numberOfContours;a+=1)s.push(o.parseUShort());e.instructionLength=o.parseUShort(),e.instructions=[];for(var u=0;u<e.instructionLength;u+=1)e.instructions.push(o.parseByte());var l=s[s.length-1]+1;n=[];for(var c=0;c<l;c+=1)if(r=o.parseByte(),n.push(r),(8&r)>0)for(var h=o.parseByte(),d=0;d<h;d+=1)n.push(r),c+=1;if(E.argument(n.length===l,"Bad flags."),s.length>0){var p,f=[];if(l>0){for(var g=0;g<l;g+=1)r=n[g],(p={}).onCurve=!!(1&r),p.lastPointOfContour=s.indexOf(g)>=0,f.push(p);for(var m=0,_=0;_<l;_+=1)r=n[_],(p=f[_]).x=Dt(o,r,m,2,16),m=p.x;for(var y=0,x=0;x<l;x+=1)r=n[x],(p=f[x]).y=Dt(o,r,y,4,32),y=p.y}e.points=f}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var w=!0;w;){n=o.parseUShort();var b={glyphIndex:o.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(1&n)>0?(2&n)>0?(b.dx=o.parseShort(),b.dy=o.parseShort()):b.matchedPoints=[o.parseUShort(),o.parseUShort()]:(2&n)>0?(b.dx=o.parseChar(),b.dy=o.parseChar()):b.matchedPoints=[o.parseByte(),o.parseByte()],(8&n)>0?b.xScale=b.yScale=o.parseF2Dot14():(64&n)>0?(b.xScale=o.parseF2Dot14(),b.yScale=o.parseF2Dot14()):(128&n)>0&&(b.xScale=o.parseF2Dot14(),b.scale01=o.parseF2Dot14(),b.scale10=o.parseF2Dot14(),b.yScale=o.parseF2Dot14()),e.components.push(b),w=!!(32&n)}if(256&n){e.instructionLength=o.parseUShort(),e.instructions=[];for(var v=0;v<e.instructionLength;v+=1)e.instructions.push(o.parseByte())}}}function It(e,t){for(var i=[],n=0;n<e.length;n+=1){var r=e[n],o={x:t.xScale*r.x+t.scale01*r.y+t.dx,y:t.scale10*r.x+t.yScale*r.y+t.dy,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour};i.push(o)}return i}function Vt(e){var t=new N;if(!e)return t;for(var i=function(e){for(var t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r),r.lastPointOfContour&&(t.push(i),i=[])}return E.argument(0===i.length,"There are still points left in the current contour."),t}(e),n=0;n<i.length;++n){var r=i[n],o=null,s=r[r.length-1],a=r[0];if(s.onCurve)t.moveTo(s.x,s.y);else if(a.onCurve)t.moveTo(a.x,a.y);else{var u={x:.5*(s.x+a.x),y:.5*(s.y+a.y)};t.moveTo(u.x,u.y)}for(var l=0;l<r.length;++l)if(o=s,s=a,a=r[(l+1)%r.length],s.onCurve)t.lineTo(s.x,s.y);else{var c=a;o.onCurve||{x:.5*(s.x+o.x),y:.5*(s.y+o.y)},a.onCurve||(c={x:.5*(s.x+a.x),y:.5*(s.y+a.y)}),t.quadraticCurveTo(s.x,s.y,c.x,c.y)}t.closePath()}return t}function Bt(e,t){if(t.isComposite)for(var i=0;i<t.components.length;i+=1){var n=t.components[i],r=e.get(n.glyphIndex);if(r.getPath(),r.points){var o=void 0;if(void 0===n.matchedPoints)o=It(r.points,n);else{if(n.matchedPoints[0]>t.points.length-1||n.matchedPoints[1]>r.points.length-1)throw Error("Matched points out of range in "+t.name);var s=t.points[n.matchedPoints[0]],a=r.points[n.matchedPoints[1]],u={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};a=It([a],u)[0],u.dx=s.x-a.x,u.dy=s.y-a.y,o=It(r.points,u)}t.points=t.points.concat(o)}}return Vt(t.points)}St.prototype={searchTag:wt,binSearch:bt,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,i=0;i<e.scripts.length;i++){var n=e.scripts[i].tag;if("DFLT"===n)return n;"latn"===n&&(t=!0)}return t?"latn":void 0}},getScriptTable:function(e,t){var i=this.getTable(t);if(i){e=e||"DFLT";var n=i.scripts,r=wt(i.scripts,e);if(r>=0)return n[r].script;if(t){var o={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-r,0,o),o.script}}},getLangSysTable:function(e,t,i){var n=this.getScriptTable(e,i);if(n){if(!t||"dflt"===t||"DFLT"===t)return n.defaultLangSys;var r=wt(n.langSysRecords,t);if(r>=0)return n.langSysRecords[r].langSys;if(i){var o={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(e,t,i,n){var r=this.getLangSysTable(e,t,n);if(r){for(var o,s=r.featureIndexes,a=this.font.tables[this.tableName].features,u=0;u<s.length;u++)if((o=a[s[u]]).tag===i)return o.feature;if(n){var l=a.length;return E.assert(0===l||i>=a[l-1].tag,"Features must be added in alphabetical order."),o={tag:i,feature:{params:0,lookupListIndexes:[]}},a.push(o),s.push(l),o.feature}}},getLookupTables:function(e,t,i,n,r){var o=this.getFeatureTable(e,t,i,r),s=[];if(o){for(var a,u=o.lookupListIndexes,l=this.font.tables[this.tableName].lookups,c=0;c<u.length;c++)(a=l[u[c]]).lookupType===n&&s.push(a);if(0===s.length&&r){a={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var h=l.length;return l.push(a),u.push(h),[a]}}return s},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:var i=vt(e.ranges,t);return i?i.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var i=bt(e.glyphs,t);return i>=0?i:-1;case 2:var n=vt(e.ranges,t);return n?n.index+t-n.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],i=e.ranges,n=0;n<i.length;n++)for(var r=i[n],o=r.start,s=r.end,a=o;a<=s;a++)t.push(a);return t}},Tt.prototype=St.prototype,Tt.prototype.init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},Tt.prototype.getKerningValue=function(e,t,i){for(var n=0;n<e.length;n++)for(var r=e[n].subtables,o=0;o<r.length;o++){var s=r[o],a=this.getCoverageIndex(s.coverage,t);if(!(a<0))switch(s.posFormat){case 1:for(var u=s.pairSets[a],l=0;l<u.length;l++){var c=u[l];if(c.secondGlyph===i)return c.value1&&c.value1.xAdvance||0}break;case 2:var h=this.getGlyphClass(s.classDef1,t),d=this.getGlyphClass(s.classDef2,i),p=s.classRecords[h][d];return p.value1&&p.value1.xAdvance||0}}return 0},Tt.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)},Ct.prototype=St.prototype,Ct.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Ct.prototype.getSingle=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,1),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var u=s[a],l=this.expandCoverage(u.coverage),c=void 0;if(1===u.substFormat){var h=u.deltaGlyphId;for(c=0;c<l.length;c++){var d=l[c];n.push({sub:d,by:d+h})}}else{var p=u.substitute;for(c=0;c<l.length;c++)n.push({sub:l[c],by:p[c]})}}return n},Ct.prototype.getMultiple=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,2),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var u=s[a],l=this.expandCoverage(u.coverage),c=void 0;for(c=0;c<l.length;c++){var h=l[c],d=u.sequences[c];n.push({sub:h,by:d})}}return n},Ct.prototype.getAlternates=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,3),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var u=s[a],l=this.expandCoverage(u.coverage),c=u.alternateSets,h=0;h<l.length;h++)n.push({sub:l[h],by:c[h]});return n},Ct.prototype.getLigatures=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,4),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var u=s[a],l=this.expandCoverage(u.coverage),c=u.ligatureSets,h=0;h<l.length;h++)for(var d=l[h],p=c[h],f=0;f<p.length;f++){var g=p[f];n.push({sub:[d].concat(g.components),by:g.ligGlyph})}return n},Ct.prototype.addSingle=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});E.assert(1===r.coverage.format,"Single: unable to modify coverage table format "+r.coverage.format);var o=t.sub,s=this.binSearch(r.coverage.glyphs,o);s<0&&(s=-1-s,r.coverage.glyphs.splice(s,0,o),r.substitute.splice(s,0,0)),r.substitute[s]=t.by},Ct.prototype.addMultiple=function(e,t,i,n){E.assert(t.by instanceof Array&&t.by.length>1,'Multiple: "by" must be an array of two or more ids');var r=Ft(this.getLookupTables(i,n,e,2,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});E.assert(1===r.coverage.format,"Multiple: unable to modify coverage table format "+r.coverage.format);var o=t.sub,s=this.binSearch(r.coverage.glyphs,o);s<0&&(s=-1-s,r.coverage.glyphs.splice(s,0,o),r.sequences.splice(s,0,0)),r.sequences[s]=t.by},Ct.prototype.addAlternate=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});E.assert(1===r.coverage.format,"Alternate: unable to modify coverage table format "+r.coverage.format);var o=t.sub,s=this.binSearch(r.coverage.glyphs,o);s<0&&(s=-1-s,r.coverage.glyphs.splice(s,0,o),r.alternateSets.splice(s,0,0)),r.alternateSets[s]=t.by},Ct.prototype.addLigature=function(e,t,i,n){var r=this.getLookupTables(i,n,e,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),E.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var s=t.sub[0],a=t.sub.slice(1),u={ligGlyph:t.by,components:a},l=this.binSearch(o.coverage.glyphs,s);if(l>=0){for(var c=o.ligatureSets[l],h=0;h<c.length;h++)if(Nt(c[h].components,a))return;c.push(u)}else l=-1-l,o.coverage.glyphs.splice(l,0,s),o.ligatureSets.splice(l,0,[u])},Ct.prototype.getFeature=function(e,t,i){if(/ss\d\d/.test(e))return this.getSingle(e,t,i);switch(e){case"aalt":case"salt":return this.getSingle(e,t,i).concat(this.getAlternates(e,t,i));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,i);case"ccmp":return this.getMultiple(e,t,i).concat(this.getLigatures(e,t,i));case"stch":return this.getMultiple(e,t,i)}},Ct.prototype.add=function(e,t,i,n){if(/ss\d\d/.test(e))return this.addSingle(e,t,i,n);switch(e){case"aalt":case"salt":return"number"==typeof t.by?this.addSingle(e,t,i,n):this.addAlternate(e,t,i,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,i,n);case"ccmp":return t.by instanceof Array?this.addMultiple(e,t,i,n):this.addLigature(e,t,i,n)}};var At,Pt,Rt,Lt,kt={getPath:Vt,parse:function(e,t,i,n,r){return r.lowMemory?function(e,t,i,n){var r=new be.GlyphSet(n);return n._push=function(o){var s=i[o];s!==i[o+1]?r.push(o,be.ttfGlyphLoader(n,o,Mt,e,t+s,Bt)):r.push(o,be.glyphLoader(n,o))},r}(e,t,i,n):function(e,t,i,n){for(var r=new be.GlyphSet(n),o=0;o<i.length-1;o+=1){var s=i[o];s!==i[o+1]?r.push(o,be.ttfGlyphLoader(n,o,Mt,e,t+s,Bt)):r.push(o,be.glyphLoader(n,o))}return r}(e,t,i,n)}};function Ut(e){this.font=e,this.getCommands=function(e){return kt.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Xt(e){return e}function zt(e){return Math.sign(e)*Math.round(Math.abs(e))}function jt(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function Gt(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function qt(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function Ht(e){return Math.sign(e)*Math.floor(Math.abs(e))}var Wt=function(e){var t=this.srPeriod,i=this.srPhase,n=1;return e<0&&(e=-e,n=-1),e+=this.srThreshold-i,e=Math.trunc(e/t)*t,(e+=i)<0?i*n:e*n},Yt={x:1,y:0,axis:"x",distance:function(e,t,i,n){return(i?e.xo:e.x)-(n?t.xo:t.x)},interpolate:function(e,t,i,n){var r,o,s,a,u,l,c;if(!n||n===this)return r=e.xo-t.xo,o=e.xo-i.xo,u=t.x-t.xo,l=i.x-i.xo,0===(c=(s=Math.abs(r))+(a=Math.abs(o)))?void(e.x=e.xo+(u+l)/2):void(e.x=e.xo+(u*a+l*s)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),u=n.distance(t,t,!1,!0),l=n.distance(i,i,!1,!0),0!==(c=(s=Math.abs(r))+(a=Math.abs(o)))?Yt.setRelative(e,e,(u*a+l*s)/c,n,!0):Yt.setRelative(e,e,(u+l)/2,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,s=r?t.yo:t.y,a=o+i*n.x,u=s+i*n.y;e.x=a+(e.y-u)/n.normalSlope}else e.x=(r?t.xo:t.x)+i},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},$t={x:0,y:1,axis:"y",distance:function(e,t,i,n){return(i?e.yo:e.y)-(n?t.yo:t.y)},interpolate:function(e,t,i,n){var r,o,s,a,u,l,c;if(!n||n===this)return r=e.yo-t.yo,o=e.yo-i.yo,u=t.y-t.yo,l=i.y-i.yo,0===(c=(s=Math.abs(r))+(a=Math.abs(o)))?void(e.y=e.yo+(u+l)/2):void(e.y=e.yo+(u*a+l*s)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),u=n.distance(t,t,!1,!0),l=n.distance(i,i,!1,!0),0!==(c=(s=Math.abs(r))+(a=Math.abs(o)))?$t.setRelative(e,e,(u*a+l*s)/c,n,!0):$t.setRelative(e,e,(u+l)/2,n,!0)},normalSlope:0,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,s=r?t.yo:t.y,a=o+i*n.x,u=s+i*n.y;e.y=u+n.normalSlope*(e.x-a)}else e.y=(r?t.yo:t.y)+i},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function Zt(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function Kt(e,t){var i=Math.sqrt(e*e+t*t);return t/=i,1===(e/=i)&&0===t?Yt:0===e&&1===t?$t:new Zt(e,t)}function Qt(e,t,i,n){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=i,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(Yt),Object.freeze($t),Zt.prototype.distance=function(e,t,i,n){return this.x*Yt.distance(e,t,i,n)+this.y*$t.distance(e,t,i,n)},Zt.prototype.interpolate=function(e,t,i,n){var r,o,s,a,u,l,c;s=n.distance(e,t,!0,!0),a=n.distance(e,i,!0,!0),r=n.distance(t,t,!1,!0),o=n.distance(i,i,!1,!0),0!==(c=(u=Math.abs(s))+(l=Math.abs(a)))?this.setRelative(e,e,(r*l+o*u)/c,n,!0):this.setRelative(e,e,(r+o)/2,n,!0)},Zt.prototype.setRelative=function(e,t,i,n,r){n=n||this;var o=r?t.xo:t.x,s=r?t.yo:t.y,a=o+i*n.x,u=s+i*n.y,l=n.normalSlope,c=this.slope,h=e.x,d=e.y;e.x=(c*h-l*a+u-d)/(c-l),e.y=c*(e.x-h)+d},Zt.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},Qt.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},Qt.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var Jt=Object.freeze(new Qt(0,0)),ei={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function ti(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Yt,this.round=zt}}function ii(e){for(var t=e.tZone=new Array(e.gZone.length),i=0;i<t.length;i++)t[i]=new Qt(0,0)}function ni(e,t){var i,n=e.prog,r=e.ip,o=1;do{if(88===(i=n[++r]))o++;else if(89===i)o--;else if(64===i)r+=n[r+1]+1;else if(65===i)r+=2*n[r+1]+1;else if(i>=176&&i<=183)r+=i-176+1;else if(i>=184&&i<=191)r+=2*(i-184+1);else if(t&&1===o&&27===i)break}while(o>0);e.ip=r}function ri(t,i){e.DEBUG&&console.log(i.step,"SVTCA["+t.axis+"]"),i.fv=i.pv=i.dpv=t}function oi(t,i){e.DEBUG&&console.log(i.step,"SPVTCA["+t.axis+"]"),i.pv=i.dpv=t}function si(t,i){e.DEBUG&&console.log(i.step,"SFVTCA["+t.axis+"]"),i.fv=t}function ai(t,i){var n,r,o=i.stack,s=o.pop(),a=o.pop(),u=i.z2[s],l=i.z1[a];e.DEBUG&&console.log("SPVTL["+t+"]",s,a),t?(n=u.y-l.y,r=l.x-u.x):(n=l.x-u.x,r=l.y-u.y),i.pv=i.dpv=Kt(n,r)}function ui(t,i){var n,r,o=i.stack,s=o.pop(),a=o.pop(),u=i.z2[s],l=i.z1[a];e.DEBUG&&console.log("SFVTL["+t+"]",s,a),t?(n=u.y-l.y,r=l.x-u.x):(n=l.x-u.x,r=l.y-u.y),i.fv=Kt(n,r)}function li(t){e.DEBUG&&console.log(t.step,"POP[]"),t.stack.pop()}function ci(t,i){var n=i.stack.pop(),r=i.z0[n],o=i.fv,s=i.pv;e.DEBUG&&console.log(i.step,"MDAP["+t+"]",n);var a=s.distance(r,Jt);t&&(a=i.round(a)),o.setRelative(r,Jt,a,s),o.touch(r),i.rp0=i.rp1=n}function hi(t,i){var n,r,o,s=i.z2,a=s.length-2;e.DEBUG&&console.log(i.step,"IUP["+t.axis+"]");for(var u=0;u<a;u++)n=s[u],t.touched(n)||(r=n.prevTouched(t))!==n&&(r===(o=n.nextTouched(t))&&t.setRelative(n,n,t.distance(r,r,!1,!0),t,!0),t.interpolate(n,r,o,t))}function di(t,i){for(var n=i.stack,r=t?i.rp1:i.rp2,o=(t?i.z0:i.z1)[r],s=i.fv,a=i.pv,u=i.loop,l=i.z2;u--;){var c=n.pop(),h=l[c],d=a.distance(o,o,!1,!0);s.setRelative(h,h,d,a),s.touch(h),e.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-u)+": ":"")+"SHP["+(t?"rp1":"rp2")+"]",c)}i.loop=1}function pi(t,i){var n=i.stack,r=t?i.rp1:i.rp2,o=(t?i.z0:i.z1)[r],s=i.fv,a=i.pv,u=n.pop(),l=i.z2[i.contours[u]],c=l;e.DEBUG&&console.log(i.step,"SHC["+t+"]",u);var h=a.distance(o,o,!1,!0);do{c!==o&&s.setRelative(c,c,h,a),c=c.nextPointOnContour}while(c!==l)}function fi(t,i){var n,r,o=i.stack,s=t?i.rp1:i.rp2,a=(t?i.z0:i.z1)[s],u=i.fv,l=i.pv,c=o.pop();switch(e.DEBUG&&console.log(i.step,"SHZ["+t+"]",c),c){case 0:n=i.tZone;break;case 1:n=i.gZone;break;default:throw new Error("Invalid zone")}for(var h=l.distance(a,a,!1,!0),d=n.length-2,p=0;p<d;p++)r=n[p],u.setRelative(r,r,h,l)}function gi(t,i){var n=i.stack,r=n.pop()/64,o=n.pop(),s=i.z1[o],a=i.z0[i.rp0],u=i.fv,l=i.pv;u.setRelative(s,a,r,l),u.touch(s),e.DEBUG&&console.log(i.step,"MSIRP["+t+"]",r,o),i.rp1=i.rp0,i.rp2=o,t&&(i.rp0=o)}function mi(t,i){var n=i.stack,r=n.pop(),o=n.pop(),s=i.z0[o],a=i.fv,u=i.pv,l=i.cvt[r];e.DEBUG&&console.log(i.step,"MIAP["+t+"]",r,"(",l,")",o);var c=u.distance(s,Jt);t&&(Math.abs(c-l)<i.cvCutIn&&(c=l),c=i.round(c)),a.setRelative(s,Jt,c,u),0===i.zp0&&(s.xo=s.x,s.yo=s.y),a.touch(s),i.rp0=i.rp1=o}function _i(t,i){var n=i.stack,r=n.pop(),o=i.z2[r];e.DEBUG&&console.log(i.step,"GC["+t+"]",r),n.push(64*i.dpv.distance(o,Jt,t,!1))}function yi(t,i){var n=i.stack,r=n.pop(),o=n.pop(),s=i.z1[r],a=i.z0[o],u=i.dpv.distance(a,s,t,t);e.DEBUG&&console.log(i.step,"MD["+t+"]",r,o,"->",u),i.stack.push(Math.round(64*u))}function xi(t,i){var n=i.stack,r=n.pop(),o=i.fv,s=i.pv,a=i.ppem,u=i.deltaBase+16*(t-1),l=i.deltaShift,c=i.z0;e.DEBUG&&console.log(i.step,"DELTAP["+t+"]",r,n);for(var h=0;h<r;h++){var d=n.pop(),p=n.pop();if(u+((240&p)>>4)===a){var f=(15&p)-8;f>=0&&f++,e.DEBUG&&console.log(i.step,"DELTAPFIX",d,"by",f*l);var g=c[d];o.setRelative(g,g,f*l,s)}}}function wi(t,i){var n=i.stack,r=n.pop();e.DEBUG&&console.log(i.step,"ROUND[]"),n.push(64*i.round(r/64))}function bi(t,i){var n=i.stack,r=n.pop(),o=i.ppem,s=i.deltaBase+16*(t-1),a=i.deltaShift;e.DEBUG&&console.log(i.step,"DELTAC["+t+"]",r,n);for(var u=0;u<r;u++){var l=n.pop(),c=n.pop();if(s+((240&c)>>4)===o){var h=(15&c)-8;h>=0&&h++;var d=h*a;e.DEBUG&&console.log(i.step,"DELTACFIX",l,"by",d),i.cvt[l]+=d}}}function vi(t,i){var n,r,o=i.stack,s=o.pop(),a=o.pop(),u=i.z2[s],l=i.z1[a];e.DEBUG&&console.log(i.step,"SDPVTL["+t+"]",s,a),t?(n=u.y-l.y,r=l.x-u.x):(n=l.x-u.x,r=l.y-u.y),i.dpv=Kt(n,r)}function Si(t,i){var n=i.stack,r=i.prog,o=i.ip;e.DEBUG&&console.log(i.step,"PUSHB["+t+"]");for(var s=0;s<t;s++)n.push(r[++o]);i.ip=o}function Ti(t,i){var n=i.ip,r=i.prog,o=i.stack;e.DEBUG&&console.log(i.ip,"PUSHW["+t+"]");for(var s=0;s<t;s++){var a=r[++n]<<8|r[++n];32768&a&&(a=-(1+(65535^a))),o.push(a)}i.ip=n}function Ci(t,i,n,r,o,s){var a,u,l,c,h=s.stack,d=t&&h.pop(),p=h.pop(),f=s.rp0,g=s.z0[f],m=s.z1[p],_=s.minDis,y=s.fv,x=s.dpv;l=(u=a=x.distance(m,g,!0,!0))>=0?1:-1,u=Math.abs(u),t&&(c=s.cvt[d],r&&Math.abs(u-c)<s.cvCutIn&&(u=c)),n&&u<_&&(u=_),r&&(u=s.round(u)),y.setRelative(m,g,l*u,x),y.touch(m),e.DEBUG&&console.log(s.step,(t?"MIRP[":"MDRP[")+(i?"M":"m")+(n?">":"_")+(r?"R":"_")+(0===o?"Gr":1===o?"Bl":2===o?"Wh":"")+"]",t?d+"("+s.cvt[d]+","+c+")":"",p,"(d =",a,"->",l*u,")"),s.rp1=s.rp0,s.rp2=p,i&&(s.rp0=p)}function Ni(e){this.char=e,this.state={},this.activeState=null}function Fi(e,t,i){this.contextName=i,this.startIndex=e,this.endOffset=t}function Oi(e,t,i){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=i}function Ei(e,t){this.context=e,this.index=t,this.length=e.length,this.current=e[t],this.backtrack=e.slice(0,t),this.lookahead=e.slice(t+1)}function Di(e){this.eventId=e,this.subscribers=[]}function Mi(e){var t=this,i=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];i.forEach((function(e){Object.defineProperty(t.events,e,{value:new Di(e)})})),e&&i.forEach((function(i){var n=e[i];"function"==typeof n&&t.events[i].subscribe(n)}));["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"].forEach((function(e){t.events[e].subscribe(t.updateContextsRanges)}))}function Ii(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],Mi.call(this,e)}function Vi(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function Bi(e){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e)}function Ai(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}function Pi(e){return/[A-z]/.test(e)}function Ri(e){this.font=e,this.features={}}function Li(e){this.id=e.id,this.tag=e.tag,this.substitution=e.substitution}function ki(e,t){if(!e)return-1;switch(t.format){case 1:return t.glyphs.indexOf(e);case 2:for(var i=t.ranges,n=0;n<i.length;n++){var r=i[n];if(e>=r.start&&e<=r.end){var o=e-r.start;return r.index+o}}break;default:return-1}return-1}function Ui(e,t){return-1===ki(e,t.coverage)?null:e+t.deltaGlyphId}function Xi(e,t){var i=ki(e,t.coverage);return-1===i?null:t.substitute[i]}function zi(e,t){for(var i=[],n=0;n<e.length;n++){var r=e[n],o=t.current,s=ki(o=Array.isArray(o)?o[0]:o,r);-1!==s&&i.push(s)}return i.length!==e.length?-1:i}function ji(e,t){var i=t.inputCoverage.length+t.lookaheadCoverage.length+t.backtrackCoverage.length;if(e.context.length<i)return[];var n=zi(t.inputCoverage,e);if(-1===n)return[];var r=t.inputCoverage.length-1;if(e.lookahead.length<t.lookaheadCoverage.length)return[];for(var o=e.lookahead.slice(r);o.length&&Ai(o[0].char);)o.shift();var s=new Ei(o,0),a=zi(t.lookaheadCoverage,s),u=[].concat(e.backtrack);for(u.reverse();u.length&&Ai(u[0].char);)u.shift();if(u.length<t.backtrackCoverage.length)return[];var l=new Ei(u,0),c=zi(t.backtrackCoverage,l),h=[];if(n.length===t.inputCoverage.length&&a.length===t.lookaheadCoverage.length&&c.length===t.backtrackCoverage.length)for(var d=0;d<t.lookupRecords.length;d++)for(var p=t.lookupRecords[d].lookupListIndex,f=this.getLookupByIndex(p),g=0;g<f.subtables.length;g++){var m=f.subtables[g],_=this.getLookupMethod(f,m);if("12"===this.getSubstitutionType(f,m))for(var y=0;y<n.length;y++){var x=_(e.get(y));x&&h.push(x)}}return h}function Gi(e,t){var i,n=ki(e.current,t.coverage);if(-1===n)return null;for(var r=t.ligatureSets[n],o=0;o<r.length;o++){i=r[o];for(var s=0;s<i.components.length;s++){if(e.lookahead[s]!==i.components[s])break;if(s===i.components.length-1)return i}}return null}function qi(e,t){var i=ki(e,t.coverage);return-1===i?null:t.sequences[i]}Ut.prototype.exec=function(t,i){if("number"!=typeof i)throw new Error("Point size is not a number!");if(!(this._errorState>2)){var n=this.font,r=this._prepState;if(!r||r.ppem!==i){var o=this._fpgmState;if(!o){ti.prototype=ei,(o=this._fpgmState=new ti("fpgm",n.tables.fpgm)).funcs=[],o.font=n,e.DEBUG&&(console.log("---EXEC FPGM---"),o.step=-1);try{Pt(o)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}ti.prototype=o,(r=this._prepState=new ti("prep",n.tables.prep)).ppem=i;var s=n.tables.cvt;if(s)for(var a=r.cvt=new Array(s.length),u=i/n.unitsPerEm,l=0;l<s.length;l++)a[l]=s[l]*u;else r.cvt=[];e.DEBUG&&(console.log("---EXEC PREP---"),r.step=-1);try{Pt(r)}catch(e){this._errorState<2&&console.log("Hinting error in PREP:"+e),this._errorState=2}}if(!(this._errorState>1))try{return Rt(t,r)}catch(e){return this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},Rt=function(t,i){var n,r,o,s=i.ppem/i.font.unitsPerEm,a=s,u=t.components;if(ti.prototype=i,u){var l=i.font;r=[],n=[];for(var c=0;c<u.length;c++){var h=u[c],d=l.glyphs.get(h.glyphIndex);o=new ti("glyf",d.instructions),e.DEBUG&&(console.log("---EXEC COMP "+c+"---"),o.step=-1),Lt(d,o,s,a);for(var p=Math.round(h.dx*s),f=Math.round(h.dy*a),g=o.gZone,m=o.contours,_=0;_<g.length;_++){var y=g[_];y.xTouched=y.yTouched=!1,y.xo=y.x=y.x+p,y.yo=y.y=y.y+f}var x=r.length;r.push.apply(r,g);for(var w=0;w<m.length;w++)n.push(m[w]+x)}t.instructions&&!o.inhibitGridFit&&((o=new ti("glyf",t.instructions)).gZone=o.z0=o.z1=o.z2=r,o.contours=n,r.push(new Qt(0,0),new Qt(Math.round(t.advanceWidth*s),0)),e.DEBUG&&(console.log("---EXEC COMPOSITE---"),o.step=-1),Pt(o),r.length-=2)}else o=new ti("glyf",t.instructions),e.DEBUG&&(console.log("---EXEC GLYPH---"),o.step=-1),Lt(t,o,s,a),r=o.gZone;return r},Lt=function(t,i,n,r){for(var o,s,a,u=t.points||[],l=u.length,c=i.gZone=i.z0=i.z1=i.z2=[],h=i.contours=[],d=0;d<l;d++)o=u[d],c[d]=new Qt(o.x*n,o.y*r,o.lastPointOfContour,o.onCurve);for(var p=0;p<l;p++)o=c[p],s||(s=o,h.push(p)),o.lastPointOfContour?(o.nextPointOnContour=s,s.prevPointOnContour=o,s=void 0):(a=c[p+1],o.nextPointOnContour=a,a.prevPointOnContour=o);if(!i.inhibitGridFit){if(e.DEBUG){console.log("PROCESSING GLYPH",i.stack);for(var f=0;f<l;f++)console.log(f,c[f].x,c[f].y)}if(c.push(new Qt(0,0),new Qt(Math.round(t.advanceWidth*n),0)),Pt(i),c.length-=2,e.DEBUG){console.log("FINISHED GLYPH",i.stack);for(var g=0;g<l;g++)console.log(g,c[g].x,c[g].y)}}},Pt=function(t){var i=t.prog;if(i){var n,r=i.length;for(t.ip=0;t.ip<r;t.ip++){if(e.DEBUG&&t.step++,!(n=At[i[t.ip]]))throw new Error("unknown instruction: 0x"+Number(i[t.ip]).toString(16));n(t)}}},At=[ri.bind(void 0,$t),ri.bind(void 0,Yt),oi.bind(void 0,$t),oi.bind(void 0,Yt),si.bind(void 0,$t),si.bind(void 0,Yt),ai.bind(void 0,0),ai.bind(void 0,1),ui.bind(void 0,0),ui.bind(void 0,1),function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SPVFS[]",n,r),t.pv=t.dpv=Kt(r,n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SPVFS[]",n,r),t.fv=Kt(r,n)},function(t){var i=t.stack,n=t.pv;e.DEBUG&&console.log(t.step,"GPV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(t){var i=t.stack,n=t.fv;e.DEBUG&&console.log(t.step,"GFV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(t){t.fv=t.pv,e.DEBUG&&console.log(t.step,"SFVTPV[]")},function(t){var i=t.stack,n=i.pop(),r=i.pop(),o=i.pop(),s=i.pop(),a=i.pop(),u=t.z0,l=t.z1,c=u[n],h=u[r],d=l[o],p=l[s],f=t.z2[a];e.DEBUG&&console.log("ISECT[], ",n,r,o,s,a);var g=c.x,m=c.y,_=h.x,y=h.y,x=d.x,w=d.y,b=p.x,v=p.y,S=(g-_)*(w-v)-(m-y)*(x-b),T=g*y-m*_,C=x*v-w*b;f.x=(T*(x-b)-C*(g-_))/S,f.y=(T*(w-v)-C*(m-y))/S},function(t){t.rp0=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP0[]",t.rp0)},function(t){t.rp1=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP1[]",t.rp1)},function(t){t.rp2=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP2[]",t.rp2)},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP0[]",i),t.zp0=i,i){case 0:t.tZone||ii(t),t.z0=t.tZone;break;case 1:t.z0=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP1[]",i),t.zp1=i,i){case 0:t.tZone||ii(t),t.z1=t.tZone;break;case 1:t.z1=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP2[]",i),t.zp2=i,i){case 0:t.tZone||ii(t),t.z2=t.tZone;break;case 1:t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZPS[]",i),t.zp0=t.zp1=t.zp2=i,i){case 0:t.tZone||ii(t),t.z0=t.z1=t.z2=t.tZone;break;case 1:t.z0=t.z1=t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){t.loop=t.stack.pop(),e.DEBUG&&console.log(t.step,"SLOOP[]",t.loop)},function(t){e.DEBUG&&console.log(t.step,"RTG[]"),t.round=zt},function(t){e.DEBUG&&console.log(t.step,"RTHG[]"),t.round=Gt},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SMD[]",i),t.minDis=i/64},function(t){e.DEBUG&&console.log(t.step,"ELSE[]"),ni(t,!1)},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"JMPR[]",i),t.ip+=i-1},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCVTCI[]",i),t.cvCutIn=i/64},void 0,void 0,function(t){var i=t.stack;e.DEBUG&&console.log(t.step,"DUP[]"),i.push(i[i.length-1])},li,function(t){e.DEBUG&&console.log(t.step,"CLEAR[]"),t.stack.length=0},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SWAP[]"),i.push(n),i.push(r)},function(t){var i=t.stack;e.DEBUG&&console.log(t.step,"DEPTH[]"),i.push(i.length)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"CINDEX[]",n),i.push(i[i.length-n])},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"MINDEX[]",n),i.push(i.splice(i.length-n,1)[0])},void 0,void 0,void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"LOOPCALL[]",n,r);var o=t.ip,s=t.prog;t.prog=t.funcs[n];for(var a=0;a<r;a++)Pt(t),e.DEBUG&&console.log(++t.step,a+1<r?"next loopcall":"done loopcall",a);t.ip=o,t.prog=s},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"CALL[]",i);var n=t.ip,r=t.prog;t.prog=t.funcs[i],Pt(t),t.ip=n,t.prog=r,e.DEBUG&&console.log(++t.step,"returning from",i)},function(t){if("fpgm"!==t.env)throw new Error("FDEF not allowed here");var i=t.stack,n=t.prog,r=t.ip,o=i.pop(),s=r;for(e.DEBUG&&console.log(t.step,"FDEF[]",o);45!==n[++r];);t.ip=r,t.funcs[o]=n.slice(s+1,r)},void 0,ci.bind(void 0,0),ci.bind(void 0,1),hi.bind(void 0,$t),hi.bind(void 0,Yt),di.bind(void 0,0),di.bind(void 0,1),pi.bind(void 0,0),pi.bind(void 0,1),fi.bind(void 0,0),fi.bind(void 0,1),function(t){for(var i=t.stack,n=t.loop,r=t.fv,o=i.pop()/64,s=t.z2;n--;){var a=i.pop(),u=s[a];e.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-n)+": ":"")+"SHPIX[]",a,o),r.setRelative(u,u,o),r.touch(u)}t.loop=1},function(t){for(var i=t.stack,n=t.rp1,r=t.rp2,o=t.loop,s=t.z0[n],a=t.z1[r],u=t.fv,l=t.dpv,c=t.z2;o--;){var h=i.pop(),d=c[h];e.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-o)+": ":"")+"IP[]",h,n,"<->",r),u.interpolate(d,s,a,l),u.touch(d)}t.loop=1},gi.bind(void 0,0),gi.bind(void 0,1),function(t){for(var i=t.stack,n=t.rp0,r=t.z0[n],o=t.loop,s=t.fv,a=t.pv,u=t.z1;o--;){var l=i.pop(),c=u[l];e.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-o)+": ":"")+"ALIGNRP[]",l),s.setRelative(c,r,0,a),s.touch(c)}t.loop=1},function(t){e.DEBUG&&console.log(t.step,"RTDG[]"),t.round=jt},mi.bind(void 0,0),mi.bind(void 0,1),function(t){var i=t.prog,n=t.ip,r=t.stack,o=i[++n];e.DEBUG&&console.log(t.step,"NPUSHB[]",o);for(var s=0;s<o;s++)r.push(i[++n]);t.ip=n},function(t){var i=t.ip,n=t.prog,r=t.stack,o=n[++i];e.DEBUG&&console.log(t.step,"NPUSHW[]",o);for(var s=0;s<o;s++){var a=n[++i]<<8|n[++i];32768&a&&(a=-(1+(65535^a))),r.push(a)}t.ip=i},function(t){var i=t.stack,n=t.store;n||(n=t.store=[]);var r=i.pop(),o=i.pop();e.DEBUG&&console.log(t.step,"WS",r,o),n[o]=r},function(t){var i=t.stack,n=t.store,r=i.pop();e.DEBUG&&console.log(t.step,"RS",r);var o=n&&n[r]||0;i.push(o)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"WCVTP",n,r),t.cvt[r]=n/64},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"RCVT",n),i.push(64*t.cvt[n])},_i.bind(void 0,0),_i.bind(void 0,1),void 0,yi.bind(void 0,0),yi.bind(void 0,1),function(t){e.DEBUG&&console.log(t.step,"MPPEM[]"),t.stack.push(t.ppem)},void 0,function(t){e.DEBUG&&console.log(t.step,"FLIPON[]"),t.autoFlip=!0},void 0,void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"LT[]",n,r),i.push(r<n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"LTEQ[]",n,r),i.push(r<=n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"GT[]",n,r),i.push(r>n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"GTEQ[]",n,r),i.push(r>=n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"EQ[]",n,r),i.push(n===r?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"NEQ[]",n,r),i.push(n!==r?1:0)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"ODD[]",n),i.push(Math.trunc(n)%2?1:0)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"EVEN[]",n),i.push(Math.trunc(n)%2?0:1)},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"IF[]",i),i||(ni(t,!0),e.DEBUG&&console.log(t.step,"EIF[]"))},function(t){e.DEBUG&&console.log(t.step,"EIF[]")},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"AND[]",n,r),i.push(n&&r?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"OR[]",n,r),i.push(n||r?1:0)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"NOT[]",n),i.push(n?0:1)},xi.bind(void 0,1),function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SDB[]",i),t.deltaBase=i},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SDS[]",i),t.deltaShift=Math.pow(.5,i)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"ADD[]",n,r),i.push(r+n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SUB[]",n,r),i.push(r-n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"DIV[]",n,r),i.push(64*r/n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"MUL[]",n,r),i.push(r*n/64)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"ABS[]",n),i.push(Math.abs(n))},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"NEG[]",n),i.push(-n)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"FLOOR[]",n),i.push(64*Math.floor(n/64))},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"CEILING[]",n),i.push(64*Math.ceil(n/64))},wi.bind(void 0,0),wi.bind(void 0,1),wi.bind(void 0,2),wi.bind(void 0,3),void 0,void 0,void 0,void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"WCVTF[]",n,r),t.cvt[r]=n*t.ppem/t.font.unitsPerEm},xi.bind(void 0,2),xi.bind(void 0,3),bi.bind(void 0,1),bi.bind(void 0,2),bi.bind(void 0,3),function(t){var i,n=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SROUND[]",n),t.round=Wt,192&n){case 0:i=.5;break;case 64:i=1;break;case 128:i=2;break;default:throw new Error("invalid SROUND value")}switch(t.srPeriod=i,48&n){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*i;break;case 32:t.srPhase=.5*i;break;case 48:t.srPhase=.75*i;break;default:throw new Error("invalid SROUND value")}n&=15,t.srThreshold=0===n?0:(n/8-.5)*i},function(t){var i,n=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"S45ROUND[]",n),t.round=Wt,192&n){case 0:i=Math.sqrt(2)/2;break;case 64:i=Math.sqrt(2);break;case 128:i=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(t.srPeriod=i,48&n){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*i;break;case 32:t.srPhase=.5*i;break;case 48:t.srPhase=.75*i;break;default:throw new Error("invalid S45ROUND value")}n&=15,t.srThreshold=0===n?0:(n/8-.5)*i},void 0,void 0,function(t){e.DEBUG&&console.log(t.step,"ROFF[]"),t.round=Xt},void 0,function(t){e.DEBUG&&console.log(t.step,"RUTG[]"),t.round=qt},function(t){e.DEBUG&&console.log(t.step,"RDTG[]"),t.round=Ht},li,li,void 0,void 0,void 0,void 0,void 0,function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCANCTRL[]",i)},vi.bind(void 0,0),vi.bind(void 0,1),function(t){var i=t.stack,n=i.pop(),r=0;e.DEBUG&&console.log(t.step,"GETINFO[]",n),1&n&&(r=35),32&n&&(r|=4096),i.push(r)},void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop(),o=i.pop();e.DEBUG&&console.log(t.step,"ROLL[]"),i.push(r),i.push(n),i.push(o)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"MAX[]",n,r),i.push(Math.max(r,n))},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"MIN[]",n,r),i.push(Math.min(r,n))},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCANTYPE[]",i)},function(t){var i=t.stack.pop(),n=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"INSTCTRL[]",i,n),i){case 1:return void(t.inhibitGridFit=!!n);case 2:return void(t.ignoreCvt=!!n);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Si.bind(void 0,1),Si.bind(void 0,2),Si.bind(void 0,3),Si.bind(void 0,4),Si.bind(void 0,5),Si.bind(void 0,6),Si.bind(void 0,7),Si.bind(void 0,8),Ti.bind(void 0,1),Ti.bind(void 0,2),Ti.bind(void 0,3),Ti.bind(void 0,4),Ti.bind(void 0,5),Ti.bind(void 0,6),Ti.bind(void 0,7),Ti.bind(void 0,8),Ci.bind(void 0,0,0,0,0,0),Ci.bind(void 0,0,0,0,0,1),Ci.bind(void 0,0,0,0,0,2),Ci.bind(void 0,0,0,0,0,3),Ci.bind(void 0,0,0,0,1,0),Ci.bind(void 0,0,0,0,1,1),Ci.bind(void 0,0,0,0,1,2),Ci.bind(void 0,0,0,0,1,3),Ci.bind(void 0,0,0,1,0,0),Ci.bind(void 0,0,0,1,0,1),Ci.bind(void 0,0,0,1,0,2),Ci.bind(void 0,0,0,1,0,3),Ci.bind(void 0,0,0,1,1,0),Ci.bind(void 0,0,0,1,1,1),Ci.bind(void 0,0,0,1,1,2),Ci.bind(void 0,0,0,1,1,3),Ci.bind(void 0,0,1,0,0,0),Ci.bind(void 0,0,1,0,0,1),Ci.bind(void 0,0,1,0,0,2),Ci.bind(void 0,0,1,0,0,3),Ci.bind(void 0,0,1,0,1,0),Ci.bind(void 0,0,1,0,1,1),Ci.bind(void 0,0,1,0,1,2),Ci.bind(void 0,0,1,0,1,3),Ci.bind(void 0,0,1,1,0,0),Ci.bind(void 0,0,1,1,0,1),Ci.bind(void 0,0,1,1,0,2),Ci.bind(void 0,0,1,1,0,3),Ci.bind(void 0,0,1,1,1,0),Ci.bind(void 0,0,1,1,1,1),Ci.bind(void 0,0,1,1,1,2),Ci.bind(void 0,0,1,1,1,3),Ci.bind(void 0,1,0,0,0,0),Ci.bind(void 0,1,0,0,0,1),Ci.bind(void 0,1,0,0,0,2),Ci.bind(void 0,1,0,0,0,3),Ci.bind(void 0,1,0,0,1,0),Ci.bind(void 0,1,0,0,1,1),Ci.bind(void 0,1,0,0,1,2),Ci.bind(void 0,1,0,0,1,3),Ci.bind(void 0,1,0,1,0,0),Ci.bind(void 0,1,0,1,0,1),Ci.bind(void 0,1,0,1,0,2),Ci.bind(void 0,1,0,1,0,3),Ci.bind(void 0,1,0,1,1,0),Ci.bind(void 0,1,0,1,1,1),Ci.bind(void 0,1,0,1,1,2),Ci.bind(void 0,1,0,1,1,3),Ci.bind(void 0,1,1,0,0,0),Ci.bind(void 0,1,1,0,0,1),Ci.bind(void 0,1,1,0,0,2),Ci.bind(void 0,1,1,0,0,3),Ci.bind(void 0,1,1,0,1,0),Ci.bind(void 0,1,1,0,1,1),Ci.bind(void 0,1,1,0,1,2),Ci.bind(void 0,1,1,0,1,3),Ci.bind(void 0,1,1,1,0,0),Ci.bind(void 0,1,1,1,0,1),Ci.bind(void 0,1,1,1,0,2),Ci.bind(void 0,1,1,1,0,3),Ci.bind(void 0,1,1,1,1,0),Ci.bind(void 0,1,1,1,1,1),Ci.bind(void 0,1,1,1,1,2),Ci.bind(void 0,1,1,1,1,3)],Ni.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},Ni.prototype.getState=function(e){return this.state[e]||null},Ii.prototype.inboundIndex=function(e){return e>=0&&e<this.tokens.length},Ii.prototype.composeRUD=function(e){var t=this,i=e.map((function(e){return t[e[0]].apply(t,e.slice(1).concat(true))})),n=function(e){return"object"==typeof e&&e.hasOwnProperty("FAIL")};if(i.every(n))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:i.filter(n)};this.dispatch("composeRUD",[i.filter((function(e){return!n(e)}))])},Ii.prototype.replaceRange=function(e,t,i,n){t=null!==t?t:this.tokens.length;var r=i.every((function(e){return e instanceof Ni}));if(!isNaN(e)&&this.inboundIndex(e)&&r){var o=this.tokens.splice.apply(this.tokens,[e,t].concat(i));return n||this.dispatch("replaceToken",[e,t,i]),[o,i]}return{FAIL:"replaceRange: invalid tokens or startIndex."}},Ii.prototype.replaceToken=function(e,t,i){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Ni){var n=this.tokens.splice(e,1,t);return i||this.dispatch("replaceToken",[e,t]),[n[0],t]}return{FAIL:"replaceToken: invalid token or index."}},Ii.prototype.removeRange=function(e,t,i){t=isNaN(t)?this.tokens.length:t;var n=this.tokens.splice(e,t);return i||this.dispatch("removeRange",[n,e,t]),n},Ii.prototype.removeToken=function(e,t){if(!isNaN(e)&&this.inboundIndex(e)){var i=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[i,e]),i}return{FAIL:"removeToken: invalid token index."}},Ii.prototype.insertToken=function(e,t,i){return e.every((function(e){return e instanceof Ni}))?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),i||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}},Ii.prototype.registerModifier=function(e,t,i){this.events.newToken.subscribe((function(n,r){var o=[n,r],s=[n,r];if(null===t||!0===t.apply(this,o)){var a=i.apply(this,s);n.setState(e,a)}})),this.registeredModifiers.push(e)},Di.prototype.subscribe=function(e){return"function"==typeof e?this.subscribers.push(e)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}},Di.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},Ei.prototype.setCurrentIndex=function(e){this.index=e,this.current=this.context[e],this.backtrack=this.context.slice(0,e),this.lookahead=this.context.slice(e+1)},Ei.prototype.get=function(e){switch(!0){case 0===e:return this.current;case e<0&&Math.abs(e)<=this.backtrack.length:return this.backtrack.slice(e)[0];case e>0&&e<=this.lookahead.length:return this.lookahead[e-1];default:return null}},Ii.prototype.rangeToText=function(e){if(e instanceof Fi)return this.getRangeTokens(e).map((function(e){return e.char})).join("")},Ii.prototype.getText=function(){return this.tokens.map((function(e){return e.char})).join("")},Ii.prototype.getContext=function(e){var t=this.registeredContexts[e];return t||null},Ii.prototype.on=function(e,t){var i=this.events[e];return i?i.subscribe(t):null},Ii.prototype.dispatch=function(e,t){var i=this,n=this.events[e];n instanceof Di&&n.subscribers.forEach((function(e){e.apply(i,t||[])}))},Ii.prototype.registerContextChecker=function(e,t,i){if(this.getContext(e))return{FAIL:"context name '"+e+"' is already registered."};if("function"!=typeof t)return{FAIL:"missing context start check."};if("function"!=typeof i)return{FAIL:"missing context end check."};var n=new Oi(e,t,i);return this.registeredContexts[e]=n,this.contextCheckers.push(n),n},Ii.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},Ii.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:"context checker '"+e+"' is not registered."}},Ii.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e){if(e.hasOwnProperty(t))e[t].ranges=[]}},Ii.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map((function(e){return e.char})),t=0;t<e.length;t++){var i=new Ei(e,t);this.runContextCheck(i)}this.dispatch("updateContextsRanges",[this.registeredContexts])},Ii.prototype.setEndOffset=function(e,t){var i=new Fi(this.getContext(t).openRange.startIndex,e,t),n=this.getContext(t).ranges;return i.rangeId=t+"."+n.length,n.push(i),this.getContext(t).openRange=null,i},Ii.prototype.runContextCheck=function(e){var t=this,i=e.index;this.contextCheckers.forEach((function(n){var r=n.contextName,o=t.getContext(r).openRange;if(!o&&n.checkStart(e)&&(o=new Fi(i,null,r),t.getContext(r).openRange=o,t.dispatch("contextStart",[r,i])),o&&n.checkEnd(e)){var s=i-o.startIndex+1,a=t.setEndOffset(s,r);t.dispatch("contextEnd",[r,a])}}))},Ii.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();var t=Array.from(e);this.dispatch("start");for(var i=0;i<t.length;i++){var n=t[i],r=new Ei(t,i);this.dispatch("next",[r]),this.runContextCheck(r);var o=new Ni(n);this.tokens.push(o),this.dispatch("newToken",[o,r])}return this.dispatch("end",[this.tokens]),this.tokens},Ri.prototype.getDefaultScriptFeaturesIndexes=function(){for(var e=this.font.tables.gsub.scripts,t=0;t<e.length;t++){var i=e[t];if("DFLT"===i.tag)return i.script.defaultLangSys.featureIndexes}return[]},Ri.prototype.getScriptFeaturesIndexes=function(e){if(!this.font.tables.gsub)return[];if(!e)return this.getDefaultScriptFeaturesIndexes();for(var t=this.font.tables.gsub.scripts,i=0;i<t.length;i++){var n=t[i];if(n.tag===e&&n.script.defaultLangSys)return n.script.defaultLangSys.featureIndexes;var r=n.langSysRecords;if(r)for(var o=0;o<r.length;o++){var s=r[o];if(s.tag===e)return s.langSys.featureIndexes}}return this.getDefaultScriptFeaturesIndexes()},Ri.prototype.mapTagsToFeatures=function(e,t){for(var i={},n=0;n<e.length;n++){var r=e[n].tag,o=e[n].feature;i[r]=o}this.features[t].tags=i},Ri.prototype.getScriptFeatures=function(e){var t=this.features[e];if(this.features.hasOwnProperty(e))return t;var i=this.getScriptFeaturesIndexes(e);if(!i)return null;var n=this.font.tables.gsub;return t=i.map((function(e){return n.features[e]})),this.features[e]=t,this.mapTagsToFeatures(t,e),t},Ri.prototype.getSubstitutionType=function(e,t){return e.lookupType.toString()+t.substFormat.toString()},Ri.prototype.getLookupMethod=function(e,t){var i=this;switch(this.getSubstitutionType(e,t)){case"11":return function(e){return Ui.apply(i,[e,t])};case"12":return function(e){return Xi.apply(i,[e,t])};case"63":return function(e){return ji.apply(i,[e,t])};case"41":return function(e){return Gi.apply(i,[e,t])};case"21":return function(e){return qi.apply(i,[e,t])};default:throw new Error("lookupType: "+e.lookupType+" - substFormat: "+t.substFormat+" is not yet supported")}},Ri.prototype.lookupFeature=function(e){var t=e.contextParams,i=t.index,n=this.getFeature({tag:e.tag,script:e.script});if(!n)return new Error("font '"+this.font.names.fullName.en+"' doesn't support feature '"+e.tag+"' for script '"+e.script+"'.");for(var r=this.getFeatureLookups(n),o=[].concat(t.context),s=0;s<r.length;s++)for(var a=r[s],u=this.getLookupSubtables(a),l=0;l<u.length;l++){var c=u[l],h=this.getSubstitutionType(a,c),d=this.getLookupMethod(a,c),p=void 0;switch(h){case"11":(p=d(t.current))&&o.splice(i,1,new Li({id:11,tag:e.tag,substitution:p}));break;case"12":(p=d(t.current))&&o.splice(i,1,new Li({id:12,tag:e.tag,substitution:p}));break;case"63":p=d(t),Array.isArray(p)&&p.length&&o.splice(i,1,new Li({id:63,tag:e.tag,substitution:p}));break;case"41":(p=d(t))&&o.splice(i,1,new Li({id:41,tag:e.tag,substitution:p}));break;case"21":(p=d(t.current))&&o.splice(i,1,new Li({id:21,tag:e.tag,substitution:p}))}t=new Ei(o,i),Array.isArray(p)&&!p.length||(p=null)}return o.length?o:null},Ri.prototype.supports=function(e){if(!e.script)return!1;this.getScriptFeatures(e.script);var t=this.features.hasOwnProperty(e.script);if(!e.tag)return t;var i=this.features[e.script].some((function(t){return t.tag===e.tag}));return t&&i},Ri.prototype.getLookupSubtables=function(e){return e.subtables||null},Ri.prototype.getLookupByIndex=function(e){return this.font.tables.gsub.lookups[e]||null},Ri.prototype.getFeatureLookups=function(e){return e.lookupListIndexes.map(this.getLookupByIndex.bind(this))},Ri.prototype.getFeature=function(e){if(!this.font)return{FAIL:"No font was found"};this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script);var t=this.features[e.script];return t?t.tags[e.tag]?this.features[e.script].tags[e.tag]:null:{FAIL:"No feature for script "+e.script}};var Hi={startCheck:function(e){var t=e.current,i=e.get(-1);return null===i&&Vi(t)||!Vi(i)&&Vi(t)},endCheck:function(e){var t=e.get(1);return null===t||!Vi(t)}};var Wi={startCheck:function(e){var t=e.current,i=e.get(-1);return(Vi(t)||Ai(t))&&!Vi(i)},endCheck:function(e){var t=e.get(1);switch(!0){case null===t:return!0;case!Vi(t)&&!Ai(t):var i=/\s/.test(t);if(!i)return!0;if(i){var n;if(n=e.lookahead.some((function(e){return Vi(e)||Ai(e)})),!n)return!0}break;default:return!1}}};var Yi={11:function(e,t,i){t[i].setState(e.tag,e.substitution)},12:function(e,t,i){t[i].setState(e.tag,e.substitution)},63:function(e,t,i){e.substitution.forEach((function(n,r){t[i+r].setState(e.tag,n)}))},41:function(e,t,i){var n=t[i];n.setState(e.tag,e.substitution.ligGlyph);for(var r=e.substitution.components.length,o=0;o<r;o++)(n=t[i+o+1]).setState("deleted",!0)}};function $i(e,t,i){e instanceof Li&&Yi[e.id]&&Yi[e.id](e,t,i)}function Zi(e){var t=this,i="arab",n=this.featuresTags.arab,r=this.tokenizer.getRangeTokens(e);if(1!==r.length){var o=new Ei(r.map((function(e){return e.getState("glyphIndex")})),0),s=new Ei(r.map((function(e){return e.char})),0);r.forEach((function(e,a){if(!Ai(e.char)){o.setCurrentIndex(a),s.setCurrentIndex(a);var u,l=0;switch(function(e){for(var t=[].concat(e.backtrack),i=t.length-1;i>=0;i--){var n=t[i],r=Bi(n),o=Ai(n);if(!r&&!o)return!0;if(r)return!1}return!1}(s)&&(l|=1),function(e){if(Bi(e.current))return!1;for(var t=0;t<e.lookahead.length;t++)if(!Ai(e.lookahead[t]))return!0;return!1}(s)&&(l|=2),l){case 1:u="fina";break;case 2:u="init";break;case 3:u="medi"}if(-1!==n.indexOf(u)){var c=t.query.lookupFeature({tag:u,script:i,contextParams:o});if(c instanceof Error)return console.info(c.message);c.forEach((function(e,t){e instanceof Li&&($i(e,r,t),o.context[t]=e.substitution)}))}}}))}}function Ki(e,t){return new Ei(e.map((function(e){return e.activeState.value})),t||0)}function Qi(e){var t=this,i=this.tokenizer.getRangeTokens(e),n=Ki(i);n.context.forEach((function(e,r){n.setCurrentIndex(r);var o=t.query.lookupFeature({tag:"rlig",script:"arab",contextParams:n});o.length&&(o.forEach((function(e){return $i(e,i,r)})),n=Ki(i))}))}var Ji={startCheck:function(e){var t=e.current,i=e.get(-1);return null===i&&Pi(t)||!Pi(i)&&Pi(t)},endCheck:function(e){var t=e.get(1);return null===t||!Pi(t)}};function en(e,t){return new Ei(e.map((function(e){return e.activeState.value})),t||0)}function tn(e){var t=this,i=this.tokenizer.getRangeTokens(e),n=en(i);n.context.forEach((function(e,r){n.setCurrentIndex(r);var o=t.query.lookupFeature({tag:"liga",script:"latn",contextParams:n});o.length&&(o.forEach((function(e){return $i(e,i,r)})),n=en(i))}))}function nn(e){this.baseDir=e||"ltr",this.tokenizer=new Ii,this.featuresTags={}}function rn(e){var t=this.contextChecks[e+"Check"];return this.tokenizer.registerContextChecker(e,t.startCheck,t.endCheck)}function on(){return rn.call(this,"latinWord"),rn.call(this,"arabicWord"),rn.call(this,"arabicSentence"),this.tokenizer.tokenize(this.text)}function sn(){var e=this;this.tokenizer.getContextRanges("arabicSentence").forEach((function(t){var i=e.tokenizer.getRangeTokens(t);e.tokenizer.replaceRange(t.startIndex,t.endOffset,i.reverse())}))}function an(){if(-1===this.tokenizer.registeredModifiers.indexOf("glyphIndex"))throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function un(){var e=this;this.featuresTags.hasOwnProperty("arab")&&(an.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){Zi.call(e,t)})))}function ln(){var e=this,t="arab";this.featuresTags.hasOwnProperty(t)&&(-1!==this.featuresTags.arab.indexOf("rlig")&&(an.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){Qi.call(e,t)}))))}function cn(){var e=this,t="latn";this.featuresTags.hasOwnProperty(t)&&(-1!==this.featuresTags.latn.indexOf("liga")&&(an.call(this),this.tokenizer.getContextRanges("latinWord").forEach((function(t){tn.call(e,t)}))))}function hn(e){(e=e||{}).tables=e.tables||{},e.empty||(Et(e.familyName,"When creating a new Font object, familyName is required."),Et(e.styleName,"When creating a new Font object, styleName is required."),Et(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Et(e.ascender,"When creating a new Font object, ascender is required."),Et(e.descender<=0,"When creating a new Font object, negative descender value is required."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\s/g,"")},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables=Object.assign(e.tables,{os2:Object.assign({usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR},e.tables.os2)})),this.supported=!0,this.glyphs=new be.GlyphSet(this,e.glyphs||[]),this.encoding=new de(this),this.position=new Tt(this),this.substitution=new Ct(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Ut(this):void 0}})}function dn(e,t){var i=JSON.stringify(e),n=256;for(var r in t){var o=parseInt(r);if(o&&!(o<256)){if(JSON.stringify(t[r])===i)return o;n<=o&&(n=o+1)}}return t[n]=e,n}function pn(e,t,i){var n=dn(t.name,i);return[{name:"tag_"+e,type:"TAG",value:t.tag},{name:"minValue_"+e,type:"FIXED",value:t.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:t.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:t.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:n}]}function fn(e,t,i){var n={},r=new oe.Parser(e,t);return n.tag=r.parseTag(),n.minValue=r.parseFixed(),n.defaultValue=r.parseFixed(),n.maxValue=r.parseFixed(),r.skip("uShort",1),n.name=i[r.parseUShort()]||{},n}function gn(e,t,i,n){for(var r=[{name:"nameID_"+e,type:"USHORT",value:dn(t.name,n)},{name:"flags_"+e,type:"USHORT",value:0}],o=0;o<i.length;++o){var s=i[o].tag;r.push({name:"axis_"+e+" "+s,type:"FIXED",value:t.coordinates[s]<<16})}return r}function mn(e,t,i,n){var r={},o=new oe.Parser(e,t);r.name=n[o.parseUShort()]||{},o.skip("uShort",1),r.coordinates={};for(var s=0;s<i.length;++s)r.coordinates[i[s].tag]=o.parseFixed();return r}nn.prototype.setText=function(e){this.text=e},nn.prototype.contextChecks={latinWordCheck:Ji,arabicWordCheck:Hi,arabicSentenceCheck:Wi},nn.prototype.registerFeatures=function(e,t){var i=this,n=t.filter((function(t){return i.query.supports({script:e,tag:t})}));this.featuresTags.hasOwnProperty(e)?this.featuresTags[e]=this.featuresTags[e].concat(n):this.featuresTags[e]=n},nn.prototype.applyFeatures=function(e,t){if(!e)throw new Error("No valid font was provided to apply features");this.query||(this.query=new Ri(e));for(var i=0;i<t.length;i++){var n=t[i];this.query.supports({script:n.script})&&this.registerFeatures(n.script,n.tags)}},nn.prototype.registerModifier=function(e,t,i){this.tokenizer.registerModifier(e,t,i)},nn.prototype.checkContextReady=function(e){return!!this.tokenizer.getContext(e)},nn.prototype.applyFeaturesToContexts=function(){this.checkContextReady("arabicWord")&&(un.call(this),ln.call(this)),this.checkContextReady("latinWord")&&cn.call(this),this.checkContextReady("arabicSentence")&&sn.call(this)},nn.prototype.processText=function(e){this.text&&this.text===e||(this.setText(e),on.call(this),this.applyFeaturesToContexts())},nn.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},nn.prototype.getTextGlyphs=function(e){this.processText(e);for(var t=[],i=0;i<this.tokenizer.tokens.length;i++){var n=this.tokenizer.tokens[i];if(!n.state.deleted){var r=n.activeState.value;t.push(Array.isArray(r)?r[0]:r)}}return t},hn.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},hn.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},hn.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},hn.prototype.updateFeatures=function(e){return this.defaultRenderOptions.features.map((function(t){return"latn"===t.script?{script:"latn",tags:t.tags.filter((function(t){return e[t]}))}:t}))},hn.prototype.stringToGlyphs=function(e,t){var i=this,n=new nn;n.registerModifier("glyphIndex",null,(function(e){return i.charToGlyphIndex(e.char)}));var r=t?this.updateFeatures(t.features):this.defaultRenderOptions.features;n.applyFeatures(this,r);for(var o=n.getTextGlyphs(e),s=o.length,a=new Array(s),u=this.glyphs.get(0),l=0;l<s;l+=1)a[l]=this.glyphs.get(o[l])||u;return a},hn.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},hn.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},hn.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},hn.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var i=this.position.defaultKerningTables;return i?this.position.getKerningValue(i,e,t):this.kerningPairs[e+","+t]||0},hn.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]}]},hn.prototype.forEachGlyph=function(e,t,i,n,r,o){t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:72,r=Object.assign({},this.defaultRenderOptions,r);var s,a=1/this.unitsPerEm*n,u=this.stringToGlyphs(e,r);if(r.kerning){var l=r.script||this.position.getDefaultScriptName();s=this.position.getKerningTables(l,r.language)}for(var c=0;c<u.length;c+=1){var h=u[c];if(o.call(this,h,t,i,n,r),h.advanceWidth&&(t+=h.advanceWidth*a),r.kerning&&c<u.length-1)t+=(s?this.position.getKerningValue(s,h.index,u[c+1].index):this.getKerningValue(h,u[c+1]))*a;r.letterSpacing?t+=r.letterSpacing*n:r.tracking&&(t+=r.tracking/1e3*n)}return t},hn.prototype.getPath=function(e,t,i,n,r){var o=new N;return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var s=e.getPath(t,i,n,r,this);o.extend(s)})),o},hn.prototype.getPaths=function(e,t,i,n,r){var o=[];return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var s=e.getPath(t,i,n,r,this);o.push(s)})),o},hn.prototype.getAdvanceWidth=function(e,t,i){return this.forEachGlyph(e,0,0,t,i,(function(){}))},hn.prototype.draw=function(e,t,i,n,r,o){this.getPath(t,i,n,r,o).draw(e)},hn.prototype.drawPoints=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawPoints(e,i,n,r)}))},hn.prototype.drawMetrics=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawMetrics(e,i,n,r)}))},hn.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},hn.prototype.validate=function(){var e=this;function t(t){var i=e.getEnglishName(t);i&&i.trim().length}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm},hn.prototype.toTables=function(){return xt.fontToTable(this)},hn.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},hn.prototype.toArrayBuffer=function(){for(var e=this.toTables().encode(),t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;n++)i[n]=e[n];return t},hn.prototype.download=function(e){var t=this.getEnglishName("fontFamily"),i=this.getEnglishName("fontSubfamily");e=e||t.replace(/\s/g,"")+"-"+i+".otf";var n=this.toArrayBuffer();if("undefined"!=typeof window)if(window.URL=window.URL||window.webkitURL,window.URL){var r=new DataView(n),o=new Blob([r],{type:"font/opentype"}),s=document.createElement("a");s.href=window.URL.createObjectURL(o),s.download=e;var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!1),s.dispatchEvent(a)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var u=require("fs"),l=function(e){for(var t=new Buffer(e.byteLength),i=new Uint8Array(e),n=0;n<t.length;++n)t[n]=i[n];return t}(n);u.writeFileSync(e,l)}},hn.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},hn.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},hn.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var _n={make:function(e,t){var i=new K.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+4*e.axes.length}]);i.offsetToData=i.sizeOf();for(var n=0;n<e.axes.length;n++)i.fields=i.fields.concat(pn(n,e.axes[n],t));for(var r=0;r<e.instances.length;r++)i.fields=i.fields.concat(gn(r,e.instances[r],e.axes,t));return i},parse:function(e,t,i){var n=new oe.Parser(e,t),r=n.parseULong();E.argument(65536===r,"Unsupported fvar table version.");var o=n.parseOffset16();n.skip("uShort",1);for(var s=n.parseUShort(),a=n.parseUShort(),u=n.parseUShort(),l=n.parseUShort(),c=[],h=0;h<s;h++)c.push(fn(e,t+o+h*a,i));for(var d=[],p=t+o+s*a,f=0;f<u;f++)d.push(mn(e,p+f*l,c,i));return{axes:c,instances:d}}},yn=function(){return{coverage:this.parsePointer(ne.coverage),attachPoints:this.parseList(ne.pointer(ne.uShortList))}},xn=function(){var e=this.parseUShort();return E.argument(1===e||2===e||3===e,"Unsupported CaretValue table version."),1===e?{coordinate:this.parseShort()}:2===e?{pointindex:this.parseShort()}:3===e?{coordinate:this.parseShort()}:void 0},wn=function(){return this.parseList(ne.pointer(xn))},bn=function(){return{coverage:this.parsePointer(ne.coverage),ligGlyphs:this.parseList(ne.pointer(wn))}},vn=function(){return this.parseUShort(),this.parseList(ne.pointer(ne.coverage))};var Sn={parse:function(e,t){var i=new ne(e,t=t||0),n=i.parseVersion(1);E.argument(1===n||1.2===n||1.3===n,"Unsupported GDEF table version.");var r={version:n,classDef:i.parsePointer(ne.classDef),attachList:i.parsePointer(yn),ligCaretList:i.parsePointer(bn),markAttachClassDef:i.parsePointer(ne.classDef)};return n>=1.2&&(r.markGlyphSets=i.parsePointer(vn)),r}},Tn=new Array(10);Tn[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(ne.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(ne.coverage),values:this.parseValueRecordList()}:void E.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Tn[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();E.assert(1===t||2===t,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var i=this.parsePointer(ne.coverage),n=this.parseUShort(),r=this.parseUShort();if(1===t)return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,pairSets:this.parseList(ne.pointer(ne.list((function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}}))))};if(2===t){var o=this.parsePointer(ne.classDef),s=this.parsePointer(ne.classDef),a=this.parseUShort(),u=this.parseUShort();return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,classDef1:o,classDef2:s,class1Count:a,class2Count:u,classRecords:this.parseList(a,ne.list(u,(function(){return{value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}})))}}},Tn[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Tn[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Tn[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Tn[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Tn[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Tn[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Tn[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var Cn=new Array(10);var Nn={parse:function(e,t){var i=new ne(e,t=t||0),n=i.parseVersion(1);return E.argument(1===n||1.1===n,"Unsupported GPOS table version "+n),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(Tn)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(Tn),variations:i.parseFeatureVariationsList()}},make:function(e){return new K.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new K.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new K.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new K.LookupList(e.lookups,Cn)}])}};var Fn={parse:function(e,t){var i=new oe.Parser(e,t),n=i.parseUShort();if(0===n)return function(e){var t={};e.skip("uShort");var i=e.parseUShort();E.argument(0===i,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),s=e.parseUShort(),a=e.parseShort();t[o+","+s]=a}return t}(i);if(1===n)return function(e){var t={};e.skip("uShort"),e.parseULong()>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var i=255&e.parseUShort();if(e.skip("uShort"),0===i){var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),s=e.parseUShort(),a=e.parseShort();t[o+","+s]=a}}return t}(i);throw new Error("Unsupported kern table version ("+n+").")}};var On={parse:function(e,t,i,n){for(var r=new oe.Parser(e,t),o=n?r.parseUShort:r.parseULong,s=[],a=0;a<i+1;a+=1){var u=o.call(r);n&&(u*=2),s.push(u)}return s}};function En(e,t){require("fs").readFile(e,(function(e,i){if(e)return t(e.message);t(null,Ot(i))}))}function Dn(e,t){var i=new XMLHttpRequest;i.open("get",e,!0),i.responseType="arraybuffer",i.onload=function(){return i.response?t(null,i.response):t("Font could not be loaded: "+i.statusText)},i.onerror=function(){t("Font could not be loaded")},i.send()}function Mn(e,t){for(var i=[],n=12,r=0;r<t;r+=1){var o=oe.getTag(e,n),s=oe.getULong(e,n+4),a=oe.getULong(e,n+8),u=oe.getULong(e,n+12);i.push({tag:o,checksum:s,offset:a,length:u,compression:!1}),n+=16}return i}function In(e,t){if("WOFF"===t.compression){var i=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),n=new Uint8Array(t.length);if(S(i,n),n.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(n.buffer,0),offset:0}}return{data:e,offset:t.offset}}function Vn(e,t){var i,n;t=null==t?{}:t;var r,o,s,a,u,l,c,h,d,p,f,g,m,_=new hn({empty:!0}),y=new DataView(e,0),x=[],w=oe.getTag(y,0);if(w===String.fromCharCode(0,1,0,0)||"true"===w||"typ1"===w)_.outlinesFormat="truetype",x=Mn(y,r=oe.getUShort(y,4));else if("OTTO"===w)_.outlinesFormat="cff",x=Mn(y,r=oe.getUShort(y,4));else{if("wOFF"!==w)throw new Error("Unsupported OpenType signature "+w);var b=oe.getTag(y,4);if(b===String.fromCharCode(0,1,0,0))_.outlinesFormat="truetype";else{if("OTTO"!==b)throw new Error("Unsupported OpenType flavor "+w);_.outlinesFormat="cff"}x=function(e,t){for(var i=[],n=44,r=0;r<t;r+=1){var o=oe.getTag(e,n),s=oe.getULong(e,n+4),a=oe.getULong(e,n+8),u=oe.getULong(e,n+12),l=void 0;l=a<u&&"WOFF",i.push({tag:o,offset:s,compression:l,compressedLength:a,length:u}),n+=20}return i}(y,r=oe.getUShort(y,12))}for(var v=0;v<r;v+=1){var S=x[v],T=void 0;switch(S.tag){case"cmap":T=In(y,S),_.tables.cmap=ae.parse(T.data,T.offset),_.encoding=new pe(_.tables.cmap);break;case"cvt ":T=In(y,S),m=new oe.Parser(T.data,T.offset),_.tables.cvt=m.parseShortList(S.length/2);break;case"fvar":s=S;break;case"fpgm":T=In(y,S),m=new oe.Parser(T.data,T.offset),_.tables.fpgm=m.parseByteList(S.length);break;case"head":T=In(y,S),_.tables.head=Xe.parse(T.data,T.offset),_.unitsPerEm=_.tables.head.unitsPerEm,i=_.tables.head.indexToLocFormat;break;case"hhea":T=In(y,S),_.tables.hhea=ze.parse(T.data,T.offset),_.ascender=_.tables.hhea.ascender,_.descender=_.tables.hhea.descender,_.numberOfHMetrics=_.tables.hhea.numberOfHMetrics;break;case"hmtx":h=S;break;case"ltag":T=In(y,S),n=Ge.parse(T.data,T.offset);break;case"maxp":T=In(y,S),_.tables.maxp=qe.parse(T.data,T.offset),_.numGlyphs=_.tables.maxp.numGlyphs;break;case"name":f=S;break;case"OS/2":T=In(y,S),_.tables.os2=st.parse(T.data,T.offset);break;case"post":T=In(y,S),_.tables.post=at.parse(T.data,T.offset),_.glyphNames=new ge(_.tables.post);break;case"prep":T=In(y,S),m=new oe.Parser(T.data,T.offset),_.tables.prep=m.parseByteList(S.length);break;case"glyf":a=S;break;case"loca":p=S;break;case"CFF ":o=S;break;case"kern":d=S;break;case"GDEF":u=S;break;case"GPOS":l=S;break;case"GSUB":c=S;break;case"meta":g=S}}var C=In(y,f);if(_.tables.name=rt.parse(C.data,C.offset,n),_.names=_.tables.name,a&&p){var N=0===i,F=In(y,p),O=On.parse(F.data,F.offset,_.numGlyphs,N),E=In(y,a);_.glyphs=kt.parse(E.data,E.offset,O,_,t)}else{if(!o)throw new Error("Font doesn't contain TrueType or CFF outlines.");var D=In(y,o);Ue.parse(D.data,D.offset,_,t)}var M=In(y,h);if(je.parse(_,M.data,M.offset,_.numberOfHMetrics,_.numGlyphs,_.glyphs,t),me(_,t),d){var I=In(y,d);_.kerningPairs=Fn.parse(I.data,I.offset)}else _.kerningPairs={};if(u){var V=In(y,u);_.tables.gdef=Sn.parse(V.data,V.offset)}if(l){var B=In(y,l);_.tables.gpos=Nn.parse(B.data,B.offset),_.position.init()}if(c){var A=In(y,c);_.tables.gsub=ht.parse(A.data,A.offset)}if(s){var P=In(y,s);_.tables.fvar=_n.parse(P.data,P.offset,_.names)}if(g){var R=In(y,g);_.tables.meta=dt.parse(R.data,R.offset),_.metas=_.tables.meta}return _}function Bn(e,t,i){i=null==i?{}:i;var n="undefined"==typeof window&&!i.isUrl?En:Dn;return new Promise((function(r,o){n(e,(function(e,n){if(e){if(t)return t(e);o(e)}var s;try{s=Vn(n,i)}catch(e){if(t)return t(e,null);o(e)}if(t)return t(null,s);r(s)}))}))}function An(e,t){return Vn(Ot(require("fs").readFileSync(e)),t)}var Pn=Object.freeze({__proto__:null,Font:hn,Glyph:ye,Path:N,BoundingBox:C,_parse:oe,parse:Vn,load:Bn,loadSync:An});e.BoundingBox=C,e.Font=hn,e.Glyph=ye,e.Path=N,e._parse=oe,e.default=Pn,e.load=Bn,e.loadSync=An,e.parse=Vn,Object.defineProperty(e,"__esModule",{value:!0})})),define("opentype",["opentype/dist/opentype"],(function(e){return e})),define("x_ite/Browser/Text/X3DTextContext",["jquery","x_ite/Components/Text/FontStyle","opentype"],(function(e,t,i){"use strict";const n=Symbol(),r=Symbol(),o=Symbol();function s(){this[r]=new Map,this[o]=new Map}return s.prototype={initialize:function(){},getDefaultFontStyle:function(){return this[n]=new t(this.getPrivateScene()),this[n].setup(),this.getDefaultFontStyle=function(){return this[n]},Object.defineProperty(this,"getDefaultFontStyle",{enumerable:!1}),this[n]},getFont:function(t){t=t.toString();let n=this[r].get(t);return void 0===n&&(this[r].set(t,n=e.Deferred()),i.load(t,this.setFont.bind(this,n))),n},setFont:function(e,t,i){t?e.reject(t):e.resolve(i)},getGlyph:function(e,t,i){let n=this[o].get(e);n||this[o].set(e,n=[]);let r=n[t];r||(r=n[t]=[]);let s=r[i];return s||(s=r[i]={}),s}},s})),define("x_ite/Components/Texturing/X3DTextureTransformNode",["x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i){"use strict";function n(n){e.call(this,n),this.addType(t.X3DTextureTransformNode),this.matrixArray=new Float32Array(i.Identity)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,setMatrix:function(e){this.matrixArray.set(e)},setShaderUniformsToChannel:function(e,t,i){e.uniformMatrix4fv(t.x3d_TextureMatrix[i],!1,this.matrixArray)}}),n})),define("x_ite/Components/Texturing/X3DSingleTextureTransformNode",["x_ite/Components/Texturing/X3DTextureTransformNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DSingleTextureTransformNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTextureMapping:function(e,t=0){this._mapping.getValue()&&e.set(this._mapping.getValue(),t)},setShaderUniforms:function(e,t){for(let i=0,n=t.x3d_MaxTextures;i<n;++i)this.setShaderUniformsToChannel(e,t,i)}}),i})),define("x_ite/Components/Texturing/TextureTransform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DSingleTextureTransformNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Numbers/Matrix3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(r.TextureTransform),this._rotation.setUnit("angle"),this.matrix=new a}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"mapping",new e.SFString),new t(r.inputOutput,"translation",new e.SFVec2f),new t(r.inputOutput,"rotation",new e.SFFloat),new t(r.inputOutput,"scale",new e.SFVec2f(1,1)),new t(r.inputOutput,"center",new e.SFVec2f)]),getTypeName:function(){return"TextureTransform"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"textureTransform"},initialize:function(){n.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},getMatrix:function(){return this.matrix},eventsProcessed:function(){const e=new o(0,0),t=new s;return function(){const i=this._translation.getValue(),n=this._rotation.getValue(),r=this._scale.getValue(),s=this._center.getValue(),a=this.matrix;t.identity(),s.equals(o.Zero)||t.translate(e.assign(s).negate()),r.equals(o.One)||t.scale(r),0!==n&&t.rotate(n),s.equals(o.Zero)||t.translate(s),i.equals(o.Zero)||t.translate(i),a[0]=t[0],a[1]=t[1],a[4]=t[3],a[5]=t[4],a[12]=t[6],a[13]=t[7],this.setMatrix(a)}}()}),u})),define("x_ite/Browser/Texturing/X3DTexturingContext",["x_ite/Components/Texturing/TextureProperties","x_ite/Components/Texturing/TextureTransform","x_ite/Components/Texturing/TextureCoordinate"],(function(e,t,i){"use strict";const n=Symbol(),r=Symbol(),o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol(),m=Symbol(),_=Symbol(),y=Symbol(),x=Symbol(),w=Symbol(),b=Symbol(),v=Symbol(),S=Symbol(),T=Symbol();function C(){const e=this.getContext(),t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this[n]=t>8?2:1,this[r]=t>8,this[o]=t>8}return C.prototype={initialize:function(){const e=this.getContext();this[s]=e.getParameter(e.MAX_TEXTURE_SIZE),this[a]=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this[u]=NaN,this[l]=[...Array(this[a]).keys()],this[c]=this[l].pop(),this[h]=this[l].pop(),this[d]=this[l].pop(),this[p]=[this[c]],this[f]=[this[h]],this[g]=[this[d]];const t=new Uint8Array([255,255,255,255]);this[x]=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this[x]),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.activeTexture(e.TEXTURE0+this[c]),e.bindTexture(e.TEXTURE_2D,this[x]),e.getVersion()>=2&&(this[w]=e.createTexture(),e.bindTexture(e.TEXTURE_3D,this[w]),e.texImage3D(e.TEXTURE_3D,0,e.RGBA,1,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.activeTexture(e.TEXTURE0+this[h]),e.bindTexture(e.TEXTURE_3D,this[w])),this[b]=e.createTexture(),e.bindTexture(e.TEXTURE_CUBE_MAP,this[b]),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_Z,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_NEGATIVE_X,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_Y,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.activeTexture(e.TEXTURE0+this[d]),e.bindTexture(e.TEXTURE_CUBE_MAP,this[b]),this.resetTextureUnits()},getMaxTextures:function(){return this[n]},getMinTextureSize:function(){return 16},getMaxTextureSize:function(){return this[s]},getMaxCombinedTextureUnits:function(){return this[a]},popTexture2DUnit:function(){return this[m]>0?(--this[m],this[p].shift()):this[l].pop()},pushTexture2DUnit:function(e){void 0!==e&&(this[m]=Math.max(this[m]+1,1),this[p].unshift(e))},getTexture2DUnit:function(){if(this[m]>0)return this[p][--this[m]];const e=this[l].pop();return void 0!==e&&this[p].push(e),e},getTexture3DUnit:function(){if(this[_]>0)return this[f][--this[_]];const e=this[l].pop();return void 0!==e&&this[f].push(e),e},getTextureCubeUnit:function(){if(this[y]>0)return this[g][--this[y]];const e=this[l].pop();return void 0!==e&&this[g].push(e),e},getTextureUnit:function(e){switch(e){case 2:return this.getTexture2DUnit();case 3:return this.getTexture3DUnit();case 4:return this.getTextureCubeUnit()}},resetTextureUnits:function(){this[m]=this[p].length,this[_]=this[f].length,this[y]=this[g].length},getDefaultTexture2DUnit:function(){return this[c]},getDefaultTexture3DUnit:function(){return this[h]},getDefaultTextureCubeUnit:function(){return this[d]},getTextureMemory:function(){return this[u]},getMultiTexturing:function(){return this[r]},getProjectiveTextureMapping:function(){return this[o]},getDefaultTextureProperties:function(){return this[v]=new e(this.getPrivateScene()),this[v]._magnificationFilter="NICEST",this[v]._minificationFilter="AVG_PIXEL_AVG_MIPMAP",this[v]._textureCompression="NICEST",this[v]._generateMipMaps=!0,this[v].setup(),this.getDefaultTextureProperties=function(){return this[v]},Object.defineProperty(this,"getDefaultTextureProperties",{enumerable:!1}),this[v]},getDefaultTextureTransform:function(){return this[S]=new t(this.getPrivateScene()),this[S].setup(),this.getDefaultTextureTransform=function(){return this[S]},Object.defineProperty(this,"getDefaultTextureTransform",{enumerable:!1}),this[S]},getDefaultTextureCoordinate:function(){return this[T]=new i(this.getPrivateScene()),this[T].setup(),this.getDefaultTextureCoordinate=function(){return this[T]},Object.defineProperty(this,"getDefaultTextureCoordinate",{enumerable:!1}),this[T]}},C})),define("x_ite/Browser/Time/X3DTimeContext",["standard/Math/Numbers/Vector3"],(function(e){"use strict";const t=Symbol(),i=Symbol(),n=Symbol(),r=Symbol();function o(){this[t]=0,this[i]=60,this[n]=new e(0,0,0),this[r]=0}return o.prototype={initialize:function(){this.advanceTime(performance.now())},getCurrentTime:function(){return this[t]},getCurrentFrameRate:function(){return this[i]},getCurrentSpeed:function(){return this[r]},advanceTime:function(){const o=new e(0,0,0);return function(e){const s=(e+performance.timeOrigin)/1e3,a=s-this[t];if(this[t]=s,this[i]=a?1/a:60,this.getWorld()&&this.getActiveLayer()){const e=this.getActiveLayer().getViewpoint().getCameraSpaceMatrix();o.assign(this[n]),this[n].set(e[12],e[13],e[14]),this[r]=o.subtract(this[n]).abs()*this[i]}else this[r]=0}}()},o})),define("x_ite/Browser/X3DBrowserContext",["jquery","x_ite/Fields/SFTime","x_ite/Base/X3DBaseNode","x_ite/Browser/Core/X3DCoreContext","x_ite/Routing/X3DRoutingContext","x_ite/Browser/Scripting/X3DScriptingContext","x_ite/Browser/Networking/X3DNetworkingContext","x_ite/Browser/Shaders/X3DShadersContext","x_ite/Browser/Rendering/X3DRenderingContext","x_ite/Browser/Shape/X3DShapeContext","x_ite/Browser/Grouping/X3DGroupingContext","x_ite/Browser/Geometry3D/X3DGeometry3DContext","x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext","x_ite/Browser/Navigation/X3DNavigationContext","x_ite/Browser/Layering/X3DLayeringContext","x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext","x_ite/Browser/Lighting/X3DLightingContext","x_ite/Browser/Picking/X3DPickingContext","x_ite/Browser/Sound/X3DSoundContext","x_ite/Browser/Text/X3DTextContext","x_ite/Browser/Texturing/X3DTexturingContext","x_ite/Browser/Time/X3DTimeContext","x_ite/Execution/X3DWorld","x_ite/Rendering/TraverseType"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w,b,v,S){"use strict";const T=Symbol(),C=Symbol(),N=Symbol(),F=Symbol(),O=Symbol(),E=Symbol(),D=Symbol(),M=Symbol(),I=Symbol(),V=[];function B(e){i.call(this,this),r.call(this),n.call(this,e),o.call(this),s.call(this),a.call(this),u.call(this),l.call(this),c.call(this),h.call(this),d.call(this),p.call(this),f.call(this),g.call(this),m.call(this),_.call(this),y.call(this),x.call(this),w.call(this),b.call(this);for(const e of V)e.call(this);this.addChildObjects("initialized",new t,"shutdown",new t,"prepareEvents",new t,"timeEvents",new t,"sensorEvents",new t,"finished",new t),this[C]=0,this[N]=this.traverse.bind(this),this[F]=0,this[O]=0,this[E]=0,this[D]=0,this[M]=0,this[I]=0}B.prototype=Object.assign(Object.create(i.prototype),r.prototype,n.prototype,o.prototype,s.prototype,a.prototype,u.prototype,l.prototype,c.prototype,h.prototype,d.prototype,p.prototype,f.prototype,g.prototype,m.prototype,_.prototype,y.prototype,x.prototype,w.prototype,b.prototype,{constructor:B,initialize:function(){i.prototype.initialize.call(this),r.prototype.initialize.call(this),n.prototype.initialize.call(this),o.prototype.initialize.call(this),s.prototype.initialize.call(this),a.prototype.initialize.call(this),u.prototype.initialize.call(this),l.prototype.initialize.call(this),c.prototype.initialize.call(this),h.prototype.initialize.call(this),d.prototype.initialize.call(this),p.prototype.initialize.call(this),f.prototype.initialize.call(this),g.prototype.initialize.call(this),m.prototype.initialize.call(this),_.prototype.initialize.call(this),y.prototype.initialize.call(this),x.prototype.initialize.call(this),w.prototype.initialize.call(this),b.prototype.initialize.call(this);for(const e of V)e.prototype.initialize&&e.prototype.initialize.call(this)},initialized:function(){return this._initialized},shutdown:function(){return this._shutdown},prepareEvents:function(){return this._prepareEvents},timeEvents:function(){return this._timeEvents},sensorEvents:function(){return this._sensorEvents},finished:function(){return this._finished},getBrowser:function(){return this},getWorld:function(){return this[T]},setExecutionContext:function(e){this[T]=new v(e),this[T].setup()},getExecutionContext:function(){return this[T].getExecutionContext()},addBrowserEvent:function(){this[C]!==this.getCurrentTime()&&(this[C]=this.getCurrentTime(),this.requestAnimationFrame())},requestAnimationFrame:function(){window.requestAnimationFrame(this[N])},traverse:function(e){const t=this.getContext(),i=performance.now();this[F]=i-this[O],this.advanceTime(e),this._prepareEvents.processInterests(),this.processEvents(),this._timeEvents.processInterests(),this.processEvents();const n=performance.now();this[T].traverse(S.CAMERA,null),this[D]=performance.now()-n;const r=performance.now();this.getCollisionCount()&&this[T].traverse(S.COLLISION,null),this[M]=performance.now()-r,this._sensorEvents.processInterests(),this.processEvents();const o=performance.now();t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this[T].traverse(S.DISPLAY,null),this[I]=performance.now()-o,this[E]=performance.now()-i,this[O]=performance.now(),this._finished.processInterests()},getSystemTime:function(){return this[F]},getBrowserTime:function(){return this[E]},getCameraTime:function(){return this[D]},getCollisionTime:function(){return this[M]},getDisplayTime:function(){return this[I]}});for(const e of Reflect.ownKeys(B.prototype))Object.defineProperty(B.prototype,e,{enumerable:!1});return Object.assign(B,{addContext:function(t){const i=require("x_ite/X3D");V.push(t),Object.assign(B.prototype,t.prototype);for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(B.prototype,e,{enumerable:!1});e("X3DCanvas").each((function(e,n){const r=i.getBrowser(n);t.call(r),t.prototype.initialize&&t.prototype.initialize.call(r)}))}}),B})),define("x_ite/Components/Core/X3DMetadataObject",["x_ite/Base/X3DConstants"],(function(e){"use strict";function t(t){this.addType(e.X3DMetadataObject)}return t.prototype={constructor:t,initialize:function(){}},t})),define("x_ite/Components/Core/MetadataBoolean",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataBoolean)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFBool)]),getTypeName:function(){return"MetadataBoolean"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataDouble",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataDouble)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFDouble)]),getTypeName:function(){return"MetadataDouble"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataFloat",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataFloat)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFFloat)]),getTypeName:function(){return"MetadataFloat"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataInteger",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataInteger)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFInt32)]),getTypeName:function(){return"MetadataInteger"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataSet)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFNode)]),getTypeName:function(){return"MetadataSet"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataString",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataString)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFString)]),getTypeName:function(){return"MetadataString"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/X3DInfoNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DInfoNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Core/WorldInfo",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DInfoNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.WorldInfo)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"title",new e.SFString),new t(r.inputOutput,"info",new e.MFString)]),getTypeName:function(){return"WorldInfo"},getComponentName:function(){return"Core"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.getExecutionContext().addWorldInfo(this)},dispose:function(){this.getExecutionContext().removeWorldInfo(this),n.prototype.dispose.call(this)}}),o})),define("x_ite/Components/Core",["x_ite/Configuration/SupportedNodes","x_ite/Components/Core/MetadataBoolean","x_ite/Components/Core/MetadataDouble","x_ite/Components/Core/MetadataFloat","x_ite/Components/Core/MetadataInteger","x_ite/Components/Core/MetadataSet","x_ite/Components/Core/MetadataString","x_ite/Components/Core/WorldInfo","x_ite/Components/Core/X3DBindableNode","x_ite/Components/Core/X3DChildNode","x_ite/Components/Core/X3DInfoNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DPrototypeInstance","x_ite/Components/Core/X3DSensorNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f){"use strict";const g={MetadataBoolean:t,MetadataDouble:i,MetadataFloat:n,MetadataInteger:r,MetadataSet:o,MetadataString:s,WorldInfo:a},m={X3DBindableNode:u,X3DChildNode:l,X3DInfoNode:c,X3DMetadataObject:h,X3DNode:d,X3DPrototypeInstance:p,X3DSensorNode:f};for(const t in g)e.addType(t,g[t]);for(const t in m)e.addAbstractType(t,m[t])})),define("x_ite/Components/EnvironmentalEffects/FogCoordinate",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.FogCoordinate),this._depth.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"depth",new e.MFFloat)]),getTypeName:function(){return"FogCoordinate"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"fogCoord"},initialize:function(){n.prototype.initialize.call(this),this._depth.addInterest("set_depth__",this),this.set_depth__()},set_depth__:function(){this.depth=this._depth.getValue(),this.length=this._depth.length},isEmpty:function(){return 0===this.length},getSize:function(){return this.length},addDepth:function(e,t){e<this.length?t.push(this.depth[e]):this.length?t.push(this.depth[this.length-1]):t.push(0)},addDepths:function(e,t){const i=this.length;if(i){const n=this.depth;for(let t=0;t<i;++t)e.push(n[t]);const r=n[i-1];for(let n=i;n<t;++n)e.push(r)}else for(let i=0;i<t;++i)e.push(0)}}),o})),define("x_ite/Components/EnvironmentalEffects/LocalFog",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/EnvironmentalEffects/X3DFogObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.LocalFog)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"fogType",new e.SFString("LINEAR")),new t(o.inputOutput,"color",new e.SFColor(1,1,1)),new t(o.inputOutput,"visibilityRange",new e.SFFloat)]),getTypeName:function(){return"LocalFog"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this)},push:function(e){if(this._enabled.getValue()){const t=this.getFogs().pop();t.set(this,e.getModelViewMatrix().get()),e.pushLocalFog(t)}},pop:function(e){this._enabled.getValue()&&e.getBrowser().getLocalObjects().push(e.popLocalFog())}}),s})),define("x_ite/Components/EnvironmentalEffects/TextureBackground",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalEffects/X3DBackgroundNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.TextureBackground)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"skyAngle",new e.MFFloat),new t(o.inputOutput,"skyColor",new e.MFColor(0,0,0)),new t(o.inputOutput,"groundAngle",new e.MFFloat),new t(o.inputOutput,"groundColor",new e.MFColor),new t(o.inputOutput,"transparency",new e.SFFloat),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime),new t(o.inputOutput,"frontTexture",new e.SFNode),new t(o.inputOutput,"backTexture",new e.SFNode),new t(o.inputOutput,"leftTexture",new e.SFNode),new t(o.inputOutput,"rightTexture",new e.SFNode),new t(o.inputOutput,"topTexture",new e.SFNode),new t(o.inputOutput,"bottomTexture",new e.SFNode)]),getTypeName:function(){return"TextureBackground"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._frontTexture.addInterest("set_frontTexture__",this),this._backTexture.addInterest("set_backTexture__",this),this._leftTexture.addInterest("set_leftTexture__",this),this._rightTexture.addInterest("set_rightTexture__",this),this._topTexture.addInterest("set_topTexture__",this),this._bottomTexture.addInterest("set_bottomTexture__",this),this.set_frontTexture__(this._frontTexture),this.set_backTexture__(this._backTexture),this.set_leftTexture__(this._leftTexture),this.set_rightTexture__(this._rightTexture),this.set_topTexture__(this._topTexture),this.set_bottomTexture__(this._bottomTexture)},set_frontTexture__:function(){n.prototype.set_frontTexture__.call(this,r(o.X3DTextureNode,this._frontTexture))},set_backTexture__:function(){n.prototype.set_backTexture__.call(this,r(o.X3DTextureNode,this._backTexture))},set_leftTexture__:function(){n.prototype.set_leftTexture__.call(this,r(o.X3DTextureNode,this._leftTexture))},set_rightTexture__:function(){n.prototype.set_rightTexture__.call(this,r(o.X3DTextureNode,this._rightTexture))},set_topTexture__:function(){n.prototype.set_topTexture__.call(this,r(o.X3DTextureNode,this._topTexture))},set_bottomTexture__:function(){n.prototype.set_bottomTexture__.call(this,r(o.X3DTextureNode,this._bottomTexture))}}),s})),define("x_ite/Components/EnvironmentalEffects",["x_ite/Configuration/SupportedNodes","x_ite/Components/EnvironmentalEffects/Background","x_ite/Components/EnvironmentalEffects/Fog","x_ite/Components/EnvironmentalEffects/FogCoordinate","x_ite/Components/EnvironmentalEffects/LocalFog","x_ite/Components/EnvironmentalEffects/TextureBackground","x_ite/Components/EnvironmentalEffects/X3DBackgroundNode","x_ite/Components/EnvironmentalEffects/X3DFogObject"],(function(e,t,i,n,r,o,s,a){"use strict";const u={Background:t,Fog:i,FogCoordinate:n,LocalFog:r,TextureBackground:o},l={X3DBackgroundNode:s,X3DFogObject:a};for(const t in u)e.addType(t,u[t]);for(const t in l)e.addAbstractType(t,l[t])})),define("x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode",["x_ite/Fields","x_ite/Components/Core/X3DSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n){"use strict";function r(n){t.call(this,n),this.addType(i.X3DEnvironmentalSensorNode),this.addChildObjects("traversed",new e.SFBool(!0)),this._size.setUnit("length"),this._center.setUnit("length"),this.zeroTest=!1,this.currentTraversed=!0}return r.prototype=Object.assign(Object.create(t.prototype),{constructor:r,initialize:function(){t.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._enabled.addInterest("set_live__",this),this._size.addInterest("set_live__",this),this._traversed.addInterest("set_live__",this),this.set_live__()},set_live__:function(){!(this._traversed.getValue()&&this.isLive().getValue()&&this._enabled.getValue())||this.zeroTest&&this._size.getValue().equals(n.Zero)?(this.getBrowser().sensorEvents().removeInterest("update",this),this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime())):this.getBrowser().sensorEvents().addInterest("update",this)},setZeroTest:function(e){this.zeroTest=e},getZeroTest:function(){return this.zeroTest},setTraversed:function(e){e?!1===this._traversed.getValue()&&(this._traversed=!0):this.currentTraversed!==this._traversed.getValue()&&(this._traversed=this.currentTraversed),this.currentTraversed=e},getTraversed:function(){return this.currentTraversed},update:function(){}}),r})),define("x_ite/Components/EnvironmentalSensor/ProximitySensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),this.addType(o.ProximitySensor),this.setCameraObject(!0),this._centerOfRotation_changed.setUnit("length"),this._position_changed.setUnit("length"),this.setZeroTest(!0),this.min=new s(0,0,0),this.max=new s(0,0,0),this.viewpointNode=null,this.modelMatrix=new u,this.inside=!1}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"size",new e.SFVec3f),new t(o.inputOutput,"center",new e.SFVec3f),new t(o.outputOnly,"enterTime",new e.SFTime),new t(o.outputOnly,"exitTime",new e.SFTime),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"position_changed",new e.SFVec3f),new t(o.outputOnly,"orientation_changed",new e.SFRotation),new t(o.outputOnly,"centerOfRotation_changed",new e.SFVec3f)]),getTypeName:function(){return"ProximitySensor"},getComponentName:function(){return"EnvironmentalSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this),this._size.addInterest("set_extents__",this),this._center.addInterest("set_extents__",this),this._traversed.addFieldInterest(this._isCameraObject),this.set_enabled__(),this.set_extents__()},set_enabled__:function(){this.setCameraObject(this._enabled.getValue()),this._enabled.getValue()?delete this.traverse:this.traverse=Function.prototype},set_extents__:function(){const e=this._size.getValue(),t=this._center.getValue(),i=e.x/2,n=e.y/2,r=e.z/2,o=t.x,s=t.y,a=t.z;this.min.set(o-i,s-n,a-r),this.max.set(o+i,s+n,a+r)},update:function(){const e=new u,t=new u,i=new s(0,0,0),n=new a(0,0,1,0),r=new s(0,0,0);return function(){try{if(this.inside&&this.getTraversed()){if(this.viewpointNode){const o=this.modelMatrix;t.assign(this.viewpointNode.getModelMatrix()),t.translate(this.viewpointNode.getUserCenterOfRotation()),t.multRight(e.assign(o).inverse()),o.multRight(this.viewpointNode.getViewMatrix()),o.get(null,n),o.inverse(),i.set(o[12],o[13],o[14]),n.inverse(),r.set(t[12],t[13],t[14]),this._isActive.getValue()?(this._position_changed.getValue().equals(i)||(this._position_changed=i),this._orientation_changed.getValue().equals(n)||(this._orientation_changed=n),this._centerOfRotation_changed.getValue().equals(r)||(this._centerOfRotation_changed=r)):(this._isActive=!0,this._enterTime=this.getBrowser().getCurrentTime(),this._position_changed=i,this._orientation_changed=n,this._centerOfRotation_changed=r)}}else this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime())}catch(e){}this.inside=!1,this.viewpointNode=null,this.setTraversed(!1)}}(),traverse:function(){const e=new u,t=new s(-1,-1,-1);return function(i,n){try{switch(i){case r.CAMERA:return this.viewpointNode=n.getViewpoint(),void this.modelMatrix.assign(n.getModelViewMatrix().get());case r.DISPLAY:if(this.setTraversed(!0),this.inside)return;return void(this._size.getValue().equals(t)?this.inside=!0:(e.assign(n.getModelViewMatrix().get()).inverse(),this.inside=this.containsPoint(e.origin)))}}catch(e){console.error(e)}}}(),containsPoint:function(e){const t=this.min,i=this.max;return t.x<=e.x&&i.x>=e.x&&t.y<=e.y&&i.y>=e.y&&t.z<=e.z&&i.z>=e.z}}),l})),define("x_ite/Components/EnvironmentalSensor/TransformSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";const c=l(u),h=l(u);function d(e){n.call(this,e),this.addType(o.TransformSensor),this._position_changed.setUnit("length"),this.setZeroTest(!0),this.min=new s,this.max=new s,this.targetObjectNode=null,this.modelMatrices=[],this.targetMatrices=[]}return d.prototype=Object.assign(Object.create(n.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"size",new e.SFVec3f),new t(o.inputOutput,"center",new e.SFVec3f),new t(o.outputOnly,"enterTime",new e.SFTime),new t(o.outputOnly,"exitTime",new e.SFTime),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"position_changed",new e.SFVec3f),new t(o.outputOnly,"orientation_changed",new e.SFRotation),new t(o.inputOutput,"targetObject",new e.SFNode)]),getTypeName:function(){return"TransformSensor"},getComponentName:function(){return"EnvironmentalSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_enabled__",this),this._enabled.addInterest("set_enabled__",this),this._size.addInterest("set_enabled__",this),this._size.addInterest("set_extents__",this),this._center.addInterest("set_extents__",this),this._targetObject.addInterest("set_targetObject__",this),this.set_extents__(),this.set_targetObject__()},set_live__:function(){},set_enabled__:function(){this.isLive().getValue()&&this.targetObjectNode&&this._enabled.getValue()&&!this._size.getValue().equals(s.Zero)?(this.setPickableObject(!0),this.getBrowser().addTransformSensor(this),this.targetObjectNode.addTransformSensor(this)):(this.setPickableObject(!1),this.getBrowser().removeTransformSensor(this),this.targetObjectNode&&this.targetObjectNode.removeTransformSensor(this),this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime()))},set_extents__:function(){const e=this._size.getValue(),t=this._center.getValue(),i=e.x/2,n=e.y/2,r=e.z/2,o=t.x,s=t.y,a=t.z;this.min.set(o-i,s-n,a-r),this.max.set(o+i,s+n,a+r)},set_targetObject__:function(){this.targetObjectNode=null;try{const e=this._targetObject.getValue().getInnerNode(),t=e.getType();for(let i=t.length-1;i>=0;--i){switch(t[i]){case o.X3DGroupingNode:case o.X3DShapeNode:this.targetObjectNode=e;break;default:continue}break}}catch(e){}this.set_enabled__()},traverse:function(e,t){e===r.PICKING&&this.getPickableObject()&&this.modelMatrices.push(c.pop().assign(t.getModelViewMatrix().get()))},collect:function(e){this.targetMatrices.push(h.pop().assign(e))},process:function(){const e=new s(0,0,0),t=new a(0,0,1,0);return function(){const i=this.modelMatrices,n=this.targetMatrices,r=this.intersects();r?(r.get(e,t),this._isActive.getValue()?(this._position_changed.getValue().equals(e)||(this._position_changed=e),this._orientation_changed.getValue().equals(t)||(this._orientation_changed=t)):(this._isActive=!0,this._enterTime=this.getBrowser().getCurrentTime(),this._position_changed=e,this._orientation_changed=t)):this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime());for(const e of i)c.push(e);for(const e of n)h.push(e);i.length=0,n.length=0}}(),intersects:function(){const e=new s(-1,-1,-1);return function(){const t=this.modelMatrices,i=this.targetMatrices,n=this._size.getValue().equals(e);for(const e of t){const t=e.inverse();for(const e of i){const i=e.multRight(t);if(n||this.containsPoint(i.origin))return i}}return null}}(),containsPoint:function(e){const t=this.min,i=this.max;return t.x<=e.x&&i.x>=e.x&&t.y<=e.y&&i.y>=e.y&&t.z<=e.z&&i.z>=e.z}}),d})),define("x_ite/Components/EnvironmentalSensor/VisibilitySensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Geometry/Box3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(o.VisibilitySensor),this.setZeroTest(!1),this.visible=!1}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"size",new e.SFVec3f),new t(o.inputOutput,"center",new e.SFVec3f),new t(o.outputOnly,"enterTime",new e.SFTime),new t(o.outputOnly,"exitTime",new e.SFTime),new t(o.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"VisibilitySensor"},getComponentName:function(){return"EnvironmentalSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this),this.set_enabled__()},set_enabled__:function(){this._enabled.getValue()?delete this.traverse:this.traverse=Function.prototype},update:function(){this.visible&&this.getTraversed()?(this._isActive.getValue()||(this._isActive=!0,this._enterTime=this.getBrowser().getCurrentTime()),this.visible=!1):this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime()),this.setTraversed(!1)},traverse:function(){const e=new a,t=new s(-1,-1,-1);return function(i,n){i===r.DISPLAY&&(this.setTraversed(!0),this.visible||(this._size.getValue().equals(t)?this.visible=!0:(e.set(this._size.getValue(),this._center.getValue()).multRight(n.getModelViewMatrix().get()),this.visible=n.getViewVolume().intersectsBox(e))))}}()}),u})),define("x_ite/Components/EnvironmentalSensor",["x_ite/Configuration/SupportedNodes","x_ite/Components/EnvironmentalSensor/ProximitySensor","x_ite/Components/EnvironmentalSensor/TransformSensor","x_ite/Components/EnvironmentalSensor/VisibilitySensor","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode"],(function(e,t,i,n,r){"use strict";const o={ProximitySensor:t,TransformSensor:i,VisibilitySensor:n},s={X3DEnvironmentalSensorNode:r};for(const t in o)e.addType(t,o[t]);for(const t in s)e.addAbstractType(t,s[t])})),define("x_ite/Components/Followers/ColorChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Color3","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=new s(0,0,0),u=new s(0,0,0),l=new s(0,0,0),c=new s(0,0,0);function h(e){n.call(this,e),this.addType(r.ColorChaser)}return h.prototype=Object.assign(Object.create(n.prototype),{constructor:h,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFColor),new t(r.inputOnly,"set_destination",new e.SFColor),new t(r.initializeOnly,"initialValue",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"initialDestination",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFColor)]),getTypeName:function(){return"ColorChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)},getValue:function(){return this._set_value.getValue().getHSV(c)},getDestination:function(){return this._set_destination.getValue().getHSV(c)},getInitialValue:function(){return this._initialValue.getValue().getHSV(a)},getInitialDestination:function(){return this._initialDestination.getValue().getHSV(u)},setValue:function(e){this._value_changed.setHSV(e.x,e.y,e.z)},interpolate:function(e,t,i){return o.lerp(e,t,i,c)},step:function(e,t,i){l.assign(this.output).add(e).subtract(t),o.lerp(this.output,l,i,this.output)}}),h})),define("x_ite/Components/Followers/X3DDamperNode",["x_ite/Components/Followers/X3DFollowerNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i){"use strict";function n(i){e.call(this,i),this.addType(t.X3DDamperNode)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,initialize:function(){e.prototype.initialize.call(this),this._order.addInterest("set_order__",this),this._set_value.addInterest("set_value__",this),this._set_destination.addInterest("set_destination__",this);var t=this.getBuffer(),i=this.getInitialValue(),n=this.getInitialDestination();t[0]=this.duplicate(n);for(var r=1,o=this.getOrder()+1;r<o;++r)t[r]=this.duplicate(i);this.equals(n,i,this.getTolerance())?this.setValue(n):this.set_active(!0)},getOrder:function(){return i.clamp(this._order.getValue(),0,5)},getTolerance:function(){return this._tolerance.getValue()<0?1e-4:this._tolerance.getValue()},prepareEvents:function(){var e=this.getBuffer(),t=e.length-1;if(this._tau.getValue()){for(var i=1/this.getBrowser().currentFrameRate,n=Math.exp(-i/this._tau.getValue()),r=0;r<t;++r)try{this.assign(e,r+1,this.interpolate(e[r],e[r+1],n))}catch(e){}if(this.setValue(e[t]),!this.equals(e[t],e[0],this.getTolerance()))return}else this.setValue(e[0]),t=0;r=1;for(var o=e.length;r<o;++r)this.assign(e,r,e[t]);this.set_active(!1)},set_value__:function(){for(var e=this.getBuffer(),t=this.getValue(),i=1,n=e.length;i<n;++i)this.assign(e,i,t);this.setValue(t),this.set_active(!0)},set_destination__:function(){this.assign(this.getBuffer(),0,this.getDestination()),this.set_active(!0)},set_order__:function(){for(var e=this.getBuffer(),t=e[e.length-1],i=e.length,n=this.getOrder()+1;i<n;++i)e[i]=this.duplicate(t);e.length=n}}),n})),define("x_ite/Components/Followers/ColorDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Color3","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=new s(0,0,0),u=new s(0,0,0),l=new s(0,0,0),c=new s(0,0,0);function h(e){n.call(this,e),this.addType(r.ColorDamper)}return h.prototype=Object.assign(Object.create(n.prototype),{constructor:h,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFColor),new t(r.inputOnly,"set_destination",new e.SFColor),new t(r.initializeOnly,"initialValue",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"initialDestination",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFColor)]),getTypeName:function(){return"ColorDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)},getValue:function(){return this._set_value.getValue().getHSV(c)},getDestination:function(){return this._set_destination.getValue().getHSV(c)},getInitialValue:function(){return this._initialValue.getValue().getHSV(u)},getInitialDestination:function(){return this._initialDestination.getValue().getHSV(l)},setValue:function(e){this._value_changed.setHSV(e.x,e.y,e.z)},equals:function(e,t,i){return a.assign(e).subtract(t).abs()<i},interpolate:function(e,t,i){return o.lerp(e,t,i,c)}}),h})),define("x_ite/Browser/Followers/X3DArrayFollowerTemplate",[],(function(){"use strict";return function(e){function t(){this.array=this.getArray(),this.zero=this.getVector()}return t.prototype={getArray:function(){const e=[];return e.assign=function(e){if(Array.isArray(e)){for(var t=0,i=Math.min(this.length,e.length);t<i;++t)this[t].assign(e[t]);for(t=i,i=e.length;t<i;++t)this[t]=e[t].copy();this.length=i}else{for(t=0,i=Math.min(this.length,e.length);t<i;++t)this[t].assign(e[t].getValue());for(t=i,i=e.length;t<i;++t)this[t]=e[t].getValue().copy();this.length=i}},e},getValue:function(){return this._set_value},getDestination:function(){return this._set_destination},getInitialValue:function(){return this._initialValue},getInitialDestination:function(){return this._initialDestination},setValue:function(e){if(Array.isArray(e)){const n=this._value_changed;for(var t=0,i=e.length;t<i;++t)n[t]=e[t];n.length=i}else this._value_changed=e},duplicate:function(e){const t=this.getArray();return t.assign(e),t},equals:function(e,t,i){if(e.length!==t.length)return!1;const n=this.a;let r=0;for(let i=0,o=e.length;i<o;++i)r=Math.max(n.assign(e[i]).subtract(t[i]).abs());return r<i},interpolate:function(e,t,i){const n=this.array;n.assign(e);for(let e=0,r=n.length;e<r;++e)n[e].lerp(t[e]||this.zero,i);return n},set_destination__:function(){const t=this.getBuffer(),i=this._set_destination.length;for(let e=0,n=t.length;e<n;++e){const n=t[e];for(let e=n.length;e<i;++e)n[e]=this.getVector();n.length=i}e.prototype.set_destination__.call(this)}},t}})),define("x_ite/Browser/Followers/X3DArrayChaserTemplate",["x_ite/Browser/Followers/X3DArrayFollowerTemplate"],(function(e){"use strict";return function(t){const i=e(t);function n(){i.call(this),this.array=this.getArray()}return Object.assign(n.prototype,i.prototype,{step:function(e,t,i){const n=this.output,r=this.deltaOut;for(let o=0,s=n.length;o<s;++o)n[o].add(r.assign(e[o]||this.zero).subtract(t[o]||this.zero).multiply(i))}}),n}})),define("x_ite/Components/Followers/CoordinateChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Browser/Followers/X3DArrayChaserTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.CoordinateChaser)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec3f),new t(o.inputOnly,"set_destination",new e.MFVec3f),new t(o.initializeOnly,"initialValue",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"initialDestination",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"duration",new e.SFTime(1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"CoordinateChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)}}),u})),define("x_ite/Components/Followers/CoordinateDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Browser/Followers/X3DArrayFollowerTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.CoordinateDamper)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec3f),new t(o.inputOnly,"set_destination",new e.MFVec3f),new t(o.initializeOnly,"initialValue",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"initialDestination",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"order",new e.SFInt32(3)),new t(o.inputOutput,"tau",new e.SFTime(.3)),new t(o.inputOutput,"tolerance",new e.SFFloat(-1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"CoordinateDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)}}),u})),define("x_ite/Components/Followers/OrientationDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r,o){"use strict";var s=new o(0,0,1,0),a=new o(0,0,1,0);function u(e){n.call(this,e),this.addType(r.OrientationDamper),this._set_value.setUnit("angle"),this._set_destination.setUnit("angle"),this._initialValue.setUnit("angle"),this._initialDestination.setUnit("angle"),this._value_changed.setUnit("angle")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFRotation),new t(r.inputOnly,"set_destination",new e.SFRotation),new t(r.initializeOnly,"initialValue",new e.SFRotation),new t(r.initializeOnly,"initialDestination",new e.SFRotation),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFRotation)]),getTypeName:function(){return"OrientationDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0,1,0)},equals:function(e,t,i){return s.assign(e).inverse().multRight(t),Math.abs(s.angle)<i},interpolate:function(e,t,i){return a.assign(e).slerp(t,i)}}),u})),define("x_ite/Components/Followers/PositionChaser2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionChaser2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFVec2f),new t(r.inputOnly,"set_destination",new e.SFVec2f),new t(r.initializeOnly,"initialValue",new e.SFVec2f),new t(r.initializeOnly,"initialDestination",new e.SFVec2f),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"PositionChaser2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0)}}),s})),define("x_ite/Components/Followers/PositionDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionDamper)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFVec3f),new t(r.inputOnly,"set_destination",new e.SFVec3f),new t(r.initializeOnly,"initialValue",new e.SFVec3f),new t(r.initializeOnly,"initialDestination",new e.SFVec3f),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.outputOnly,"value_changed",new e.SFVec3f),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"PositionDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0,0)}}),s})),define("x_ite/Components/Followers/PositionDamper2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionDamper2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFVec2f),new t(r.inputOnly,"set_destination",new e.SFVec2f),new t(r.initializeOnly,"initialValue",new e.SFVec2f),new t(r.initializeOnly,"initialDestination",new e.SFVec2f),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"PositionDamper2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0)}}),s})),define("x_ite/Components/Followers/ScalarChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ScalarChaser)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFFloat),new t(r.inputOnly,"set_destination",new e.SFFloat),new t(r.initializeOnly,"initialValue",new e.SFFloat),new t(r.initializeOnly,"initialDestination",new e.SFFloat),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFFloat)]),getTypeName:function(){return"ScalarChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return 0},setPreviousValue:function(e){this.previousValue=e},setDestination:function(e){this.destination=e},duplicate:function(e){return e},assign:function(e,t,i){e[t]=i},equals:function(e,t,i){return Math.abs(e-t)<i},interpolate:function(e,t,i){return o.lerp(e,t,i)},step:function(e,t,i){this.output+=(e-t)*i}}),s})),define("x_ite/Components/Followers/ScalarDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ScalarDamper)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFFloat),new t(r.inputOnly,"set_destination",new e.SFFloat),new t(r.initializeOnly,"initialValue",new e.SFFloat),new t(r.initializeOnly,"initialDestination",new e.SFFloat),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFFloat)]),getTypeName:function(){return"ScalarDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return 0},duplicate:function(e){return e},assign:function(e,t,i){e[t]=i},equals:function(e,t,i){return Math.abs(e-t)<i},interpolate:function(e,t,i){return o.lerp(e,t,i)}}),s})),define("x_ite/Components/Followers/TexCoordChaser2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Browser/Followers/X3DArrayChaserTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.TexCoordChaser2D)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec2f),new t(o.inputOnly,"set_destination",new e.MFVec2f),new t(o.initializeOnly,"initialValue",new e.MFVec2f),new t(o.initializeOnly,"initialDestination",new e.MFVec2f),new t(o.initializeOnly,"duration",new e.SFTime(1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec2f)]),getTypeName:function(){return"TexCoordChaser2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0)}}),u})),define("x_ite/Components/Followers/TexCoordDamper2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Browser/Followers/X3DArrayFollowerTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.TexCoordDamper2D)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec2f),new t(o.inputOnly,"set_destination",new e.MFVec2f),new t(o.initializeOnly,"initialValue",new e.MFVec2f),new t(o.initializeOnly,"initialDestination",new e.MFVec2f),new t(o.initializeOnly,"order",new e.SFInt32(3)),new t(o.inputOutput,"tau",new e.SFTime(.3)),new t(o.inputOutput,"tolerance",new e.SFFloat(-1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec2f)]),getTypeName:function(){return"TexCoordDamper2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)}}),u})),define("x_ite/Components/Followers",["x_ite/Configuration/SupportedNodes","x_ite/Components/Followers/ColorChaser","x_ite/Components/Followers/ColorDamper","x_ite/Components/Followers/CoordinateChaser","x_ite/Components/Followers/CoordinateDamper","x_ite/Components/Followers/OrientationChaser","x_ite/Components/Followers/OrientationDamper","x_ite/Components/Followers/PositionChaser","x_ite/Components/Followers/PositionChaser2D","x_ite/Components/Followers/PositionDamper","x_ite/Components/Followers/PositionDamper2D","x_ite/Components/Followers/ScalarChaser","x_ite/Components/Followers/ScalarDamper","x_ite/Components/Followers/TexCoordChaser2D","x_ite/Components/Followers/TexCoordDamper2D","x_ite/Components/Followers/X3DChaserNode","x_ite/Components/Followers/X3DDamperNode","x_ite/Components/Followers/X3DFollowerNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_){"use strict";const y={ColorChaser:t,ColorDamper:i,CoordinateChaser:n,CoordinateDamper:r,OrientationChaser:o,OrientationDamper:s,PositionChaser:a,PositionChaser2D:u,PositionDamper:l,PositionDamper2D:c,ScalarChaser:h,ScalarDamper:d,TexCoordChaser2D:p,TexCoordDamper2D:f},x={X3DChaserNode:g,X3DDamperNode:m,X3DFollowerNode:_};for(const t in y)e.addType(t,y[t]);for(const t in x)e.addAbstractType(t,x[t])})),define("x_ite/Components/Geometry3D/Box",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.Box),this._size.setUnit("length")}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"size",new e.SFVec3f(2,2,2)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Box"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},build:function(){const e=new o(2,2,2);return function(){const t=this.getBrowser().getBoxOptions().getGeometry(),i=this._size.getValue();if(this.setMultiTexCoords(t.getMultiTexCoords()),this.setNormals(t.getNormals()),i.equals(e))this.setVertices(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=o.divide(i,2),n=t.getVertices().getValue(),r=this.getVertices();let s=e.x,a=e.y,u=e.z;for(let e=0,t=n.length;e<t;e+=4)r.push(s*n[e],a*n[e+1],u*n[e+2],1);s=Math.abs(s),a=Math.abs(a),u=Math.abs(u),this.getMin().set(-s,-a,-u),this.getMax().set(s,a,u)}this.setSolid(this._solid.getValue())}}()}),s})),define("x_ite/Components/Geometry3D/Cone",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(r.Cone),this._height.setUnit("length"),this._bottomRadius.setUnit("length")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"side",new e.SFBool(!0)),new t(r.initializeOnly,"bottom",new e.SFBool(!0)),new t(r.initializeOnly,"height",new e.SFFloat(2)),new t(r.initializeOnly,"bottomRadius",new e.SFFloat(1)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Cone"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getConeOptions().addInterest("requestRebuild",this):this.getBrowser().getConeOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getConeOptions()._xDimension.getValue(),t=this._height.getValue(),i=this._bottomRadius.getValue(),n=this.getTexCoords(),r=this.getNormals(),u=this.getVertices();this.getMultiTexCoords().push(n);const l=t/2,c=-l,h=o.Polar(1,-Math.PI/2+Math.atan(i/t));if(this._side.getValue())for(let t=0;t<e;++t){const s=(t+.5)/e,a=2*Math.PI*s,d=o.Polar(h.imag,a),p=t/e,f=2*Math.PI*p,g=o.Polar(-i,f),m=o.Polar(h.imag,f),_=(t+1)/e,y=2*Math.PI*_,x=o.Polar(-i,y),w=o.Polar(h.imag,y);n.push(s,1,0,1),r.push(d.imag,h.real,d.real),u.push(0,l,0,1),n.push(p,0,0,1),r.push(m.imag,h.real,m.real),u.push(g.imag,c,g.real,1),n.push(_,0,0,1),r.push(w.imag,h.real,w.real),u.push(x.imag,c,x.real,1)}if(this._bottom.getValue()){const t=[],l=[];for(let n=e-1;n>-1;--n){const r=n/e,u=2*Math.PI*r,h=o.Polar(-1,u),d=o.multiply(h,i);t.push(new s((h.imag+1)/2,(h.real+1)/2)),l.push(new a(d.imag,c,d.real))}const h=t[0],d=l[0];for(let e=1,i=l.length-1;e<i;++e){const i=t[e],o=t[e+1],s=l[e],a=l[e+1];n.push(h.x,h.y,0,1),r.push(0,-1,0),u.push(d.x,d.y,d.z,1),n.push(i.x,i.y,0,1),r.push(0,-1,0),u.push(s.x,s.y,s.z,1),n.push(o.x,o.y,0,1),r.push(0,-1,0),u.push(a.x,a.y,a.z,1)}}this.setSolid(this._solid.getValue()),this.setExtents()},setExtents:function(){const e=this._bottomRadius.getValue(),t=this._height.getValue()/2,i=-t;this._side.getValue()||this._bottom.getValue()?this._side.getValue()?(this.getMin().set(-e,i,-e),this.getMax().set(e,t,e)):(this.getMin().set(-e,i,-e),this.getMax().set(e,i,e)):(this.getMin().set(0,0,0),this.getMax().set(0,0,0))}}),u})),define("x_ite/Components/Geometry3D/Cylinder",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(r.Cylinder),this._height.setUnit("length"),this._radius.setUnit("length")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"top",new e.SFBool(!0)),new t(r.initializeOnly,"side",new e.SFBool(!0)),new t(r.initializeOnly,"bottom",new e.SFBool(!0)),new t(r.initializeOnly,"height",new e.SFFloat(2)),new t(r.initializeOnly,"radius",new e.SFFloat(1)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Cylinder"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getCylinderOptions().addInterest("requestRebuild",this):this.getBrowser().getCylinderOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getCylinderOptions()._xDimension.getValue(),t=this.getTexCoords(),i=this.getNormals(),n=this.getVertices();this.getMultiTexCoords().push(t);const r=this._radius.getValue(),u=this._height.getValue()/2,l=-u;if(this._side.getValue())for(let s=0;s<e;++s){const a=s/e,c=2*Math.PI*a,h=o.Polar(-1,c),d=o.multiply(h,r),p=(s+1)/e,f=2*Math.PI*p,g=o.Polar(-1,f),m=o.multiply(g,r);t.push(a,1,0,1),i.push(h.imag,0,h.real),n.push(d.imag,u,d.real,1),t.push(a,0,0,1),i.push(h.imag,0,h.real),n.push(d.imag,l,d.real,1),t.push(p,0,0,1),i.push(g.imag,0,g.real),n.push(m.imag,l,m.real,1),t.push(a,1,0,1),i.push(h.imag,0,h.real),n.push(d.imag,u,d.real,1),t.push(p,0,0,1),i.push(g.imag,0,g.real),n.push(m.imag,l,m.real,1),t.push(p,1,0,1),i.push(g.imag,0,g.real),n.push(m.imag,u,m.real,1)}if(this._top.getValue()){const l=[],c=[];for(let t=0;t<e;++t){const i=t/e,n=2*Math.PI*i,h=o.Polar(-1,n);l.push(new s((h.imag+1)/2,-(h.real-1)/2)),c.push(new a(h.imag*r,u,h.real*r))}const h=l[0],d=c[0];for(let e=1,r=c.length-1;e<r;++e){const r=l[e],o=l[e+1],s=c[e],a=c[e+1];t.push(h.x,h.y,0,1),i.push(0,1,0),n.push(d.x,d.y,d.z,1),t.push(r.x,r.y,0,1),i.push(0,1,0),n.push(s.x,s.y,s.z,1),t.push(o.x,o.y,0,1),i.push(0,1,0),n.push(a.x,a.y,a.z,1)}}if(this._bottom.getValue()){const u=[],c=[];for(let t=e-1;t>-1;--t){const i=t/e,n=2*Math.PI*i,h=o.Polar(-1,n);u.push(new s((h.imag+1)/2,(h.real+1)/2)),c.push(new a(h.imag*r,l,h.real*r))}const h=u[0],d=c[0];for(let e=1,r=c.length-1;e<r;++e){const r=u[e],o=u[e+1],s=c[e],a=c[e+1];t.push(h.x,h.y,0,1),i.push(0,-1,0),n.push(d.x,d.y,d.z,1),t.push(r.x,r.y,0,1),i.push(0,-1,0),n.push(s.x,s.y,s.z,1),t.push(o.x,o.y,0,1),i.push(0,-1,0),n.push(a.x,a.y,a.z,1)}}this.setSolid(this._solid.getValue()),this.setExtents()},setExtents:function(){const e=this._radius.getValue(),t=this._height.getValue()/2,i=-t;this._top.getValue()||this._side.getValue()||this._bottom.getValue()?this._top.getValue()||this._side.getValue()?this._bottom.getValue()||this._side.getValue()?(this.getMin().set(-e,i,-e),this.getMax().set(e,t,e)):(this.getMin().set(-e,t,-e),this.getMax().set(e,t,e)):(this.getMin().set(-e,i,-e),this.getMax().set(e,i,e)):(this.getMin().set(0,0,0),this.getMax().set(0,0,0))}}),u})),define("x_ite/Components/Geometry3D/ElevationGrid",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Geometry/Triangle3","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),this.addType(o.ElevationGrid),this._xSpacing.setUnit("length"),this._zSpacing.setUnit("length"),this._creaseAngle.setUnit("angle"),this._height.setUnit("length"),this.fogCoordNode=null,this.colorNode=null,this.texCoordNode=null,this.normalNode=null,this.coordNode=null}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_height",new e.MFFloat),new t(o.initializeOnly,"xDimension",new e.SFInt32),new t(o.initializeOnly,"zDimension",new e.SFInt32),new t(o.initializeOnly,"xSpacing",new e.SFFloat(1)),new t(o.initializeOnly,"zSpacing",new e.SFFloat(1)),new t(o.initializeOnly,"solid",new e.SFBool(!0)),new t(o.initializeOnly,"ccw",new e.SFBool(!0)),new t(o.initializeOnly,"creaseAngle",new e.SFFloat),new t(o.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"texCoord",new e.SFNode),new t(o.inputOutput,"normal",new e.SFNode),new t(o.initializeOnly,"height",new e.MFFloat)]),getTypeName:function(){return"ElevationGrid"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_height.addFieldInterest(this._height),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._texCoord.addInterest("set_texCoord__",this),this._normal.addInterest("set_normal__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_texCoord__(),this.set_normal__()},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const t of this._attrib){const i=r(o.X3DVertexAttributeNode,t);i&&e.push(i)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=r(o.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&(this.colorNode.removeInterest("requestRebuild",this),this.colorNode._transparent.removeInterest("set_transparent__",this)),this.colorNode=r(o.X3DColorNode,this._color),this.colorNode?(this.colorNode.addInterest("requestRebuild",this),this.colorNode._transparent.addInterest("set_transparent__",this),this.set_transparent__()):this.setTransparent(!1)},set_transparent__:function(){this.setTransparent(this.colorNode.getTransparent())},set_texCoord__:function(){this.texCoordNode&&this.texCoordNode.removeInterest("requestRebuild",this),this.texCoordNode=r(o.X3DTextureCoordinateNode,this._texCoord),this.texCoordNode&&this.texCoordNode.addInterest("requestRebuild",this),this.setTextureCoordinate(this.texCoordNode)},set_normal__:function(){this.normalNode&&this.normalNode.removeInterest("requestRebuild",this),this.normalNode=r(o.X3DNormalNode,this._normal),this.normalNode&&this.normalNode.addInterest("requestRebuild",this)},getColor:function(){return this.colorNode},getTexCoord:function(){return this.texCoordNode},getNormal:function(){return this.normalNode},getHeight:function(e){return e<this._height.length?this._height[e]:0},createTexCoords:function(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=t-1,r=i-1;for(let o=0;o<i;++o)for(let i=0;i<t;++i)e.push(new a(i/n,o/r));return e},createNormals:function(e,t,i){const n=!this._ccw.getValue(),r=[],o=[];for(let t=0,i=e.length;t<i;++t)r[t]=[];for(let i=0,a=t.length;i<a;i+=3){const a=t[i],l=t[i+1],c=t[i+2];r[a].push(o.length),r[l].push(o.length+1),r[c].push(o.length+2);const h=s.normal(e[a],e[l],e[c],new u(0,0,0));n&&h.negate(),o.push(h),o.push(h),o.push(h)}return this.refineNormals(r,o,this._creaseAngle.getValue())},createCoordIndex:function(){const e=[],t=this._xDimension.getValue(),i=t-1,n=this._zDimension.getValue()-1;for(let r=0;r<n;++r)for(let n=0;n<i;++n){const i=r*t+n,o=(r+1)*t+n,s=(r+1)*t+(n+1),a=r*t+(n+1);e.push(i),e.push(o),e.push(s),e.push(i),e.push(s),e.push(a)}return e},createPoints:function(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=this._xSpacing.getValue(),r=this._zSpacing.getValue();for(let o=0;o<i;++o)for(let i=0;i<t;++i)e.push(new u(n*i,this.getHeight(i+o*t),r*o));return e},build:function(){if(this._xDimension.getValue()<2||this._zDimension.getValue()<2)return;const e=this._colorPerVertex.getValue(),t=this._normalPerVertex.getValue(),i=this.createCoordIndex(),n=this.getAttrib(),r=n.length,o=this.getAttribs(),s=this.fogCoordNode,a=this.getColor(),u=this.getTexCoord(),l=this.getNormal(),c=this.createPoints(),h=this.getFogDepths(),d=this.getColors(),p=this.getMultiTexCoords(),f=this.getNormals(),g=this.getVertices();let m=0;if(u)u.init(p);else{var _=this.createTexCoords(),y=this.getTexCoords();p.push(y)}for(let x=0,w=i.length;x<w;++m)for(let w=0;w<6;++w,++x){const w=i[x],b=c[w];for(let e=0;e<r;++e)n[e].addValue(w,o[e]);if(s&&s.addDepth(w,h),a&&(e?a.addColor(w,d):a.addColor(m,d)),u)u.addTexCoord(w,p);else{const e=_[w];y.push(e.x,e.y,0,1)}l&&(t?l.addVector(w,f):l.addVector(m,f)),g.push(b.x,b.y,b.z,1)}if(!l){const e=this.createNormals(c,i);for(const t of e)f.push(t.x,t.y,t.z)}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}}),l})),define("x_ite/Components/Geometry3D/Extrusion",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Geometry/Triangle3","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),this.addType(r.Extrusion),this._creaseAngle.setUnit("angle"),this._crossSection.setUnit("length"),this._spine.setUnit("length")}return c.prototype=Object.assign(Object.create(n.prototype),{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_crossSection",new e.MFVec2f),new t(r.inputOnly,"set_orientation",new e.MFRotation),new t(r.inputOnly,"set_scale",new e.MFVec2f),new t(r.inputOnly,"set_spine",new e.MFVec3f),new t(r.initializeOnly,"beginCap",new e.SFBool(!0)),new t(r.initializeOnly,"endCap",new e.SFBool(!0)),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"convex",new e.SFBool(!0)),new t(r.initializeOnly,"creaseAngle",new e.SFFloat),new t(r.initializeOnly,"crossSection",new e.MFVec2f(new s(1,1),new s(1,-1),new s(-1,-1),new s(-1,1),new s(1,1))),new t(r.initializeOnly,"orientation",new e.MFRotation(new u)),new t(r.initializeOnly,"scale",new e.MFVec2f(new s(1,1))),new t(r.initializeOnly,"spine",new e.MFVec3f(new a(0,0,0),new a(0,1,0)))]),getTypeName:function(){return"Extrusion"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_crossSection.addFieldInterest(this._crossSection),this._set_orientation.addFieldInterest(this._orientation),this._set_scale.addFieldInterest(this._scale),this._set_spine.addFieldInterest(this._spine)},getClosedOrientation:function(){const e=this._orientation;if(e.length){const t=e[0].getValue(),i=e[e.length-1].getValue();return t.equals(i)}return!0},createPoints:function(){const e=new a(1,1,1);return function(){const t=this._crossSection,i=this._orientation,n=this._scale,r=this._spine,o=[],s=this.createRotations();for(let u=0,l=r.length;u<l;++u){const r=s[u];if(i.length&&r.rotate(i[Math.min(u,i.length-1)].getValue()),n.length){const t=n[Math.min(u,n.length-1)].getValue();r.scale(e.set(t.x,1,t.y))}for(let e=0,i=t.length;e<i;++e){const i=t[e].getValue();o.push(r.multVecMatrix(new a(i.x,0,i.y)))}}return o}}(),createRotations:function(){const e=[],t=new a(0,0,0),i=new a(0,0,0),n=new a(0,0,0),r=new a(0,0,0),o=new a(0,0,0),s=new a(0,0,0),c=new u(0,0,1,0);return function(){const u=this._spine,h=u.length,d=u[0].getValue(),p=u[u.length-1].getValue(),f=d.equals(p)&&this.getClosedOrientation();for(let t=e.length;t<h;++t)e[t]=new l;if(e.length=h,t.set(0,0,0),i.set(0,0,0),n.set(0,0,0),f){const e=d;for(let t=1,n=h-2;t<n&&(i.assign(u[t].getValue()).subtract(e).normalize().subtract(s.assign(u[n].getValue()).subtract(e).normalize()).normalize(),i.equals(a.Zero));++t);for(let e=0,t=h-2;e<t&&(n.assign(u[e+1].getValue()).subtract(u[e].getValue()).cross(s.assign(u[t].getValue()).subtract(u[e].getValue())).normalize(),n.equals(a.Zero));++e);}else{for(let e=0,t=h-1;e<t&&(i.assign(u[e+1].getValue()).subtract(u[e].getValue()).normalize(),i.equals(a.Zero));++e);for(let e=1,t=h-1;e<t&&(n.assign(u[e+1].getValue()).subtract(u[e].getValue()).cross(s.assign(u[e-1].getValue()).subtract(u[e].getValue())).normalize(),n.equals(a.Zero));++e);}i.equals(a.Zero)&&i.set(0,1,0),n.equals(a.Zero)&&c.setFromToVec(a.yAxis,i).multVecRot(n.assign(a.zAxis)),t.assign(i).cross(n);const g=d;e[0].set(t.x,t.y,t.z,0,i.x,i.y,i.z,0,n.x,n.y,n.z,0,g.x,g.y,g.z,1),r.assign(i),o.assign(n);for(let l=1,c=h-1;l<c;++l){const c=u[l].getValue();i.assign(u[l+1].getValue()).subtract(c).normalize().subtract(s.assign(u[l-1].getValue()).subtract(c).normalize()).normalize(),n.assign(u[l+1].getValue()).subtract(c).cross(s.assign(u[l-1].getValue()).subtract(c)).normalize(),o.dot(n)<0&&n.negate(),i.equals(a.Zero)?i.assign(r):r.assign(i),n.equals(a.Zero)?n.assign(o):o.assign(n),t.assign(i).cross(n),e[l].set(t.x,t.y,t.z,0,i.x,i.y,i.z,0,n.x,n.y,n.z,0,c.x,c.y,c.z,1)}if(f)e[h-1].assign(e[0]);else{const l=p;i.assign(l).subtract(u[h-2].getValue()).normalize(),h>2&&n.assign(l).subtract(u[h-2].getValue()).cross(s.assign(u[h-3].getValue()).subtract(u[h-2].getValue())).normalize(),o.dot(n)<0&&n.negate(),i.equals(a.Zero)&&i.assign(r),n.equals(a.Zero)&&n.assign(o),t.assign(i).cross(n),e[h-1].set(t.x,t.y,t.z,0,i.x,i.y,i.z,0,n.x,n.y,n.z,0,l.x,l.y,l.z,1)}return e}}(),build:function(){const e=new s(0,0,0),t=new s(0,0,0),i=new s(0,0,0);return function(){const n=!this._ccw.getValue(),r=this._crossSection,u=this._spine,l=u.length,c=this.getTexCoords();if(l<2||r.length<2)return;this.getMultiTexCoords().push(c);const h=r.length;function d(e,t){return e*h+t}const p=u[0].getValue(),f=u[l-1].getValue(),g=p.equals(f)&&this.getClosedOrientation(),m=r[0].getValue(),_=r[r.length-1].getValue(),y=m.equals(_);e.assign(r[0].getValue()),t.assign(r[0].getValue());for(let i=1,n=r.length;i<n;++i)e.min(r[i].getValue()),t.max(r[i].getValue());const x=i.assign(t).subtract(e),w=Math.max(x.x,x.y),b=y?r.length-1:r.length,v=[],S=[],T=this.createPoints();for(let e=0,t=T.length;e<t;++e)v[e]=[];const C=this.getNormals(),N=this.getVertices(),F=r.length-1,O=l-1;let E=d(0,0),D=d(0,y?0:F);for(let e=0;e<O;++e)for(let t=0;t<F;++t){const i=g&&e===l-2?0:e+1,s=y&&t===r.length-2?0:t+1;let u=d(e,t),h=d(e,s),p=d(i,s),f=d(i,t),m=T[u],_=T[h],x=T[p],w=T[f],b=_.distance(x)>=1e-7,C=w.distance(m)>=1e-7;if(n)var M=o.normal(x,_,m,new a(0,0,0)),I=o.normal(w,x,m,new a(0,0,0));else M=o.normal(m,_,x,new a(0,0,0)),I=o.normal(m,x,w,new a(0,0,0));if(0==t&&(C?E=u:(u=E,m=T[u])),t==r.length-2&&(b?D=h:(p=D,x=T[p])),b){if(C)c.push(t/F,e/O,0,1);else{const i=(e/O+(e+1)/O)/2;c.push(t/F,i,0,1)}v[u].push(S.length),S.push(M),N.push(m.x,m.y,m.z,1),c.push((t+1)/F,e/O,0,1),v[h].push(S.length),S.push(M),N.push(_.x,_.y,_.z,1),c.push((t+1)/F,(e+1)/O,0,1),v[p].push(S.length),S.push(M),N.push(x.x,x.y,x.z,1)}if(C){if(c.push(t/F,e/O,0,1),v[u].push(S.length),S.push(I),N.push(m.x,m.y,m.z,1),b)c.push((t+1)/F,(e+1)/O,0,1);else{const i=((e+1)/O+e/O)/2;c.push((t+1)/F,i,0,1)}v[p].push(S.length),S.push(I),N.push(x.x,x.y,x.z,1),c.push(t/F,(e+1)/O,0,1),v[f].push(S.length),S.push(I),N.push(w.x,w.y,w.z,1)}}const V=this.refineNormals(v,S,this._creaseAngle.getValue());for(const e of V)C.push(e.x,e.y,e.z);if(w&&b>2){if(this._beginCap.getValue()){const t=0,i=[],u=[];for(let n=0;n<b;++n){const o=d(t,b-1-n),a=T[o].copy();a.index=o,a.texCoord=s.subtract(r[b-1-n].getValue(),e).divide(w),i.push(a)}if(this._convex.getValue()?o.triangulateConvexPolygon(i,u):o.triangulatePolygon(i,u),u.length>=3){const e=o.normal(T[u[0].index],T[u[1].index],T[u[2].index],new a(0,0,0));n&&e.negate(),this.addCap(c,e,T,u)}}if(this._endCap.getValue()){const t=l-1,i=[],u=[];for(let n=0;n<b;++n){const o=d(t,n),a=T[o].copy();a.index=o,a.texCoord=s.subtract(r[n].getValue(),e).divide(w),i.push(a)}if(this._convex.getValue()?o.triangulateConvexPolygon(i,u):o.triangulatePolygon(i,u),u.length>=3){const e=o.normal(T[u[0].index],T[u[1].index],T[u[2].index],new a(0,0,0));n&&e.negate(),this.addCap(c,e,T,u)}}}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}}(),addCap:function(e,t,i,n){const r=this.getNormals(),o=this.getVertices();for(let s=0,a=n.length;s<a;s+=3){const a=i[n[s].index],u=i[n[s+1].index],l=i[n[s+2].index],c=n[s].texCoord,h=n[s+1].texCoord,d=n[s+2].texCoord;e.push(c.x,c.y,0,1),e.push(h.x,h.y,0,1),e.push(d.x,d.y,0,1),r.push(t.x,t.y,t.z,t.x,t.y,t.z,t.x,t.y,t.z),o.push(a.x,a.y,a.z,1,u.x,u.y,u.z,1,l.x,l.y,l.z,1)}}}),c})),define("x_ite/Components/Geometry3D/Sphere",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Sphere),this._radius.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"radius",new e.SFFloat(1)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Sphere"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getSphereOptions().addInterest("requestRebuild",this):this.getBrowser().getSphereOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getSphereOptions().getGeometry(),t=Math.abs(this._radius.getValue());if(this.setMultiTexCoords(e.getMultiTexCoords()),this.setNormals(e.getNormals()),1===t)this.setVertices(e.getVertices()),this.getMin().assign(e.getMin()),this.getMax().assign(e.getMax());else{const i=e.getVertices().getValue(),n=this.getVertices();for(let e=0,r=i.length;e<r;e+=4)n.push(t*i[e],t*i[e+1],t*i[e+2],1);this.getMin().set(-t,-t,-t),this.getMax().set(t,t,t)}this.setSolid(this._solid.getValue())}}),o})),define("x_ite/Components/Geometry3D",["x_ite/Configuration/SupportedNodes","x_ite/Components/Geometry3D/Box","x_ite/Components/Geometry3D/Cone","x_ite/Components/Geometry3D/Cylinder","x_ite/Components/Geometry3D/ElevationGrid","x_ite/Components/Geometry3D/Extrusion","x_ite/Components/Geometry3D/IndexedFaceSet","x_ite/Components/Geometry3D/Sphere"],(function(e,t,i,n,r,o,s,a){"use strict";const u={Box:t,Cone:i,Cylinder:n,ElevationGrid:r,Extrusion:o,IndexedFaceSet:s,Sphere:a},l={};for(const t in u)e.addType(t,u[t]);for(const t in l)e.addAbstractType(t,l[t])})),define("x_ite/Components/Grouping/StaticGroup",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Components/Grouping/Group","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType","standard/Math/Geometry/Box3","standard/Math/Geometry/ViewVolume"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),r.call(this,e),this.addType(s.StaticGroup),this.group=new o(this.getExecutionContext()),this.collisionShapes=null,this.depthShapes=null,this.opaqueShapes=null,this.transparentShapes=null,this.bbox=new u,this.shadowBBox=new u}return c.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"visible",new e.SFBool(!0)),new t(s.inputOutput,"bboxDisplay",new e.SFBool),new t(s.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(s.initializeOnly,"bboxCenter",new e.SFVec3f),new t(s.initializeOnly,"children",new e.MFNode)]),getTypeName:function(){return"StaticGroup"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this),this._bboxSize.addFieldInterest(this.group._bboxSize),this._bboxCenter.addFieldInterest(this.group._bboxCenter),this._children.addFieldInterest(this.group._children),this.group._bboxSize=this._bboxSize,this.group._bboxCenter=this._bboxCenter,this.group._children=this._children,this.group.setPrivate(!0),this.group.setup(),this.group._isCameraObject.addFieldInterest(this._isCameraObject),this.group._isPickableObject.addFieldInterest(this._isPickableObject),this.group._children.addInterest("set_children__",this),this.setCameraObject(this.group.getCameraObject()),this.setPickableObject(this.group.getPickableObject()),this.set_children__()},getBBox:function(e,t){return e.assign(t?this.shadowBBox:this.bbox)},set_children__:function(){this.group.getBBox(this.bbox),this.group.getBBox(this.shadowBBox,!0),this.collisionShapes=null,this.depthShapes=null,this.opaqueShapes=null,this.transparentShapes=null},traverse:function(){const e=new l;return e.intersectsSphere=function(){return!0},function(t,i){switch(t){case a.CAMERA:return;case a.POINTER:case a.COLLISION:{if(!this.collisionShapes){const n=i.getViewVolumes(),r=i.getViewport(),o=i.getProjectionMatrix(),s=i.getModelViewMatrix(),a=i.getNumCollisionShapes();n.push(e.set(o,r,r)),s.push(),s.identity(),this.group.traverse(t,i),s.pop(),n.pop();const u=i.getNumCollisionShapes();this.collisionShapes=i.getCollisionShapes().splice(a,u-a),i.setNumCollisionShapes(a)}const n=i.getModelViewMatrix();for(const e of this.collisionShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();return}case a.SHADOW:{if(!this.depthShapes){const n=i.getViewVolumes(),r=i.getViewport(),o=i.getProjectionMatrix(),s=i.getModelViewMatrix(),a=i.getNumDepthShapes();n.push(e.set(o,r,r)),s.push(),s.identity(),this.group.traverse(t,i),s.pop(),n.pop();const u=i.getNumDepthShapes();this.depthShapes=i.getDepthShapes().splice(a,u-a),i.setNumDepthShapes(a)}const n=i.getModelViewMatrix();for(const e of this.depthShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();return}case a.DISPLAY:{if(!this.opaqueShapes){const n=i.getViewVolumes(),r=i.getViewport(),o=i.getProjectionMatrix(),s=i.getModelViewMatrix(),a=i.getNumOpaqueShapes(),u=i.getNumTransparentShapes();n.push(e.set(o,r,r)),s.push(),s.identity(),this.group.traverse(t,i),s.pop(),n.pop();const l=i.getNumOpaqueShapes(),c=i.getNumTransparentShapes();this.opaqueShapes=i.getOpaqueShapes().splice(a,l-a),this.transparentShapes=i.getTransparentShapes().splice(u,c-u),i.setNumOpaqueShapes(a),i.setNumTransparentShapes(u)}const n=i.getModelViewMatrix();for(const e of this.opaqueShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();for(const e of this.transparentShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();return}}}}()}),c})),define("x_ite/Components/Grouping/Switch",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(s.Switch),"2.0"===e.getSpecificationVersion()&&this.addAlias("choice",this._children),this.childNode=null,this.visibleNode=null,this.boundedObject=null}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"whichChoice",new e.SFInt32(-1)),new t(s.inputOutput,"visible",new e.SFBool(!0)),new t(s.inputOutput,"bboxDisplay",new e.SFBool),new t(s.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(s.initializeOnly,"bboxCenter",new e.SFVec3f),new t(s.inputOnly,"addChildren",new e.MFNode),new t(s.inputOnly,"removeChildren",new e.MFNode),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Switch"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._whichChoice.addInterest("set_child__",this),this._children.addInterest("set_child__",this),this.set_child__()},getSubBBox:function(e,t){if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){const i=o(s.X3DBoundedObject,this.visibleNode);return i?i.getBBox(e,t):e.set()}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},clear:function(){},add:function(){},remove:function(){},set_child__:function(){this.childNode&&(this.childNode._isCameraObject.removeInterest("set_cameraObject__",this),this.childNode._isPickableObject.removeInterest("set_transformSensors__",this)),o(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.removeInterest("set_visible__",this),this.childNode._bboxDisplay.removeInterest("set_bboxDisplay__",this));const e=this._whichChoice.getValue();e>=0&&e<this._children.length?(this.childNode=o(s.X3DChildNode,this._children[e]),this.childNode&&(this.childNode._isCameraObject.addInterest("set_cameraObject__",this),this.childNode._isPickableObject.addInterest("set_transformSensors__",this),o(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.addInterest("set_visible__",this),this.childNode._bboxDisplay.addInterest("set_bboxDisplay__",this)),delete this.traverse)):(this.childNode=null,this.traverse=Function.prototype),this.set_transformSensors__(),this.set_visible__(),this.set_bboxDisplay__()},set_cameraObject__:function(){this.childNode&&this.childNode.getCameraObject()?o(s.X3DBoundedObject,this.childNode)?this.setCameraObject(this.childNode._visible.getValue()):this.setCameraObject(!0):this.setCameraObject(!1)},set_transformSensors__:function(){this.setPickableObject(Boolean(this.getTransformSensors().size||this.childNode&&this.childNode.getPickableObject()))},set_visible__:function(){o(s.X3DBoundedObject,this.childNode)?this.visibleNode=this.childNode._visible.getValue()?this.childNode:null:this.visibleNode=this.childNode,this.set_cameraObject__()},set_bboxDisplay__:function(){o(s.X3DBoundedObject,this.childNode)?this.boundedObject=this.childNode._bboxDisplay.getValue()?this.childNode:null:this.boundedObject=null},traverse:function(e,t){switch(e){case r.POINTER:case r.CAMERA:case r.SHADOW:{const i=this.visibleNode;return void(i&&i.traverse(e,t))}case r.PICKING:{if(this.getTransformSensors().size){const e=t.getModelViewMatrix().get();for(const t of this.getTransformSensors())t.collect(e)}const i=this.childNode;if(i){const n=t.getBrowser().getPickingHierarchy();n.push(this),i.traverse(e,t),n.pop()}return}case r.COLLISION:{const i=this.childNode;return void(i&&i.traverse(e,t))}case r.DISPLAY:{const i=this.visibleNode;i&&i.traverse(e,t);const n=this.boundedObject;return void(n&&n.displayBBox(e,t))}}}}),a})),define("x_ite/Components/Grouping/X3DTransformMatrix3DNode",["x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r){"use strict";function o(i){e.call(this,i),this.addType(t.X3DTransformMatrix3DNode),this.matrix=new r,this.getBBox=this.getGetGroupBBox(),this.traverse=this.getGroupTraverse()}return o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,setMatrix:function(e){e.equals(r.Identity)?(this.matrix.identity(),this.getBBox=this.getGetGroupBBox(),this.traverse=this.getGroupTraverse()):(this.matrix.assign(e),this.getBBox=this.getGetBBox(),this.traverse=this.getTraverse())},getMatrix:function(){return this.matrix},setTransform:function(e,t,r,o,s){e.equals(i.Zero)&&t.equals(n.Identity)&&r.equals(i.One)?(this.matrix.identity(),this.getBBox=this.getGetGroupBBox(),this.traverse=this.getGroupTraverse()):(this.matrix.set(e,t,r,o,s),this.getBBox=this.getGetBBox(),this.traverse=this.getTraverse())},getGetBBox:function(){function e(e,t){return this.getSubBBox(e,t).multRight(this.matrix)}return function(){return e}}(),getGetGroupBBox:function(){return e.prototype.getBBox},getTraverse:function(){function t(t,i){const n=i.getModelViewMatrix();n.push(),n.multLeft(this.matrix),e.prototype.traverse.call(this,t,i),n.pop()}return function(){return t}}(),getGroupTraverse:function(){return e.prototype.traverse}}),o})),define("x_ite/Components/Grouping/X3DTransformNode",["x_ite/Components/Grouping/X3DTransformMatrix3DNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DTransformNode),this._translation.setUnit("length"),this._center.setUnit("length")}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,initialize:function(){e.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},eventsProcessed:function(){this.setHidden(0===this._scale.x||0===this._scale.y||0===this._scale.z),this.setTransform(this._translation.getValue(),this._rotation.getValue(),this._scale.getValue(),this._scaleOrientation.getValue(),this._center.getValue())}}),i})),define("x_ite/Components/Grouping/Transform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Transform)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"translation",new e.SFVec3f),new t(r.inputOutput,"rotation",new e.SFRotation),new t(r.inputOutput,"scale",new e.SFVec3f(1,1,1)),new t(r.inputOutput,"scaleOrientation",new e.SFRotation),new t(r.inputOutput,"center",new e.SFVec3f),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Transform"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"}}),o})),define("x_ite/Components/Grouping",["x_ite/Configuration/SupportedNodes","x_ite/Components/Grouping/Group","x_ite/Components/Grouping/StaticGroup","x_ite/Components/Grouping/Switch","x_ite/Components/Grouping/Transform","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Grouping/X3DTransformMatrix3DNode","x_ite/Components/Grouping/X3DTransformNode"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l={Group:t,StaticGroup:i,Switch:n,Transform:r},c={X3DBoundedObject:o,X3DGroupingNode:s,X3DTransformMatrix3DNode:a,X3DTransformNode:u};for(const t in l)e.addType(t,l[t]);for(const t in c)e.addAbstractType(t,c[t])})),define("x_ite/Components/Interpolation/ColorInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Color3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ColorInterpolator),this.hsv=[]}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFColor),new t(r.outputOnly,"value_changed",new e.SFColor)]),getTypeName:function(){return"ColorInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){const t=this._keyValue;t.length<this._key.length&&this._keyValue.resize(this._key.length,t.length?t[this._keyValue.length-1]:new e.SFColor),this.hsv.length=0;for(const e of t)this.hsv.push(e.getHSV([]))},interpolate:function(){const e=[];return function(t,i,n){o.lerp(this.hsv[t],this.hsv[i],n,e),this._value_changed.setHSV(e[0],e[1],e[2])}}()}),s})),define("x_ite/Components/Interpolation/CoordinateInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.CoordinateInterpolator)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec3f),new t(r.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"CoordinateInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},set_keyValue__:function(){},interpolate:function(e,t,i){const n=this._keyValue.getValue();let r=this._key.length?Math.floor(this._keyValue.length/this._key.length):0;this._value_changed.length=r;const s=this._value_changed.getValue();t=(e*=r)+(this._key.length>1?r:0),e*=3,t*=3,r*=3;for(let a=0;a<r;a+=3){const r=a+1,u=a+2;s[a]=o.lerp(n[e+a],n[t+a],i),s[r]=o.lerp(n[e+r],n[t+r],i),s[u]=o.lerp(n[e+u],n[t+u],i)}this._value_changed.addEvent()}}),s})),define("x_ite/Components/Interpolation/CoordinateInterpolator2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.CoordinateInterpolator2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec2f),new t(r.outputOnly,"value_changed",new e.MFVec2f)]),getTypeName:function(){return"CoordinateInterpolator2D"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},set_keyValue__:function(){},interpolate:function(e,t,i){const n=this._keyValue.getValue();let r=this._key.length?Math.floor(this._keyValue.length/this._key.length):0;this._value_changed.length=r;const s=this._value_changed.getValue();t=(e*=r)+(this._key.length>1?r:0),e*=2,t*=2,r*=2;for(let a=0;a<r;a+=2){const r=a+1;s[a]=o.lerp(n[e+a],n[t+a],i),s[r]=o.lerp(n[e+r],n[t+r],i)}this._value_changed.addEvent()}}),s})),define("x_ite/Components/Interpolation/NormalInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(r.NormalInterpolator)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec3f),new t(r.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"NormalInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){},interpolate:function(){const e=new o(0,0,0),t=new o(0,0,0);return function(i,n,r){const o=this._keyValue.getValue();let a=this._key.length>1?Math.floor(this._keyValue.length/this._key.length):0;this._value_changed.length=a;const u=this._value_changed.getValue();n=(i*=a)+a,i*=3,n*=3,a*=3;for(let l=0;l<a;l+=3)try{const a=l+1,c=l+2;e.set(o[i+l],o[i+a],o[i+c]),t.set(o[n+l],o[n+a],o[n+c]);const h=s.simpleSlerp(e,t,r);u[l]=h[0],u[a]=h[1],u[c]=h[2]}catch(e){}this._value_changed.addEvent()}}()}),a})),define("x_ite/Components/Interpolation/PositionInterpolator2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionInterpolator2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec2f),new t(r.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"PositionInterpolator2D"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFVec2f)},interpolate:function(){const e=new o(0,0);return function(t,i,n){this._value_changed=e.assign(this._keyValue[t].getValue()).lerp(this._keyValue[i].getValue(),n)}}()}),s})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator",["standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4"],(function(e,t){"use strict";const i=[],n=[],r=[],o=new e(0,0,0,0),s=new t(2,-2,1,1,-3,3,-2,-1,0,0,1,0,1,0,0,0);function a(){this.T0=[],this.T1=[]}return a.prototype={constructor:a,generate:function(e,t,o,s,a){const u=this.T0,l=this.T1;if(u.length=0,l.length=0,i.length=0,n.length=0,r.length=0,t.length>1){if(0===s.length){e?i.push(this.divide(this.subtract(o[1],o[o.length-2]),2)):i.push(this.create());for(let e=1,t=o.length-1;e<t;++e)i.push(this.divide(this.subtract(o[e+1],o[e-1]),2));i.push(this.copy(i[0]))}else{for(let e=0,t=s.length;e<t;++e)i.push(this.copy(s[e]));if(a){let e=0;for(let t=0,i=o.length-1;t<i;++t)e+=this.abs(this.subtract(o[t],o[t+1]));for(let t=0,n=i.length-1;t<n;++t){const n=this.abs(i[t]);n&&(i[t]=this.multiply(i[t],e/n))}}}if(e){const e=t.length-1,i=t.length-2,o=t[1]-t[0]+t[e]-t[i];r.push(2*(t[1]-t[0])/o),n.push(2*(t[e]-t[i])/o)}else r.push(1),n.push(1);for(let e=1,i=t.length-1;e<i;++e){const i=t[e+1]-t[e-1];r.push(2*(t[e+1]-t[e])/i),n.push(2*(t[e]-t[e-1])/i)}r.push(r[0]),n.push(n[0]);for(let e=0,t=i.length;e<t;++e)u.push(this.multiply(i[e],n[e])),l.push(this.multiply(i[e],r[e]))}else u.push(this.create()),l.push(this.create())},interpolate:function(e,t,i,n){return o.set(Math.pow(i,3),Math.pow(i,2),i,1),this.dot(s.multVecMatrix(o),n[e],n[t],this.T0[e],this.T1[t])}},a})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolator"],(function(e){"use strict";return function(t){const i=new t(0,0,0,0),n=new t(0,0,0,0),r=new t(0,0,0,0),o=new t(0,0,0,0);function s(){this.T0=[],this.T1=[]}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,create:function(){return new t(0,0,0,0)},copy:function(e){return e.copy()},subtract:function(e,i){return t.subtract(e,i)},multiply:function(e,i){return t.multiply(e,i)},divide:function(e,i){return t.divide(e,i)},abs:function(e){return e.abs()},dot:function(e,t,s,a,u){return i.assign(t).multiply(e[0]),n.assign(s).multiply(e[1]),r.assign(a).multiply(e[2]),o.assign(u).multiply(e[3]),i.add(n).add(r).add(o)}}),s}})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate","standard/Math/Numbers/Vector3"],(function(e,t){"use strict";return e(t)})),define("x_ite/Components/Interpolation/SplinePositionInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SplinePositionInterpolator),this.spline=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFVec3f),new t(o.inputOutput,"keyVelocity",new e.MFVec3f),new t(o.inputOutput,"normalizeVelocity",new e.SFBool),new t(o.outputOnly,"value_changed",new e.SFVec3f)]),getTypeName:function(){return"SplinePositionInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this),this._keyVelocity.addInterest("set_keyVelocity__",this),this._normalizeVelocity.addInterest("set_normalizeVelocity__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFVec3f),this.set_keyVelocity__()},set_keyVelocity__:function(){this._keyVelocity.length&&this._keyVelocity.length<this._key.length&&this._keyVelocity.resize(this._key.length,new e.SFVec3f),this.set_normalizeVelocity__()},set_normalizeVelocity__:function(){this.spline.generate(this._closed.getValue(),this._key,this._keyValue,this._keyVelocity,this._normalizeVelocity.getValue())},interpolate:function(e,t,i){this._value_changed=this.spline.interpolate(e,t,i,this._keyValue)}}),s})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate","standard/Math/Numbers/Vector2"],(function(e,t){"use strict";return e(t)})),define("x_ite/Components/Interpolation/SplinePositionInterpolator2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SplinePositionInterpolator2D),this.spline=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFVec2f),new t(o.inputOutput,"keyVelocity",new e.MFVec2f),new t(o.inputOutput,"normalizeVelocity",new e.SFBool),new t(o.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"SplinePositionInterpolator2D"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this),this._keyVelocity.addInterest("set_keyVelocity__",this),this._normalizeVelocity.addInterest("set_normalizeVelocity__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFVec2f),this.set_keyVelocity__()},set_keyVelocity__:function(){this._keyVelocity.length&&this._keyVelocity.length<this._key.length&&this._keyVelocity.resize(this._key.length,new e.SFVec2f),this.set_normalizeVelocity__()},set_normalizeVelocity__:function(){this.spline.generate(this._closed.getValue(),this._key,this._keyValue,this._keyVelocity,this._normalizeVelocity.getValue())},interpolate:function(e,t,i){this._value_changed=this.spline.interpolate(e,t,i,this._keyValue)}}),s})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolator"],(function(e){"use strict";function t(){this.T0=[],this.T1=[]}return t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,create:function(){return 0},copy:function(e){return e},subtract:function(e,t){return e-t},multiply:function(e,t){return e*t},divide:function(e,t){return e/t},abs:function(e){return Math.abs(e)},dot:function(e,t,i,n,r){return t*e[0]+i*e[1]+n*e[2]+r*e[3]}}),t})),define("x_ite/Components/Interpolation/SplineScalarInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SplineScalarInterpolator),this.spline=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFFloat),new t(o.inputOutput,"keyVelocity",new e.MFFloat),new t(o.inputOutput,"normalizeVelocity",new e.SFBool),new t(o.outputOnly,"value_changed",new e.SFFloat)]),getTypeName:function(){return"SplineScalarInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this),this._keyVelocity.addInterest("set_keyVelocity__",this),this._normalizeVelocity.addInterest("set_normalizeVelocity__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFFloat),this.set_keyVelocity__()},set_keyVelocity__:function(){this._keyVelocity.length&&this._keyVelocity.length<this._key.length&&this._keyVelocity.resize(this._key.length,new e.SFFloat),this.set_normalizeVelocity__()},set_normalizeVelocity__:function(){this.spline.generate(this._closed.getValue(),this._key,this._keyValue,this._keyVelocity,this._normalizeVelocity.getValue())},interpolate:function(e,t,i){this._value_changed=this.spline.interpolate(e,t,i,this._keyValue)}}),s})),define("x_ite/Browser/Interpolation/SquatInterpolator",["standard/Math/Numbers/Rotation4"],(function(e){"use strict";const t=new e(0,0,1,0);function i(){this.s=[]}return i.prototype={constructor:i,generate:function(t,i,n){const r=this.s;if(r.length=0,i.length>1){t?r.push(e.spline(n[i.length-2].getValue(),n[0].getValue(),n[1].getValue())):r.push(n[0].getValue());for(let t=1,o=i.length-1;t<o;++t)r.push(e.spline(n[t-1].getValue(),n[t].getValue(),n[t+1].getValue()));t?r.push(e.spline(n[i.length-2].getValue(),n[i.length-1].getValue(),n[1].getValue())):r.push(n[i.length-1].getValue())}else i.length>0&&r.push(n[0].getValue().copy())},interpolate:function(e,i,n,r){return t.assign(r[e].getValue()).squad(this.s[e],this.s[i],r[i].getValue(),n)}},i})),define("x_ite/Components/Interpolation/SquadOrientationInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/SquatInterpolator","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SquadOrientationInterpolator),this._keyValue.setUnit("angle"),this._value_changed.setUnit("angle"),this.squad=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFRotation),new t(o.outputOnly,"value_changed",new e.SFRotation)]),getTypeName:function(){return"SquadOrientationInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFRotation),this.squad.generate(this._closed.getValue(),this._key,this._keyValue)},interpolate:function(e,t,i){try{this._value_changed=this.squad.interpolate(e,t,i,this._keyValue)}catch(e){console.error(e)}}}),s})),define("x_ite/Components/Interpolation",["x_ite/Configuration/SupportedNodes","x_ite/Components/Interpolation/ColorInterpolator","x_ite/Components/Interpolation/CoordinateInterpolator","x_ite/Components/Interpolation/CoordinateInterpolator2D","x_ite/Components/Interpolation/EaseInEaseOut","x_ite/Components/Interpolation/NormalInterpolator","x_ite/Components/Interpolation/OrientationInterpolator","x_ite/Components/Interpolation/PositionInterpolator","x_ite/Components/Interpolation/PositionInterpolator2D","x_ite/Components/Interpolation/ScalarInterpolator","x_ite/Components/Interpolation/SplinePositionInterpolator","x_ite/Components/Interpolation/SplinePositionInterpolator2D","x_ite/Components/Interpolation/SplineScalarInterpolator","x_ite/Components/Interpolation/SquadOrientationInterpolator","x_ite/Components/Interpolation/X3DInterpolatorNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f){"use strict";const g={ColorInterpolator:t,CoordinateInterpolator:i,CoordinateInterpolator2D:n,EaseInEaseOut:r,NormalInterpolator:o,OrientationInterpolator:s,PositionInterpolator:a,PositionInterpolator2D:u,ScalarInterpolator:l,SplinePositionInterpolator:c,SplinePositionInterpolator2D:h,SplineScalarInterpolator:d,SquadOrientationInterpolator:p},m={X3DInterpolatorNode:f};for(const t in g)e.addType(t,g[t]);for(const t in m)e.addAbstractType(t,m[t])})),define("x_ite/Components/Layering",["x_ite/Configuration/SupportedNodes","x_ite/Components/Layering/Layer","x_ite/Components/Layering/LayerSet","x_ite/Components/Layering/Viewport","x_ite/Components/Layering/X3DLayerNode","x_ite/Components/Layering/X3DViewportNode"],(function(e,t,i,n,r,o){"use strict";const s={Layer:t,LayerSet:i,Viewport:n},a={X3DLayerNode:r,X3DViewportNode:o};for(const t in s)e.addType(t,s[t]);for(const t in a)e.addAbstractType(t,a[t])})),define("x_ite/Components/Lighting/PointLight",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Lighting/X3DLightNode","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/Camera","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix3","standard/Math/Numbers/Matrix4","standard/Math/Utility/MatrixStack","standard/Math/Algorithm","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m){"use strict";const _=[(new p).setRotation(new h(new l(1,0,0),l.zAxis)),(new p).setRotation(new h(new l(-1,0,0),l.zAxis)),(new p).setRotation(new h(new l(0,0,-1),l.zAxis)),(new p).setRotation(new h(new l(0,0,1),l.zAxis)),(new p).setRotation(new h(new l(0,1,0),l.zAxis)),(new p).setRotation(new h(new l(0,-1,0),l.zAxis))],y=[new c(0,.5,.25,.5),new c(.5,.5,.25,.5),new c(.75,.5,.25,.5),new c(.25,.5,.25,.5),new c(0,0,.5,.5),new c(.5,0,.5,.5)],x=m(w);function w(){this.location=new l(0,0,0),this.matrixArray=new Float32Array(9),this.shadowBuffer=null,this.viewVolume=new u,this.viewport=new c(0,0,0,0),this.projectionMatrix=new p,this.modelViewMatrix=new f(p),this.modelMatrix=new p,this.invLightSpaceMatrix=new p,this.invLightSpaceProjectionMatrix=new p,this.shadowMatrix=new p,this.shadowMatrixArray=new Float32Array(16),this.rotation=new h,this.rotationMatrix=new p,this.textureUnit=void 0}function b(e){n.call(this,e),this.addType(s.PointLight),this._location.setUnit("length"),this._radius.setUnit("length")}return w.prototype={constructor:w,getModelViewMatrix:function(){return this.modelViewMatrix},set:function(e,t,i,n){const r=t.getShadowMapSize();this.browser=e,this.lightNode=t,this.groupNode=i;try{this.matrixArray.set(n.submatrix.inverse())}catch(e){this.matrixArray.set(d.Identity)}this.modelViewMatrix.pushMatrix(n),t.getShadowIntensity()>0&&r>0&&(this.shadowBuffer=e.popShadowBuffer(r),this.shadowBuffer||console.warn("Couldn't create shadow buffer."))},renderShadowMap:function(e){try{if(!this.shadowBuffer)return;const t=this.lightNode,i=e.getCameraSpaceMatrix().get(),n=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),s=this.invLightSpaceMatrix.assign(t.getGlobal()?n:p.Identity);s.translate(t.getLocation()),s.inverse();const u=t.getShadowMapSize();this.shadowBuffer.bind();for(let t=0;t<6;++t){const i=y[t],n=this.viewport.set(i[0]*u,i[1]*u,i[2]*u,i[3]*u),l=a.perspective2(g.radians(90),.125,1e4,n[2],n[3],this.projectionMatrix);e.getViewVolumes().push(this.viewVolume.set(l,n,n)),e.getProjectionMatrix().pushMatrix(this.projectionMatrix),e.getModelViewMatrix().pushMatrix(_[t]),e.getModelViewMatrix().multLeft(s),e.render(o.SHADOW,r.prototype.traverse,this.groupNode),e.getModelViewMatrix().pop(),e.getProjectionMatrix().pop(),e.getViewVolumes().pop()}this.shadowBuffer.unbind(),t.getGlobal()||s.multLeft(n.inverse()),this.invLightSpaceProjectionMatrix.assign(s)}catch(e){console.error(e)}},setGlobalVariables:function(e){this.modelViewMatrix.get().multVecMatrix(this.location.assign(this.lightNode._location.getValue())),this.shadowMatrix.assign(e.getCameraSpaceMatrix().get()).multRight(this.invLightSpaceProjectionMatrix),this.shadowMatrixArray.set(this.shadowMatrix)},setShaderUniforms:function(e,t){const i=t.numLights++;if(t.hasLight(i,this))return;const n=this.lightNode,r=n.getColor(),o=n.getAttenuation(),s=this.location;if(e.uniform1i(t.x3d_LightType[i],2),e.uniform3f(t.x3d_LightColor[i],r.r,r.g,r.b),e.uniform1f(t.x3d_LightIntensity[i],n.getIntensity()),e.uniform1f(t.x3d_LightAmbientIntensity[i],n.getAmbientIntensity()),e.uniform3f(t.x3d_LightAttenuation[i],Math.max(0,o.x),Math.max(0,o.y),Math.max(0,o.z)),e.uniform3f(t.x3d_LightLocation[i],s.x,s.y,s.z),e.uniform1f(t.x3d_LightRadius[i],n.getRadius()),e.uniformMatrix3fv(t.x3d_LightMatrix[i],!1,this.matrixArray),this.shadowBuffer){const r=this.browser,o=n.getShadowColor();e.uniform3f(t.x3d_ShadowColor[i],o.r,o.g,o.b),e.uniform1f(t.x3d_ShadowIntensity[i],n.getShadowIntensity()),e.uniform1f(t.x3d_ShadowBias[i],n.getShadowBias()),e.uniformMatrix4fv(t.x3d_ShadowMatrix[i],!1,this.shadowMatrixArray),e.uniform1i(t.x3d_ShadowMapSize[i],n.getShadowMapSize()),this.textureUnit=n.getGlobal()?void 0===this.textureUnit?r.popTexture2DUnit():this.textureUnit:r.getTexture2DUnit(),void 0!==this.textureUnit?(e.activeTexture(e.TEXTURE0+this.textureUnit),e.getVersion()>=2||r.getExtension("WEBGL_depth_texture")?e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getDepthTexture()):e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getColorTexture()),e.uniform1i(t.x3d_ShadowMap[i],this.textureUnit)):console.warn("Not enough combined texture units for shadow map available.")}},dispose:function(){this.browser.pushShadowBuffer(this.shadowBuffer),this.lightNode.getGlobal()&&this.browser.pushTexture2DUnit(this.textureUnit),this.modelViewMatrix.clear(),this.browser=null,this.lightNode=null,this.groupNode=null,this.shadowBuffer=null,this.textureUnit=void 0,x.push(this)}},b.prototype=Object.assign(Object.create(n.prototype),{constructor:b,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"global",new e.SFBool(!0)),new t(s.inputOutput,"on",new e.SFBool(!0)),new t(s.inputOutput,"color",new e.SFColor(1,1,1)),new t(s.inputOutput,"intensity",new e.SFFloat(1)),new t(s.inputOutput,"ambientIntensity",new e.SFFloat),new t(s.inputOutput,"attenuation",new e.SFVec3f(1,0,0)),new t(s.inputOutput,"location",new e.SFVec3f),new t(s.inputOutput,"radius",new e.SFFloat(100)),new t(s.inputOutput,"shadows",new e.SFBool),new t(s.inputOutput,"shadowColor",new e.SFColor),new t(s.inputOutput,"shadowIntensity",new e.SFFloat(1)),new t(s.inputOutput,"shadowBias",new e.SFFloat(.005)),new t(s.initializeOnly,"shadowMapSize",new e.SFInt32(1024))]),getTypeName:function(){return"PointLight"},getComponentName:function(){return"Lighting"},getContainerField:function(){return"children"},getAttenuation:function(){return this._attenuation.getValue()},getLocation:function(){return this._location.getValue()},getRadius:function(){return Math.max(0,this._radius.getValue())},getLights:function(){return x}}),b})),define("x_ite/Components/Lighting/SpotLight",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Lighting/X3DLightNode","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/Box3","standard/Math/Geometry/Camera","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix3","standard/Math/Numbers/Matrix4","standard/Math/Utility/MatrixStack","standard/Math/Algorithm","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_){"use strict";const y=_(x);function x(){this.location=new c(0,0,0),this.direction=new c(0,0,0),this.matrixArray=new Float32Array(9),this.renderShadow=!0,this.shadowBuffer=null,this.bbox=new a,this.viewVolume=new l,this.viewport=new h(0,0,0,0),this.projectionMatrix=new f,this.modelViewMatrix=new g(f),this.modelMatrix=new f,this.invLightSpaceMatrix=new f,this.invLightSpaceProjectionMatrix=new f,this.shadowMatrix=new f,this.shadowMatrixArray=new Float32Array(16),this.rotation=new d,this.lightBBoxMin=new c(0,0,0),this.lightBBoxMax=new c(0,0,0),this.textureUnit=void 0}function w(e){switch(n.call(this,e),this.addType(s.SpotLight),e.getSpecificationVersion()){case"2.0":case"3.0":case"3.1":case"3.2":this._beamWidth=1.5708,this._cutOffAngle=.785398}this._location.setUnit("length"),this._radius.setUnit("length"),this._beamWidth.setUnit("angle"),this._cutOffAngle.setUnit("angle")}return x.prototype={constructor:x,getModelViewMatrix:function(){return this.modelViewMatrix},set:function(e,t,i,n){const r=t.getShadowMapSize();this.browser=e,this.lightNode=t,this.groupNode=i;try{this.matrixArray.set(n.submatrix.inverse())}catch(e){this.matrixArray.set(p.Identity)}this.modelViewMatrix.pushMatrix(n),t.getShadowIntensity()>0&&r>0&&(this.shadowBuffer=e.popShadowBuffer(r),this.shadowBuffer||console.warn("Couldn't create shadow buffer."))},renderShadowMap:function(e){try{if(!this.shadowBuffer)return;const t=this.lightNode,i=e.getCameraSpaceMatrix().get(),n=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),s=this.invLightSpaceMatrix.assign(t.getGlobal()?n:f.Identity);s.translate(t.getLocation()),s.rotate(this.rotation.setFromToVec(c.zAxis,this.direction.assign(t.getDirection()).negate())),s.inverse();const a=this.groupNode.getSubBBox(this.bbox,!0),l=(a.multRight(s).getExtents(this.lightBBoxMin,this.lightBBoxMax),t.getShadowMapSize()),h=Math.min(t.getRadius(),-this.lightBBoxMin.z),d=this.viewport.set(0,0,l,l),p=u.perspective(2*t.getCutOffAngle(),.125,Math.max(1e4,h),l,l,this.projectionMatrix);this.renderShadow=h>0,this.shadowBuffer.bind(),e.getViewVolumes().push(this.viewVolume.set(p,d,d)),e.getProjectionMatrix().pushMatrix(p),e.getModelViewMatrix().pushMatrix(s),e.render(o.SHADOW,r.prototype.traverse,this.groupNode),e.getModelViewMatrix().pop(),e.getProjectionMatrix().pop(),e.getViewVolumes().pop(),this.shadowBuffer.unbind(),t.getGlobal()||s.multLeft(n.inverse()),this.invLightSpaceProjectionMatrix.assign(s).multRight(p).multRight(t.getBiasMatrix())}catch(e){console.error(e)}},setGlobalVariables:function(e){const t=this.lightNode,i=this.modelViewMatrix.get();i.multVecMatrix(this.location.assign(t._location.getValue())),i.multDirMatrix(this.direction.assign(t._direction.getValue())).normalize(),this.shadowMatrix.assign(e.getCameraSpaceMatrix().get()).multRight(this.invLightSpaceProjectionMatrix),this.shadowMatrixArray.set(this.shadowMatrix)},setShaderUniforms:function(e,t){const i=t.numLights++;if(t.hasLight(i,this))return;const n=this.lightNode,r=n.getColor(),o=n.getAttenuation(),s=this.location,a=this.direction;if(e.uniform1i(t.x3d_LightType[i],3),e.uniform3f(t.x3d_LightColor[i],r.r,r.g,r.b),e.uniform1f(t.x3d_LightIntensity[i],n.getIntensity()),e.uniform1f(t.x3d_LightAmbientIntensity[i],n.getAmbientIntensity()),e.uniform3f(t.x3d_LightAttenuation[i],Math.max(0,o.x),Math.max(0,o.y),Math.max(0,o.z)),e.uniform3f(t.x3d_LightLocation[i],s.x,s.y,s.z),e.uniform3f(t.x3d_LightDirection[i],a.x,a.y,a.z),e.uniform1f(t.x3d_LightRadius[i],n.getRadius()),e.uniform1f(t.x3d_LightBeamWidth[i],n.getBeamWidth()),e.uniform1f(t.x3d_LightCutOffAngle[i],n.getCutOffAngle()),e.uniformMatrix3fv(t.x3d_LightMatrix[i],!1,this.matrixArray),this.renderShadow&&this.shadowBuffer){const r=this.browser,o=n.getShadowColor();e.uniform3f(t.x3d_ShadowColor[i],o.r,o.g,o.b),e.uniform1f(t.x3d_ShadowIntensity[i],n.getShadowIntensity()),e.uniform1f(t.x3d_ShadowBias[i],n.getShadowBias()),e.uniformMatrix4fv(t.x3d_ShadowMatrix[i],!1,this.shadowMatrixArray),e.uniform1i(t.x3d_ShadowMapSize[i],n.getShadowMapSize()),this.textureUnit=n.getGlobal()?void 0===this.textureUnit?r.popTexture2DUnit():this.textureUnit:r.getTexture2DUnit(),void 0!==this.textureUnit?(e.activeTexture(e.TEXTURE0+this.textureUnit),e.getVersion()>=2||r.getExtension("WEBGL_depth_texture")?e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getDepthTexture()):e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getColorTexture()),e.uniform1i(t.x3d_ShadowMap[i],this.textureUnit)):console.warn("Not enough combined texture units for shadow map available.")}},dispose:function(){this.browser.pushShadowBuffer(this.shadowBuffer),this.lightNode.getGlobal()&&this.browser.pushTexture2DUnit(this.textureUnit),this.modelViewMatrix.clear(),this.browser=null,this.lightNode=null,this.groupNode=null,this.shadowBuffer=null,this.textureUnit=void 0,y.push(this)}},w.prototype=Object.assign(Object.create(n.prototype),{constructor:w,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"global",new e.SFBool(!0)),new t(s.inputOutput,"on",new e.SFBool(!0)),new t(s.inputOutput,"color",new e.SFColor(1,1,1)),new t(s.inputOutput,"intensity",new e.SFFloat(1)),new t(s.inputOutput,"ambientIntensity",new e.SFFloat),new t(s.inputOutput,"attenuation",new e.SFVec3f(1,0,0)),new t(s.inputOutput,"location",new e.SFVec3f),new t(s.inputOutput,"direction",new e.SFVec3f(0,0,-1)),new t(s.inputOutput,"radius",new e.SFFloat(100)),new t(s.inputOutput,"beamWidth",new e.SFFloat(.785398)),new t(s.inputOutput,"cutOffAngle",new e.SFFloat(1.5708)),new t(s.inputOutput,"shadows",new e.SFBool),new t(s.inputOutput,"shadowColor",new e.SFColor),new t(s.inputOutput,"shadowIntensity",new e.SFFloat(1)),new t(s.inputOutput,"shadowBias",new e.SFFloat(.005)),new t(s.initializeOnly,"shadowMapSize",new e.SFInt32(1024))]),getTypeName:function(){return"SpotLight"},getComponentName:function(){return"Lighting"},getContainerField:function(){return"children"},getAttenuation:function(){return this._attenuation.getValue()},getLocation:function(){return this._location.getValue()},getRadius:function(){return Math.max(0,this._radius.getValue())},getBeamWidth:function(){const e=this._beamWidth.getValue(),t=this.getCutOffAngle();return e>t?t:m.clamp(e,0,Math.PI/2)},getCutOffAngle:function(){return m.clamp(this._cutOffAngle.getValue(),0,Math.PI/2)},getLights:function(){return y}}),w})),define("x_ite/Components/Lighting",["x_ite/Configuration/SupportedNodes","x_ite/Components/Lighting/DirectionalLight","x_ite/Components/Lighting/PointLight","x_ite/Components/Lighting/SpotLight","x_ite/Components/Lighting/X3DLightNode"],(function(e,t,i,n,r){"use strict";const o={DirectionalLight:t,PointLight:i,SpotLight:n},s={X3DLightNode:r};for(const t in o)e.addType(t,o[t]);for(const t in s)e.addAbstractType(t,s[t])})),define("x_ite/Components/Navigation/Billboard",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=new u,c=new s(0,1,0),h=new s(0,0,1),d=new s(0,0,0),p=new s(0,0,0),f=new s(0,0,0),g=new s(0,0,0),m=new s(0,0,0),_=new a(0,0,1,0);function y(e){n.call(this,e),this.addType(r.Billboard),this.matrix=new u}return y.prototype=Object.assign(Object.create(n.prototype),{constructor:y,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"axisOfRotation",new e.SFVec3f(0,1,0)),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Billboard"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},getBBox:function(e,t){return n.prototype.getBBox.call(this,e,t).multRight(this.matrix)},getMatrix:function(){return this.matrix},rotate:function(e){l.assign(e).inverse();const t=l.origin.normalize();if(this._axisOfRotation.getValue().equals(s.Zero)){l.multDirMatrix(d.assign(c)).normalize(),p.assign(d).cross(t),f.assign(t).cross(p);const e=t;p.normalize(),f.normalize(),this.matrix.set(p[0],p[1],p[2],0,f[0],f[1],f[2],0,e[0],e[1],e[2],0,0,0,0,1)}else g.assign(this._axisOfRotation.getValue()).cross(t),m.assign(this._axisOfRotation.getValue()).cross(h),this.matrix.setRotation(_.setFromToVec(m,g));return this.matrix},traverse:function(e,t){const i=t.getModelViewMatrix();i.push();try{switch(e){case o.CAMERA:case o.PICKING:case o.SHADOW:i.multLeft(this.matrix);break;default:i.multLeft(this.rotate(i.get()))}n.prototype.traverse.call(this,e,t)}catch(e){console.error(e)}i.pop()}}),y})),define("x_ite/Components/Navigation/Collision",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Core/X3DSensorNode","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),r.call(this,e),this.addType(a.Collision),"2.0"===e.getSpecificationVersion()&&this.addAlias("collide",this._enabled)}return u.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(a.inputOutput,"metadata",new e.SFNode),new t(a.inputOutput,"enabled",new e.SFBool(!0)),new t(a.outputOnly,"isActive",new e.SFBool),new t(a.outputOnly,"collideTime",new e.SFTime),new t(a.inputOutput,"visible",new e.SFBool(!0)),new t(a.inputOutput,"bboxDisplay",new e.SFBool),new t(a.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(a.initializeOnly,"bboxCenter",new e.SFVec3f),new t(a.initializeOnly,"proxy",new e.SFNode),new t(a.inputOnly,"addChildren",new e.MFNode),new t(a.inputOnly,"removeChildren",new e.MFNode),new t(a.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Collision"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._enabled.addInterest("set_live__",this),this._proxy.addInterest("set_proxy__",this),this.set_live__(),this.set_proxy__()},set_live__:function(){this.isLive().getValue()&&this._enabled.getValue()?this.getBrowser().addCollision(this):this.getBrowser().removeCollision(this)},set_active:function(e){this._isActive.getValue()!==e&&(this._isActive=e,e&&(this._collideTime=this.getBrowser().getCurrentTime()))},set_proxy__:function(){this.proxyNode=o(a.X3DChildNode,this._proxy)},traverse:function(e,t){if(e!==s.COLLISION)n.prototype.traverse.call(this,e,t);else if(this._enabled.getValue()){const i=t.getCollisions();i.push(this),this.proxyNode?this.proxyNode.traverse(e,t):n.prototype.traverse.call(this,e,t),i.pop()}}}),u})),define("x_ite/Components/Navigation/LOD",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),this.addType(s.LOD),"2.0"===e.getSpecificationVersion()&&this.addAlias("level",this._children),this._center.setUnit("length"),this._range.setUnit("length"),this.frameRate=60,this.keepCurrentLevel=!1,this.childNode=null,this.visibleNode=null,this.boundedObject=null}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"forceTransitions",new e.SFBool),new t(s.initializeOnly,"center",new e.SFVec3f),new t(s.initializeOnly,"range",new e.MFFloat),new t(s.outputOnly,"level_changed",new e.SFInt32(-1)),new t(s.inputOutput,"visible",new e.SFBool(!0)),new t(s.inputOutput,"bboxDisplay",new e.SFBool),new t(s.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(s.initializeOnly,"bboxCenter",new e.SFVec3f),new t(s.inputOnly,"addChildren",new e.MFNode),new t(s.inputOnly,"removeChildren",new e.MFNode),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"LOD"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._children.addInterest("set_child__",this)},getSubBBox:function(e,t){if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){const i=r(s.X3DBoundedObject,this.visibleNode);return i?i.getBBox(e,t):e.set()}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},clear:function(){},add:function(){},remove:function(){},set_child__:function(){this.set_level__(Math.min(this._level_changed.getValue(),this._children.length-1))},set_level__:function(e){this.childNode&&(this.childNode._isCameraObject.removeInterest("set_cameraObject__",this),this.childNode._isPickableObject.removeInterest("set_transformSensors__",this)),r(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.removeInterest("set_visible__",this),this.childNode._bboxDisplay.removeInterest("set_bboxDisplay__",this)),e>=0&&e<this._children.length?(this.childNode=r(s.X3DChildNode,this._children[e]),this.childNode&&(this.childNode._isCameraObject.addInterest("set_cameraObject__",this),this.childNode._isPickableObject.addInterest("set_transformSensors__",this),r(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.addInterest("set_visible__",this),this.childNode._bboxDisplay.addInterest("set_bboxDisplay__",this)))):this.childNode=null,this.set_transformSensors__(),this.set_visible__(),this.set_bboxDisplay__()},set_cameraObject__:function(){this.childNode&&this.childNode.getCameraObject()?r(s.X3DBoundedObject,this.childNode)?this.setCameraObject(this.childNode._visible.getValue()):this.setCameraObject(!0):this.setCameraObject(!1)},set_transformSensors__:function(){this.setPickableObject(Boolean(this.getTransformSensors().size||this.childNode&&this.childNode.getPickableObject()))},set_visible__:function(){r(s.X3DBoundedObject,this.childNode)?this.visibleNode=this.childNode._visible.getValue()?this.childNode:null:this.visibleNode=this.childNode,this.set_cameraObject__()},set_bboxDisplay__:function(){r(s.X3DBoundedObject,this.childNode)?this.boundedObject=this.childNode._bboxDisplay.getValue()?this.childNode:null:this.boundedObject=null},getLevel:function(e,t){if(0===this._range.length){this.frameRate=(179*this.frameRate+e.currentFrameRate)/180;const t=this._children.length;switch(t){case 0:return-1;case 1:return 0;case 2:return+(this.frameRate>55);default:{const e=1-u.clamp((this.frameRate-20)/35,0,1);return Math.min(Math.floor(e*t),t-1)}}}const i=t.translate(this._center.getValue()).origin.abs();return u.upperBound(this._range,0,this._range.length,i,u.less)},traverse:function(){const e=new a;return function(t,i){switch(t){case o.POINTER:case o.CAMERA:case o.SHADOW:{const e=this.visibleNode;return void(e&&e.traverse(t,i))}case o.PICKING:{if(this.getTransformSensors().size){const e=i.getModelViewMatrix().get();for(const t of this.getTransformSensors())t.collect(e)}const e=this.childNode;if(e){const n=i.getBrowser().getPickingHierarchy();n.push(this),e.traverse(t,i),n.pop()}return}case o.COLLISION:{const e=this.childNode;return void(e&&e.traverse(t,i))}case o.DISPLAY:{if(!this.keepCurrentLevel){let t=this.getLevel(i.getBrowser(),e.assign(i.getModelViewMatrix().get())),n=this._level_changed.getValue();this._forceTransitions.getValue()&&(t>n?t=n+1:t<n&&(t=n-1)),t!==n&&(this._level_changed=t,this.set_level__(Math.min(t,this._children.length-1)))}const n=this.visibleNode;n&&n.traverse(t,i);const r=this.boundedObject;return void(r&&r.displayBBox(t,i))}}}}()}),l})),define("x_ite/Components/Navigation/ViewpointGroup",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/EnvironmentalSensor/ProximitySensor","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(s.ViewpointGroup),this._size.setUnit("length"),this._center.setUnit("length"),this.proximitySensor=new r(e),this.cameraObjects=[],this.viewpointGroups=[]}function l(e,t){switch(e){case o.CAMERA:if(this.proximitySensor.traverse(e,t),this.proximitySensor._isActive.getValue())for(var i=0,n=this.cameraObjects.length;i<n;++i)this.cameraObjects[i].traverse(e,t);return;case o.DISPLAY:if(this.proximitySensor.traverse(e,t),this.proximitySensor._isActive.getValue())for(i=0,n=this.viewpointGroups.length;i<n;++i)this.viewpointGroups[i].traverse(e,t);return}}function c(e,t){switch(e){case o.CAMERA:for(var i=0,n=this.cameraObjects.length;i<n;++i)this.cameraObjects[i].traverse(e,t);return;case o.DISPLAY:for(i=0,n=this.viewpointGroups.length;i<n;++i)this.viewpointGroups[i].traverse(e,t);return}}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"description",new e.SFString),new t(s.inputOutput,"displayed",new e.SFBool(!0)),new t(s.inputOutput,"retainUserOffsets",new e.SFBool),new t(s.inputOutput,"size",new e.SFVec3f),new t(s.inputOutput,"center",new e.SFVec3f),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"ViewpointGroup"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.proximitySensor.setup(),this._size.addFieldInterest(this.proximitySensor._size),this._center.addFieldInterest(this.proximitySensor._center),this.proximitySensor._size=this._size,this.proximitySensor._center=this._center,this._displayed.addInterest("set_displayed__",this),this._size.addInterest("set_displayed__",this),this._children.addInterest("set_children__",this),this.set_displayed__(),this.set_children__()},isActive:function(){return this.proximitySensor._isActive.getValue()},set_displayed__:function(){var e=!this._size.getValue().equals(a.Zero),t=this._displayed.getValue();this.proximitySensor._enabled=t&&e,t&&e?(this.proximitySensor._isCameraObject.addFieldInterest(this._isCameraObject),this.proximitySensor._isPickableObject.addFieldInterest(this._isPickableObject),this.setCameraObject(this.proximitySensor.getCameraObject()),this.setPickableObject(this.proximitySensor.getPickableObject()),this.traverse=l):(this.proximitySensor._isCameraObject.removeFieldInterest(this._isCameraObject),this.proximitySensor._isPickableObject.removeFieldInterest(this._isPickableObject),this.setCameraObject(t),this.setPickableObject(!1),t?this.traverse=c:delete this.traverse)},set_children__:function(){this.cameraObjects.length=0,this.viewpointGroups.length=0;for(var e=this._children,t=0,i=e.length;t<i;++t)try{for(var n=e[t].getValue().getInnerNode(),r=n.getType(),o=r.length-1;o>=0;--o)switch(r[o]){case s.X3DViewpointNode:this.cameraObjects.push(n);break;case s.ViewpointGroup:this.cameraObjects.push(n),this.viewpointGroups.push(n)}}catch(e){}},traverse:function(){}}),u})),define("x_ite/Components/Navigation",["x_ite/Configuration/SupportedNodes","x_ite/Components/Navigation/Billboard","x_ite/Components/Navigation/Collision","x_ite/Components/Navigation/LOD","x_ite/Components/Navigation/NavigationInfo","x_ite/Components/Navigation/OrthoViewpoint","x_ite/Components/Navigation/Viewpoint","x_ite/Components/Navigation/ViewpointGroup","x_ite/Components/Navigation/X3DViewpointNode"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l={Billboard:t,Collision:i,LOD:n,NavigationInfo:r,OrthoViewpoint:o,Viewpoint:s,ViewpointGroup:a},c={X3DViewpointNode:u};for(const t in l)e.addType(t,l[t]);for(const t in c)e.addAbstractType(t,c[t])})),define("x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer",["standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4"],(function(e,t){"use strict";function i(i,n,r,o){this.node=null,this.modelViewMatrix=new t,this.projectionMatrix=new t,this.viewport=new e(0,0,0,0),this.set(i,n,r,o)}return i.prototype={set:function(e,t,i,n){this.node=e,this.modelViewMatrix.assign(t),this.projectionMatrix.assign(i),this.viewport.assign(n)},set_over__:function(e,t){this.node.set_over__(e,t,this.modelViewMatrix,this.projectionMatrix,this.viewport)},set_active__:function(e,t){this.node.set_active__(e,t,this.modelViewMatrix,this.projectionMatrix,this.viewport)},set_motion__:function(e){this.node.set_motion__(e,this.modelViewMatrix,this.projectionMatrix,this.viewport)}},i})),define("x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode",["x_ite/Components/Core/X3DSensorNode","x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(t){e.call(this,t),this.addType(i.X3DPointingDeviceSensorNode)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,initialize:function(){e.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this)},getMatrices:function(){return this.matrices},set_enabled__:function(){this._enabled.getValue()||(this._isActive.getValue()&&(this._isActive=!1),this._isOver.getValue()&&(this._isOver=!1))},set_over__:function(e,t){e!==this._isOver.getValue()&&(this._isOver=e,e&&(this.getBrowser().getNotification()._string=this._description))},set_active__:function(e,t){e!==this._isActive.getValue()&&(this._isActive=e)},set_motion__:function(e){},push:function(e,i){this._enabled.getValue()&&i.set(this,new t(this,e.getModelViewMatrix().get(),e.getProjectionMatrix().get(),e.getViewVolume().getViewport()))}}),n})),define("x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode",["x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DTouchSensorNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,set_active__:function(t,i){e.prototype.set_active__.call(this,t,i),this._enabled.getValue()&&this._isOver.getValue()&&!t&&(this._touchTime=this.getBrowser().getCurrentTime())}}),i})),define("x_ite/Components/PointingDeviceSensor/TouchSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o){"use strict";var s=new o;function a(e){n.call(this,e),this.addType(r.TouchSensor),this._hitPoint_changed.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.outputOnly,"hitTexCoord_changed",new e.SFVec2f),new t(r.outputOnly,"hitNormal_changed",new e.SFVec3f),new t(r.outputOnly,"hitPoint_changed",new e.SFVec3f),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"touchTime",new e.SFTime)]),getTypeName:function(){return"TouchSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},set_over__:function(e,t,i,r,o){try{if(n.prototype.set_over__.call(this,e,t,i,r,o),this._isOver.getValue()){var a=t.intersection;s.assign(i).inverse(),this._hitTexCoord_changed=a.texCoord,this._hitNormal_changed=i.multMatrixDir(a.normal.copy()).normalize(),this._hitPoint_changed=s.multVecMatrix(a.point.copy())}}catch(e){console.error(e)}}}),a})),define("x_ite/Components/Networking/Anchor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/PointingDeviceSensor/TouchSensor","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","x_ite/InputOutput/FileLoader"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),r.call(this,e),this.addType(a.Anchor),this.touchSensorNode=new o(e),this.sensors=new Map}return l.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(a.inputOutput,"metadata",new e.SFNode),new t(a.inputOutput,"description",new e.SFString),new t(a.inputOutput,"load",new e.SFBool(!0)),new t(a.inputOutput,"url",new e.MFString),new t(a.inputOutput,"parameter",new e.MFString),new t(a.inputOutput,"autoRefresh",new e.SFTime),new t(a.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600)),new t(a.inputOutput,"visible",new e.SFBool(!0)),new t(a.inputOutput,"bboxDisplay",new e.SFBool),new t(a.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(a.initializeOnly,"bboxCenter",new e.SFVec3f),new t(a.inputOnly,"addChildren",new e.MFNode),new t(a.inputOnly,"removeChildren",new e.MFNode),new t(a.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Anchor"},getComponentName:function(){return"Networking"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this),this._description.addFieldInterest(this.touchSensorNode._description),this._load.addFieldInterest(this.touchSensorNode._enabled),this.touchSensorNode._description=this._description,this.touchSensorNode._enabled=this._load,this.touchSensorNode.setup();const e=this,t=this.touchSensorNode.set_active__;this.touchSensorNode.set_active__=function(i,n){t.call(this,i,n),this._isOver.getValue()&&!i&&e.requestImmediateLoad()}},set_load__:function(){},set_url__:function(){},requestImmediateLoad:function(e=!0){this.setCache(e),this.setLoadState(a.IN_PROGRESS_STATE,!1),new u(this).createX3DFromURL(this._url,this._parameter,function(e){e?(this.getBrowser().replaceWorld(e),this.setLoadState(a.COMPLETE_STATE,!1)):this.setLoadState(a.FAILED_STATE,!1)}.bind(this),function(e){this.getBrowser().changeViewpoint(e),this.setLoadState(a.COMPLETE_STATE,!1)}.bind(this),function(e,t){t?window.open(e,t):location=e,this.setLoadState(a.COMPLETE_STATE,!1)}.bind(this))},requestUnload(){},traverse:function(e,t){if(e===s.POINTER){const i=this.sensors;i.clear(),t.getBrowser().getSensors().push(i),this.touchSensorNode.push(t,i),n.prototype.traverse.call(this,e,t),t.getBrowser().getSensors().pop()}else n.prototype.traverse.call(this,e,t)}}),l})),define("x_ite/Components/Networking/Inline",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Components/Grouping/Group","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","x_ite/InputOutput/FileLoader"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),r.call(this,e),o.call(this,e),this.addType(u.Inline),this.scene=this.getBrowser().getDefaultScene(),this.group=new s(e),this.group.addParent(this)}return c.prototype=Object.assign(Object.create(n.prototype),r.prototype,o.prototype,{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(u.inputOutput,"metadata",new e.SFNode),new t(u.inputOutput,"load",new e.SFBool(!0)),new t(u.inputOutput,"url",new e.MFString),new t(u.inputOutput,"autoRefresh",new e.SFTime),new t(u.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600)),new t(u.inputOutput,"visible",new e.SFBool(!0)),new t(u.inputOutput,"bboxDisplay",new e.SFBool),new t(u.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(u.initializeOnly,"bboxCenter",new e.SFVec3f)]),getTypeName:function(){return"Inline"},getComponentName:function(){return"Networking"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this),o.prototype.initialize.call(this),this.group.setPrivate(!0),this.group.setup(),this.group._isCameraObject.addFieldInterest(this._isCameraObject),this.group._isPickableObject.addFieldInterest(this._isPickableObject),this.requestImmediateLoad()},getBBox:function(e,t){return this._bboxSize.getValue().equals(this.getDefaultBBoxSize())?this.group.getBBox(e,t):e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},set_live__:function(){r.prototype.set_live__.call(this),this.getPrivate()||this.scene.setLive(this.isLive().getValue())},unloadNow:function(){this.setInternalScene(this.getBrowser().getDefaultScene())},loadNow:function(){new l(this).createX3DFromURL(this._url,null,this.setInternalSceneAsync.bind(this))},setInternalSceneAsync:function(e){e?(this.setLoadState(u.COMPLETE_STATE),this.setInternalScene(e)):(this.setLoadState(u.FAILED_STATE),this.setInternalScene(this.getBrowser().getDefaultScene()))},setInternalScene:function(e){this.scene.setLive(!1),this.scene.rootNodes.removeFieldInterest(this.group._children),this.scene=e,this.scene.setExecutionContext(this.getExecutionContext()),this.scene.setPrivate(this.getExecutionContext().getPrivate()),this.scene.rootNodes.addFieldInterest(this.group._children),this.group._children=this.scene.rootNodes,this.set_live__(),this.getBrowser().addBrowserEvent()},getInternalScene:function(){return this.scene},traverse:function(e,t){if(e===a.PICKING){const i=t.getBrowser().getPickingHierarchy();return i.push(this),this.group.traverse(e,t),void i.pop()}this.group.traverse(e,t)}}),c})),define("x_ite/Components/Networking",["x_ite/Configuration/SupportedNodes","x_ite/Components/Networking/Anchor","x_ite/Components/Networking/Inline","x_ite/Components/Networking/LoadSensor","x_ite/Components/Networking/X3DNetworkSensorNode","x_ite/Components/Networking/X3DUrlObject"],(function(e,t,i,n,r,o){"use strict";const s={Anchor:t,Inline:i,LoadSensor:n},a={X3DNetworkSensorNode:r,X3DUrlObject:o};for(const t in s)e.addType(t,s[t]);for(const t in a)e.addAbstractType(t,a[t])})),define("x_ite/Components/PointingDeviceSensor/X3DDragSensorNode",["x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DDragSensorNode),this._trackPoint_changed.setUnit("length")}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("standard/Math/Geometry/Cylinder3",["standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3"],(function(e,t,i,n){"use strict";function r(e,t){this.axis=e.copy(),this.radius=t}return r.prototype={constructor:r,intersectsLine:function(r,o,s){const a=new t(this.axis.direction,new e(0,1,0)),u=i.Rotation(a),l=1/this.radius,c=new i;c.scale(new e(l,l,l)),c.multLeft(u);const h=e.subtract(r.point,this.axis.point),d=new n(h,r.direction).multLineMatrix(c),p=this.unitCylinderIntersectsLine(d,o,s);if(p){const e=c.inverse();e.multVecMatrix(o),o.add(this.axis.point),e.multVecMatrix(s),s.add(this.axis.point)}return p},unitCylinderIntersectsLine:function(e,t,i){let n,r;const o=e.point,s=e.direction,a=s[0]*s[0]+s[2]*s[2],u=2*(o[0]*s[0]+o[2]*s[2]),l=o[0]*o[0]+o[2]*o[2]-1,c=u*u-4*a*l;if(c<0)return!1;const h=Math.sqrt(c);return u>0?(n=-2*l/(h+u),r=-(h+u)/(2*a)):(n=2*l/(h-u),r=(h-u)/(2*a)),t.assign(s).multiply(n).add(o),i.assign(s).multiply(r).add(o),!0},toString:function(){return this.axis.toString()+" "+this.radius}},r})),define("x_ite/Components/PointingDeviceSensor/CylinderSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3","standard/Math/Geometry/Plane3","standard/Math/Geometry/Cylinder3","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";function d(e){n.call(this,e),this.addType(r.CylinderSensor),this._diskAngle.setUnit("angle"),this._minAngle.setUnit("angle"),this._maxAngle.setUnit("angle"),this._offset.setUnit("angle")}return d.prototype=Object.assign(Object.create(n.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"axisRotation",new e.SFRotation),new t(r.inputOutput,"diskAngle",new e.SFFloat(.261792)),new t(r.inputOutput,"minAngle",new e.SFFloat),new t(r.inputOutput,"maxAngle",new e.SFFloat(-1)),new t(r.inputOutput,"offset",new e.SFFloat),new t(r.inputOutput,"autoOffset",new e.SFBool(!0)),new t(r.outputOnly,"trackPoint_changed",new e.SFVec3f),new t(r.outputOnly,"rotation_changed",new e.SFRotation),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"CylinderSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.modelViewMatrix=new a,this.invModelViewMatrix=new a,this.cylinder=new c(new u(new o(0,0,0),new o(0,0,0)),0),this.disk=!1,this.yPlane=null,this.zPlane=null,this.sxPlane=null,this.szNormal=null,this.behind=!1,this.fromVector=new o(0,0,0),this.startOffset=new s(0,0,1,0)},isBehind:function(e,t){const i=new o(0,0,0),n=new o(0,0,0);return this.cylinder.intersectsLine(e,i,n),o.subtract(t,i).abs()>o.subtract(t,n).abs()},getTrackPoint:function(e,t){const i=new o(0,0,0);this.zPlane.intersectsLine(e,i);const n=o.add(i,this.cylinder.axis.getPerpendicularVectorToPoint(i,new o(0,0,0))),r=this.sxPlane.getDistanceToPoint(i)/this.cylinder.radius,a=Math.floor((r+1)/2),u=h.interval(r,-1,1),l=(0===a?Math.asin(u):u*Math.PI/2)+a*Math.PI;new s(this.cylinder.axis.direction,l).multVecRot(t.assign(this.szNormal).multiply(this.cylinder.radius)),t.add(n)},getAngle:function(e){return o.dot(e.getAxis(),this.cylinder.axis.direction)>0?e.angle:-e.angle},set_active__:function(e,t,i,r,a){n.prototype.set_active__.call(this,e,t,i,r,a);try{if(this._isActive.getValue()){this.modelViewMatrix.assign(i),this.invModelViewMatrix.assign(i).inverse();const e=t.hitRay.copy().multLineMatrix(this.invModelViewMatrix),n=this.invModelViewMatrix.multVecMatrix(t.intersection.point.copy()),r=this._axisRotation.getValue().multVecRot(new o(0,1,0)),a=this.invModelViewMatrix.multDirMatrix(new o(0,0,1)).normalize(),h=new u(new o(0,0,0),r),d=h.getPerpendicularVectorToPoint(n,new o(0,0,0)).abs();this.cylinder=new c(h,d),this.disk=Math.abs(o.dot(a,r))>Math.cos(this._diskAngle.getValue()),this.behind=this.isBehind(e,n),this.yPlane=new l(n,r),this.zPlane=new l(n,a);const p=this.invModelViewMatrix.origin,f=o.cross(r,p).normalize();this.sxPlane=new l(new o(0,0,0),f),this.szNormal=o.cross(f,r).normalize();const g=new o(0,0,0);this.disk?this.yPlane.intersectsLine(e,g):this.getTrackPoint(e,g),this.fromVector=this.cylinder.axis.getPerpendicularVectorToPoint(g,new o(0,0,0)).negate(),this.startOffset=new s(r,this._offset.getValue()),this._trackPoint_changed=g,this._rotation_changed=this.startOffset,this.angle=this._offset.getValue(),this.startVector=this._rotation_changed.getValue().multVecRot(this._axisRotation.getValue().multVecRot(new o(0,0,1)))}else this._autoOffset.getValue()&&(this._offset=this.getAngle(this._rotation_changed.getValue()))}catch(e){console.error(e)}},set_motion__:function(e){try{const t=e.hitRay.copy().multLineMatrix(this.invModelViewMatrix),i=new o(0,0,0);this.disk?this.yPlane.intersectsLine(t,i):this.getTrackPoint(t,i),this._trackPoint_changed=i;const n=this.cylinder.axis.getPerpendicularVectorToPoint(i,new o(0,0,0)).negate(),r=new s(this.fromVector,n);if(this.disk){this.modelViewMatrix.multVecMatrix(i.copy()).z>0&&r.multRight(new s(this.yPlane.normal,Math.PI))}else this.behind&&r.inverse();if(r.multLeft(this.startOffset),this._minAngle.getValue()>this._maxAngle.getValue())this._rotation_changed=r;else{const e=r.multVecRot(this._axisRotation.getValue().multVecRot(new o(0,0,1))),t=new s(this.startVector,e),i=this._axisRotation.getValue().multVecRot(new o(0,1,0)).dot(t.getAxis())>0?1:-1,n=this._minAngle.getValue(),a=this._maxAngle.getValue();this.angle+=i*t.angle,this.startVector.assign(e),this.angle<n?r.setAxisAngle(this.cylinder.axis.direction,n):this.angle>a?r.setAxisAngle(this.cylinder.axis.direction,a):r.setAxisAngle(this.cylinder.axis.direction,this.angle),this._rotation_changed.getValue().equals(r)||(this._rotation_changed=r)}}catch(e){console.error(e),this._trackPoint_changed.addEvent(),this._rotation_changed.addEvent()}}}),d})),define("x_ite/Components/PointingDeviceSensor/PlaneSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3","standard/Math/Geometry/Plane3","standard/Math/Geometry/ViewVolume","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d){"use strict";var p=new l(s.Zero,s.Zero),f=new s(0,0,0),g=new l(s.Zero,s.Zero);function m(e){n.call(this,e),this.addType(r.PlaneSensor),this._offset.setUnit("length"),this._minPosition.setUnit("length"),this._maxPosition.setUnit("length"),this._translation_changed.setUnit("length")}return m.prototype=Object.assign(Object.create(n.prototype),{constructor:m,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"axisRotation",new e.SFRotation),new t(r.inputOutput,"autoOffset",new e.SFBool(!0)),new t(r.inputOutput,"offset",new e.SFVec3f),new t(r.inputOutput,"minPosition",new e.SFVec2f),new t(r.inputOutput,"maxPosition",new e.SFVec2f(-1,-1)),new t(r.outputOnly,"trackPoint_changed",new e.SFVec3f),new t(r.outputOnly,"translation_changed",new e.SFVec3f),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"PlaneSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.modelViewMatrix=new u,this.invModelViewMatrix=new u,this.projectionMatrix=new u,this.viewport=new a,this.planeSensor=!0,this.plane=null,this.line=null,this.startOffset=new s(0,0,0),this.startPoint=new s(0,0,0)},getLineTrackPoint:function(e,t,i){return h.projectLine(t,this.modelViewMatrix,this.projectionMatrix,this.viewport,p),p.getClosestPointToPoint(new s(e.pointer.x,e.pointer.y,0),f),h.unProjectRay(f.x,f.y,this.modelViewMatrix,this.projectionMatrix,this.viewport,g),t.getClosestPointToLine(g,i)},set_active__:function(e,t,i,r,o){n.prototype.set_active__.call(this,e,t,i,r,o);try{if(this._isActive.getValue()){this.modelViewMatrix.assign(i),this.projectionMatrix.assign(r),this.viewport.assign(o),this.invModelViewMatrix.assign(i).inverse();var a=t.hitRay.copy().multLineMatrix(this.invModelViewMatrix),u=this.invModelViewMatrix.multVecMatrix(t.intersection.point.copy()),h=this._axisRotation.getValue();if(this._minPosition.x===this._maxPosition.x){this.planeSensor=!1;var d=h.multVecRot(new s(0,Math.abs(this._maxPosition.y-this._minPosition.y),0));this.line=new l(u,d.normalize())}else if(this._minPosition.y===this._maxPosition.y){this.planeSensor=!1;d=h.multVecRot(new s(Math.abs(this._maxPosition.x-this._minPosition.x),0,0));this.line=new l(u,d.normalize())}else this.planeSensor=!0,this.plane=new c(u,h.multVecRot(new s(0,0,1)));if(this.planeSensor)this.plane.intersectsLine(a,this.startPoint)&&this.trackStart(this.startPoint);else if(this.getLineTrackPoint(t,this.line,this.startPoint)){var p=new s(0,0,0);try{this.getLineTrackPoint(t,new l(this.line.direction,this.line.direction),p)}catch(e){p=this.startPoint}this.trackStart(p)}}else this._autoOffset.getValue()&&(this._offset=this._translation_changed)}catch(e){console.error(e)}},trackStart:function(e){this.startOffset.assign(this._offset.getValue()),this._trackPoint_changed=e,this._translation_changed=this._offset.getValue()},set_motion__:function(e){try{if(this.planeSensor){var t=e.hitRay.copy().multLineMatrix(this.invModelViewMatrix),i=new s(0,0,0);if(!this.plane.intersectsLine(t,i))throw new Error("Plane and line are parallel.");this.track(i,i.copy())}else{i=new s(0,0,0);var n=new s(0,0,0);if(!this.getLineTrackPoint(e,this.line,i))throw new Error("Lines are parallel.");try{this.getLineTrackPoint(e,new l(s.Zero,this.line.direction),n)}catch(e){n.assign(i)}this.track(i,n)}}catch(e){this._trackPoint_changed.addEvent(),this._translation_changed.addEvent()}},track:function(e,t){var i=this._axisRotation.getValue(),n=o.inverse(i).multVecRot(e.add(this.startOffset).subtract(this.startPoint));this._minPosition.x>this._maxPosition.x||(n.x=d.clamp(n.x,this._minPosition.x,this._maxPosition.x)),this._minPosition.y>this._maxPosition.y||(n.y=d.clamp(n.y,this._minPosition.y,this._maxPosition.y)),i.multVecRot(n),this._trackPoint_changed.getValue().equals(t)||(this._trackPoint_changed=t),this._translation_changed.getValue().equals(n)||(this._translation_changed=n)}}),m})),define("standard/Math/Geometry/Sphere3",["standard/Math/Numbers/Vector3"],(function(e){"use strict";function t(e,t){this.radius=e,this.center=t.copy()}return t.prototype={constructor:t,set:function(e,t){this.radius=e,this.center.assign(t)},intersectsLine:function(e,t,i){const n=e.point,r=e.direction,o=this.center,s=this.radius,a=2*(n.dot(r)-o.dot(r)),u=a*a-4*(n.x*n.x+n.y*n.y+n.z*n.z+(o.x*o.x+o.y*o.y+o.z*o.z)-2*n.dot(o)-s*s);if(u>=0){let e=(-a+Math.sqrt(u))/2,o=(-a-Math.sqrt(u))/2;if(e>o){const t=e;e=o,o=t}return t.assign(r).multiply(e).add(n),i.assign(r).multiply(o).add(n),!0}return!1},intersectsTriangle:function(){const t=new e(0,0,0),i=new e(0,0,0),n=new e(0,0,0),r=new e(0,0,0),o=new e(0,0,0),s=new e(0,0,0),a=new e(0,0,0);return function(u,l,c){const h=this.center,d=this.radius;u.subtract(h),l.subtract(h),c.subtract(h),t.assign(l).subtract(u),i.assign(c).subtract(u);const p=d*d,f=t.cross(i),g=e.dot(u,f);if(g*g>p*e.dot(f,f))return!1;const m=e.dot(u,u),_=e.dot(u,l),y=e.dot(u,c),x=e.dot(l,l),w=e.dot(l,c),b=e.dot(c,c);if(m>p&&_>m&&y>m||x>p&&_>x&&w>x||b>p&&y>b&&w>b)return!1;t.assign(l).subtract(u),n.assign(c).subtract(l),r.assign(u).subtract(c);const v=_-m,S=w-x,T=y-b,C=e.dot(t,t),N=e.dot(n,n),F=e.dot(r,r);o.assign(u).multiply(C).subtract(t.multiply(v)),s.assign(l).multiply(N).subtract(n.multiply(S)),a.assign(c).multiply(F).subtract(r.multiply(T));const O=c.multiply(C).subtract(o),E=u.multiply(N).subtract(s),D=l.multiply(F).subtract(a),M=e.dot(o,o)>p*C*C&&e.dot(o,O)>0,I=e.dot(s,s)>p*N*N&&e.dot(s,E)>0,V=e.dot(a,a)>p*F*F&&e.dot(a,D)>0;return!(M||I||V)}}(),toString:function(){return this.radius+" "+this.center.toString()}},t})),define("x_ite/Components/PointingDeviceSensor/SphereSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Triangle3","standard/Math/Geometry/Line3","standard/Math/Geometry/Plane3","standard/Math/Geometry/Sphere3"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";function d(e){n.call(this,e),this.addType(r.SphereSensor)}return d.prototype=Object.assign(Object.create(n.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"autoOffset",new e.SFBool(!0)),new t(r.inputOutput,"offset",new e.SFRotation),new t(r.outputOnly,"trackPoint_changed",new e.SFVec3f),new t(r.outputOnly,"rotation_changed",new e.SFRotation),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"SphereSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.modelViewMatrix=new a,this.invModelViewMatrix=new a,this.sphere=null,this.zPlane=null,this.behind=!1,this.fromVector=new o(0,0,0),this.startPoint=new o(0,0,0),this.startOffset=new s(0,0,1,0)},getTrackPoint:function(e,t,i){var n=new o(0,0,0);return!!this.sphere.intersectsLine(e,t,n)&&((o.subtract(e.point,n).abs()<o.subtract(e.point,t).abs())-i&&t.assign(n),!0)},set_active__:function(e,t,i,r,s){n.prototype.set_active__.call(this,e,t,i,r,s);try{if(this._isActive.getValue()){this.modelViewMatrix.assign(i),this.invModelViewMatrix.assign(i).inverse();var a=this.invModelViewMatrix.multVecMatrix(t.intersection.point.copy()),u=new o(0,0,0);this.zPlane=new c(u,this.invModelViewMatrix.multDirMatrix(new o(0,0,1)).normalize()),this.sphere=new h(a.abs(),u),this.behind=this.zPlane.getDistanceToPoint(a)<0,this.fromVector.assign(a),this.startPoint.assign(a),this.startOffset.assign(this._offset.getValue()),this._trackPoint_changed=a,this._rotation_changed=this._offset.getValue()}else this._autoOffset.getValue()&&(this._offset=this._rotation_changed)}catch(e){}},set_motion__:function(e){try{var t=e.hitRay.copy().multLineMatrix(this.invModelViewMatrix),i=new o(0,0,0);if(this.getTrackPoint(t,i,this.behind)){var n=this.invModelViewMatrix.multDirMatrix(new o(0,0,1)).normalize();this.zPlane=new c(i,n)}else{var r=new o(0,0,0);this.zPlane.intersectsLine(t,r),t=new l(r,o.subtract(this.sphere.center,r).normalize()),this.getTrackPoint(t,i,!1);var a=u.normal(this.sphere.center,i,this.startPoint,new o(0,0,0)),h=o.subtract(i,this.sphere.center).normalize(),d=o.cross(a,h).normalize(),p=o.subtract(i,d.multiply(o.subtract(r,i).abs()));t=new l(p,o.subtract(this.sphere.center,p).normalize()),this.getTrackPoint(t,i,!1)}this._trackPoint_changed=i;var f=o.subtract(i,this.sphere.center),g=new s(this.fromVector,f);this.behind&&g.inverse(),this._rotation_changed=s.multRight(this.startOffset,g)}catch(e){this._trackPoint_changed.addEvent(),this._rotation_changed.addEvent()}}}),d})),define("x_ite/Components/PointingDeviceSensor",["x_ite/Configuration/SupportedNodes","x_ite/Components/PointingDeviceSensor/CylinderSensor","x_ite/Components/PointingDeviceSensor/PlaneSensor","x_ite/Components/PointingDeviceSensor/SphereSensor","x_ite/Components/PointingDeviceSensor/TouchSensor","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode","x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode"],(function(e,t,i,n,r,o,s,a){"use strict";const u={CylinderSensor:t,PlaneSensor:i,SphereSensor:n,TouchSensor:r},l={X3DDragSensorNode:o,X3DPointingDeviceSensorNode:s,X3DTouchSensorNode:a};for(const t in u)e.addType(t,u[t]);for(const t in l)e.addAbstractType(t,l[t])})),define("x_ite/Components/Rendering/ClipPlane",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Geometry/Plane3","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=u(c);function c(){this.plane=new a(o.Zero,o.Zero)}function h(e){n.call(this,e),this.addType(r.ClipPlane),this.enabled=!1,this.plane=new s(0,0,0,0)}return c.prototype={constructor:c,isClipped:function(e){return this.plane.getDistanceToPoint(e)<0},set:function(e,t){const i=this.plane,n=e.plane;try{i.normal.assign(n),i.distanceFromOrigin=-n.w,i.multRight(t)}catch(e){i.normal.set(0,0,0),i.distanceFromOrigin=0}},setShaderUniforms:function(e,t){const i=this.plane,n=i.normal;e.uniform4f(t.x3d_ClipPlane[t.numClipPlanes++],n.x,n.y,n.z,i.distanceFromOrigin)},dispose:function(){l.push(this)}},h.prototype=Object.assign(Object.create(n.prototype),{constructor:h,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"plane",new e.SFVec4f(0,1,0,0))]),getTypeName:function(){return"ClipPlane"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this),this._plane.addInterest("set_enabled__",this),this.set_enabled__()},set_enabled__:function(){this.plane.assign(this._plane.getValue()),this.enabled=this._enabled.getValue()&&!this.plane.equals(s.Zero)},push:function(e){if(this.enabled){const t=l.pop();t.set(this,e.getModelViewMatrix().get()),e.getLocalObjects().push(t)}},pop:function(e){this.enabled&&e.getBrowser().getLocalObjects().push(e.getLocalObjects().pop())}}),h})),define("x_ite/Components/Rendering/ColorRGBA",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DColorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector4"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ColorRGBA),this.setTransparent(!0)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"color",new e.MFColorRGBA)]),getTypeName:function(){return"ColorRGBA"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"color"},initialize:function(){n.prototype.initialize.call(this),this._color.addInterest("set_color__",this),this.set_color__()},set_color__:function(){this.color=this._color.getValue(),this.length=this._color.length},addColor:function(e,t){if(e>=0&&e<this.length){const i=this.color;e*=4,t.push(i[e],i[e+1],i[e+2],i[e+3])}else if(this.length){const i=this.color;e=4*(this.length-1),t.push(i[e],i[e+1],i[e+2],i[e+3])}else t.push(1,1,1,1)},addColors:function(e,t){if(this.length){const r=this.color;for(var i=0,n=4*this.length;i<n;i+=4)e.push(r[i],r[i+1],r[i+2],r[i+3]);const o=r[i=4*(this.length-1)],s=r[i+1],a=r[i+2],u=r[i+2];for(i=n,n=4*t;i<n;i+=4)e.push(o,s,a,u)}else for(let i=0;i<t;++i)e.push(1,1,1,1)},getVectors:function(e){const t=this._color;for(var i=0,n=t.length;i<n;++i){const n=t[i];e[i]=new o(n.r,n.g,n.b,n.a)}return e.length=n,e}}),s})),define("x_ite/Components/Rendering/IndexedTriangleFanSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.IndexedTriangleFanSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_index",new e.MFInt32),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"index",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedTriangleFanSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index),this._index.addInterest("set_index__",this),this.set_index__()},set_index__:function(){const e=this._index,t=this.triangleIndex;t.length=0;for(let i=0,n=e.length;i<n;++i){const r=e[i];if(!(r<0)&&++i<n){let o=e[i];if(o<0)continue;for(++i;i<n;++i){const n=e[i];if(n<0)break;t.push(r,o,n),o=n}}}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering/IndexedTriangleSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.IndexedTriangleSet)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_index",new e.MFInt32),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"index",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedTriangleSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},getPolygonIndex:function(e){return this._index[e]},initialize:function(){n.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index)},build:function(){n.prototype.build.call(this,3,this._index.length,3,this._index.length)}}),o})),define("x_ite/Components/Rendering/IndexedTriangleStripSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.IndexedTriangleStripSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_index",new e.MFInt32),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"index",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedTriangleStripSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index),this._index.addInterest("set_index__",this),this.set_index__()},set_index__:function(){const e=this._index,t=this.triangleIndex;t.length=0;for(let i=0,n=e.length;i<n;++i){let r=e[i];if(!(r<0)&&++i<n){let o=e[i];if(o<0)continue;++i;for(let s=0;i<n;++i,++s){const n=e[i];if(n<0)break;t.push(r,o,n),1&s?o=n:r=n}}}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering/LineSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.LineSet),this.fogCoordNode=null,this.colorNode=null,this.coordNode=null}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"vertexCount",new e.MFInt32),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"LineSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._coord.addInterest("set_coord__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_coord__()},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const t of this._attrib){const i=r(o.X3DVertexAttributeNode,t);i&&e.push(i)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=r(o.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&(this.colorNode.removeInterest("requestRebuild",this),this.colorNode._transparent.removeInterest("set_transparent__",this)),this.colorNode=r(o.X3DColorNode,this._color),this.colorNode?(this.colorNode.addInterest("requestRebuild",this),this.colorNode._transparent.addInterest("set_transparent__",this),this.set_transparent__()):this.setTransparent(!1)},set_transparent__:function(){this.setTransparent(this.colorNode.getTransparent())},set_coord__:function(){this.coordNode&&this.coordNode.removeInterest("requestRebuild",this),this.coordNode=r(o.X3DCoordinateNode,this._coord),this.coordNode&&this.coordNode.addInterest("requestRebuild",this)},build:function(){if(!this.coordNode||this.coordNode.isEmpty())return;const e=this._vertexCount,t=this.getAttrib(),i=t.length,n=this.getAttribs(),r=this.fogCoordNode,o=this.colorNode,s=this.coordNode,a=this.getFogDepths(),u=this.getColors(),l=this.getVertices(),c=s.getSize();let h=0;for(let d of e){if(h+d>c)break;if(d>1){d=2*d-2;for(let e=0;e<d;++e,h+=1&e){for(let e=0;e<i;++e)t[e].addValue(h,n[e]);r&&r.addDepth(h,a),o&&o.addColor(h,u),s.addPoint(h,l)}++h}else h+=d}}}),s})),define("x_ite/Components/Rendering/X3DNormalNode",["x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DNormalNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Rendering/Normal",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DNormalNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.Normal)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"vector",new e.MFVec3f)]),getTypeName:function(){return"Normal"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"normal"},initialize:function(){n.prototype.initialize.call(this),this._vector.addInterest("set_vector__",this),this.set_vector__()},set_vector__:function(){this.vector=this._vector.getValue(),this.length=this._vector.length},set1Vector:function(e,t){this._vector[e]=t},get1Vector:function(e,t){if(e>=0&&e<this.length){const i=this.vector;return e*=3,t.set(i[e],i[e+1],i[e+2])}if(e>=0&&this.length){const i=this.vector;return e%=this.length,e*=3,t.set(i[e],i[e+1],i[e+2])}return t.set(0,0,0)},addVector:function(e,t){if(e>=0&&e<this.length){const i=this.vector;e*=3,t.push(i[e],i[e+1],i[e+2])}else{if(!(e>=0&&this.length))return t.push(0,0,0);{const i=this.vector;e%=this.length,e*=3,t.push(i[e],i[e+1],i[e+2])}}}}),s})),define("x_ite/Components/Rendering/X3DPointGeometryNode",["x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n){"use strict";function r(t){e.call(this,t);const i=this.getBrowser();this.setGeometryType(0),this.setPrimitiveMode(i.getContext().POINTS),this.setSolid(!1),this.setTransparent(!0)}return r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,intersectsLine:function(){const e=new i(0,0,0),n=new i(0,0,0),r=new i(0,0,0);return function(o,s,a,u){if(this.intersectsBBox(o,1)){const l=this.getVertices();for(let c=0,h=l.length;c<h;c+=4)if(e.set(l[c+0],l[c+1],l[c+2]),o.getPerpendicularVectorToPoint(e,n).abs()<.0033333333333333335*o.point.distance(e)){if(this.isClipped(a.multVecMatrix(r.assign(e)),s))continue;return u.push({texCoord:new t(0,0),normal:new i(0,0,0),point:e.copy()}),!0}}return!1}}(),intersectsBox:function(e,t,i){return!1},display:function(e,t){try{const i=t.browser,n=t.shapeNode.getAppearance(),r=n.shaderNode||i.getPointShader();if(r.getValid()){const i=n.blendModeNode,o=this.attribNodes,s=this.attribBuffers;i&&i.enable(e),r.enable(e),r.setLocalUniforms(e,t);for(let t=0,i=o.length;t<i;++t)o[t].enable(e,r,s[t]);this.fogCoords&&r.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&r.enableColorAttribute(e,this.colorBuffer),this.getMultiTexCoords().length&&r.enableTexCoordAttribute(e,this.texCoordBuffers,!0),r.enableVertexAttribute(e,this.vertexBuffer),e.drawArrays(this.primitiveMode,0,this.vertexCount);for(const t of o)t.disable(e,r);this.fogCoords&&r.disableFogDepthAttribute(e),this.colorMaterial&&r.disableColorAttribute(e),this.getMultiTexCoords().length&&r.disableTexCoordAttribute(e),i&&i.disable(e)}}catch(e){console.error(e)}},displayParticles:function(e,t,i,r){try{const o=t.browser,s=t.shapeNode.getAppearance(),a=s.shaderNode||this.getShader(o);if(a.getValid()){const o=s.blendModeNode,u=this.attribNodes,l=this.attribBuffers;o&&o.enable(e),a.enable(e),a.setLocalUniforms(e,t);for(let t=0,i=u.length;t<i;++t)u[t].enable(e,a,l[t]);this.fogCoords&&a.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&a.enableColorAttribute(e,this.colorBuffer),this.getMultiTexCoords().length&&a.enableTexCoordAttribute(e,this.texCoordBuffers),a.enableVertexAttribute(e,this.vertexBuffer);const c=t.modelViewMatrix,h=c[12],d=c[13],p=c[14],f=this.primitiveMode;for(let t=0;t<r;++t){const r=i[t];c[12]=h,c[13]=d,c[14]=p,n.prototype.translate.call(c,r.position),a.setParticle(e,r,c),e.drawArrays(f,0,this.vertexCount)}for(const t of u)t.disable(e,a);this.fogCoords&&a.disableFogDepthAttribute(e),this.colorMaterial&&a.disableColorAttribute(e),a.disableTexCoordAttribute(e),o&&o.disable(e)}}catch(e){console.error(e)}}}),r})),define("x_ite/Components/Rendering/PointSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DPointGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.PointSet),this.fogCoordNode=null,this.colorNode=null,this.coordNode=null}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"PointSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._coord.addInterest("set_coord__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_coord__()},getCoord:function(){return this.coordNode},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const t of this._attrib){const i=r(o.X3DVertexAttributeNode,t);i&&e.push(i)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=r(o.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&this.colorNode.removeInterest("requestRebuild",this),this.colorNode=r(o.X3DColorNode,this._color),this.colorNode&&this.colorNode.addInterest("requestRebuild",this)},set_coord__:function(){this.coordNode&&this.coordNode.removeInterest("requestRebuild",this),this.coordNode=r(o.X3DCoordinateNode,this._coord),this.coordNode&&this.coordNode.addInterest("requestRebuild",this)},build:function(){if(!this.coordNode||this.coordNode.isEmpty())return;const e=this.getAttrib(),t=e.length,i=this.getAttribs(),n=this.fogCoordNode,r=this.getFogDepths(),o=this.colorNode,s=this.getColors(),a=this.coordNode,u=this.getVertices(),l=a._point.length;for(let n=0;n<t;++n)for(let t=0;t<l;++t)e[n].addValue(t,i[n]);n&&n.addDepths(r,l),o&&o.addColors(s,l),a.addPoints(u,l)}}),s})),define("x_ite/Components/Rendering/TriangleFanSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.TriangleFanSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.inputOutput,"fanCount",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"TriangleFanSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._fanCount.addInterest("set_fanCount__",this),this.set_fanCount__()},set_fanCount__:function(){const e=this._fanCount,t=this.triangleIndex;t.length=0;let i=0;for(const n of e){for(let e=1,r=n-1;e<r;++e)t.push(i,i+e,i+e+1);i+=n}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering/TriangleSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.TriangleSet)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"TriangleSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},build:function(){this.getCoord()&&n.prototype.build.call(this,3,this.getCoord().getSize(),3,this.getCoord().getSize())},createNormals:function(e,t){return this.createFaceNormals(e,t)}}),o})),define("x_ite/Components/Rendering/TriangleStripSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.TriangleStripSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.inputOutput,"stripCount",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"TriangleStripSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._stripCount.addInterest("set_stripCount__",this),this.set_stripCount__()},set_stripCount__:function(){const e=this._stripCount,t=this.triangleIndex;t.length=0;let i=0;for(const n of e){for(let e=0,r=n-2;e<r;++e){const n=1&e;t.push(i+(n?e+1:e),i+(n?e:e+1),i+(e+2))}i+=n}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering",["x_ite/Configuration/SupportedNodes","x_ite/Components/Rendering/ClipPlane","x_ite/Components/Rendering/Color","x_ite/Components/Rendering/ColorRGBA","x_ite/Components/Rendering/Coordinate","x_ite/Components/Rendering/IndexedLineSet","x_ite/Components/Rendering/IndexedTriangleFanSet","x_ite/Components/Rendering/IndexedTriangleSet","x_ite/Components/Rendering/IndexedTriangleStripSet","x_ite/Components/Rendering/LineSet","x_ite/Components/Rendering/Normal","x_ite/Components/Rendering/PointSet","x_ite/Components/Rendering/TriangleFanSet","x_ite/Components/Rendering/TriangleSet","x_ite/Components/Rendering/TriangleStripSet","x_ite/Components/Rendering/X3DColorNode","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Components/Rendering/X3DCoordinateNode","x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Components/Rendering/X3DNormalNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w,b){"use strict";const v={ClipPlane:t,Color:i,ColorRGBA:n,Coordinate:r,IndexedLineSet:o,IndexedTriangleFanSet:s,IndexedTriangleSet:a,IndexedTriangleStripSet:u,LineSet:l,Normal:c,PointSet:h,TriangleFanSet:d,TriangleSet:p,TriangleStripSet:f},S={X3DColorNode:g,X3DComposedGeometryNode:m,X3DCoordinateNode:_,X3DGeometricPropertyNode:y,X3DGeometryNode:x,X3DLineGeometryNode:w,X3DNormalNode:b};for(const t in v)e.addType(t,v[t]);for(const t in S)e.addAbstractType(t,S[t])})),define("x_ite/Components/Shaders/X3DVertexAttributeNode",["x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DVertexAttributeNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Shaders/FloatVertexAttribute",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DVertexAttributeNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.FloatVertexAttribute)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"name",new e.SFString),new t(r.initializeOnly,"numComponents",new e.SFInt32(4)),new t(r.inputOutput,"value",new e.MFFloat)]),getTypeName:function(){return"FloatVertexAttribute"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"attrib"},initialize:function(){n.prototype.initialize.call(this),this._numComponents.addInterest("set_numComponents",this),this._value.addInterest("set_value",this),this.set_numComponents(),this.set_value()},set_numComponents:function(){this.numComponents=o.clamp(this._numComponents.getValue(),1,4)},set_value:function(){this.value=this._value.getValue(),this.length=this._value.length},addValue:function(e,t){const i=this.value;let n=e*this.numComponents,r=n+this.numComponents;if(r<=this.length)for(;n<r;++n)t.push(i[n]);else if(this.numComponents<=this.length)for(r=i.length,n=r-this.numComponents;n<r;++n)t.push(i[n]);else for(;n<r;++n)t.push(0)},enable:function(e,t,i){t.enableFloatAttrib(e,this._name.getValue(),i,this.numComponents)},disable:function(e,t){t.disableFloatAttrib(e,this._name.getValue())}}),s})),define("x_ite/Components/Shaders/Matrix3VertexAttribute",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DVertexAttributeNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.Matrix3VertexAttribute)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"name",new e.SFString),new t(r.inputOutput,"value",new e.MFMatrix3f)]),getTypeName:function(){return"Matrix3VertexAttribute"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"attrib"},initialize:function(){n.prototype.initialize.call(this),this._value.addInterest("set_value",this),this.set_value()},set_value:function(){this.value=this._value.getValue(),this.length=this._value.length},addValue:function(e,t){if(e<this.length)for(var i=this.value,n=(r=9*e)+9;r<n;++r)t.push(i[r]);else if(this.length)for(i=this.value,n=(r=9*(e=this.length-1))+9;r<n;++r)t.push(i[r]);else{i=o.Identity;for(var r=0;r<9;++r)t.push(i[r])}},enable:function(e,t,i){t.enableMatrix3Attrib(e,this._name.getValue(),i)},disable:function(e,t){t.disableMatrix3Attrib(e,this._name.getValue())}}),s})),define("x_ite/Components/Shaders/Matrix4VertexAttribute",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DVertexAttributeNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Matrix4VertexAttribute)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"name",new e.SFString),new t(r.inputOutput,"value",new e.MFMatrix4f)]),getTypeName:function(){return"Matrix4VertexAttribute"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"attrib"},initialize:function(){n.prototype.initialize.call(this),this._value.addInterest("set_value",this),this.set_value()},set_value:function(){this.value=this._value.getValue(),this.length=this._value.length},addValue:function(e,t){if(e<this.length)for(var i=this.value,n=(r=16*e)+16;r<n;++r)t.push(i[r]);else if(this.length)for(i=this.value,n=(r=16*(e=this.length-1))+16;r<n;++r)t.push(i[r]);else{i=Matrix4.Identity;for(var r=0;r<16;++r)t.push(i[r])}},enable:function(e,t,i){t.enableMatrix4Attrib(e,this._name.getValue(),i)},disable:function(e,t){t.disableMatrix4Attrib(e,this._name.getValue())}}),o})),define("x_ite/Components/Shaders/PackagedShader",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DShaderNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/Shaders/X3DProgrammableShaderObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),r.call(this,e),o.call(this,e),this.addType(s.PackagedShader)}return a.prototype=Object.assign(Object.create(n.prototype),r.prototype,o.prototype,{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOnly,"activate",new e.SFBool),new t(s.outputOnly,"isSelected",new e.SFBool),new t(s.outputOnly,"isValid",new e.SFBool),new t(s.initializeOnly,"language",new e.SFString),new t(s.inputOutput,"load",new e.SFBool(!0)),new t(s.inputOutput,"url",new e.MFString),new t(s.inputOutput,"autoRefresh",new e.SFTime),new t(s.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600))]),getTypeName:function(){return"PackagedShader"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"shaders"},getSourceText:function(){return this._url},requestImmediateLoad:function(e=!0){},requestUnload:function(){}}),a})),define("x_ite/Components/Shaders/ProgramShader",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DShaderNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.ProgramShader)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"activate",new e.SFBool),new t(r.outputOnly,"isSelected",new e.SFBool),new t(r.outputOnly,"isValid",new e.SFBool),new t(r.initializeOnly,"language",new e.SFString),new t(r.inputOutput,"programs",new e.MFNode)]),getTypeName:function(){return"ProgramShader"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"shaders"}}),o})),define("x_ite/Components/Shaders/ShaderProgram",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/Shaders/X3DProgrammableShaderObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),r.call(this,e),o.call(this,e),this.addType(s.ShaderProgram)}return a.prototype=Object.assign(Object.create(n.prototype),r.prototype,o.prototype,{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"type",new e.SFString("VERTEX")),new t(s.inputOutput,"load",new e.SFBool(!0)),new t(s.inputOutput,"url",new e.MFString),new t(s.inputOutput,"autoRefresh",new e.SFTime),new t(s.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600))]),getTypeName:function(){return"ShaderProgram"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"programs"},getSourceText:function(){return this._url},requestImmediateLoad:function(e=!0){},requestUnload:function(){}}),a})),define("x_ite/Components/Shaders",["x_ite/Configuration/SupportedNodes","x_ite/Components/Shaders/ComposedShader","x_ite/Components/Shaders/FloatVertexAttribute","x_ite/Components/Shaders/Matrix3VertexAttribute","x_ite/Components/Shaders/Matrix4VertexAttribute","x_ite/Components/Shaders/PackagedShader","x_ite/Components/Shaders/ProgramShader","x_ite/Components/Shaders/ShaderPart","x_ite/Components/Shaders/ShaderProgram","x_ite/Components/Shaders/X3DProgrammableShaderObject","x_ite/Components/Shaders/X3DShaderNode","x_ite/Components/Shaders/X3DVertexAttributeNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";const d={ComposedShader:t,FloatVertexAttribute:i,Matrix3VertexAttribute:n,Matrix4VertexAttribute:r,PackagedShader:o,ProgramShader:s,ShaderPart:a,ShaderProgram:u},p={X3DProgrammableShaderObject:l,X3DShaderNode:c,X3DVertexAttributeNode:h};for(const t in d)e.addType(t,d[t]);for(const t in p)e.addAbstractType(t,p[t])})),define("x_ite/Components/Shape/AcousticProperties",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.AcousticProperties)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"absorption",new e.SFFloat),new t(r.inputOutput,"refraction",new e.SFFloat),new t(r.inputOutput,"diffuse",new e.SFFloat),new t(r.inputOutput,"specular",new e.SFFloat)]),getTypeName:function(){return"AcousticProperties"},getComponentName:function(){return"Shape"},getContainerField:function(){return"AcousticProperties"}}),o})),define("x_ite/Components/Shape/Material",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DOneSidedMaterialNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(o.Material),this.diffuseColor=new Float32Array(3),this.specularColor=new Float32Array(3),this.shaderNode=this.getBrowser().getDefaultShader()}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"ambientIntensity",new e.SFFloat(.2)),new t(o.inputOutput,"ambientTexture",new e.SFNode),new t(o.inputOutput,"ambientTextureMapping",new e.SFString),new t(o.inputOutput,"diffuseColor",new e.SFColor(.8,.8,.8)),new t(o.inputOutput,"diffuseTexture",new e.SFNode),new t(o.inputOutput,"diffuseTextureMapping",new e.SFString),new t(o.inputOutput,"specularColor",new e.SFColor),new t(o.inputOutput,"specularTexture",new e.SFNode),new t(o.inputOutput,"specularTextureMapping",new e.SFString),new t(o.inputOutput,"emissiveColor",new e.SFColor),new t(o.inputOutput,"emissiveTexture",new e.SFNode),new t(o.inputOutput,"emissiveTextureMapping",new e.SFString),new t(o.inputOutput,"shininess",new e.SFFloat(.2)),new t(o.inputOutput,"shininessTexture",new e.SFNode),new t(o.inputOutput,"shininessTextureMapping",new e.SFString),new t(o.inputOutput,"occlusionStrength",new e.SFFloat(1)),new t(o.inputOutput,"occlusionTexture",new e.SFNode),new t(o.inputOutput,"occlusionTextureMapping",new e.SFString),new t(o.inputOutput,"normalScale",new e.SFFloat(1)),new t(o.inputOutput,"normalTexture",new e.SFNode),new t(o.inputOutput,"normalTextureMapping",new e.SFString),new t(o.inputOutput,"transparency",new e.SFFloat)]),getTypeName:function(){return"Material"},getComponentName:function(){return"Shape"},getContainerField:function(){return"material"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._ambientIntensity.addInterest("set_ambientIntensity__",this),this._ambientTexture.addInterest("set_ambientTexture__",this),this._diffuseColor.addInterest("set_diffuseColor__",this),this._diffuseTexture.addInterest("set_diffuseTexture__",this),this._specularColor.addInterest("set_specularColor__",this),this._specularTexture.addInterest("set_specularTexture__",this),this._shininess.addInterest("set_shininess__",this),this._shininessTexture.addInterest("set_shininessTexture__",this),this._occlusionStrength.addInterest("set_occlusionStrength__",this),this._occlusionTexture.addInterest("set_occlusionTexture__",this),this.set_live__(),this.set_ambientIntensity__(),this.set_ambientTexture__(),this.set_diffuseColor__(),this.set_diffuseTexture__(),this.set_specularColor__(),this.set_specularTexture__(),this.set_shininess__(),this.set_shininessTexture__(),this.set_occlusionStrength__(),this.set_occlusionTexture__(),this.set_transparent__()},set_live__:function(){this.isLive().getValue()?this.getBrowser().getBrowserOptions()._Shading.addInterest("set_shading__",this):this.getBrowser().getBrowserOptions()._Shading.removeInterest("set_shading__",this),this.set_shading__()},set_ambientIntensity__:function(){this.ambientIntensity=s.clamp(this._ambientIntensity.getValue(),0,1)},set_ambientTexture__:function(){this.ambientTextureNode=r(o.X3DSingleTextureNode,this._ambientTexture),this.setTexture(this.getTextureIndices().AMBIENT_TEXTURE,this.ambientTextureNode)},set_diffuseColor__:function(){const e=this.diffuseColor,t=this._diffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_diffuseTexture__:function(){this.diffuseTextureNode&&this.diffuseTextureNode._transparent.removeInterest("set_transparent__",this),this.diffuseTextureNode=r(o.X3DSingleTextureNode,this._diffuseTexture),this.diffuseTextureNode&&this.diffuseTextureNode._transparent.addInterest("set_transparent__",this),this.setTexture(this.getTextureIndices().DIFFUSE_TEXTURE,this.diffuseTextureNode)},set_specularColor__:function(){const e=this.specularColor,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_specularTexture__:function(){this.specularTextureNode=r(o.X3DSingleTextureNode,this._specularTexture),this.setTexture(this.getTextureIndices().SPECULAR_TEXTURE,this.specularTextureNode)},set_shininess__:function(){this.shininess=s.clamp(this._shininess.getValue(),0,1)},set_shininessTexture__:function(){this.shininessTextureNode=r(o.X3DSingleTextureNode,this._shininessTexture),this.setTexture(this.getTextureIndices().SHININESS_TEXTURE,this.shininessTextureNode)},set_occlusionStrength__:function(){this.occlusionStrength=s.clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__:function(){this.occlusionTextureNode=r(o.X3DSingleTextureNode,this._occlusionTexture),this.setTexture(this.getTextureIndices().OCCLUSION_TEXTURE,this.occlusionTextureNode)},set_transparent__:function(){this.setTransparent(Boolean(this.getTransparency()||this.diffuseTextureNode&&this.diffuseTextureNode.getTransparent()))},set_textures__:function(){if(this.getTextures()){const e=this.getBrowser(),t=["X3D_MATERIAL_TEXTURES"];this.ambientTextureNode&&t.push("X3D_AMBIENT_TEXTURE","X3D_AMBIENT_TEXTURE_"+this.ambientTextureNode.getTextureTypeString()),this.diffuseTextureNode&&t.push("X3D_DIFFUSE_TEXTURE","X3D_DIFFUSE_TEXTURE_"+this.diffuseTextureNode.getTextureTypeString()),this.specularTextureNode&&t.push("X3D_SPECULAR_TEXTURE","X3D_SPECULAR_TEXTURE_"+this.specularTextureNode.getTextureTypeString()),this.getEmissiveTexture()&&t.push("X3D_EMISSIVE_TEXTURE","X3D_EMISSIVE_TEXTURE_"+this.getEmissiveTexture().getTextureTypeString()),this.shininessTextureNode&&t.push("X3D_SHININESS_TEXTURE","X3D_SHININESS_TEXTURE_"+this.shininessTextureNode.getTextureTypeString()),this.occlusionTextureNode&&t.push("X3D_OCCLUSION_TEXTURE","X3D_OCCLUSION_TEXTURE_"+this.occlusionTextureNode.getTextureTypeString()),this.getNormalTexture()&&t.push("X3D_NORMAL_TEXTURE","X3D_NORMAL_TEXTURE_"+this.getNormalTexture().getTextureTypeString());const i=e.createShader("MaterialTexturesShader","Phong",t);i._isValid.addInterest("set_shader__",this,i)}else this.set_shading__()},set_shader__:function(e){e._isValid.removeInterest("set_shader__",this),this.shaderNode=e},set_shading__:function(){if(this.getTextures())return;const e=this.getBrowser().getDefaultShader();e._isValid.getValue()?this.shaderNode=e:e._isValid.addInterest("set_shader__",this,e)},getTextureIndices:function(){const e={AMBIENT_TEXTURE:0,DIFFUSE_TEXTURE:1,SPECULAR_TEXTURE:2,EMISSIVE_TEXTURE:3,SHININESS_TEXTURE:4,OCCLUSION_TEXTURE:5,NORMAL_TEXTURE:6};return function(){return e}}(),getShader:function(e,t){return t?e.getShadowShader():this.shaderNode},setShaderUniforms:function(e,t,i,r,o){if(n.prototype.setShaderUniforms.call(this,e,t,i,r,o),e.uniform1f(t.x3d_AmbientIntensity,this.ambientIntensity),e.uniform3fv(t.x3d_DiffuseColor,this.diffuseColor),e.uniform3fv(t.x3d_SpecularColor,this.specularColor),e.uniform1f(t.x3d_Shininess,this.shininess),this.getTextures()){const n=t.x3d_AmbientTexture,s=t.x3d_DiffuseTexture,a=t.x3d_SpecularTexture,u=t.x3d_ShininessTexture,l=t.x3d_OcclusionTexture;this.ambientTextureNode&&(this.ambientTextureNode.setShaderUniformsToChannel(e,t,i,n),e.uniform1i(n.textureTransformMapping,r.get(this._ambientTextureMapping.getValue())||0),e.uniform1i(n.textureCoordinateMapping,o.get(this._ambientTextureMapping.getValue())||0)),this.diffuseTextureNode&&(this.diffuseTextureNode.setShaderUniformsToChannel(e,t,i,s),e.uniform1i(s.textureTransformMapping,r.get(this._diffuseTextureMapping.getValue())||0),e.uniform1i(s.textureCoordinateMapping,o.get(this._diffuseTextureMapping.getValue())||0)),this.specularTextureNode&&(this.specularTextureNode.setShaderUniformsToChannel(e,t,i,a),e.uniform1i(a.textureTransformMapping,r.get(this._specularTextureMapping.getValue())||0),e.uniform1i(a.textureCoordinateMapping,o.get(this._specularTextureMapping.getValue())||0)),this.shininessTextureNode&&(this.shininessTextureNode.setShaderUniformsToChannel(e,t,i,u),e.uniform1i(u.textureTransformMapping,r.get(this._shininessTextureMapping.getValue())||0),e.uniform1i(u.textureCoordinateMapping,o.get(this._shininessTextureMapping.getValue())||0)),this.occlusionTextureNode&&(e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode.setShaderUniformsToChannel(e,t,i,l),e.uniform1i(l.textureTransformMapping,r.get(this._occlusionTextureMapping.getValue())||0),e.uniform1i(l.textureCoordinateMapping,o.get(this._occlusionTextureMapping.getValue())||0))}}}),a})),define("x_ite/Components/Shape/PhysicalMaterial",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DOneSidedMaterialNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(o.PhysicalMaterial),this.baseColor=new Float32Array(3)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"baseColor",new e.SFColor(1,1,1)),new t(o.inputOutput,"baseTexture",new e.SFNode),new t(o.inputOutput,"baseTextureMapping",new e.SFString),new t(o.inputOutput,"emissiveColor",new e.SFColor(0,0,0)),new t(o.inputOutput,"emissiveTexture",new e.SFNode),new t(o.inputOutput,"emissiveTextureMapping",new e.SFString),new t(o.inputOutput,"metallic",new e.SFFloat(1)),new t(o.inputOutput,"roughness",new e.SFFloat(1)),new t(o.inputOutput,"metallicRoughnessTexture",new e.SFNode),new t(o.inputOutput,"metallicRoughnessTextureMapping",new e.SFString),new t(o.inputOutput,"occlusionStrength",new e.SFFloat(1)),new t(o.inputOutput,"occlusionTexture",new e.SFNode),new t(o.inputOutput,"occlusionTextureMapping",new e.SFString),new t(o.inputOutput,"normalScale",new e.SFFloat(1)),new t(o.inputOutput,"normalTexture",new e.SFNode),new t(o.inputOutput,"normalTextureMapping",new e.SFString),new t(o.inputOutput,"transparency",new e.SFFloat)]),getTypeName:function(){return"PhysicalMaterial"},getComponentName:function(){return"Shape"},getContainerField:function(){return"material"},initialize:function(){n.prototype.initialize.call(this),this.shaderNode=this.getBrowser().getPhysicalMaterialShader(),this._baseColor.addInterest("set_baseColor__",this),this._baseTexture.addInterest("set_baseTexture__",this),this._metallic.addInterest("set_metallic__",this),this._roughness.addInterest("set_roughness__",this),this._metallicRoughnessTexture.addInterest("set_metallicRoughnessTexture__",this),this._occlusionStrength.addInterest("set_occlusionStrength__",this),this._occlusionTexture.addInterest("set_occlusionTexture__",this),this.set_baseColor__(),this.set_baseTexture__(),this.set_metallic__(),this.set_roughness__(),this.set_metallicRoughnessTexture__(),this.set_occlusionStrength__(),this.set_occlusionTexture__(),this.set_transparent__()},set_baseColor__:function(){const e=this.baseColor,t=this._baseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_baseTexture__:function(){this.baseTextureNode&&this.baseTextureNode._transparent.removeInterest("set_transparent__",this),this.baseTextureNode=r(o.X3DSingleTextureNode,this._baseTexture),this.setTexture(this.getTextureIndices().BASE_TEXTURE,this.baseTextureNode),this.baseTextureNode&&this.baseTextureNode._transparent.addInterest("set_transparent__",this)},set_metallic__:function(){this.metallic=s.clamp(this._metallic.getValue(),0,1)},set_roughness__:function(){this.roughness=s.clamp(this._roughness.getValue(),0,1)},set_metallicRoughnessTexture__:function(){this.metallicRoughnessTextureNode=r(o.X3DSingleTextureNode,this._metallicRoughnessTexture),this.setTexture(this.getTextureIndices().METALLIC_ROUGHNESS_TEXTURE,this.metallicRoughnessTextureNode)},set_occlusionStrength__:function(){this.occlusionStrength=s.clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__:function(){this.occlusionTextureNode=r(o.X3DSingleTextureNode,this._occlusionTexture),this.setTexture(this.getTextureIndices().OCCLUSION_TEXTURE,this.occlusionTextureNode)},set_transparent__:function(){this.setTransparent(Boolean(this.getTransparency()||this.baseTextureNode&&this.baseTextureNode.getTransparent()))},set_textures__:function(){const e=this.getBrowser();if(this.getTextures()){const t=["X3D_MATERIAL_TEXTURES"];this.baseTextureNode&&t.push("X3D_BASE_TEXTURE","X3D_BASE_TEXTURE_"+this.baseTextureNode.getTextureTypeString()),this.getEmissiveTexture()&&t.push("X3D_EMISSIVE_TEXTURE","X3D_EMISSIVE_TEXTURE_"+this.getEmissiveTexture().getTextureTypeString()),this.metallicRoughnessTextureNode&&t.push("X3D_METALLIC_ROUGHNESS_TEXTURE","X3D_METALLIC_ROUGHNESS_TEXTURE_"+this.metallicRoughnessTextureNode.getTextureTypeString()),this.occlusionTextureNode&&t.push("X3D_OCCLUSION_TEXTURE","X3D_OCCLUSION_TEXTURE_"+this.occlusionTextureNode.getTextureTypeString()),this.getNormalTexture()&&t.push("X3D_NORMAL_TEXTURE","X3D_NORMAL_TEXTURE_"+this.getNormalTexture().getTextureTypeString());const i=e.createShader("PhysicalMaterialTexturesShader","PBR",t);i._isValid.addInterest("set_shader__",this,i)}else this.shaderNode=e.getPhysicalMaterialShader()},set_shader__:function(e){e._isValid.removeInterest("set_shader__",this),this.shaderNode=e},getTextureIndices:function(){const e={BASE_TEXTURE:0,EMISSIVE_TEXTURE:1,METALLIC_ROUGHNESS_TEXTURE:2,OCCLUSION_TEXTURE:3,NORMAL_TEXTURE:4};return function(){return e}}(),getShader:function(e,t){return this.shaderNode},setShaderUniforms:function(e,t,i,r,o){if(n.prototype.setShaderUniforms.call(this,e,t,i,r,o),e.uniform3fv(t.x3d_BaseColor,this.baseColor),e.uniform1f(t.x3d_Metallic,this.metallic),e.uniform1f(t.x3d_Roughness,this.roughness),this.getTextures()){const n=t.x3d_BaseTexture,s=t.x3d_MetallicRoughnessTexture,a=t.x3d_OcclusionTexture;this.baseTextureNode&&(this.baseTextureNode.setShaderUniformsToChannel(e,t,i,n),e.uniform1i(n.textureTransformMapping,r.get(this._baseTextureMapping.getValue())||0),e.uniform1i(n.textureCoordinateMapping,o.get(this._baseTextureMapping.getValue())||0)),this.metallicRoughnessTextureNode&&(this.metallicRoughnessTextureNode.setShaderUniformsToChannel(e,t,i,s),e.uniform1i(s.textureTransformMapping,r.get(this._metallicRoughnessTextureMapping.getValue())||0),e.uniform1i(s.textureCoordinateMapping,o.get(this._metallicRoughnessTextureMapping.getValue())||0)),this.occlusionTextureNode&&(e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode.setShaderUniformsToChannel(e,t,i,a),e.uniform1i(a.textureTransformMapping,r.get(this._occlusionTextureMapping.getValue())||0),e.uniform1i(a.textureCoordinateMapping,o.get(this._occlusionTextureMapping.getValue())||0))}}}),a})),define("x_ite/Components/Shape/TwoSidedMaterial",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DMaterialNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.TwoSidedMaterial),this.diffuseColor=new Float32Array(3),this.specularColor=new Float32Array(3),this.emissiveColor=new Float32Array(3),this.backDiffuseColor=new Float32Array(3),this.backSpecularColor=new Float32Array(3),this.backEmissiveColor=new Float32Array(3)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"separateBackColor",new e.SFBool),new t(r.inputOutput,"ambientIntensity",new e.SFFloat(.2)),new t(r.inputOutput,"diffuseColor",new e.SFColor(.8,.8,.8)),new t(r.inputOutput,"specularColor",new e.SFColor),new t(r.inputOutput,"emissiveColor",new e.SFColor),new t(r.inputOutput,"shininess",new e.SFFloat(.2)),new t(r.inputOutput,"transparency",new e.SFFloat),new t(r.inputOutput,"backAmbientIntensity",new e.SFFloat(.2)),new t(r.inputOutput,"backDiffuseColor",new e.SFColor(.8,.8,.8)),new t(r.inputOutput,"backSpecularColor",new e.SFColor),new t(r.inputOutput,"backEmissiveColor",new e.SFColor),new t(r.inputOutput,"backShininess",new e.SFFloat(.2)),new t(r.inputOutput,"backTransparency",new e.SFFloat)]),getTypeName:function(){return"TwoSidedMaterial"},getComponentName:function(){return"Shape"},getContainerField:function(){return"material"},initialize:function(){n.prototype.initialize.call(this),this._ambientIntensity.addInterest("set_ambientIntensity__",this),this._diffuseColor.addInterest("set_diffuseColor__",this),this._specularColor.addInterest("set_specularColor__",this),this._emissiveColor.addInterest("set_emissiveColor__",this),this._shininess.addInterest("set_shininess__",this),this._transparency.addInterest("set_transparency__",this),this._backAmbientIntensity.addInterest("set_backAmbientIntensity__",this),this._backDiffuseColor.addInterest("set_backDiffuseColor__",this),this._backSpecularColor.addInterest("set_backSpecularColor__",this),this._backEmissiveColor.addInterest("set_backEmissiveColor__",this),this._backShininess.addInterest("set_backShininess__",this),this._backTransparency.addInterest("set_backTransparency__",this),this._separateBackColor.addInterest("set_transparent__",this),this._transparency.addInterest("set_transparent__",this),this._backTransparency.addInterest("set_transparent__",this),this.set_ambientIntensity__(),this.set_diffuseColor__(),this.set_specularColor__(),this.set_emissiveColor__(),this.set_shininess__(),this.set_transparency__(),this.set_backAmbientIntensity__(),this.set_backDiffuseColor__(),this.set_backSpecularColor__(),this.set_backEmissiveColor__(),this.set_backShininess__(),this.set_backTransparency__(),this.set_transparent__()},set_ambientIntensity__:function(){this.ambientIntensity=Math.max(this._ambientIntensity.getValue(),0)},set_diffuseColor__:function(){const e=this.diffuseColor,t=this._diffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_specularColor__:function(){const e=this.specularColor,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_emissiveColor__:function(){const e=this.emissiveColor,t=this._emissiveColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_shininess__:function(){this.shininess=o.clamp(this._shininess.getValue(),0,1)},set_transparency__:function(){this.transparency=o.clamp(this._transparency.getValue(),0,1)},set_backAmbientIntensity__:function(){this.backAmbientIntensity=Math.max(this._backAmbientIntensity.getValue(),0)},set_backDiffuseColor__:function(){const e=this.backDiffuseColor,t=this._backDiffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_backSpecularColor__:function(){const e=this.backSpecularColor,t=this._backSpecularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_backEmissiveColor__:function(){const e=this.backEmissiveColor,t=this._backEmissiveColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_backShininess__:function(){this.backShininess=o.clamp(this._backShininess.getValue(),0,1)},set_backTransparency__:function(){this.backTransparency=o.clamp(this._backTransparency.getValue(),0,1)},set_transparent__:function(){this.setTransparent(Boolean(this._transparency.getValue()||this._separateBackColor.getValue()&&this._backTransparency.getValue()))},getShader:function(e,t){return t?e.getShadowShader():e.getDefaultShader()},setShaderUniforms:function(e,t,i,n,r,o){!o&&this._separateBackColor.getValue()?(e.uniform1f(t.x3d_AmbientIntensity,this.backAmbientIntensity),e.uniform3fv(t.x3d_DiffuseColor,this.backDiffuseColor),e.uniform3fv(t.x3d_SpecularColor,this.backSpecularColor),e.uniform3fv(t.x3d_EmissiveColor,this.backEmissiveColor),e.uniform1f(t.x3d_Shininess,this.backShininess),e.uniform1f(t.x3d_Transparency,this.backTransparency)):(e.uniform1f(t.x3d_AmbientIntensity,this.ambientIntensity),e.uniform3fv(t.x3d_DiffuseColor,this.diffuseColor),e.uniform3fv(t.x3d_SpecularColor,this.specularColor),e.uniform3fv(t.x3d_EmissiveColor,this.emissiveColor),e.uniform1f(t.x3d_Shininess,this.shininess),e.uniform1f(t.x3d_Transparency,this.transparency))}}),s})),define("x_ite/Components/Shape",["x_ite/Configuration/SupportedNodes","x_ite/Components/Shape/AcousticProperties","x_ite/Components/Shape/Appearance","x_ite/Components/Shape/FillProperties","x_ite/Components/Shape/LineProperties","x_ite/Components/Shape/Material","x_ite/Components/Shape/PhysicalMaterial","x_ite/Components/Shape/PointProperties","x_ite/Components/Shape/Shape","x_ite/Components/Shape/TwoSidedMaterial","x_ite/Components/Shape/UnlitMaterial","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Components/Shape/X3DAppearanceNode","x_ite/Components/Shape/X3DMaterialNode","x_ite/Components/Shape/X3DOneSidedMaterialNode","x_ite/Components/Shape/X3DShapeNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g){"use strict";const m={AcousticProperties:t,Appearance:i,FillProperties:n,LineProperties:r,Material:o,PhysicalMaterial:s,PointProperties:a,Shape:u,TwoSidedMaterial:l,UnlitMaterial:c},_={X3DAppearanceChildNode:h,X3DAppearanceNode:d,X3DMaterialNode:p,X3DOneSidedMaterialNode:f,X3DShapeNode:g};for(const t in m)e.addType(t,m[t]);for(const t in _)e.addAbstractType(t,_[t])})),define("x_ite/Components/Sound/X3DSoundSourceNode",["x_ite/Fields","x_ite/Components/Core/X3DChildNode","x_ite/Components/Time/X3DTimeDependentNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r){"use strict";function o(e){t.call(this,e),i.call(this,e),this.addType(n.X3DSoundSourceNode),this.volume=0,this.media=null}return o.prototype=Object.assign(Object.create(t.prototype),i.prototype,{constructor:o,initialize:function(){t.prototype.initialize.call(this),i.prototype.initialize.call(this)},set_live__:function(){i.prototype.set_live__.call(this),this.getDisabled()?(this.getBrowser()._volume.removeInterest("set_volume__",this),this.getBrowser()._mute.removeInterest("set_volume__",this)):(this.getBrowser()._volume.addInterest("set_volume__",this),this.getBrowser()._mute.addInterest("set_volume__",this),this.set_volume__())},setMedia:function(e){if(this.media&&(this.media[0].volume=0,this.media[0].pause()),this.media=e,e){const t=e[0];t.loop=this._loop.getValue(),this.setVolume(0),this._duration_changed=t.duration,this.resetElapsedTime(),this._isActive.getValue()?this._isPaused.getValue()?this.set_pause():this.getLiveState()?this.set_start():this.set_pause():this.set_stop()}},getMedia:function(){return this.media},setVolume:function(e){this.volume=r.clamp(e,0,1),this.set_volume__()},set_loop:function(){this.media&&(this.media[0].loop=this._loop.getValue())},set_volume__:function(){if(!this.media)return;const e=!this.getBrowser()._mute.getValue()*r.clamp(this.getBrowser()._volume.getValue(),0,1)*this.volume;this.media[0].volume=e},set_speed:function(){},set_pitch:function(){},set_start:function(){this.media&&this._speed.getValue()&&(this.media[0].currentTime=0,this.media[0].play())},set_pause:function(){this.media&&this.media[0].pause()},set_resume:function(){this.media&&this._speed.getValue()&&this.media[0].play()},set_stop:function(){this.media&&this.media[0].pause()},set_ended:function(){if(this.media){const e=this.media[0];if(e.currentTime<e.duration)return;this._loop.getValue()||this.stop()}},set_time:function(){this.media&&(this._elapsedTime=this.getElapsedTime()),this.set_ended()}}),o})),define("x_ite/Components/Sound/AudioClip",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Sound/X3DSoundSourceNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a){"use strict";function u(i){r.call(this,i),o.call(this,i),this.addType(s.AudioClip),this.addChildObjects("speed",new t.SFFloat(1)),this.audio=e("<audio></audio>"),this.urlStack=new t.MFString}return u.prototype=Object.assign(Object.create(r.prototype),o.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(s.inputOutput,"metadata",new t.SFNode),new i(s.inputOutput,"description",new t.SFString),new i(s.inputOutput,"enabled",new t.SFBool(!0)),new i(s.inputOutput,"load",new t.SFBool(!0)),new i(s.inputOutput,"url",new t.MFString),new i(s.inputOutput,"autoRefresh",new t.SFTime),new i(s.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(s.inputOutput,"gain",new t.SFFloat(1)),new i(s.inputOutput,"pitch",new t.SFFloat(1)),new i(s.inputOutput,"loop",new t.SFBool),new i(s.inputOutput,"startTime",new t.SFTime),new i(s.inputOutput,"resumeTime",new t.SFTime),new i(s.inputOutput,"pauseTime",new t.SFTime),new i(s.inputOutput,"stopTime",new t.SFTime),new i(s.outputOnly,"isPaused",new t.SFBool),new i(s.outputOnly,"isActive",new t.SFBool),new i(s.outputOnly,"elapsedTime",new t.SFTime),new i(s.outputOnly,"duration_changed",new t.SFTime(-1))]),getTypeName:function(){return"AudioClip"},getComponentName:function(){return"Sound"},getContainerField:function(){return"source"},initialize:function(){r.prototype.initialize.call(this),o.prototype.initialize.call(this),this.audio.on("error",this.setError.bind(this)),this.audio[0].preload="auto",this.audio[0].volume=0,this.audio[0].crossOrigin="Anonymous",this.requestImmediateLoad()},getElement:function(){return this.audio[0]},set_live__:function(){r.prototype.set_live__.call(this),o.prototype.set_live__.call(this)},unloadNow:function(){this.setMedia(null)},loadNow:function(){this.setMedia(null),this.urlStack.setValue(this._url),this.audio.bind("canplaythrough",this.setAudio.bind(this)),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.audio.unbind("canplaythrough"),this._duration_changed=-1,void this.setLoadState(s.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.audio.attr("src",this.URL.href),this.audio.get(0).load()},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading audio:",decodeURI(this.URL.href)),this.loadNext()},setAudio:function(){a&&"data:"!==this.URL.protocol&&console.info("Done loading audio:",decodeURI(this.URL.href)),this.audio.unbind("canplaythrough"),this.setMedia(this.audio),this.setLoadState(s.COMPLETE_STATE)}}),u})),define("x_ite/Components/Sound/X3DSoundNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DSoundNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Sound/Sound",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Sound/X3DSoundNode","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3","standard/Math/Geometry/Sphere3","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d){"use strict";function p(t){n.call(this,t),this.addType(s.Sound),this.addChildObjects("traversed",new e.SFBool(!0)),this._location.setUnit("length"),this._minBack.setUnit("length"),this._minFront.setUnit("length"),this._maxBack.setUnit("length"),this._maxFront.setUnit("length"),this.currentTraversed=!0}return p.prototype=Object.assign(Object.create(n.prototype),{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"intensity",new e.SFFloat(1)),new t(s.initializeOnly,"spatialize",new e.SFBool(!0)),new t(s.inputOutput,"location",new e.SFVec3f),new t(s.inputOutput,"direction",new e.SFVec3f(0,0,1)),new t(s.inputOutput,"minBack",new e.SFFloat(1)),new t(s.inputOutput,"minFront",new e.SFFloat(1)),new t(s.inputOutput,"maxBack",new e.SFFloat(10)),new t(s.inputOutput,"maxFront",new e.SFFloat(10)),new t(s.inputOutput,"priority",new e.SFFloat),new t(s.inputOutput,"source",new e.SFNode)]),getTypeName:function(){return"Sound"},getComponentName:function(){return"Sound"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._traversed.addInterest("set_live__",this),this._source.addInterest("set_source__",this),this.set_live__(),this.set_source__()},setTraversed:function(e){e?!1===this._traversed.getValue()&&(this._traversed=!0):this.currentTraversed!==this._traversed.getValue()&&(this._traversed=this.currentTraversed),this.currentTraversed=e},getTraversed:function(){return this.currentTraversed},set_live__:function(){this.isLive().getValue()&&this._traversed.getValue()?this.getBrowser().sensorEvents().addInterest("update",this):this.getBrowser().sensorEvents().removeInterest("update",this)},set_source__:function(){this.sourceNode&&this.sourceNode.setVolume(0),this.sourceNode=r(s.X3DSoundSourceNode,this._source)},update:function(){this.getTraversed()||this.sourceNode&&this.sourceNode.setVolume(0),this.setTraversed(!1)},traverse:function(){const e={distance:0,intersection:new a(0,0,0)},t={distance:0,intersection:new a(0,0,0)};return function(i,n){try{if(i!==o.DISPLAY)return;if(!this.sourceNode)return;if(!this.sourceNode._isActive.getValue()||this.sourceNode._isPaused.getValue())return;this.setTraversed(!0);const r=n.getModelViewMatrix().get();if(this.getEllipsoidParameter(r,Math.max(this._maxBack.getValue(),0),Math.max(this._maxFront.getValue(),0),t),t.distance<1)if(this.getEllipsoidParameter(r,Math.max(this._minBack.getValue(),0),Math.max(this._minFront.getValue(),0),e),e.distance<1)this.sourceNode.setVolume(this._intensity.getValue());else{const i=t.intersection.abs(),n=t.intersection.distance(e.intersection),r=Math.min(i/n,1),o=d.clamp(this._intensity.getValue(),0,1)*r;this.sourceNode.setVolume(o)}else this.sourceNode.setVolume(0)}catch(e){this.sourceNode&&this.sourceNode.setVolume(0)}}}(),getEllipsoidParameter:function(){const e=new a(0,0,0),t=new l,i=new l,n=new u,r=new a(1,1,1),o=new h(1,a.Zero),s=new a(0,0,0),d=new c(a.Zero,a.zAxis),p=new a(0,0,0),f=new a(0,0,0);return function(u,l,c,h){if(0==l||0==c)return t.multVecMatrix(h.intersection.assign(this._location.getValue())),void(h.distance=1);const g=(l+c)/2,m=g-l,_=Math.sqrt(g*g-m*m);e.set(0,0,m),r.set(_,_,g),n.setFromToVec(a.zAxis,this._direction.getValue()),t.assign(u).translate(this._location.getValue()).rotate(n).translate(e).scale(r),i.assign(t).inverse();const y=i.origin;e.negate().divVec(r),s.assign(e).subtract(y).normalize(),d.set(y,s),o.intersectsLine(d,p,f),h.intersection.assign(t.multVecMatrix(p)),h.distance=y.abs()}}()}),p})),define("x_ite/Components/Sound",["x_ite/Configuration/SupportedNodes","x_ite/Components/Sound/AudioClip","x_ite/Components/Sound/Sound","x_ite/Components/Sound/X3DSoundNode","x_ite/Components/Sound/X3DSoundSourceNode"],(function(e,t,i,n,r){"use strict";const o={AudioClip:t,Sound:i},s={X3DSoundNode:n,X3DSoundSourceNode:r};for(const t in o)e.addType(t,o[t]);for(const t in s)e.addAbstractType(t,s[t])})),define("x_ite/Components/Text/Text",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.Text),this._length.setUnit("length"),this._maxExtent.setUnit("length"),this._origin.setUnit("length"),this._textBounds.setUnit("length"),this._lineBounds.setUnit("length")}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"string",new e.MFString),new t(o.inputOutput,"length",new e.MFFloat),new t(o.inputOutput,"maxExtent",new e.SFFloat),new t(o.initializeOnly,"solid",new e.SFBool),new t(o.outputOnly,"origin",new e.SFVec3f),new t(o.outputOnly,"textBounds",new e.SFVec2f),new t(o.outputOnly,"lineBounds",new e.MFVec2f),new t(o.inputOutput,"fontStyle",new e.SFNode)]),getTypeName:function(){return"Text"},getComponentName:function(){return"Text"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._fontStyle.addInterest("set_fontStyle__",this),this.set_fontStyle__()},getMatrix:function(){return this.textGeometry.getMatrix()},getLength:function(e){return e<this._length.length?Math.max(0,this._length[e]):0},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getBrowserOptions()._PrimitiveQuality.addInterest("requestRebuild",this):this.getBrowser().getBrowserOptions()._PrimitiveQuality.removeInterest("requestRebuild",this)},set_fontStyle__:function(){this.fontStyleNode&&this.fontStyleNode.removeInterest("requestRebuild",this),this.fontStyleNode=r(o.X3DFontStyleNode,this._fontStyle),this.fontStyleNode||(this.fontStyleNode=this.getBrowser().getDefaultFontStyle()),this.fontStyleNode.addInterest("requestRebuild",this),this.textGeometry=this.fontStyleNode.getTextGeometry(this),this.setTransparent(this.textGeometry.getTransparent())},build:function(){this.textGeometry.update(),this.textGeometry.build(),this.setSolid(this._solid.getValue())},traverse:function(e,t){try{this.textGeometry.traverse(e,t),n.prototype.traverse.call(this,e,t)}catch(e){console.error(e)}},display:function(e,t){try{this.textGeometry.display(e,t),n.prototype.display.call(this,e,t)}catch(e){console.error(e)}},transformLine:function(e){return this.textGeometry.transformLine(e)},transformMatrix:function(e){return this.textGeometry.transformMatrix(e)}}),s})),define("x_ite/Components/Text",["x_ite/Configuration/SupportedNodes","x_ite/Components/Text/FontStyle","x_ite/Components/Text/Text","x_ite/Components/Text/X3DFontStyleNode"],(function(e,t,i,n){"use strict";const r={FontStyle:t,Text:i},o={X3DFontStyleNode:n};for(const t in r)e.addType(t,r[t]);for(const t in o)e.addAbstractType(t,o[t])})),define("x_ite/Components/Texturing/MovieTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Components/Sound/X3DSoundSourceNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","standard/Math/Algorithm","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(i){r.call(this,i),o.call(this,i),s.call(this,i),this.addType(a.MovieTexture),this.canvas=e("<canvas></canvas>"),this.video=e("<video></video>"),this.urlStack=new t.MFString}return c.prototype=Object.assign(Object.create(r.prototype),o.prototype,s.prototype,{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(a.inputOutput,"metadata",new t.SFNode),new i(a.inputOutput,"description",new t.SFString),new i(a.inputOutput,"enabled",new t.SFBool(!0)),new i(a.inputOutput,"load",new t.SFBool(!0)),new i(a.inputOutput,"url",new t.MFString),new i(a.inputOutput,"autoRefresh",new t.SFTime),new i(a.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(a.inputOutput,"gain",new t.SFFloat(1)),new i(a.inputOutput,"speed",new t.SFFloat(1)),new i(a.inputOutput,"pitch",new t.SFFloat(1)),new i(a.inputOutput,"loop",new t.SFBool),new i(a.inputOutput,"startTime",new t.SFTime),new i(a.inputOutput,"resumeTime",new t.SFTime),new i(a.inputOutput,"pauseTime",new t.SFTime),new i(a.inputOutput,"stopTime",new t.SFTime),new i(a.outputOnly,"isPaused",new t.SFBool),new i(a.outputOnly,"isActive",new t.SFBool),new i(a.outputOnly,"elapsedTime",new t.SFTime),new i(a.outputOnly,"duration_changed",new t.SFTime(-1)),new i(a.initializeOnly,"repeatS",new t.SFBool(!0)),new i(a.initializeOnly,"repeatT",new t.SFBool(!0)),new i(a.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"MovieTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),o.prototype.initialize.call(this),s.prototype.initialize.call(this),this.video.on("error",this.setError.bind(this)),this.video[0].preload="auto",this.video[0].volume=0,this.video[0].crossOrigin="Anonymous",this.requestImmediateLoad()},getElement:function(){return this.video[0]},set_live__:function(){o.prototype.set_live__.call(this),s.prototype.set_live__.call(this)},unloadNow:function(){this.clearTexture()},loadNow:function(){this.setMedia(null),this.urlStack.setValue(this._url),this.video.bind("canplaythrough",this.setVideo.bind(this)),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.video.unbind("canplaythrough"),this._duration_changed=-1,this.clearTexture(),void this.setLoadState(a.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.video.attr("src",this.URL.href),this.video.get(0).load()},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading movie:",decodeURI(this.URL.href)),this.loadNext()},setVideo:function(){l&&"data:"!==this.URL.protocol&&console.info("Done loading movie:",decodeURI(this.URL.href));try{this.video.unbind("canplaythrough");const e=this.video[0],t=e.videoWidth,i=e.videoHeight,n=this.canvas[0],r=n.getContext("2d");if(!u.isPowerOfTwo(t)||!u.isPowerOfTwo(i))throw new Error("The movie texture is a non power-of-two texture.");n.width=t,n.height=i,r.drawImage(e,0,0);const o=r.getImageData(0,0,t,i).data;this.setMedia(this.video),this.setTexture(t,i,!1,new Uint8Array(o.buffer),!0),this.setLoadState(a.COMPLETE_STATE)}catch(e){console.log(e.message),this.setError()}},set_time:function(){o.prototype.set_time.call(this),this.checkLoadState()===a.COMPLETE_STATE&&this.updateTexture(this.getMedia()[0],!0)},traverse:r.prototype.traverse}),c})),define("x_ite/Components/Texturing/MultiTexture",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTextureNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast","x_ite/Browser/Texturing/MultiTextureModeType","x_ite/Browser/Texturing/MultiTextureSourceType","x_ite/Browser/Texturing/MultiTextureFunctionType"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(t){n.call(this,t),this.addType(r.MultiTexture),this.addChildObjects("loadState",new e.SFInt32(r.NOT_STARTED_STATE)),this.color=new Float32Array(4),this.modes=[],this.alphaModes=[],this.sources=[],this.functions=[],this.textureNodes=[]}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"color",new e.SFColor(1,1,1)),new t(r.inputOutput,"alpha",new e.SFFloat(1)),new t(r.inputOutput,"mode",new e.MFString),new t(r.inputOutput,"source",new e.MFString),new t(r.inputOutput,"function",new e.MFString),new t(r.inputOutput,"texture",new e.MFNode)]),getTypeName:function(){return"MultiTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){n.prototype.initialize.call(this),this._color.addInterest("set_color__",this),this._alpha.addInterest("set_alpha__",this),this._mode.addInterest("set_mode__",this),this._source.addInterest("set_source__",this),this._function.addInterest("set_function__",this),this._texture.addInterest("set_texture__",this),this.set_color__(),this.set_alpha__(),this.set_mode__(),this.set_source__(),this.set_function__(),this.set_texture__(),this._loadState=r.COMPLETE_STATE},getMode:function(e){return e<this.modes.length?this.modes[e]:s.MODULATE},getAlphaMode:function(e){return e<this.alphaModes.length?this.alphaModes[e]:s.MODULATE},getSource:function(e){return e<this.sources.length?this.sources[e]:a.DEFAULT},getFunction:function(e){return e<this.functions.length?this.functions[e]:u.DEFAULT},set_color__:function(){this.color[0]=this._color.r,this.color[1]=this._color.g,this.color[2]=this._color.b},set_alpha__:function(){this.color[3]=this._alpha},set_mode__:function(){const e=new Map([["REPLACE",s.REPLACE],["MODULATE",s.MODULATE],["MODULATE2X",s.MODULATE2X],["MODULATE4X",s.MODULATE4X],["ADD",s.ADD],["ADDSIGNED",s.ADDSIGNED],["ADDSIGNED2X",s.ADDSIGNED2X],["ADDSMOOTH",s.ADDSMOOTH],["SUBTRACT",s.SUBTRACT],["BLENDDIFFUSEALPHA",s.BLENDDIFFUSEALPHA],["BLENDTEXTUREALPHA",s.BLENDTEXTUREALPHA],["BLENDFACTORALPHA",s.BLENDFACTORALPHA],["BLENDCURRENTALPHA",s.BLENDCURRENTALPHA],["MODULATEALPHA_ADDCOLOR",s.MODULATEALPHA_ADDCOLOR],["MODULATEINVALPHA_ADDCOLOR",s.MODULATEINVALPHA_ADDCOLOR],["MODULATEINVCOLOR_ADDALPHA",s.MODULATEINVCOLOR_ADDALPHA],["DOTPRODUCT3",s.DOTPRODUCT3],["SELECTARG1",s.SELECTARG1],["SELECTARG2",s.SELECTARG2],["OFF",s.OFF]]);return function(){this.modes.length=0,this.alphaModes.length=0;for(const t of this._mode){const i=t.split(",");for(let e=0,t=i.length;e<t;++e)i[e]=i[e].trim();0===i.length&&i.push("MODULATE"),i.length<2&&i.push(i[0]);const n=e.get(i[0]);void 0!==n?this.modes.push(n):this.modes.push(s.MODULATE);const r=e.get(i[1]);void 0!==r?this.alphaModes.push(r):this.alphaModes.push(s.MODULATE)}}}(),set_source__:function(){const e=new Map([["DIFFUSE",a.DIFFUSE],["SPECULAR",a.SPECULAR],["FACTOR",a.FACTOR]]);return function(){this.sources.length=0;for(const t of this._source){const i=e.get(t);void 0!==i?this.sources.push(i):this.sources.push(a.DEFAULT)}}}(),set_function__:function(){const e=new Map([["COMPLEMENT",u.COMPLEMENT],["ALPHAREPLICATE",u.ALPHAREPLICATE]]);return function(){this.functions.length=0;for(const t of this._function){const i=e.get(t);void 0!==i?this.functions.push(i):this.functions.push(u.DEFAULT)}}}(),set_texture__:function(){this.textureNodes.length=0;for(const e of this._texture){const t=o(r.X3DSingleTextureNode,e);t&&this.textureNodes.push(t)}},traverse:function(e,t){for(const i of this.textureNodes)i.traverse(e,t)},setShaderUniforms:function(e,t,i){const n=this.textureNodes,r=Math.min(t.getBrowser().getMaxTextures(),n.length);e.uniform1i(t.x3d_NumTextures,r),e.uniform4fv(t.x3d_MultiTextureColor,this.color);for(let o=0;o<r;++o)n[o].setShaderUniformsToChannel(e,t,i,t.x3d_Textures[o]),e.uniform1i(t.x3d_MultiTextureMode[o],this.getMode(o)),e.uniform1i(t.x3d_MultiTextureAlphaMode[o],this.getAlphaMode(o)),e.uniform1i(t.x3d_MultiTextureSource[o],this.getSource(o)),e.uniform1i(t.x3d_MultiTextureFunction[o],this.getFunction(o))}}),l})),define("x_ite/Components/Texturing/MultiTextureCoordinate",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTextureCoordinateNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.MultiTextureCoordinate),this.textureCoordinateNodes=[]}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"texCoord",new e.MFNode)]),getTypeName:function(){return"MultiTextureCoordinate"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texCoord"},initialize:function(){n.prototype.initialize.call(this),this._texCoord.addInterest("set_texCoord__",this),this.set_texCoord__()},set_texCoord__:function(){const e=this.textureCoordinateNodes;for(const t of e)t.removeInterest("addNodeEvent",this);e.length=0;for(const t of this._texCoord){const i=o(r.X3DSingleTextureCoordinateNode,t);i&&e.push(i)}for(const t of e)t.addInterest("addNodeEvent",this)},isEmpty:function(){return!0},getSize:function(){return 0},get1Point:function(e,t){for(const i of this.textureCoordinateNodes)return i.get1Point(e,t);return t.set(0,0,0,1)},init:function(e){for(const t of this.textureCoordinateNodes)t.init(e)},addTexCoord:function(e,t){const i=this.textureCoordinateNodes;for(let n=0,r=i.length;n<r;++n)i[n].addTexCoordToChannel(e,t[n])},addTexCoordToChannel:function(e,t){},getTexCoord:function(e){for(const t of this.textureCoordinateNodes)return t.getTexCoord(e);return e},getTextureMapping:function(e){const t=this.textureCoordinateNodes,i=Math.min(this.getBrowser().getMaxTextures(),t.length);for(let n=0;n<i;++n)t[n].getTextureMapping(e,n)},setShaderUniforms:function(e,t){const i=this.textureCoordinateNodes,n=Math.min(t.x3d_MaxTextures,i.length);for(let r=0;r<n;++r)i[r].setShaderUniformsToChannel(e,t,r);const r=n?i.at(-1):this;for(let i=n,o=t.x3d_MaxTextures;i<o;++i)r.setShaderUniformsToChannel(e,t,i)}}),s})),define("x_ite/Components/Texturing/MultiTextureTransform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTextureTransformNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.MultiTextureTransform),this.textureTransformNodes=[]}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"textureTransform",new e.MFNode)]),getTypeName:function(){return"MultiTextureTransform"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"textureTransform"},initialize:function(){n.prototype.initialize.call(this),this._textureTransform.addInterest("set_textureTransform__",this),this.set_textureTransform__()},set_textureTransform__:function(){const e=this.textureTransformNodes;e.length=0;for(const t of this._textureTransform){const i=o(r.X3DSingleTextureTransformNode,t);i&&e.push(i)}},getTextureMapping:function(e){const t=this.textureTransformNodes,i=Math.min(this.getBrowser().getMaxTextures(),t.length);for(let n=0;n<i;++n)t[n].getTextureMapping(e,n)},setShaderUniforms:function(e,t){const i=this.textureTransformNodes,n=Math.min(t.x3d_MaxTextures,i.length);for(let r=0;r<n;++r)i[r].setShaderUniformsToChannel(e,t,r);const r=n?i.at(-1):this;for(let i=n,o=t.x3d_MaxTextures;i<o;++i)r.setShaderUniformsToChannel(e,t,i)}}),s})),define("x_ite/Components/Texturing/PixelTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Base/X3DConstants","standard/Math/Algorithm","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix3"],(function(e,t,i,n,r,o,s){"use strict";function a(e){r.call(this,e),this.addType(o.PixelTexture),this.addChildObjects("loadState",new t.SFInt32(o.NOT_STARTED_STATE))}return a.prototype=Object.assign(Object.create(r.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(o.inputOutput,"metadata",new t.SFNode),new i(o.inputOutput,"description",new t.SFString),new i(o.inputOutput,"image",new t.SFImage(0,0,0,new t.MFInt32)),new i(o.initializeOnly,"repeatS",new t.SFBool(!0)),new i(o.initializeOnly,"repeatT",new t.SFBool(!0)),new i(o.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"PixelTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),this._image.addInterest("set_image__",this),this.canvas1=e("<canvas></canvas>"),this.canvas2=e("<canvas></canvas>"),this.set_image__()},checkLoadState:function(){return this._loadState.getValue()},convert:function(e,t,i,n){switch(t){case 1:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=e[r+1]=e[r+2]=255&n,e[r+3]=255}break;case 2:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=e[r+1]=e[r+2]=n>>>8&255,e[r+3]=255&n}break;case 3:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=n>>>16&255,e[r+1]=n>>>8&255,e[r+2]=255&n,e[r+3]=255}break;case 4:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=n>>>24,e[r+1]=n>>>16&255,e[r+2]=n>>>8&255,e[r+3]=255&n}}},resize:function(e,t,i,n,r){const o=new Uint8Array(n*r*4),s=n/t,a=r/i;for(let i=0;i<r;++i){const r=Math.floor(i/a)*t,u=i*n;for(let t=0;t<n;++t){const i=4*(r+Math.floor(t/s)),n=4*(u+t);o[n]=e[i],o[n+1]=e[i+1],o[n+2]=e[i+2],o[n+3]=e[i+3]}}return o},set_image__:function(){const e=this.getBrowser().getContext(),t=this._image.comp,i=this._image.array,n=!(t%2);let r=this._image.width,a=this._image.height,u=null;if(r>0&&a>0&&t>0&&t<5){if(e.getVersion()>=2||s.isPowerOfTwo(r)&&s.isPowerOfTwo(a))u=new Uint8Array(r*a*4),this.convert(u,t,i.getValue(),i.length);else if(Math.max(r,a)<this.getBrowser().getMinTextureSize()&&!this._textureProperties.getValue()){u=new Uint8Array(r*a*4),this.convert(u,t,i.getValue(),i.length);const e=r,n=a;r=4*s.nextPowerOfTwo(e),a=4*s.nextPowerOfTwo(n),u=this.resize(u,e,n,r,a)}else{const e=this.canvas1[0],n=this.canvas2[0],o=e.getContext("2d"),l=n.getContext("2d"),c=o.createImageData(r,a);e.width=r,e.height=a,this.convert(c.data,t,i,i.length),o.putImageData(c,0,0),r=s.nextPowerOfTwo(r),a=s.nextPowerOfTwo(a),n.width=r,n.height=a,l.clearRect(0,0,r,a),l.drawImage(e,0,0,e.width,e.height,0,0,r,a),u=l.getImageData(0,0,r,a).data}this.setTexture(r,a,n,new Uint8Array(u.buffer),!1),this._loadState=o.COMPLETE_STATE}else this.clearTexture(),this._loadState=o.FAILED_STATE}}),a})),define("x_ite/Components/Texturing/TextureCoordinateGenerator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DSingleTextureCoordinateNode","x_ite/Base/X3DConstants","x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.TextureCoordinateGenerator),this.mode=o.SPHERE,this.parameter=new Float32Array(6)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"mapping",new e.SFString),new t(r.inputOutput,"mode",new e.SFString("SPHERE")),new t(r.inputOutput,"parameter",new e.MFFloat)]),getTypeName:function(){return"TextureCoordinateGenerator"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texCoord"},initialize:function(){n.prototype.initialize.call(this),this._mode.addInterest("set_mode__",this),this._parameter.addInterest("set_parameter__",this),this.set_mode__(),this.set_parameter__()},set_mode__:function(){const e=new Map([["SPHERE",o.SPHERE],["CAMERASPACENORMAL",o.CAMERASPACENORMAL],["CAMERASPACEPOSITION",o.CAMERASPACEPOSITION],["CAMERASPACEREFLECTIONVECTOR",o.CAMERASPACEREFLECTIONVECTOR],["SPHERE-LOCAL",o.SPHERE_LOCAL],["COORD",o.COORD],["COORD-EYE",o.COORD_EYE],["NOISE",o.NOISE],["NOISE-EYE",o.NOISE_EYE],["SPHERE-REFLECT",o.SPHERE_REFLECT],["SPHERE-REFLECT-LOCAL",o.SPHERE_REFLECT_LOCAL]]);return function(){this.mode=e.get(this._mode.getValue()),void 0===this.mode&&(this.mode=o.SPHERE)}}(),set_parameter__:function(){const e=Math.min(this.parameter.length,this._parameter.length);for(let t=0;t<e;++t)this.parameter[t]=this._parameter[t];this.parameter.fill(0,e)},get1Point:function(e,t){return t},addTexCoordToChannel:function(e,t){t.push(0,0,0,1)},getTexCoord:function(e){return arrray},setShaderUniformsToChannel:function(e,t,i){e.uniform1i(t.x3d_TextureCoordinateGeneratorMode[i],this.mode),e.uniform1fv(t.x3d_TextureCoordinateGeneratorParameter[i],this.parameter)}}),s})),define("x_ite/Components/Texturing",["x_ite/Configuration/SupportedNodes","x_ite/Components/Texturing/ImageTexture","x_ite/Components/Texturing/MovieTexture","x_ite/Components/Texturing/MultiTexture","x_ite/Components/Texturing/MultiTextureCoordinate","x_ite/Components/Texturing/MultiTextureTransform","x_ite/Components/Texturing/PixelTexture","x_ite/Components/Texturing/TextureCoordinate","x_ite/Components/Texturing/TextureCoordinateGenerator","x_ite/Components/Texturing/TextureProperties","x_ite/Components/Texturing/TextureTransform","x_ite/Components/Texturing/X3DSingleTextureCoordinateNode","x_ite/Components/Texturing/X3DSingleTextureNode","x_ite/Components/Texturing/X3DSingleTextureTransformNode","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Components/Texturing/X3DTextureCoordinateNode","x_ite/Components/Texturing/X3DTextureNode","x_ite/Components/Texturing/X3DTextureTransformNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_){"use strict";const y={ImageTexture:t,MovieTexture:i,MultiTexture:n,MultiTextureCoordinate:r,MultiTextureTransform:o,PixelTexture:s,TextureCoordinate:a,TextureCoordinateGenerator:u,TextureProperties:l,TextureTransform:c},x={X3DSingleTextureCoordinateNode:h,X3DSingleTextureNode:d,X3DSingleTextureTransformNode:p,X3DTexture2DNode:f,X3DTextureCoordinateNode:g,X3DTextureNode:m,X3DTextureTransformNode:_};for(const t in y)e.addType(t,y[t]);for(const t in x)e.addAbstractType(t,x[t])})),define("x_ite/Components/Time",["x_ite/Configuration/SupportedNodes","x_ite/Components/Time/TimeSensor","x_ite/Components/Time/X3DTimeDependentNode"],(function(e,t,i){"use strict";const n={TimeSensor:t},r={X3DTimeDependentNode:i};for(const t in n)e.addType(t,n[t]);for(const t in r)e.addAbstractType(t,r[t])})),define("x_ite/Components",["x_ite/DEBUG","x_ite/Browser/X3DBrowserContext","x_ite/Configuration/SupportedNodes","x_ite/Components/Core","x_ite/Components/EnvironmentalEffects","x_ite/Components/EnvironmentalSensor","x_ite/Components/Followers","x_ite/Components/Geometry3D","x_ite/Components/Grouping","x_ite/Components/Interpolation","x_ite/Components/Layering","x_ite/Components/Lighting","x_ite/Components/Navigation","x_ite/Components/Networking","x_ite/Components/PointingDeviceSensor","x_ite/Components/Rendering","x_ite/Components/Shaders","x_ite/Components/Shape","x_ite/Components/Sound","x_ite/Components/Text","x_ite/Components/Texturing","x_ite/Components/Time"],(function(e,t,i){"use strict";function n(){}return n.prototype={addComponent:function(n){if(n.types)for(const e in n.types)i.addType(e,n.types[e]);if(n.abstractTypes)for(const e in n.abstractTypes)i.addAbstractType(e,n.abstractTypes[e]);n.browser&&t.addContext(n.browser),n.name&&e&&console.log("Done loading external component '"+n.name+"'.")}},new n})),define("x_ite/Configuration/ProfileInfo",["x_ite/Base/X3DObject"],(function(e){"use strict";function t(e,t,i,n){this.name=e,this.title=t,this.providerUrl=i,this.components=n}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"ProfileInfo"},toVRMLStream:function(e){e.string+="PROFILE",e.string+=" ",e.string+=this.name},toXMLStream:function(e){e.string+=this.name}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Configuration/ProfileInfoArray",["x_ite/Configuration/ComponentInfoArray","x_ite/Configuration/ProfileInfo","x_ite/Base/X3DInfoArray"],(function(e,t,i){"use strict";function n(e){return i.call(this,e)}n.prototype=Object.assign(Object.create(i.prototype),{constructor:n,getTypeName:function(){return"ProfileInfoArray"},addProfile:function(i){this.add(i.name,new t(i.name,i.title,i.providerUrl,new e(i.components)))}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Configuration/SupportedComponents",["x_ite/Configuration/ComponentInfoArray","x_ite/Browser/Networking/urls"],(function(e,t){"use strict";const i=new e([]);return i.addComponent({title:"Annotation",name:"Annotation",level:2,providerUrl:t.getProviderUrl("annotation")}),i.addComponent({title:"Computer-Aided Design (CAD) model geometry",name:"CADGeometry",level:2,providerUrl:t.getProviderUrl("cad-geometry")}),i.addComponent({title:"Core",name:"Core",level:2,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Cube map environmental texturing",name:"CubeMapTexturing",level:3,providerUrl:t.getProviderUrl("cube-map-texturing")}),i.addComponent({title:"Distributed interactive simulation (DIS)",name:"DIS",level:2,providerUrl:t.getProviderUrl("dis")}),i.addComponent({title:"Environmental effects",name:"EnvironmentalEffects",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Environmental sensor",name:"EnvironmentalSensor",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Event utilities",name:"EventUtilities",level:4,providerUrl:t.getProviderUrl("event-utilities")}),i.addComponent({title:"Followers",name:"Followers",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Geometry2D",name:"Geometry2D",level:2,providerUrl:t.getProviderUrl("geometry2d")}),i.addComponent({title:"Geometry3D",name:"Geometry3D",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Geospatial",name:"Geospatial",level:2,providerUrl:t.getProviderUrl("geospatial")}),i.addComponent({title:"Grouping",name:"Grouping",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Humanoid animation (HAnim)",name:"HAnim",level:3,providerUrl:t.getProviderUrl("h-anim")}),i.addAlias("H-Anim","HAnim"),i.addComponent({title:"Interpolation",name:"Interpolation",level:5,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Key device sensor",name:"KeyDeviceSensor",level:2,providerUrl:t.getProviderUrl("key-device-sensor")}),i.addComponent({title:"Layering",name:"Layering",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Layout",name:"Layout",level:2,providerUrl:t.getProviderUrl("layout")}),i.addComponent({title:"Lighting",name:"Lighting",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Navigation",name:"Navigation",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Networking",name:"Networking",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Non-uniform Rational B-Spline (NURBS)",name:"NURBS",level:4,providerUrl:t.getProviderUrl("nurbs")}),i.addComponent({title:"Particle systems",name:"ParticleSystems",level:3,providerUrl:t.getProviderUrl("particle-systems")}),i.addComponent({title:"Picking sensor",name:"Picking",level:3,providerUrl:t.getProviderUrl("picking")}),i.addComponent({title:"Pointing device sensor",name:"PointingDeviceSensor",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Projective Texture Mapping",name:"ProjectiveTextureMapping",level:2,providerUrl:t.getProviderUrl("projective-texture-mapping")}),i.addComponent({title:"Programmable shaders",name:"Shaders",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Rendering",name:"Rendering",level:5,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Rigid body physics",name:"RigidBodyPhysics",level:5,providerUrl:t.getProviderUrl("rigid-body-physics")}),i.addComponent({title:"Scripting",name:"Scripting",level:1,providerUrl:t.getProviderUrl("scripting")}),i.addComponent({title:"Shape",name:"Shape",level:5,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Sound",name:"Sound",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Text",name:"Text",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Texturing",name:"Texturing",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Texturing3D",name:"Texturing3D",level:3,providerUrl:t.getProviderUrl("texturing-3d")}),i.addComponent({title:"Time",name:"Time",level:2,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Volume rendering",name:"VolumeRendering",level:2,providerUrl:t.getProviderUrl("volume-rendering")}),i.addComponent({title:"X_ITE",name:"X_ITE",level:1,providerUrl:t.getProviderUrl("x_ite")}),i})),define("x_ite/Configuration/SupportedProfiles",["x_ite/Configuration/ProfileInfo","x_ite/Configuration/ProfileInfoArray","x_ite/Configuration/ComponentInfoArray","x_ite/Configuration/SupportedComponents","x_ite/Browser/Networking/urls"],(function(e,t,i,n,r){"use strict";const o=new t;return o.addProfile({title:"Computer-Aided Design (CAD) interchange",name:"CADInterchange",providerUrl:r.getProviderUrl(),components:[n.get("CADGeometry"),n.get("Core"),n.get("Grouping"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("Rendering"),n.get("Shaders"),n.get("Shape"),n.get("Texturing")]}),o.addProfile({title:"Core",name:"Core",providerUrl:r.getProviderUrl(),components:[n.get("Core")]}),o.addProfile({title:"Full",name:"Full",providerUrl:r.getProviderUrl(),components:[n.get("CADGeometry"),n.get("Core"),n.get("CubeMapTexturing"),n.get("DIS"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("EventUtilities"),n.get("Followers"),n.get("Geometry2D"),n.get("Geometry3D"),n.get("Geospatial"),n.get("Grouping"),n.get("HAnim"),n.get("Interpolation"),n.get("KeyDeviceSensor"),n.get("Layering"),n.get("Layout"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("NURBS"),n.get("ParticleSystems"),n.get("Picking"),n.get("PointingDeviceSensor"),n.get("ProjectiveTextureMapping"),n.get("Rendering"),n.get("RigidBodyPhysics"),n.get("Scripting"),n.get("Shaders"),n.get("Shape"),n.get("Sound"),n.get("Text"),n.get("Texturing"),n.get("Texturing3D"),n.get("Time"),n.get("VolumeRendering")]}),o.addProfile({title:"Immersive",name:"Immersive",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("EventUtilities"),n.get("Geometry2D"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("KeyDeviceSensor"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("PointingDeviceSensor"),n.get("Rendering"),n.get("Scripting"),n.get("Shape"),n.get("Sound"),n.get("Text"),n.get("Texturing"),n.get("Time")]}),o.addProfile({title:"Interactive",name:"Interactive",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("EventUtilities"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("KeyDeviceSensor"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("PointingDeviceSensor"),n.get("Rendering"),n.get("Shape"),n.get("Texturing"),n.get("Time")]}),o.addProfile({title:"Interchange",name:"Interchange",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("Rendering"),n.get("Shape"),n.get("Texturing"),n.get("Time")]}),o.addProfile({title:"Medical interchange",name:"MedicalInterchange",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EventUtilities"),n.get("Geometry2D"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("Rendering"),n.get("Shape"),n.get("Text"),n.get("Texturing"),n.get("Texturing3D"),n.get("Time"),n.get("VolumeRendering")]}),o.addProfile({title:"MPEG-4 interactive",name:"MPEG-4",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("PointingDeviceSensor"),n.get("Rendering"),n.get("Shape"),n.get("Texturing"),n.get("Time")]}),o})),define("x_ite/Browser/X3DBrowser",["jquery","x_ite/Browser/VERSION","x_ite/Fields","x_ite/Components","x_ite/Components/Layering/X3DLayerNode","x_ite/Browser/X3DBrowserContext","x_ite/Configuration/ProfileInfo","x_ite/Configuration/ComponentInfo","x_ite/Configuration/SupportedProfiles","x_ite/Configuration/SupportedComponents","x_ite/Configuration/SupportedNodes","x_ite/Execution/Scene","x_ite/Execution/X3DScene","x_ite/InputOutput/FileLoader","x_ite/Parser/XMLParser","x_ite/Parser/JSONParser","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Utility/MapUtilities","locale/gettext"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x){"use strict";const w=Symbol(),b=Symbol();function v(e){o.call(this,e),this[b]=new Map,this.replaceWorld(this.createScene())}v.prototype=Object.assign(Object.create(o.prototype),{constructor:v,getTypeName:function(){return"X3DBrowser"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"browser"},initialize:function(){o.prototype.initialize.call(this);let e=this.getElement().attr("src");e=e?'"'+e+'"':this.getElement().attr("url"),e?(this.initialized().set(this.getCurrentTime()),this.load(e)):(this.initialized().setValue(this.getCurrentTime()),this.callBrowserCallbacks(_.INITIALIZED_EVENT),this.callBrowserEventHandler("onload")),this.getNumber()>1||this.print("Welcome to "+this.name+" X3D Browser "+this.version+":\n Current Graphics Renderer\n Name: "+this.getVendor()+" "+this.getRenderer()+"\n WebGL version: "+this.getWebGLVersion()+"\n Shading language: "+this.getShadingLanguageVersion()+"\n Rendering Properties\n Antialiased: "+this.getAntialiased()+"\n Depth size: "+this.getDepthSize()+" bits\n Color depth: "+this.getColorDepth()+" bits\n Max clip planes: "+this.getMaxClipPlanes()+"\n Max global lights: "+this.getMaxLights()+"\n Max textures: "+this.getMaxTextures()+"\n Texture units: "+this.getMaxCombinedTextureUnits()+"\n Max texture size: "+this.getMaxTextureSize()+" × "+this.getMaxTextureSize()+" pixel\n Texture memory: "+this.getTextureMemory()+"\n Max vertex uniform vectors: "+this.getMaxVertexUniformVectors()+"\n Max fragment uniform vectors: "+this.getMaxFragmentUniformVectors()+"\n Max vertex attribs: "+this.getMaxVertexAttribs()+"\n")},getName:function(){return"X_ITE"},getVersion:function(){return t},getDescription:function(){return this.getNotification()._string.getValue()},setDescription:function(e){this.getNotification()._string=e},getWorldURL:function(){return this.currentScene.worldURL},getProfile:function(e){e=String(e);const t=u.get(e);if(t)return t;throw Error("Profile '"+e+"' is not supported.")},getSupportedProfiles:function(){return u},getComponent:function(e,t){e=String(e),t=~~t;const i=l.get(e);if(i)return i.level,new a(e,t,i.title,i.providerUrl);throw Error("Component '"+e+"' at level '"+t+"' is not supported.")},getSupportedComponents:function(){return l},getSupportedNode:function(e){return c.getType(String(e))},getSupportedNodes:function(){return c.getTypes()},createScene:function(e,t){const i=new h(this);if(arguments.length){if(!(e instanceof s))throw new Error("Couldn't create scene: profile must be of type ProfileInfo.");i.setProfile(e);for(let e=1,t=arguments.length;e<t;++e){const t=arguments[e];if(!(t instanceof a))throw new Error("Couldn't create scene: component must be of type ComponentInfo.");i.addComponent(t)}}return i.setup(),i},replaceWorld:function(e){if(this._loadCount.removeInterest("set_loadCount__",this),this.prepareEvents().removeInterest("bind",this),this[w]&&this[w].abort(),this.getWorld()&&(this.getExecutionContext().setLive(!1),this.shutdown().processInterests(),this.callBrowserCallbacks(_.SHUTDOWN_EVENT),this.callBrowserEventHandler("onshutdown")),e instanceof i.MFNode){const t=e;e=this.createScene();for(const i of t)e.isLive().addInterest(i.getValue().getExecutionContext().isLive());e.setRootNodes(t)}e instanceof d||(e=this.createScene()),e.getExecutionContext().isLive().removeInterest("setLive",e),e.setExecutionContext(e),this.description="",this.getBrowserOptions().configure(),this.setBrowserLoading(!0),this._loadCount.addInterest("set_loadCount__",this),this.prepareEvents().removeInterest("bind",this);for(const t of e.getLoadingObjects())this.addLoadCount(t);this.setExecutionContext(e),this.getWorld().bind(),e.setLive(this.isLive().getValue())},set_loadCount__:function(e){e.getValue()||(this._loadCount.removeInterest("set_loadCount__",this),this.prepareEvents().addInterest("bind",this),this.addBrowserEvent())},bind:function(){this.prepareEvents().removeInterest("bind",this),this.setBrowserLoading(!1),this.initialized().getValue()&&(this.initialized().setValue(this.getCurrentTime()),this.callBrowserCallbacks(_.INITIALIZED_EVENT),this.callBrowserEventHandler("onload"))},createVrmlFromString:function(e){return this.createX3DFromString(e).rootNodes},createX3DFromString:function(e){e=String(e);const t=this.currentScene,i=this.isExternal(),n=new p(this.getWorld()).createX3DFromString(t.getWorldURL(),e);return i||(t.isLive().addInterest("setLive",n),n.setExecutionContext(t),n.setLive(t.getLive())),n},createVrmlFromURL:function(e,t,n){if(t=m(_.X3DNode,t,!1),n=String(n),!(e instanceof i.MFString))throw new Error("Browser.createVrmlFromURL: url must be of type MFString.");if(!t)throw new Error("Browser.createVrmlFromURL: node must be of type X3DNode.");const r=t.getField(n);if(!r.isInput())throw new Error("Browser.createVrmlFromURL: event named '"+n+"' must be a input field.");if(r.getType()!==_.MFNode)throw new Error("Browser.createVrmlFromURL: event named '"+n+"' must be of type MFNode.");const o=this.currentScene,s=this.isExternal(),a=new p(this.getWorld());this.addLoadCount(a),a.createX3DFromURL(e,null,function(e){this.removeLoadCount(a),e&&(s||(o.isLive().addInterest("setLive",e),e.setExecutionContext(o),e.setLive(o.getLive())),r.setValue(e.rootNodes))}.bind(this))},createX3DFromURL:function(e,t,n){if(3===arguments.length)return this.createVrmlFromURL(e,t,n);if(!(e instanceof i.MFString))throw new Error("Browser.createX3DFromURL: url must be of type MFString.");const r=this.currentScene,o=this.isExternal(),s=new p(this.getWorld()),a=s.createX3DFromURL(e,null);return o||(r.isLive().addInterest("setLive",a),a.setExecutionContext(r),a.setLive(r.getLive())),a},loadURL:function(e,t=new i.MFString){return new Promise(function(n,r){if(!(e instanceof i.MFString))throw new Error("Browser.loadURL: url must be of type MFString.");if(!(t instanceof i.MFString))throw new Error("Browser.loadURL: parameter must be of type MFString.");this._loadCount.removeInterest("set_loadCount__",this),this.prepareEvents().removeInterest("bind",this),this[w]&&this[w].abort(),this.setBrowserLoading(!0),this.addLoadCount(this);const o=this[w]=new p(this.getWorld());o.createX3DFromURL(e,t,function(e){o===this[w]?(this.getBrowserOptions().getSplashScreen()||this.getCanvas().fadeIn(0),e?(this.replaceWorld(e),this.removeLoadCount(this),n()):(this.callBrowserCallbacks(_.CONNECTION_ERROR),this.callBrowserEventHandler("onerror"),setTimeout(function(){this.getSplashScreen().find(".x_ite-private-spinner-text").text(x("Failed loading world."))}.bind(this),31),r())):r()}.bind(this),function(e){o===this[w]?(this.changeViewpoint(e),this.removeLoadCount(this),this.setBrowserLoading(!1),n()):r()}.bind(this),function(e,t){o===this[w]?(t?window.open(e,t):location=e,this.removeLoadCount(this),this.setBrowserLoading(!1),n()):r()}.bind(this))}.bind(this))},addBrowserListener:function(e,t){},removeBrowserListener:function(e){},addBrowserCallback:function(e,t){this[b].set(e,t)},removeBrowserCallback:function(e){this[b].delete(e)},getBrowserCallbacks:function(){return this[b]},callBrowserCallbacks:function(){const e=[];return function(t){if(this[b].size)for(const i of y.values(e,this[b]))i(t)}}(),importDocument:function(e,t,i){const n=this.currentScene,r=this.createScene(),o=this.isExternal();o||(n.isLive().addInterest("setLive",r),r.setExecutionContext(n),r.setLive(n.getLive()));const s=new f(r);if(s.setInput(e),s.parseIntoScene(t,i),1===arguments.length)return r},importJS:function(e,t,i){const n=this.currentScene,r=this.createScene(),o=this.isExternal();o||(n.isLive().addInterest("setLive",r),r.setExecutionContext(n),r.setLive(n.getLive()));const s=new g(r);if(s.setInput(e),s.parseIntoScene(t,i),1===arguments.length)return r},getBrowserProperty:function(e){return this.getBrowserProperties().getField(e).getValue()},setBrowserOption:function(e,t){this.getBrowserOptions().getField(e).setValue(t)},getBrowserOption:function(e){return this.getBrowserOptions().getField(e).getValue()},getRenderingProperty:function(e){return this.getRenderingProperties().getField(e).getValue()},firstViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();t.length&&this.bindViewpoint(e,t[0])},previousViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();if(0!==t.length){for(var i=0,n=t.length;i<n&&!t[i]._isBound.getValue();++i);i<t.length?0===i?this.bindViewpoint(e,t.at(-1)):this.bindViewpoint(e,t[i-1]):this.bindViewpoint(e,t.at(-1))}},nextViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();if(0!==t.length){for(var i=0,n=t.length;i<n&&!t[i]._isBound.getValue();++i);i<t.length?i===t.length-1?this.bindViewpoint(e,t[0]):this.bindViewpoint(e,t[i+1]):this.bindViewpoint(e,t[0])}},lastViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();t.length&&this.bindViewpoint(e,t.at(-1))},changeViewpoint:function(e,t){if(1===arguments.length&&(t=String(e),e=this.getActiveLayer()),(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer()),e instanceof r)for(const i of e.getViewpoints().get())if(i.getName()===t){this.bindViewpoint(e,i);break}},bindViewpoint:function(e,t){if(e=m(_.X3DLayerNode,e,!1),t=m(_.X3DViewpointNode,t,!1),!e)throw new Error("Browser.bindViewpoint: layerNode must be of type X3DLayerNode.");if(!t)throw new Error("Browser.bindViewpoint: viewpointNode must be of type X3DViewpointNode.");t.setVRMLTransition(!0),t._isBound.getValue()?t.transitionStart(e,t,t):t._set_bind=!0},addRoute:function(e,t,i,n){this.currentScene.addRoute(e,t,i,n)},deleteRoute:function(e,t,i,n){try{const r=this.currentScene.getRoute(e,t,i,n);r&&this.currentScene.deleteRoute(r)}catch(e){console.error(e)}},beginUpdate:function(){this.setLive(!0),this.getExecutionContext().setLive(!0),this.advanceTime(performance.now())},endUpdate:function(){this.setLive(!1),this.getExecutionContext().setLive(!1)},print:function(){const t=Array.prototype.join.call(arguments,"");console.log(t);const i=e(".x_ite-console");i.length&&i.append(document.createTextNode(t))},println:function(){const t=Array.prototype.join.call(arguments,"");console.log(t);const i=e(".x_ite-console");i.length&&i.append(document.createTextNode(t+"\n"))},toVRMLStream:function(e){this.currentScene.toVRMLStream(e)},toXMLStream:function(e){this.currentScene.toXMLStream(e)},toJSONStream:function(e){this.currentScene.toJSONStream(e)}});for(const e of Reflect.ownKeys(v.prototype))Object.defineProperty(v.prototype,e,{enumerable:!1});return Object.defineProperty(v.prototype,"name",{get:function(){return this.getName()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"version",{get:function(){return this.getVersion()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"currentFrameRate",{get:function(){return this.getCurrentFrameRate()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"currentSpeed",{get:function(){return this.getCurrentSpeed()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"description",{get:function(){return this.getDescription()},set:function(e){this.setDescription(e)},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"currentScene",{get:function(){return this.getScriptStack().at(-1).getExecutionContext()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"supportedProfiles",{get:function(){return u},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"supportedComponents",{get:function(){return l},enumerable:!0,configurable:!1}),v})),define("x_ite/Fallback",["jquery"],(function(e){"use strict";return{error:function(t,i){e(function(){const n=e("X3DCanvas");this.show(n,t);for(const e of i)"function"==typeof e&&e(n,t)}.bind(this))},show:function(t,i){console.error(i);const n=e(".x_ite-console");n.length&&n.append(document.createTextNode(i)),t.addClass("x_ite-browser-fallback"),t.children(".x_ite-private-browser").hide(),t.children(":not(.x_ite-private-browser)").addClass("x_ite-fallback"),t.children(":not(.x_ite-private-browser)").show()}}})),define("standard/Time/MicroTime",[],(function(){"use strict";performance.now=function(){const e=performance.now;let t=0,i=0;return function(){const n=e.call(this);return n>i?(t=0,i=n,n):i=n+ ++t/1e3}}()})),define("x_ite/X3D",["jquery","x_ite/Base/X3DBaseNode","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/X3DField","x_ite/Base/X3DArrayField","x_ite/Fields","x_ite/Browser/X3DBrowser","x_ite/Configuration/ComponentInfo","x_ite/Configuration/ComponentInfoArray","x_ite/Configuration/ProfileInfo","x_ite/Configuration/ProfileInfoArray","x_ite/Configuration/UnitInfo","x_ite/Configuration/UnitInfoArray","x_ite/Execution/X3DExecutionContext","x_ite/Execution/X3DScene","x_ite/Execution/X3DImportedNode","x_ite/Execution/X3DExportedNode","x_ite/Prototype/ExternProtoDeclarationArray","x_ite/Prototype/ProtoDeclarationArray","x_ite/Prototype/X3DExternProtoDeclaration","x_ite/Prototype/X3DProtoDeclaration","x_ite/Prototype/X3DProtoDeclarationNode","x_ite/Routing/RouteArray","x_ite/Routing/X3DRoute","x_ite/Base/X3DConstants","x_ite/Browser/Networking/urls","x_ite/Fallback","standard/Time/MicroTime"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w,b,v,S,T,C,N,F,O){"use strict";function E(t){if((t=e(t)).find(".x_ite-private-browser").length)return;const i=new a(t);return t.data("browser",i),i.setup(),i}e.noConflict(!0);const D=e.Deferred(),M=e.Deferred();let I=!1;function V(t,i){"function"==typeof t&&D.done(t),"function"==typeof i&&M.done(i),I||(I=!0,e((function(){const t=e("X3DCanvas");t.children().hide();try{e.map(t,E),D.resolve()}catch(e){F.show(t,e),M.resolve(e)}})))}return require.getComponentUrl=function(e){const t=N.getProviderUrl(e);return"function"==typeof __global_require__&&"string"==typeof __filename&&__global_require__(__global_require__("url").fileURLToPath(t)),t},Object.assign(V,{require:require,define:define,getBrowser:function(t){return e(t||"X3DCanvas").data("browser")},createBrowser:function(t,i){const n=e("<X3DCanvas></X3DCanvas>");return t instanceof s.MFString&&n.attr("url",t.toString()),E(n),n[0]},X3DConstants:C,X3DBrowser:a,X3DExecutionContext:f,X3DScene:g,ComponentInfo:u,ComponentInfoArray:l,ProfileInfo:c,ProfileInfoArray:h,UnitInfo:d,UnitInfoArray:p,ExternProtoDeclarationArray:y,ProtoDeclarationArray:x,X3DExternProtoDeclaration:w,X3DProtoDeclaration:b,RouteArray:S,X3DRoute:T,X3DBaseNode:t,X3DExportedNode:_,X3DImportedNode:m,X3DProtoDeclarationNode:v,X3DFieldDefinition:i,FieldDefinitionArray:n,X3DField:r,X3DArrayField:o,SFColor:s.SFColor,SFColorRGBA:s.SFColorRGBA,SFImage:s.SFImage,SFMatrix3d:s.SFMatrix3d,SFMatrix3f:s.SFMatrix3f,SFMatrix4d:s.SFMatrix4d,SFMatrix4f:s.SFMatrix4f,SFNode:s.SFNode,SFRotation:s.SFRotation,SFVec2d:s.SFVec2d,SFVec2f:s.SFVec2f,SFVec3d:s.SFVec3d,SFVec3f:s.SFVec3f,SFVec4d:s.SFVec4d,SFVec4f:s.SFVec4f,VrmlMatrix:s.VrmlMatrix,MFBool:s.MFBool,MFColor:s.MFColor,MFColorRGBA:s.MFColorRGBA,MFDouble:s.MFDouble,MFFloat:s.MFFloat,MFImage:s.MFImage,MFInt32:s.MFInt32,MFMatrix3d:s.MFMatrix3d,MFMatrix3f:s.MFMatrix3f,MFMatrix4d:s.MFMatrix4d,MFMatrix4f:s.MFMatrix4f,MFNode:s.MFNode,MFRotation:s.MFRotation,MFString:s.MFString,MFTime:s.MFTime,MFVec2d:s.MFVec2d,MFVec2f:s.MFVec2f,MFVec3d:s.MFVec3d,MFVec3f:s.MFVec3f,MFVec4d:s.MFVec4d,MFVec4f:s.MFVec4f}),V})),require.config({waitSeconds:0}),define.show=function(){this.define=window.define,window.define=this},define.hide=function(){void 0===this.define?delete window.define:window.define=this.define,delete this.define};const getScriptURL=function(){if(document.currentScript)var e=document.currentScript.src;else if("function"==typeof __global_require__&&"string"==typeof __filename)e=__global_require__("url").pathToFileURL(__filename).href;return function(){return e}}();!function(){"use strict";function e(e,t){return new Promise((function(i,n){require(["x_ite/X3D"],(function(r){r(e,t),r(i,n)}),(function(){"function"==typeof t&&t(),n()}))}))}e.noConflict=function(){return window.X3D===e&&(void 0===t?delete window.X3D:window.X3D=t),e},e.require=require,e.define=define;const t=window.X3D;window.X3D=e,window[Symbol.for("X_ITE.X3D-5.0.2")]=e,"object"==typeof __global_module__&&"object"==typeof __global_module__.exports&&(__global_module__.exports=e),document.createElement("X3DCanvas"),require(["x_ite/X3D"],(function(t){Object.assign(e,t),t()}))}(),function(){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})}(),define("x_ite",(function(){})),define("x_ite/Browser/Shaders/ShaderSource",[],(function(){"use strict";return{get:function(e,t){return t}}}))}));
|
|
80
|
+
/*! https://mths.be/codepointat v0.2.0 by @mathias */var t,i;String.prototype.codePointAt||(t=function(){try{var e={},t=Object.defineProperty,i=t(e,e,e)&&t}catch(e){}return i}(),i=function(e){if(null==this)throw TypeError();var t=String(this),i=t.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||n>=i)){var r,o=t.charCodeAt(n);return o>=55296&&o<=56319&&i>n+1&&(r=t.charCodeAt(n+1))>=56320&&r<=57343?1024*(o-55296)+r-56320+65536:o}},t?t(String.prototype,"codePointAt",{value:i,configurable:!0,writable:!0}):String.prototype.codePointAt=i);function n(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function r(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new n,this.dtree=new n}var o=new n,s=new n,a=new Uint8Array(30),u=new Uint16Array(30),l=new Uint8Array(30),c=new Uint16Array(30),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new n,p=new Uint8Array(320);function f(e,t,i,n){var r,o;for(r=0;r<i;++r)e[r]=0;for(r=0;r<30-i;++r)e[r+i]=r/i|0;for(o=n,r=0;r<30;++r)t[r]=o,o+=1<<e[r]}var g=new Uint16Array(16);function m(e,t,i,n){var r,o;for(r=0;r<16;++r)e.table[r]=0;for(r=0;r<n;++r)e.table[t[i+r]]++;for(e.table[0]=0,o=0,r=0;r<16;++r)g[r]=o,o+=e.table[r];for(r=0;r<n;++r)t[i+r]&&(e.trans[g[t[i+r]]++]=r)}function _(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function y(e,t,i){if(!t)return i;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,n+i}function x(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var i=0,n=0,r=0,o=e.tag;do{n=2*n+(1&o),o>>>=1,++r,i+=t.table[r],n-=t.table[r]}while(n>=0);return e.tag=o,e.bitcount-=r,t.trans[i+n]}function w(e,t,i){var n,r,o,s,a,u;for(n=y(e,5,257),r=y(e,5,1),o=y(e,4,4),s=0;s<19;++s)p[s]=0;for(s=0;s<o;++s){var l=y(e,3,0);p[h[s]]=l}for(m(d,p,0,19),a=0;a<n+r;){var c=x(e,d);switch(c){case 16:var f=p[a-1];for(u=y(e,2,3);u;--u)p[a++]=f;break;case 17:for(u=y(e,3,3);u;--u)p[a++]=0;break;case 18:for(u=y(e,7,11);u;--u)p[a++]=0;break;default:p[a++]=c}}m(t,p,0,n),m(i,p,n,r)}function b(e,t,i){for(;;){var n,r,o,s,h=x(e,t);if(256===h)return 0;if(h<256)e.dest[e.destLen++]=h;else for(n=y(e,a[h-=257],u[h]),r=x(e,i),s=o=e.destLen-y(e,l[r],c[r]);s<o+n;++s)e.dest[e.destLen++]=e.dest[s]}}function v(e){for(var t,i;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,i=t;i;--i)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}!function(e,t){var i;for(i=0;i<7;++i)e.table[i]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,i=0;i<24;++i)e.trans[i]=256+i;for(i=0;i<144;++i)e.trans[24+i]=i;for(i=0;i<8;++i)e.trans[168+i]=280+i;for(i=0;i<112;++i)e.trans[176+i]=144+i;for(i=0;i<5;++i)t.table[i]=0;for(t.table[5]=32,i=0;i<32;++i)t.trans[i]=i}(o,s),f(a,u,4,3),f(l,c,2,1),a[28]=0,u[28]=258;var S=function(e,t){var i,n,a=new r(e,t);do{switch(i=_(a),y(a,2,0)){case 0:n=v(a);break;case 1:n=b(a,o,s);break;case 2:w(a,a.ltree,a.dtree),n=b(a,a.ltree,a.dtree);break;default:n=-3}if(0!==n)throw new Error("Data error")}while(!i);return a.destLen<a.dest.length?"function"==typeof a.dest.slice?a.dest.slice(0,a.destLen):a.dest.subarray(0,a.destLen):a.dest};function T(e,t,i,n,r){return Math.pow(1-r,3)*e+3*Math.pow(1-r,2)*r*t+3*(1-r)*Math.pow(r,2)*i+Math.pow(r,3)*n}function C(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function N(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function F(e){throw new Error(e)}function O(e,t){e||F(t)}C.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},C.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},C.prototype.addX=function(e){this.addPoint(e,null)},C.prototype.addY=function(e){this.addPoint(null,e)},C.prototype.addBezier=function(e,t,i,n,r,o,s,a){var u=[e,t],l=[i,n],c=[r,o],h=[s,a];this.addPoint(e,t),this.addPoint(s,a);for(var d=0;d<=1;d++){var p=6*u[d]-12*l[d]+6*c[d],f=-3*u[d]+9*l[d]-9*c[d]+3*h[d],g=3*l[d]-3*u[d];if(0!==f){var m=Math.pow(p,2)-4*g*f;if(!(m<0)){var _=(-p+Math.sqrt(m))/(2*f);0<_&&_<1&&(0===d&&this.addX(T(u[d],l[d],c[d],h[d],_)),1===d&&this.addY(T(u[d],l[d],c[d],h[d],_)));var y=(-p-Math.sqrt(m))/(2*f);0<y&&y<1&&(0===d&&this.addX(T(u[d],l[d],c[d],h[d],y)),1===d&&this.addY(T(u[d],l[d],c[d],h[d],y)))}}else{if(0===p)continue;var x=-g/p;0<x&&x<1&&(0===d&&this.addX(T(u[d],l[d],c[d],h[d],x)),1===d&&this.addY(T(u[d],l[d],c[d],h[d],x)))}}},C.prototype.addQuad=function(e,t,i,n,r,o){var s=e+2/3*(i-e),a=t+2/3*(n-t),u=s+1/3*(r-e),l=a+1/3*(o-t);this.addBezier(e,t,s,a,u,l,r,o)},N.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},N.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},N.prototype.curveTo=N.prototype.bezierCurveTo=function(e,t,i,n,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:i,y2:n,x:r,y:o})},N.prototype.quadTo=N.prototype.quadraticCurveTo=function(e,t,i,n){this.commands.push({type:"Q",x1:e,y1:t,x:i,y:n})},N.prototype.close=N.prototype.closePath=function(){this.commands.push({type:"Z"})},N.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof C){var t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},N.prototype.getBoundingBox=function(){for(var e=new C,t=0,i=0,n=0,r=0,o=0;o<this.commands.length;o++){var s=this.commands[o];switch(s.type){case"M":e.addPoint(s.x,s.y),t=n=s.x,i=r=s.y;break;case"L":e.addPoint(s.x,s.y),n=s.x,r=s.y;break;case"Q":e.addQuad(n,r,s.x1,s.y1,s.x,s.y),n=s.x,r=s.y;break;case"C":e.addBezier(n,r,s.x1,s.y1,s.x2,s.y2,s.x,s.y),n=s.x,r=s.y;break;case"Z":n=t,r=i;break;default:throw new Error("Unexpected path command "+s.type)}}return e.isEmpty()&&e.addPoint(0,0),e},N.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var i=this.commands[t];"M"===i.type?e.moveTo(i.x,i.y):"L"===i.type?e.lineTo(i.x,i.y):"C"===i.type?e.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y):"Q"===i.type?e.quadraticCurveTo(i.x1,i.y1,i.x,i.y):"Z"===i.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},N.prototype.toPathData=function(e){function t(t){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function i(){for(var e=arguments,i="",n=0;n<arguments.length;n+=1){var r=e[n];r>=0&&n>0&&(i+=" "),i+=t(r)}return i}e=void 0!==e?e:2;for(var n="",r=0;r<this.commands.length;r+=1){var o=this.commands[r];"M"===o.type?n+="M"+i(o.x,o.y):"L"===o.type?n+="L"+i(o.x,o.y):"C"===o.type?n+="C"+i(o.x1,o.y1,o.x2,o.y2,o.x,o.y):"Q"===o.type?n+="Q"+i(o.x1,o.y1,o.x,o.y):"Z"===o.type&&(n+="Z")}return n},N.prototype.toSVG=function(e){var t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>"},N.prototype.toDOMElement=function(e){var t=this.toPathData(e),i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i};var E={fail:F,argument:O,assert:O},D=2147483648,M={},I={},V={};function B(e){return function(){return e}}I.BYTE=function(e){return E.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},V.BYTE=B(1),I.CHAR=function(e){return[e.charCodeAt(0)]},V.CHAR=B(1),I.CHARARRAY=function(e){void 0===e&&(e="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var t=[],i=0;i<e.length;i+=1)t[i]=e.charCodeAt(i);return t},V.CHARARRAY=function(e){return void 0===e?0:e.length},I.USHORT=function(e){return[e>>8&255,255&e]},V.USHORT=B(2),I.SHORT=function(e){return e>=32768&&(e=-(65536-e)),[e>>8&255,255&e]},V.SHORT=B(2),I.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},V.UINT24=B(3),I.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},V.ULONG=B(4),I.LONG=function(e){return e>=D&&(e=-(2*D-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},V.LONG=B(4),I.FIXED=I.ULONG,V.FIXED=V.ULONG,I.FWORD=I.SHORT,V.FWORD=V.SHORT,I.UFWORD=I.USHORT,V.UFWORD=V.USHORT,I.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},V.LONGDATETIME=B(8),I.TAG=function(e){return E.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},V.TAG=B(4),I.Card8=I.BYTE,V.Card8=V.BYTE,I.Card16=I.USHORT,V.Card16=V.USHORT,I.OffSize=I.BYTE,V.OffSize=V.BYTE,I.SID=I.USHORT,V.SID=V.USHORT,I.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?I.NUMBER16(e):I.NUMBER32(e)},V.NUMBER=function(e){return I.NUMBER(e).length},I.NUMBER16=function(e){return[28,e>>8&255,255&e]},V.NUMBER16=B(3),I.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},V.NUMBER32=B(5),I.REAL=function(e){var t=e.toString(),i=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(i){var n=parseFloat("1e"+((i[2]?+i[2]:0)+i[1].length));t=(Math.round(e*n)/n).toString()}for(var r="",o=0,s=t.length;o<s;o+=1){var a=t[o];r+="e"===a?"-"===t[++o]?"c":"b":"."===a?"a":"-"===a?"e":a}for(var u=[30],l=0,c=(r+=1&r.length?"f":"ff").length;l<c;l+=2)u.push(parseInt(r.substr(l,2),16));return u},V.REAL=function(e){return I.REAL(e).length},I.NAME=I.CHARARRAY,V.NAME=V.CHARARRAY,I.STRING=I.CHARARRAY,V.STRING=V.CHARARRAY,M.UTF8=function(e,t,i){for(var n=[],r=i,o=0;o<r;o++,t+=1)n[o]=e.getUint8(t);return String.fromCharCode.apply(null,n)},M.UTF16=function(e,t,i){for(var n=[],r=i/2,o=0;o<r;o++,t+=2)n[o]=e.getUint16(t);return String.fromCharCode.apply(null,n)},I.UTF16=function(e){for(var t=[],i=0;i<e.length;i+=1){var n=e.charCodeAt(i);t[t.length]=n>>8&255,t[t.length]=255&n}return t},V.UTF16=function(e){return 2*e.length};var A={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};M.MACSTRING=function(e,t,i,n){var r=A[n];if(void 0!==r){for(var o="",s=0;s<i;s++){var a=e.getUint8(t+s);o+=a<=127?String.fromCharCode(a):r[127&a]}return o}};var P,R="function"==typeof WeakMap&&new WeakMap;function L(e){return e>=-128&&e<=127}function k(e,t,i){for(var n=0,r=e.length;t<r&&n<64&&0===e[t];)++t,++n;return i.push(128|n-1),t}function U(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var s=e[o];if(!L(s))break;if(0===s&&o+1<r&&0===e[o+1])break;++o,++n}i.push(n-1);for(var a=t;a<o;++a)i.push(e[a]+256&255);return o}function X(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var s=e[o];if(0===s)break;if(L(s)&&o+1<r&&L(e[o+1]))break;++o,++n}i.push(64|n-1);for(var a=t;a<o;++a){var u=e[a];i.push(u+65536>>8&255,u+256&255)}return o}I.MACSTRING=function(e,t){var i=function(e){if(!P)for(var t in P={},A)P[t]=new String(t);var i=P[e];if(void 0!==i){if(R){var n=R.get(i);if(void 0!==n)return n}var r=A[e];if(void 0!==r){for(var o={},s=0;s<r.length;s++)o[r.charCodeAt(s)]=s+128;return R&&R.set(i,o),o}}}(t);if(void 0!==i){for(var n=[],r=0;r<e.length;r++){var o=e.charCodeAt(r);if(o>=128&&void 0===(o=i[o]))return;n[r]=o}return n}},V.MACSTRING=function(e,t){var i=I.MACSTRING(e,t);return void 0!==i?i.length:0},I.VARDELTAS=function(e){for(var t=0,i=[];t<e.length;){var n=e[t];t=0===n?k(e,t,i):n>=-128&&n<=127?U(e,t,i):X(e,t,i)}return i},I.INDEX=function(e){for(var t=1,i=[t],n=[],r=0;r<e.length;r+=1){var o=I.OBJECT(e[r]);Array.prototype.push.apply(n,o),t+=o.length,i.push(t)}if(0===n.length)return[0,0];for(var s=[],a=1+Math.floor(Math.log(t)/Math.log(2))/8|0,u=[void 0,I.BYTE,I.USHORT,I.UINT24,I.ULONG][a],l=0;l<i.length;l+=1){var c=u(i[l]);Array.prototype.push.apply(s,c)}return Array.prototype.concat(I.Card16(e.length),I.OffSize(a),s,n)},V.INDEX=function(e){return I.INDEX(e).length},I.DICT=function(e){for(var t=[],i=Object.keys(e),n=i.length,r=0;r<n;r+=1){var o=parseInt(i[r],0),s=e[o];t=(t=t.concat(I.OPERAND(s.value,s.type))).concat(I.OPERATOR(o))}return t},V.DICT=function(e){return I.DICT(e).length},I.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},I.OPERAND=function(e,t){var i=[];if(Array.isArray(t))for(var n=0;n<t.length;n+=1)E.argument(e.length===t.length,"Not enough arguments given for type"+t),i=i.concat(I.OPERAND(e[n],t[n]));else if("SID"===t)i=i.concat(I.NUMBER(e));else if("offset"===t)i=i.concat(I.NUMBER32(e));else if("number"===t)i=i.concat(I.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);i=i.concat(I.REAL(e))}return i},I.OP=I.BYTE,V.OP=V.BYTE;var z="function"==typeof WeakMap&&new WeakMap;function j(e,t,i){if(t.length&&("coverageFormat"!==t[0].name||1===t[0].value))for(var n=0;n<t.length;n+=1){var r=t[n];this[r.name]=r.value}if(this.tableName=e,this.fields=t,i)for(var o=Object.keys(i),s=0;s<o.length;s+=1){var a=o[s],u=i[a];void 0!==this[a]&&(this[a]=u)}}function G(e,t,i){void 0===i&&(i=t.length);var n=new Array(t.length+1);n[0]={name:e+"Count",type:"USHORT",value:i};for(var r=0;r<t.length;r++)n[r+1]={name:e+r,type:"USHORT",value:t[r]};return n}function q(e,t,i){var n=t.length,r=new Array(n+1);r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r[o+1]={name:e+o,type:"TABLE",value:i(t[o],o)};return r}function H(e,t,i){var n=t.length,r=[];r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r=r.concat(i(t[o],o));return r}function W(e){1===e.format?j.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(G("glyph",e.glyphs))):2===e.format?j.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(H("rangeRecord",e.ranges,(function(e){return[{name:"startGlyphID",type:"USHORT",value:e.start},{name:"endGlyphID",type:"USHORT",value:e.end},{name:"startCoverageIndex",type:"USHORT",value:e.index}]})))):E.assert(!1,"Coverage format must be 1 or 2.")}function Y(e){j.call(this,"scriptListTable",H("scriptRecord",e,(function(e,t){var i=e.script,n=i.defaultLangSys;return E.assert(!!n,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new j("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new j("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(G("featureIndex",n.featureIndexes)))}].concat(H("langSys",i.langSysRecords,(function(e,t){var i=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new j("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(G("featureIndex",i.featureIndexes)))}]}))))}]})))}function $(e){j.call(this,"featureListTable",H("featureRecord",e,(function(e,t){var i=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new j("featureTable",[{name:"featureParams",type:"USHORT",value:i.featureParams}].concat(G("lookupListIndex",i.lookupListIndexes)))}]})))}function Z(e,t){j.call(this,"lookupListTable",q("lookup",e,(function(e){var i=t[e.lookupType];return E.assert(!!i,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new j("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(q("subtable",e.subtables,i)))})))}I.CHARSTRING=function(e){if(z){var t=z.get(e);if(void 0!==t)return t}for(var i=[],n=e.length,r=0;r<n;r+=1){var o=e[r];i=i.concat(I[o.type](o.value))}return z&&z.set(e,i),i},V.CHARSTRING=function(e){return I.CHARSTRING(e).length},I.OBJECT=function(e){var t=I[e.type];return E.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},V.OBJECT=function(e){var t=V[e.type];return E.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},I.TABLE=function(e){for(var t=[],i=e.fields.length,n=[],r=[],o=0;o<i;o+=1){var s=e.fields[o],a=I[s.type];E.argument(void 0!==a,"No encoding function for field type "+s.type+" ("+s.name+")");var u=e[s.name];void 0===u&&(u=s.value);var l=a(u);"TABLE"===s.type?(r.push(t.length),t=t.concat([0,0]),n.push(l)):t=t.concat(l)}for(var c=0;c<n.length;c+=1){var h=r[c],d=t.length;E.argument(d<65536,"Table "+e.tableName+" too big."),t[h]=d>>8,t[h+1]=255&d,t=t.concat(n[c])}return t},V.TABLE=function(e){for(var t=0,i=e.fields.length,n=0;n<i;n+=1){var r=e.fields[n],o=V[r.type];E.argument(void 0!==o,"No sizeOf function for field type "+r.type+" ("+r.name+")");var s=e[r.name];void 0===s&&(s=r.value),t+=o(s),"TABLE"===r.type&&(t+=2)}return t},I.RECORD=I.TABLE,V.RECORD=V.TABLE,I.LITERAL=function(e){return e},V.LITERAL=function(e){return e.length},j.prototype.encode=function(){return I.TABLE(this)},j.prototype.sizeOf=function(){return V.TABLE(this)},W.prototype=Object.create(j.prototype),W.prototype.constructor=W,Y.prototype=Object.create(j.prototype),Y.prototype.constructor=Y,$.prototype=Object.create(j.prototype),$.prototype.constructor=$,Z.prototype=Object.create(j.prototype),Z.prototype.constructor=Z;var K={Table:j,Record:j,Coverage:W,ScriptList:Y,FeatureList:$,LookupList:Z,ushortList:G,tableList:q,recordList:H};function Q(e,t){return e.getUint8(t)}function J(e,t){return e.getUint16(t,!1)}function ee(e,t){return e.getUint32(t,!1)}function te(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var ie={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function ne(e,t){this.data=e,this.offset=t,this.relativeOffset=0}ne.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},ne.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},ne.prototype.parseCard8=ne.prototype.parseByte,ne.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},ne.prototype.parseCard16=ne.prototype.parseUShort,ne.prototype.parseSID=ne.prototype.parseUShort,ne.prototype.parseOffset16=ne.prototype.parseUShort,ne.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},ne.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},ne.prototype.parseULong=function(){var e=ee(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},ne.prototype.parseOffset32=ne.prototype.parseULong,ne.prototype.parseFixed=function(){var e=te(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},ne.prototype.parseString=function(e){var t=this.data,i=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var r=0;r<e;r++)n+=String.fromCharCode(t.getUint8(i+r));return n},ne.prototype.parseTag=function(){return this.parseString(4)},ne.prototype.parseLongDateTime=function(){var e=ee(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},ne.prototype.parseVersion=function(e){var t=J(this.data,this.offset+this.relativeOffset),i=J(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+i/e/10},ne.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=ie[e]*t},ne.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint32(n),n+=4;return this.relativeOffset+=4*e,t},ne.prototype.parseOffset16List=ne.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint16(n),n+=2;return this.relativeOffset+=2*e,t},ne.prototype.parseShortList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getInt16(n),n+=2;return this.relativeOffset+=2*e,t},ne.prototype.parseByteList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint8(n++);return this.relativeOffset+=e,t},ne.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},ne.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},ne.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],u=t[a];o[a]=u.call(this)}i[r]=o}return i},ne.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],u=t[a];o[a]=u.call(this)}i[r]=o}return i},ne.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n],o=e[r];i[r]=o.call(this)}return i},ne.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0!==e){var t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t}},ne.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),i=new Array(t),n=0;n<t;n++)i[n]=this.parseValueRecord(e);return i},ne.prototype.parsePointer=function(e){var t=this.parseOffset16();if(t>0)return new ne(this.data,this.offset+t).parseStruct(e)},ne.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(t>0)return new ne(this.data,this.offset+t).parseStruct(e)},ne.prototype.parseListOfLists=function(e){for(var t=this.parseOffset16List(),i=t.length,n=this.relativeOffset,r=new Array(i),o=0;o<i;o++){var s=t[o];if(0!==s)if(this.relativeOffset=s,e){for(var a=this.parseOffset16List(),u=new Array(a.length),l=0;l<a.length;l++)this.relativeOffset=s+a[l],u[l]=e.call(this);r[o]=u}else r[o]=this.parseUShortList();else r[o]=void 0}return this.relativeOffset=n,r},ne.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort(),i=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(i)};if(2===t){for(var n=new Array(i),r=0;r<i;r++)n[r]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},ne.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:ne.uShort,end:ne.uShort,classId:ne.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},ne.list=function(e,t){return function(){return this.parseList(e,t)}},ne.list32=function(e,t){return function(){return this.parseList32(e,t)}},ne.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},ne.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},ne.pointer=function(e){return function(){return this.parsePointer(e)}},ne.pointer32=function(e){return function(){return this.parsePointer32(e)}},ne.tag=ne.prototype.parseTag,ne.byte=ne.prototype.parseByte,ne.uShort=ne.offset16=ne.prototype.parseUShort,ne.uShortList=ne.prototype.parseUShortList,ne.uLong=ne.offset32=ne.prototype.parseULong,ne.uLongList=ne.prototype.parseULongList,ne.struct=ne.prototype.parseStruct,ne.coverage=ne.prototype.parseCoverage,ne.classDef=ne.prototype.parseClassDef;var re={reserved:ne.uShort,reqFeatureIndex:ne.uShort,featureIndexes:ne.uShortList};ne.prototype.parseScriptList=function(){return this.parsePointer(ne.recordList({tag:ne.tag,script:ne.pointer({defaultLangSys:ne.pointer(re),langSysRecords:ne.recordList({tag:ne.tag,langSys:ne.pointer(re)})})}))||[]},ne.prototype.parseFeatureList=function(){return this.parsePointer(ne.recordList({tag:ne.tag,feature:ne.pointer({featureParams:ne.offset16,lookupListIndexes:ne.uShortList})}))||[]},ne.prototype.parseLookupList=function(e){return this.parsePointer(ne.list(ne.pointer((function(){var t=this.parseUShort();E.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");var i=this.parseUShort(),n=16&i;return{lookupType:t,lookupFlag:i,subtables:this.parseList(ne.pointer(e[t])),markFilteringSet:n?this.parseUShort():void 0}}))))||[]},ne.prototype.parseFeatureVariationsList=function(){return this.parsePointer32((function(){var e=this.parseUShort(),t=this.parseUShort();return E.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:ne.offset32,featureTableSubstitutionOffset:ne.offset32})}))||[]};var oe={getByte:Q,getCard8:Q,getUShort:J,getCard16:J,getShort:function(e,t){return e.getInt16(t,!1)},getULong:ee,getFixed:te,getTag:function(e,t){for(var i="",n=t;n<t+4;n+=1)i+=String.fromCharCode(e.getInt8(n));return i},getOffset:function(e,t,i){for(var n=0,r=0;r<i;r+=1)n<<=8,n+=e.getUint8(t+r);return n},getBytes:function(e,t,i){for(var n=[],r=t;r<i;r+=1)n.push(e.getUint8(r));return n},bytesToString:function(e){for(var t="",i=0;i<e.length;i+=1)t+=String.fromCharCode(e[i]);return t},Parser:ne};function se(e,t,i){e.segments.push({end:t,start:t,delta:-(t-i),offset:0,glyphIndex:i})}var ae={parse:function(e,t){var i={};i.version=oe.getUShort(e,t),E.argument(0===i.version,"cmap table version should be 0."),i.numTables=oe.getUShort(e,t+2);for(var n=-1,r=i.numTables-1;r>=0;r-=1){var o=oe.getUShort(e,t+4+8*r),s=oe.getUShort(e,t+4+8*r+2);if(3===o&&(0===s||1===s||10===s)||0===o&&(0===s||1===s||2===s||3===s||4===s)){n=oe.getULong(e,t+4+8*r+4);break}}if(-1===n)throw new Error("No valid cmap sub-tables found.");var a=new oe.Parser(e,t+n);if(i.format=a.parseUShort(),12===i.format)!function(e,t){var i;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=i=t.parseULong(),e.glyphIndexMap={};for(var n=0;n<i;n+=1)for(var r=t.parseULong(),o=t.parseULong(),s=t.parseULong(),a=r;a<=o;a+=1)e.glyphIndexMap[a]=s,s++}(i,a);else{if(4!==i.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+i.format+").");!function(e,t,i,n,r){var o;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=o=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};for(var s=new oe.Parser(i,n+r+14),a=new oe.Parser(i,n+r+16+2*o),u=new oe.Parser(i,n+r+16+4*o),l=new oe.Parser(i,n+r+16+6*o),c=n+r+16+8*o,h=0;h<o-1;h+=1)for(var d=void 0,p=s.parseUShort(),f=a.parseUShort(),g=u.parseShort(),m=l.parseUShort(),_=f;_<=p;_+=1)0!==m?(c=l.offset+l.relativeOffset-2,c+=m,c+=2*(_-f),0!==(d=oe.getUShort(i,c))&&(d=d+g&65535)):d=_+g&65535,e.glyphIndexMap[_]=d}(i,a,e,t,n)}return i},make:function(e){var t,i=!0;for(t=e.length-1;t>0;t-=1){if(e.get(t).unicode>65535){console.log("Adding CMAP format 12 (needed!)"),i=!1;break}}var n=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:i?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:i?12:20}];i||(n=n.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),n=n.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var r=new K.Table("cmap",n);for(r.segments=[],t=0;t<e.length;t+=1){for(var o=e.get(t),s=0;s<o.unicodes.length;s+=1)se(r,o.unicodes[s],t);r.segments=r.segments.sort((function(e,t){return e.start-t.start}))}!function(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}(r);var a=r.segments.length,u=0,l=[],c=[],h=[],d=[],p=[],f=[];for(t=0;t<a;t+=1){var g=r.segments[t];g.end<=65535&&g.start<=65535?(l=l.concat({name:"end_"+t,type:"USHORT",value:g.end}),c=c.concat({name:"start_"+t,type:"USHORT",value:g.start}),h=h.concat({name:"idDelta_"+t,type:"SHORT",value:g.delta}),d=d.concat({name:"idRangeOffset_"+t,type:"USHORT",value:g.offset}),void 0!==g.glyphId&&(p=p.concat({name:"glyph_"+t,type:"USHORT",value:g.glyphId}))):u+=1,i||void 0===g.glyphIndex||(f=(f=(f=f.concat({name:"cmap12Start_"+t,type:"ULONG",value:g.start})).concat({name:"cmap12End_"+t,type:"ULONG",value:g.end})).concat({name:"cmap12Glyph_"+t,type:"ULONG",value:g.glyphIndex}))}if(r.segCountX2=2*(a-u),r.searchRange=2*Math.pow(2,Math.floor(Math.log(a-u)/Math.log(2))),r.entrySelector=Math.log(r.searchRange/2)/Math.log(2),r.rangeShift=r.segCountX2-r.searchRange,r.fields=r.fields.concat(l),r.fields.push({name:"reservedPad",type:"USHORT",value:0}),r.fields=r.fields.concat(c),r.fields=r.fields.concat(h),r.fields=r.fields.concat(d),r.fields=r.fields.concat(p),r.cmap4Length=14+2*l.length+2+2*c.length+2*h.length+2*d.length+2*p.length,!i){var m=16+4*f.length;r.cmap12Offset=20+r.cmap4Length,r.fields=r.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:m},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:f.length/3}]),r.fields=r.fields.concat(f)}return r}},ue=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],le=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],ce=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],he=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function de(e){this.font=e}function pe(e){this.cmap=e}function fe(e,t){this.encoding=e,this.charset=t}function ge(e){switch(e.version){case 1:this.names=he.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<he.length?this.names[t]=he[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-he.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var i=0;i<e.numberOfGlyphs;i++)this.names[i]=he[i+e.glyphNameIndex[i]];break;default:this.names=[]}}function me(e,t){t.lowMemory?function(e){e._IndexToUnicodeMap={};for(var t=e.tables.cmap.glyphIndexMap,i=Object.keys(t),n=0;n<i.length;n+=1){var r=i[n],o=t[r];void 0===e._IndexToUnicodeMap[o]?e._IndexToUnicodeMap[o]={unicodes:[parseInt(r)]}:e._IndexToUnicodeMap[o].unicodes.push(parseInt(r))}}(e):function(e){for(var t,i=e.tables.cmap.glyphIndexMap,n=Object.keys(i),r=0;r<n.length;r+=1){var o=n[r],s=i[o];(t=e.glyphs.get(s)).addUnicode(parseInt(o))}for(var a=0;a<e.glyphs.length;a+=1)t=e.glyphs.get(a),e.cffEncoding?e.isCIDFont?t.name="gid"+a:t.name=e.cffEncoding.charset[a]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(a))}(e)}de.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.font.glyphs;if(i)for(var n=0;n<i.length;n+=1)for(var r=i.get(n),o=0;o<r.unicodes.length;o+=1)if(r.unicodes[o]===t)return n;return null},pe.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},fe.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.encoding[t];return this.charset.indexOf(i)},ge.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},ge.prototype.glyphIndexToName=function(e){return this.names[e]};var _e={line:function(e,t,i,n,r){e.beginPath(),e.moveTo(t,i),e.lineTo(n,r),e.stroke()}};function ye(e){this.bindConstructorValues(e)}function xe(e,t,i){Object.defineProperty(e,t,{get:function(){return e.path,e[i]},set:function(t){e[i]=t},enumerable:!0,configurable:!0})}function we(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var i=0;i<t.length;i++){var n=t[i];n.path.unitsPerEm=e.unitsPerEm,this.glyphs[i]=n}this.length=t&&t.length||0}ye.prototype.bindConstructorValues=function(e){var t,i;this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],"xMin"in e&&(this.xMin=e.xMin),"yMin"in e&&(this.yMin=e.yMin),"xMax"in e&&(this.xMax=e.xMax),"yMax"in e&&(this.yMax=e.yMax),"advanceWidth"in e&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",(t=e.path,i=t||new N,{configurable:!0,get:function(){return"function"==typeof i&&(i=i()),i},set:function(e){i=e}}))},ye.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},ye.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},ye.prototype.getPath=function(e,t,i,n,r){var o,s;e=void 0!==e?e:0,t=void 0!==t?t:0,i=void 0!==i?i:72,n||(n={});var a=n.xScale,u=n.yScale;if(n.hinting&&r&&r.hinting&&(s=this.path&&r.hinting.exec(this,i)),s)o=r.hinting.getCommands(s),e=Math.round(e),t=Math.round(t),a=u=1;else{o=this.path.commands;var l=1/(this.path.unitsPerEm||1e3)*i;void 0===a&&(a=l),void 0===u&&(u=l)}for(var c=new N,h=0;h<o.length;h+=1){var d=o[h];"M"===d.type?c.moveTo(e+d.x*a,t+-d.y*u):"L"===d.type?c.lineTo(e+d.x*a,t+-d.y*u):"Q"===d.type?c.quadraticCurveTo(e+d.x1*a,t+-d.y1*u,e+d.x*a,t+-d.y*u):"C"===d.type?c.curveTo(e+d.x1*a,t+-d.y1*u,e+d.x2*a,t+-d.y2*u,e+d.x*a,t+-d.y*u):"Z"===d.type&&c.closePath()}return c},ye.prototype.getContours=function(){if(void 0===this.points)return[];for(var e=[],t=[],i=0;i<this.points.length;i+=1){var n=this.points[i];t.push(n),n.lastPointOfContour&&(e.push(t),t=[])}return E.argument(0===t.length,"There are still points left in the current contour."),e},ye.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];"Z"!==r.type&&(t.push(r.x),i.push(r.y)),"Q"!==r.type&&"C"!==r.type||(t.push(r.x1),i.push(r.y1)),"C"===r.type&&(t.push(r.x2),i.push(r.y2))}var o={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,i),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,i),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o},ye.prototype.draw=function(e,t,i,n,r){this.getPath(t,i,n,r).draw(e)},ye.prototype.drawPoints=function(e,t,i,n){function r(t,i,n,r){e.beginPath();for(var o=0;o<t.length;o+=1)e.moveTo(i+t[o].x*r,n+t[o].y*r),e.arc(i+t[o].x*r,n+t[o].y*r,2,0,2*Math.PI,!1);e.closePath(),e.fill()}t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24;for(var o=1/this.path.unitsPerEm*n,s=[],a=[],u=this.path,l=0;l<u.commands.length;l+=1){var c=u.commands[l];void 0!==c.x&&s.push({x:c.x,y:-c.y}),void 0!==c.x1&&a.push({x:c.x1,y:-c.y1}),void 0!==c.x2&&a.push({x:c.x2,y:-c.y2})}e.fillStyle="blue",r(s,t,i,o),e.fillStyle="red",r(a,t,i,o)},ye.prototype.drawMetrics=function(e,t,i,n){var r;t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24,r=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",_e.line(e,t,-1e4,t,1e4),_e.line(e,-1e4,i,1e4,i);var o=this.xMin||0,s=this.yMin||0,a=this.xMax||0,u=this.yMax||0,l=this.advanceWidth||0;e.strokeStyle="blue",_e.line(e,t+o*r,-1e4,t+o*r,1e4),_e.line(e,t+a*r,-1e4,t+a*r,1e4),_e.line(e,-1e4,i+-s*r,1e4,i+-s*r),_e.line(e,-1e4,i+-u*r,1e4,i+-u*r),e.strokeStyle="green",_e.line(e,t+l*r,-1e4,t+l*r,1e4)},we.prototype.get=function(e){if(void 0===this.glyphs[e]){this.font._push(e),"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());var t=this.glyphs[e],i=this.font._IndexToUnicodeMap[e];if(i)for(var n=0;n<i.unicodes.length;n++)t.addUnicode(i.unicodes[n]);this.font.cffEncoding?this.font.isCIDFont?t.name="gid"+e:t.name=this.font.cffEncoding.charset[e]:this.font.glyphNames.names&&(t.name=this.font.glyphNames.glyphIndexToName(e)),this.glyphs[e].advanceWidth=this.font._hmtxTableData[e].advanceWidth,this.glyphs[e].leftSideBearing=this.font._hmtxTableData[e].leftSideBearing}else"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());return this.glyphs[e]},we.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var be={GlyphSet:we,glyphLoader:function(e,t){return new ye({index:t,font:e})},ttfGlyphLoader:function(e,t,i,n,r,o){return function(){var s=new ye({index:t,font:e});return s.path=function(){i(s,n,r);var t=o(e.glyphs,s);return t.unitsPerEm=e.unitsPerEm,t},xe(s,"xMin","_xMin"),xe(s,"xMax","_xMax"),xe(s,"yMin","_yMin"),xe(s,"yMax","_yMax"),s}},cffGlyphLoader:function(e,t,i,n){return function(){var r=new ye({index:t,font:e});return r.path=function(){var t=i(e,r,n);return t.unitsPerEm=e.unitsPerEm,t},r}}};function ve(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i+=1)if(!ve(e[i],t[i]))return!1;return!0}return!1}function Se(e){return e.length<1240?107:e.length<33900?1131:32768}function Te(e,t,i){var n,r,o=[],s=[],a=oe.getCard16(e,t);if(0!==a){var u=oe.getByte(e,t+2);n=t+(a+1)*u+2;for(var l=t+3,c=0;c<a+1;c+=1)o.push(oe.getOffset(e,l,u)),l+=u;r=n+o[a]}else r=t+2;for(var h=0;h<o.length-1;h+=1){var d=oe.getBytes(e,n+o[h],n+o[h+1]);i&&(d=i(d)),s.push(d)}return{objects:s,startOffset:t,endOffset:r}}function Ce(e,t){if(28===t)return e.parseByte()<<8|e.parseByte();if(29===t)return e.parseByte()<<24|e.parseByte()<<16|e.parseByte()<<8|e.parseByte();if(30===t)return function(e){for(var t="",i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var n=e.parseByte(),r=n>>4,o=15&n;if(15===r)break;if(t+=i[r],15===o)break;t+=i[o]}return parseFloat(t)}(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return 256*(t-247)+e.parseByte()+108;if(t>=251&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function Ne(e,t,i){t=void 0!==t?t:0;var n=new oe.Parser(e,t),r=[],o=[];for(i=void 0!==i?i:e.length;n.relativeOffset<i;){var s=n.parseByte();s<=21?(12===s&&(s=1200+n.parseByte()),r.push([s,o]),o=[]):o.push(Ce(n,s))}return function(e){for(var t={},i=0;i<e.length;i+=1){var n=e[i][0],r=e[i][1],o=void 0;if(o=1===r.length?r[0]:r,t.hasOwnProperty(n)&&!isNaN(t[n]))throw new Error("Object "+t+" already has key "+n);t[n]=o}return t}(r)}function Fe(e,t){return t=t<=390?ue[t]:e[t-391]}function Oe(e,t,i){for(var n,r={},o=0;o<t.length;o+=1){var s=t[o];if(Array.isArray(s.type)){var a=[];a.length=s.type.length;for(var u=0;u<s.type.length;u++)void 0===(n=void 0!==e[s.op]?e[s.op][u]:void 0)&&(n=void 0!==s.value&&void 0!==s.value[u]?s.value[u]:null),"SID"===s.type[u]&&(n=Fe(i,n)),a[u]=n;r[s.name]=a}else void 0===(n=e[s.op])&&(n=void 0!==s.value?s.value:null),"SID"===s.type&&(n=Fe(i,n)),r[s.name]=n}return r}var Ee=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],De=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Me(e,t){return Oe(Ne(e,0,e.byteLength),Ee,t)}function Ie(e,t,i,n){return Oe(Ne(e,t,i),De,n)}function Ve(e,t,i,n){for(var r=[],o=0;o<i.length;o+=1){var s=Me(new DataView(new Uint8Array(i[o]).buffer),n);s._subrs=[],s._subrsBias=0,s._defaultWidthX=0,s._nominalWidthX=0;var a=s.private[0],u=s.private[1];if(0!==a&&0!==u){var l=Ie(e,u+t,a,n);if(s._defaultWidthX=l.defaultWidthX,s._nominalWidthX=l.nominalWidthX,0!==l.subrs){var c=Te(e,u+l.subrs+t);s._subrs=c.objects,s._subrsBias=Se(s._subrs)}s._privateDict=l}r.push(s)}return r}function Be(e,t,i){var n,r,o,s,a,u,l,c,h=new N,d=[],p=0,f=!1,g=!1,m=0,_=0;if(e.isCIDFont){var y=e.tables.cff.topDict._fdSelect[t.index],x=e.tables.cff.topDict._fdArray[y];a=x._subrs,u=x._subrsBias,l=x._defaultWidthX,c=x._nominalWidthX}else a=e.tables.cff.topDict._subrs,u=e.tables.cff.topDict._subrsBias,l=e.tables.cff.topDict._defaultWidthX,c=e.tables.cff.topDict._nominalWidthX;var w=l;function b(e,t){g&&h.closePath(),h.moveTo(e,t),g=!0}function v(){d.length%2!=0&&!f&&(w=d.shift()+c),p+=d.length>>1,d.length=0,f=!0}return function i(l){for(var y,x,S,T,C,N,F,O,E,D,M,I,V=0;V<l.length;){var B=l[V];switch(V+=1,B){case 1:case 3:case 18:case 23:v();break;case 4:d.length>1&&!f&&(w=d.shift()+c,f=!0),_+=d.pop(),b(m,_);break;case 5:for(;d.length>0;)m+=d.shift(),_+=d.shift(),h.lineTo(m,_);break;case 6:for(;d.length>0&&(m+=d.shift(),h.lineTo(m,_),0!==d.length);)_+=d.shift(),h.lineTo(m,_);break;case 7:for(;d.length>0&&(_+=d.shift(),h.lineTo(m,_),0!==d.length);)m+=d.shift(),h.lineTo(m,_);break;case 8:for(;d.length>0;)n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+d.shift(),h.curveTo(n,r,o,s,m,_);break;case 10:C=d.pop()+u,(N=a[C])&&i(N);break;case 11:return;case 12:switch(B=l[V],V+=1,B){case 35:n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s+d.shift(),E=F+d.shift(),D=O+d.shift(),M=E+d.shift(),I=D+d.shift(),m=M+d.shift(),_=I+d.shift(),d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;case 34:n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s,E=F+d.shift(),D=s,M=E+d.shift(),I=_,m=M+d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;case 36:n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s,E=F+d.shift(),D=s,M=E+d.shift(),I=D+d.shift(),m=M+d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;case 37:n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),F=o+d.shift(),O=s+d.shift(),E=F+d.shift(),D=O+d.shift(),M=E+d.shift(),I=D+d.shift(),Math.abs(M-m)>Math.abs(I-_)?m=M+d.shift():_=I+d.shift(),h.curveTo(n,r,o,s,F,O),h.curveTo(E,D,M,I,m,_);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+B),d.length=0}break;case 14:d.length>0&&!f&&(w=d.shift()+c,f=!0),g&&(h.closePath(),g=!1);break;case 19:case 20:v(),V+=p+7>>3;break;case 21:d.length>2&&!f&&(w=d.shift()+c,f=!0),_+=d.pop(),b(m+=d.pop(),_);break;case 22:d.length>1&&!f&&(w=d.shift()+c,f=!0),b(m+=d.pop(),_);break;case 24:for(;d.length>2;)n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+d.shift(),h.curveTo(n,r,o,s,m,_);m+=d.shift(),_+=d.shift(),h.lineTo(m,_);break;case 25:for(;d.length>6;)m+=d.shift(),_+=d.shift(),h.lineTo(m,_);n=m+d.shift(),r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+d.shift(),h.curveTo(n,r,o,s,m,_);break;case 26:for(d.length%2&&(m+=d.shift());d.length>0;)n=m,r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o,_=s+d.shift(),h.curveTo(n,r,o,s,m,_);break;case 27:for(d.length%2&&(_+=d.shift());d.length>0;)n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s,h.curveTo(n,r,o,s,m,_);break;case 28:y=l[V],x=l[V+1],d.push((y<<24|x<<16)>>16),V+=2;break;case 29:C=d.pop()+e.gsubrsBias,(N=e.gsubrs[C])&&i(N);break;case 30:for(;d.length>0&&(n=m,r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_),0!==d.length);)n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),_=s+d.shift(),m=o+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_);break;case 31:for(;d.length>0&&(n=m+d.shift(),r=_,o=n+d.shift(),s=r+d.shift(),_=s+d.shift(),m=o+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_),0!==d.length);)n=m,r=_+d.shift(),o=n+d.shift(),s=r+d.shift(),m=o+d.shift(),_=s+(1===d.length?d.shift():0),h.curveTo(n,r,o,s,m,_);break;default:B<32?console.log("Glyph "+t.index+": unknown operator "+B):B<247?d.push(B-139):B<251?(y=l[V],V+=1,d.push(256*(B-247)+y+108)):B<255?(y=l[V],V+=1,d.push(256*-(B-251)-y-108)):(y=l[V],x=l[V+1],S=l[V+2],T=l[V+3],V+=4,d.push((y<<24|x<<16|S<<8|T)/65536))}}}(i),t.advanceWidth=w,h}function Ae(e,t){var i,n=ue.indexOf(e);return n>=0&&(i=n),(n=t.indexOf(e))>=0?i=n+ue.length:(i=ue.length+t.length,t.push(e)),i}function Pe(e,t,i){for(var n={},r=0;r<e.length;r+=1){var o=e[r],s=t[o.name];void 0===s||ve(s,o.value)||("SID"===o.type&&(s=Ae(s,i)),n[o.op]={name:o.name,type:o.type,value:s})}return n}function Re(e,t){var i=new K.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return i.dict=Pe(Ee,e,t),i}function Le(e){var t=new K.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function ke(e){var t=[],i=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,r=0,o=0;o<i.commands.length;o+=1){var s=void 0,a=void 0,u=i.commands[o];if("Q"===u.type){var l=1/3,c=2/3;u={type:"C",x:u.x,y:u.y,x1:Math.round(l*n+c*u.x1),y1:Math.round(l*r+c*u.y1),x2:Math.round(l*u.x+c*u.x1),y2:Math.round(l*u.y+c*u.y1)}}if("M"===u.type)s=Math.round(u.x-n),a=Math.round(u.y-r),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:a}),t.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(u.x),r=Math.round(u.y);else if("L"===u.type)s=Math.round(u.x-n),a=Math.round(u.y-r),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:a}),t.push({name:"rlineto",type:"OP",value:5}),n=Math.round(u.x),r=Math.round(u.y);else if("C"===u.type){var h=Math.round(u.x1-n),d=Math.round(u.y1-r),p=Math.round(u.x2-u.x1),f=Math.round(u.y2-u.y1);s=Math.round(u.x-u.x2),a=Math.round(u.y-u.y2),t.push({name:"dx1",type:"NUMBER",value:h}),t.push({name:"dy1",type:"NUMBER",value:d}),t.push({name:"dx2",type:"NUMBER",value:p}),t.push({name:"dy2",type:"NUMBER",value:f}),t.push({name:"dx",type:"NUMBER",value:s}),t.push({name:"dy",type:"NUMBER",value:a}),t.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(u.x),r=Math.round(u.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}var Ue={parse:function(e,t,i,n){i.tables.cff={};var r=function(e,t){var i={};return i.formatMajor=oe.getCard8(e,t),i.formatMinor=oe.getCard8(e,t+1),i.size=oe.getCard8(e,t+2),i.offsetSize=oe.getCard8(e,t+3),i.startOffset=t,i.endOffset=t+4,i}(e,t),o=Te(e,r.endOffset,oe.bytesToString),s=Te(e,o.endOffset),a=Te(e,s.endOffset,oe.bytesToString),u=Te(e,a.endOffset);i.gsubrs=u.objects,i.gsubrsBias=Se(i.gsubrs);var l=Ve(e,t,s.objects,a.objects);if(1!==l.length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);var c=l[0];if(i.tables.cff.topDict=c,c._privateDict&&(i.defaultWidthX=c._privateDict.defaultWidthX,i.nominalWidthX=c._privateDict.nominalWidthX),void 0!==c.ros[0]&&void 0!==c.ros[1]&&(i.isCIDFont=!0),i.isCIDFont){var h=c.fdArray,d=c.fdSelect;if(0===h||0===d)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");var p=Te(e,h+=t),f=Ve(e,t,p.objects,a.objects);c._fdArray=f,d+=t,c._fdSelect=function(e,t,i,n){var r,o=[],s=new oe.Parser(e,t),a=s.parseCard8();if(0===a)for(var u=0;u<i;u++){if((r=s.parseCard8())>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");o.push(r)}else{if(3!==a)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+a);var l,c=s.parseCard16(),h=s.parseCard16();if(0!==h)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+h);for(var d=0;d<c;d++){if(r=s.parseCard8(),l=s.parseCard16(),r>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");if(l>i)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+l);for(;h<l;h++)o.push(r);h=l}if(l!==i)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+l)}return o}(e,d,i.numGlyphs,f.length)}var g,m=t+c.private[1],_=Ie(e,m,c.private[0],a.objects);if(i.defaultWidthX=_.defaultWidthX,i.nominalWidthX=_.nominalWidthX,0!==_.subrs){var y=m+_.subrs,x=Te(e,y);i.subrs=x.objects,i.subrsBias=Se(i.subrs)}else i.subrs=[],i.subrsBias=0;n.lowMemory?(g=function(e,t){var i,n,r=[],o=oe.getCard16(e,t);if(0!==o){var s=oe.getByte(e,t+2);i=t+(o+1)*s+2;for(var a=t+3,u=0;u<o+1;u+=1)r.push(oe.getOffset(e,a,s)),a+=s;n=i+r[o]}else n=t+2;return{offsets:r,startOffset:t,endOffset:n}}(e,t+c.charStrings),i.nGlyphs=g.offsets.length):(g=Te(e,t+c.charStrings),i.nGlyphs=g.objects.length);var w=function(e,t,i,n){var r,o,s=new oe.Parser(e,t);i-=1;var a=[".notdef"],u=s.parseCard8();if(0===u)for(var l=0;l<i;l+=1)r=s.parseSID(),a.push(Fe(n,r));else if(1===u)for(;a.length<=i;){r=s.parseSID(),o=s.parseCard8();for(var c=0;c<=o;c+=1)a.push(Fe(n,r)),r+=1}else{if(2!==u)throw new Error("Unknown charset format "+u);for(;a.length<=i;){r=s.parseSID(),o=s.parseCard16();for(var h=0;h<=o;h+=1)a.push(Fe(n,r)),r+=1}}return a}(e,t+c.charset,i.nGlyphs,a.objects);if(0===c.encoding?i.cffEncoding=new fe(le,w):1===c.encoding?i.cffEncoding=new fe(ce,w):i.cffEncoding=function(e,t,i){var n,r={},o=new oe.Parser(e,t),s=o.parseCard8();if(0===s)for(var a=o.parseCard8(),u=0;u<a;u+=1)r[n=o.parseCard8()]=u;else{if(1!==s)throw new Error("Unknown encoding format "+s);var l=o.parseCard8();n=1;for(var c=0;c<l;c+=1)for(var h=o.parseCard8(),d=o.parseCard8(),p=h;p<=h+d;p+=1)r[p]=n,n+=1}return new fe(r,i)}(e,t+c.encoding,w),i.encoding=i.encoding||i.cffEncoding,i.glyphs=new be.GlyphSet(i),n.lowMemory)i._push=function(n){var r=function(e,t,i,n,r){var o=oe.getCard16(i,n),s=0;0!==o&&(s=n+(o+1)*oe.getByte(i,n+2)+2);var a=oe.getBytes(i,s+t[e],s+t[e+1]);return r&&(a=r(a)),a}(n,g.offsets,e,t+c.charStrings);i.glyphs.push(n,be.cffGlyphLoader(i,n,Be,r))};else for(var b=0;b<i.nGlyphs;b+=1){var v=g.objects[b];i.glyphs.push(b,be.cffGlyphLoader(i,b,Be,v))}},make:function(e,t){for(var i,n=new K.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),r=1/t.unitsPerEm,o={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[r,0,0,r,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},s=[],a=1;a<e.length;a+=1)i=e.get(a),s.push(i.name);var u=[];n.header=new K.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),n.nameIndex=function(e){var t=new K.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var i=0;i<e.length;i+=1)t.names.push({name:"name_"+i,type:"NAME",value:e[i]});return t}([t.postScriptName]);var l=Re(o,u);n.topDictIndex=Le(l),n.globalSubrIndex=new K.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),n.charsets=function(e,t){for(var i=new K.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var r=Ae(e[n],t);i.fields.push({name:"glyph_"+n,type:"SID",value:r})}return i}(s,u),n.charStringsIndex=function(e){for(var t=new K.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),i=0;i<e.length;i+=1){var n=e.get(i),r=ke(n);t.charStrings.push({name:n.name,type:"CHARSTRING",value:r})}return t}(e),n.privateDict=function(e,t){var i=new K.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return i.dict=Pe(De,e,t),i}({},u),n.stringIndex=function(e){var t=new K.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var i=0;i<e.length;i+=1)t.strings.push({name:"string_"+i,type:"STRING",value:e[i]});return t}(u);var c=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return o.charset=c,o.encoding=0,o.charStrings=o.charset+n.charsets.sizeOf(),o.private[1]=o.charStrings+n.charStringsIndex.sizeOf(),l=Re(o,u),n.topDictIndex=Le(l),n}};var Xe={parse:function(e,t){var i={},n=new oe.Parser(e,t);return i.version=n.parseVersion(),i.fontRevision=Math.round(1e3*n.parseFixed())/1e3,i.checkSumAdjustment=n.parseULong(),i.magicNumber=n.parseULong(),E.argument(1594834165===i.magicNumber,"Font header has wrong magic number."),i.flags=n.parseUShort(),i.unitsPerEm=n.parseUShort(),i.created=n.parseLongDateTime(),i.modified=n.parseLongDateTime(),i.xMin=n.parseShort(),i.yMin=n.parseShort(),i.xMax=n.parseShort(),i.yMax=n.parseShort(),i.macStyle=n.parseUShort(),i.lowestRecPPEM=n.parseUShort(),i.fontDirectionHint=n.parseShort(),i.indexToLocFormat=n.parseShort(),i.glyphDataFormat=n.parseShort(),i},make:function(e){var t=Math.round((new Date).getTime()/1e3)+2082844800,i=t;return e.createdTimestamp&&(i=e.createdTimestamp+2082844800),new K.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:i},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}};var ze={parse:function(e,t){var i={},n=new oe.Parser(e,t);return i.version=n.parseVersion(),i.ascender=n.parseShort(),i.descender=n.parseShort(),i.lineGap=n.parseShort(),i.advanceWidthMax=n.parseUShort(),i.minLeftSideBearing=n.parseShort(),i.minRightSideBearing=n.parseShort(),i.xMaxExtent=n.parseShort(),i.caretSlopeRise=n.parseShort(),i.caretSlopeRun=n.parseShort(),i.caretOffset=n.parseShort(),n.relativeOffset+=8,i.metricDataFormat=n.parseShort(),i.numberOfHMetrics=n.parseUShort(),i},make:function(e){return new K.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}};var je={parse:function(e,t,i,n,r,o,s){s.lowMemory?function(e,t,i,n,r){var o,s;e._hmtxTableData={};for(var a=new oe.Parser(t,i),u=0;u<r;u+=1)u<n&&(o=a.parseUShort(),s=a.parseShort()),e._hmtxTableData[u]={advanceWidth:o,leftSideBearing:s}}(e,t,i,n,r):function(e,t,i,n,r){for(var o,s,a=new oe.Parser(e,t),u=0;u<n;u+=1){u<i&&(o=a.parseUShort(),s=a.parseShort());var l=r.get(u);l.advanceWidth=o,l.leftSideBearing=s}}(t,i,n,r,o)},make:function(e){for(var t=new K.Table("hmtx",[]),i=0;i<e.length;i+=1){var n=e.get(i),r=n.advanceWidth||0,o=n.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+i,type:"USHORT",value:r}),t.fields.push({name:"leftSideBearing_"+i,type:"SHORT",value:o})}return t}};var Ge={make:function(e){for(var t=new K.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),i="",n=12+4*e.length,r=0;r<e.length;++r){var o=i.indexOf(e[r]);o<0&&(o=i.length,i+=e[r]),t.fields.push({name:"offset "+r,type:"USHORT",value:n+o}),t.fields.push({name:"length "+r,type:"USHORT",value:e[r].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),t},parse:function(e,t){var i=new oe.Parser(e,t),n=i.parseULong();E.argument(1===n,"Unsupported ltag table version."),i.skip("uLong",1);for(var r=i.parseULong(),o=[],s=0;s<r;s++){for(var a="",u=t+i.parseUShort(),l=i.parseUShort(),c=u;c<u+l;++c)a+=String.fromCharCode(e.getInt8(c));o.push(a)}return o}};var qe={parse:function(e,t){var i={},n=new oe.Parser(e,t);return i.version=n.parseVersion(),i.numGlyphs=n.parseUShort(),1===i.version&&(i.maxPoints=n.parseUShort(),i.maxContours=n.parseUShort(),i.maxCompositePoints=n.parseUShort(),i.maxCompositeContours=n.parseUShort(),i.maxZones=n.parseUShort(),i.maxTwilightPoints=n.parseUShort(),i.maxStorage=n.parseUShort(),i.maxFunctionDefs=n.parseUShort(),i.maxInstructionDefs=n.parseUShort(),i.maxStackElements=n.parseUShort(),i.maxSizeOfInstructions=n.parseUShort(),i.maxComponentElements=n.parseUShort(),i.maxComponentDepth=n.parseUShort()),i},make:function(e){return new K.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}},He=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],We={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},Ye={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},$e={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function Ze(e,t,i){switch(e){case 0:if(65535===t)return"und";if(i)return i[t];break;case 1:return We[t];case 3:return $e[t]}}var Ke="utf-16",Qe={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},Je={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function et(e,t,i){switch(e){case 0:return Ke;case 1:return Je[i]||Qe[t];case 3:if(1===t||10===t)return Ke}}function tt(e){var t={};for(var i in e)t[e[i]]=parseInt(i);return t}function it(e,t,i,n,r,o){return new K.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:i},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:r},{name:"offset",type:"USHORT",value:o}])}function nt(e,t){var i=function(e,t){var i=e.length,n=t.length-i+1;e:for(var r=0;r<n;r++)for(;r<n;r++){for(var o=0;o<i;o++)if(t[r+o]!==e[o])continue e;return r}return-1}(e,t);if(i<0){i=t.length;for(var n=0,r=e.length;n<r;++n)t.push(e[n])}return i}var rt={parse:function(e,t,i){for(var n={},r=new oe.Parser(e,t),o=r.parseUShort(),s=r.parseUShort(),a=r.offset+r.parseUShort(),u=0;u<s;u++){var l=r.parseUShort(),c=r.parseUShort(),h=r.parseUShort(),d=r.parseUShort(),p=He[d]||d,f=r.parseUShort(),g=r.parseUShort(),m=Ze(l,h,i),_=et(l,c,h);if(void 0!==_&&void 0!==m){var y=void 0;if(y=_===Ke?M.UTF16(e,a+g,f):M.MACSTRING(e,a+g,f,_)){var x=n[p];void 0===x&&(x=n[p]={}),x[m]=y}}}return 1===o&&r.parseUShort(),n},make:function(e,t){var i,n=[],r={},o=tt(He);for(var s in e){var a=o[s];if(void 0===a&&(a=s),i=parseInt(a),isNaN(i))throw new Error('Name table entry "'+s+'" does not exist, see nameTableNames for complete list.');r[i]=e[s],n.push(i)}for(var u=tt(We),l=tt($e),c=[],h=[],d=0;d<n.length;d++){var p=r[i=n[d]];for(var f in p){var g=p[f],m=1,_=u[f],y=Ye[_],x=et(m,y,_),w=I.MACSTRING(g,x);void 0===w&&(m=0,(_=t.indexOf(f))<0&&(_=t.length,t.push(f)),y=4,w=I.UTF16(g));var b=nt(w,h);c.push(it(m,y,_,i,w.length,b));var v=l[f];if(void 0!==v){var S=I.UTF16(g),T=nt(S,h);c.push(it(3,1,v,i,S.length,T))}}}c.sort((function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID}));for(var C=new K.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:c.length},{name:"stringOffset",type:"USHORT",value:6+12*c.length}]),N=0;N<c.length;N++)C.fields.push({name:"record_"+N,type:"RECORD",value:c[N]});return C.fields.push({name:"strings",type:"LITERAL",value:h}),C}},ot=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];var st={parse:function(e,t){var i={},n=new oe.Parser(e,t);i.version=n.parseUShort(),i.xAvgCharWidth=n.parseShort(),i.usWeightClass=n.parseUShort(),i.usWidthClass=n.parseUShort(),i.fsType=n.parseUShort(),i.ySubscriptXSize=n.parseShort(),i.ySubscriptYSize=n.parseShort(),i.ySubscriptXOffset=n.parseShort(),i.ySubscriptYOffset=n.parseShort(),i.ySuperscriptXSize=n.parseShort(),i.ySuperscriptYSize=n.parseShort(),i.ySuperscriptXOffset=n.parseShort(),i.ySuperscriptYOffset=n.parseShort(),i.yStrikeoutSize=n.parseShort(),i.yStrikeoutPosition=n.parseShort(),i.sFamilyClass=n.parseShort(),i.panose=[];for(var r=0;r<10;r++)i.panose[r]=n.parseByte();return i.ulUnicodeRange1=n.parseULong(),i.ulUnicodeRange2=n.parseULong(),i.ulUnicodeRange3=n.parseULong(),i.ulUnicodeRange4=n.parseULong(),i.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),i.fsSelection=n.parseUShort(),i.usFirstCharIndex=n.parseUShort(),i.usLastCharIndex=n.parseUShort(),i.sTypoAscender=n.parseShort(),i.sTypoDescender=n.parseShort(),i.sTypoLineGap=n.parseShort(),i.usWinAscent=n.parseUShort(),i.usWinDescent=n.parseUShort(),i.version>=1&&(i.ulCodePageRange1=n.parseULong(),i.ulCodePageRange2=n.parseULong()),i.version>=2&&(i.sxHeight=n.parseShort(),i.sCapHeight=n.parseShort(),i.usDefaultChar=n.parseUShort(),i.usBreakChar=n.parseUShort(),i.usMaxContent=n.parseUShort()),i},make:function(e){return new K.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},unicodeRanges:ot,getUnicodeRange:function(e){for(var t=0;t<ot.length;t+=1){var i=ot[t];if(e>=i.begin&&e<i.end)return t}return-1}};var at={parse:function(e,t){var i={},n=new oe.Parser(e,t);switch(i.version=n.parseVersion(),i.italicAngle=n.parseFixed(),i.underlinePosition=n.parseShort(),i.underlineThickness=n.parseShort(),i.isFixedPitch=n.parseULong(),i.minMemType42=n.parseULong(),i.maxMemType42=n.parseULong(),i.minMemType1=n.parseULong(),i.maxMemType1=n.parseULong(),i.version){case 1:i.names=he.slice();break;case 2:i.numberOfGlyphs=n.parseUShort(),i.glyphNameIndex=new Array(i.numberOfGlyphs);for(var r=0;r<i.numberOfGlyphs;r++)i.glyphNameIndex[r]=n.parseUShort();i.names=[];for(var o=0;o<i.numberOfGlyphs;o++)if(i.glyphNameIndex[o]>=he.length){var s=n.parseChar();i.names.push(n.parseString(s))}break;case 2.5:i.numberOfGlyphs=n.parseUShort(),i.offset=new Array(i.numberOfGlyphs);for(var a=0;a<i.numberOfGlyphs;a++)i.offset[a]=n.parseChar()}return i},make:function(){return new K.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}},ut=new Array(9);ut[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(ne.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(ne.coverage),substitute:this.parseOffset16List()}:void E.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},ut[2]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),sequences:this.parseListOfLists()}},ut[3]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),alternateSets:this.parseListOfLists()}},ut[4]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),ligatureSets:this.parseListOfLists((function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}}))}};var lt={sequenceIndex:ne.uShort,lookupListIndex:ne.uShort};ut[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{substFormat:t,coverage:this.parsePointer(ne.coverage),ruleSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lt)}}))};if(2===t)return{substFormat:t,coverage:this.parsePointer(ne.coverage),classDef:this.parsePointer(ne.classDef),classSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lt)}}))};if(3===t){var i=this.parseUShort(),n=this.parseUShort();return{substFormat:t,coverages:this.parseList(i,ne.pointer(ne.coverage)),lookupRecords:this.parseRecordList(n,lt)}}E.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},ut[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(ne.coverage),chainRuleSets:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lt)}}))}:2===t?{substFormat:2,coverage:this.parsePointer(ne.coverage),backtrackClassDef:this.parsePointer(ne.classDef),inputClassDef:this.parsePointer(ne.classDef),lookaheadClassDef:this.parsePointer(ne.classDef),chainClassSet:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lt)}}))}:3===t?{substFormat:3,backtrackCoverage:this.parseList(ne.pointer(ne.coverage)),inputCoverage:this.parseList(ne.pointer(ne.coverage)),lookaheadCoverage:this.parseList(ne.pointer(ne.coverage)),lookupRecords:this.parseRecordList(lt)}:void E.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},ut[7]=function(){var e=this.parseUShort();E.argument(1===e,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),i=new ne(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:ut[t].call(i)}},ut[8]=function(){var e=this.parseUShort();return E.argument(1===e,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(ne.coverage),backtrackCoverage:this.parseList(ne.pointer(ne.coverage)),lookaheadCoverage:this.parseList(ne.pointer(ne.coverage)),substitutes:this.parseUShortList()}};var ct=new Array(9);ct[1]=function(e){return 1===e.substFormat?new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.ushortList("substitute",e.substitute)))},ct[2]=function(e){return E.assert(1===e.substFormat,"Lookup type 2 substFormat must be 1."),new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("seqSet",e.sequences,(function(e){return new K.Table("sequenceSetTable",K.ushortList("sequence",e))}))))},ct[3]=function(e){return E.assert(1===e.substFormat,"Lookup type 3 substFormat must be 1."),new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("altSet",e.alternateSets,(function(e){return new K.Table("alternateSetTable",K.ushortList("alternate",e))}))))},ct[4]=function(e){return E.assert(1===e.substFormat,"Lookup type 4 substFormat must be 1."),new K.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("ligSet",e.ligatureSets,(function(e){return new K.Table("ligatureSetTable",K.tableList("ligature",e,(function(e){return new K.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:e.ligGlyph}].concat(K.ushortList("component",e.components,e.components.length+1)))})))}))))},ct[6]=function(e){if(1===e.substFormat){var t=new K.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:e.substFormat},{name:"coverage",type:"TABLE",value:new K.Coverage(e.coverage)}].concat(K.tableList("chainRuleSet",e.chainRuleSets,(function(e){return new K.Table("chainRuleSetTable",K.tableList("chainRule",e,(function(e){var t=K.ushortList("backtrackGlyph",e.backtrack,e.backtrack.length).concat(K.ushortList("inputGlyph",e.input,e.input.length+1)).concat(K.ushortList("lookaheadGlyph",e.lookahead,e.lookahead.length)).concat(K.ushortList("substitution",[],e.lookupRecords.length));return e.lookupRecords.forEach((function(e,i){t=t.concat({name:"sequenceIndex"+i,type:"USHORT",value:e.sequenceIndex}).concat({name:"lookupListIndex"+i,type:"USHORT",value:e.lookupListIndex})})),new K.Table("chainRuleTable",t)})))}))));return t}if(2===e.substFormat)E.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(3===e.substFormat){var i=[{name:"substFormat",type:"USHORT",value:e.substFormat}];return i.push({name:"backtrackGlyphCount",type:"USHORT",value:e.backtrackCoverage.length}),e.backtrackCoverage.forEach((function(e,t){i.push({name:"backtrackCoverage"+t,type:"TABLE",value:new K.Coverage(e)})})),i.push({name:"inputGlyphCount",type:"USHORT",value:e.inputCoverage.length}),e.inputCoverage.forEach((function(e,t){i.push({name:"inputCoverage"+t,type:"TABLE",value:new K.Coverage(e)})})),i.push({name:"lookaheadGlyphCount",type:"USHORT",value:e.lookaheadCoverage.length}),e.lookaheadCoverage.forEach((function(e,t){i.push({name:"lookaheadCoverage"+t,type:"TABLE",value:new K.Coverage(e)})})),i.push({name:"substitutionCount",type:"USHORT",value:e.lookupRecords.length}),e.lookupRecords.forEach((function(e,t){i=i.concat({name:"sequenceIndex"+t,type:"USHORT",value:e.sequenceIndex}).concat({name:"lookupListIndex"+t,type:"USHORT",value:e.lookupListIndex})})),new K.Table("chainContextTable",i)}E.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};var ht={parse:function(e,t){var i=new ne(e,t=t||0),n=i.parseVersion(1);return E.argument(1===n||1.1===n,"Unsupported GSUB table version."),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(ut)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(ut),variations:i.parseFeatureVariationsList()}},make:function(e){return new K.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new K.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new K.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new K.LookupList(e.lookups,ct)}])}};var dt={parse:function(e,t){var i=new oe.Parser(e,t),n=i.parseULong();E.argument(1===n,"Unsupported META table version."),i.parseULong(),i.parseULong();for(var r=i.parseULong(),o={},s=0;s<r;s++){var a=i.parseTag(),u=i.parseULong(),l=i.parseULong(),c=M.UTF8(e,t+u,l);o[a]=c}return o},make:function(e){var t=Object.keys(e).length,i="",n=16+12*t,r=new K.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:t}]);for(var o in e){var s=i.length;i+=e[o],r.fields.push({name:"tag "+o,type:"TAG",value:o}),r.fields.push({name:"offset "+o,type:"ULONG",value:n+s}),r.fields.push({name:"length "+o,type:"ULONG",value:e[o].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),r}};function pt(e){return Math.log(e)/Math.log(2)|0}function ft(e){for(;e.length%4!=0;)e.push(0);for(var t=0,i=0;i<e.length;i+=4)t+=(e[i]<<24)+(e[i+1]<<16)+(e[i+2]<<8)+e[i+3];return t%=Math.pow(2,32)}function gt(e,t,i,n){return new K.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==e?e:""},{name:"checkSum",type:"ULONG",value:void 0!==t?t:0},{name:"offset",type:"ULONG",value:void 0!==i?i:0},{name:"length",type:"ULONG",value:void 0!==n?n:0}])}function mt(e){var t=new K.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);t.tables=e,t.numTables=e.length;var i=Math.pow(2,pt(t.numTables));t.searchRange=16*i,t.entrySelector=pt(i),t.rangeShift=16*t.numTables-t.searchRange;for(var n=[],r=[],o=t.sizeOf()+gt().sizeOf()*t.numTables;o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0});for(var s=0;s<e.length;s+=1){var a=e[s];E.argument(4===a.tableName.length,"Table name"+a.tableName+" is invalid.");var u=a.sizeOf(),l=gt(a.tableName,ft(a.encode()),o,u);for(n.push({name:l.tag+" Table Record",type:"RECORD",value:l}),r.push({name:a.tableName+" table",type:"RECORD",value:a}),o+=u,E.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0})}return n.sort((function(e,t){return e.value.tag>t.value.tag?1:-1})),t.fields=t.fields.concat(n),t.fields=t.fields.concat(r),t}function _t(e,t,i){for(var n=0;n<t.length;n+=1){var r=e.charToGlyphIndex(t[n]);if(r>0)return e.glyphs.get(r).getMetrics()}return i}function yt(e){for(var t=0,i=0;i<e.length;i+=1)t+=e[i];return t/e.length}var xt={make:mt,fontToTable:function(e){for(var t,i=[],n=[],r=[],o=[],s=[],a=[],u=[],l=0,c=0,h=0,d=0,p=0,f=0;f<e.glyphs.length;f+=1){var g=e.glyphs.get(f),m=0|g.unicode;if(isNaN(g.advanceWidth))throw new Error("Glyph "+g.name+" ("+f+"): advanceWidth is not a number.");(t>m||void 0===t)&&m>0&&(t=m),l<m&&(l=m);var _=st.getUnicodeRange(m);if(_<32)c|=1<<_;else if(_<64)h|=1<<_-32;else if(_<96)d|=1<<_-64;else{if(!(_<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");p|=1<<_-96}if(".notdef"!==g.name){var y=g.getMetrics();i.push(y.xMin),n.push(y.yMin),r.push(y.xMax),o.push(y.yMax),a.push(y.leftSideBearing),u.push(y.rightSideBearing),s.push(g.advanceWidth)}}var x={xMin:Math.min.apply(null,i),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,o),advanceWidthMax:Math.max.apply(null,s),advanceWidthAvg:yt(s),minLeftSideBearing:Math.min.apply(null,a),maxLeftSideBearing:Math.max.apply(null,a),minRightSideBearing:Math.min.apply(null,u)};x.ascender=e.ascender,x.descender=e.descender;var w=Xe.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:x.xMin,yMin:x.yMin,xMax:x.xMax,yMax:x.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),b=ze.make({ascender:x.ascender,descender:x.descender,advanceWidthMax:x.advanceWidthMax,minLeftSideBearing:x.minLeftSideBearing,minRightSideBearing:x.minRightSideBearing,xMaxExtent:x.maxLeftSideBearing+(x.xMax-x.xMin),numberOfHMetrics:e.glyphs.length}),v=qe.make(e.glyphs.length),S=st.make(Object.assign({xAvgCharWidth:Math.round(x.advanceWidthAvg),usFirstCharIndex:t,usLastCharIndex:l,ulUnicodeRange1:c,ulUnicodeRange2:h,ulUnicodeRange3:d,ulUnicodeRange4:p,sTypoAscender:x.ascender,sTypoDescender:x.descender,sTypoLineGap:0,usWinAscent:x.yMax,usWinDescent:Math.abs(x.yMin),ulCodePageRange1:1,sxHeight:_t(e,"xyvw",{yMax:Math.round(x.ascender/2)}).yMax,sCapHeight:_t(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",x).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0},e.tables.os2)),T=je.make(e.glyphs),C=ae.make(e.glyphs),N=e.getEnglishName("fontFamily"),F=e.getEnglishName("fontSubfamily"),O=N+" "+F,E=e.getEnglishName("postScriptName");E||(E=N.replace(/\s/g,"")+"-"+F);var D={};for(var M in e.names)D[M]=e.names[M];D.uniqueID||(D.uniqueID={en:e.getEnglishName("manufacturer")+":"+O}),D.postScriptName||(D.postScriptName={en:E}),D.preferredFamily||(D.preferredFamily=e.names.fontFamily),D.preferredSubfamily||(D.preferredSubfamily=e.names.fontSubfamily);var I=[],V=rt.make(D,I),B=I.length>0?Ge.make(I):void 0,A=at.make(),P=Ue.make(e.glyphs,{version:e.getEnglishName("version"),fullName:O,familyName:N,weightName:F,postScriptName:E,unitsPerEm:e.unitsPerEm,fontBBox:[0,x.yMin,x.ascender,x.advanceWidthMax]}),R=e.metas&&Object.keys(e.metas).length>0?dt.make(e.metas):void 0,L=[w,b,v,S,V,C,A,P,T];B&&L.push(B),e.tables.gsub&&L.push(ht.make(e.tables.gsub)),R&&L.push(R);for(var k=mt(L),U=ft(k.encode()),X=k.fields,z=!1,j=0;j<X.length;j+=1)if("head table"===X[j].name){X[j].value.checkSumAdjustment=2981146554-U,z=!0;break}if(!z)throw new Error("Could not find head table with checkSum to adjust.");return k},computeCheckSum:ft};function wt(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r].tag;if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function bt(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r];if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function vt(e,t){for(var i,n=0,r=e.length-1;n<=r;){var o=n+r>>>1,s=(i=e[o]).start;if(s===t)return i;s<t?n=o+1:r=o-1}if(n>0)return t>(i=e[n-1]).end?0:i}function St(e,t){this.font=e,this.tableName=t}function Tt(e){St.call(this,e,"gpos")}function Ct(e){St.call(this,e,"gsub")}function Nt(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Ft(e,t,i){for(var n=e.subtables,r=0;r<n.length;r++){var o=n[r];if(o.substFormat===t)return o}if(i)return n.push(i),i}function Ot(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;++n)i[n]=e[n];return t}function Et(e,t){if(!e)throw t}function Dt(e,t,i,n,r){var o;return(t&n)>0?(o=e.parseByte(),0==(t&r)&&(o=-o),o=i+o):o=(t&r)>0?i:i+e.parseShort(),o}function Mt(e,t,i){var n,r,o=new oe.Parser(t,i);if(e.numberOfContours=o.parseShort(),e._xMin=o.parseShort(),e._yMin=o.parseShort(),e._xMax=o.parseShort(),e._yMax=o.parseShort(),e.numberOfContours>0){for(var s=e.endPointIndices=[],a=0;a<e.numberOfContours;a+=1)s.push(o.parseUShort());e.instructionLength=o.parseUShort(),e.instructions=[];for(var u=0;u<e.instructionLength;u+=1)e.instructions.push(o.parseByte());var l=s[s.length-1]+1;n=[];for(var c=0;c<l;c+=1)if(r=o.parseByte(),n.push(r),(8&r)>0)for(var h=o.parseByte(),d=0;d<h;d+=1)n.push(r),c+=1;if(E.argument(n.length===l,"Bad flags."),s.length>0){var p,f=[];if(l>0){for(var g=0;g<l;g+=1)r=n[g],(p={}).onCurve=!!(1&r),p.lastPointOfContour=s.indexOf(g)>=0,f.push(p);for(var m=0,_=0;_<l;_+=1)r=n[_],(p=f[_]).x=Dt(o,r,m,2,16),m=p.x;for(var y=0,x=0;x<l;x+=1)r=n[x],(p=f[x]).y=Dt(o,r,y,4,32),y=p.y}e.points=f}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var w=!0;w;){n=o.parseUShort();var b={glyphIndex:o.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(1&n)>0?(2&n)>0?(b.dx=o.parseShort(),b.dy=o.parseShort()):b.matchedPoints=[o.parseUShort(),o.parseUShort()]:(2&n)>0?(b.dx=o.parseChar(),b.dy=o.parseChar()):b.matchedPoints=[o.parseByte(),o.parseByte()],(8&n)>0?b.xScale=b.yScale=o.parseF2Dot14():(64&n)>0?(b.xScale=o.parseF2Dot14(),b.yScale=o.parseF2Dot14()):(128&n)>0&&(b.xScale=o.parseF2Dot14(),b.scale01=o.parseF2Dot14(),b.scale10=o.parseF2Dot14(),b.yScale=o.parseF2Dot14()),e.components.push(b),w=!!(32&n)}if(256&n){e.instructionLength=o.parseUShort(),e.instructions=[];for(var v=0;v<e.instructionLength;v+=1)e.instructions.push(o.parseByte())}}}function It(e,t){for(var i=[],n=0;n<e.length;n+=1){var r=e[n],o={x:t.xScale*r.x+t.scale01*r.y+t.dx,y:t.scale10*r.x+t.yScale*r.y+t.dy,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour};i.push(o)}return i}function Vt(e){var t=new N;if(!e)return t;for(var i=function(e){for(var t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r),r.lastPointOfContour&&(t.push(i),i=[])}return E.argument(0===i.length,"There are still points left in the current contour."),t}(e),n=0;n<i.length;++n){var r=i[n],o=null,s=r[r.length-1],a=r[0];if(s.onCurve)t.moveTo(s.x,s.y);else if(a.onCurve)t.moveTo(a.x,a.y);else{var u={x:.5*(s.x+a.x),y:.5*(s.y+a.y)};t.moveTo(u.x,u.y)}for(var l=0;l<r.length;++l)if(o=s,s=a,a=r[(l+1)%r.length],s.onCurve)t.lineTo(s.x,s.y);else{var c=a;o.onCurve||{x:.5*(s.x+o.x),y:.5*(s.y+o.y)},a.onCurve||(c={x:.5*(s.x+a.x),y:.5*(s.y+a.y)}),t.quadraticCurveTo(s.x,s.y,c.x,c.y)}t.closePath()}return t}function Bt(e,t){if(t.isComposite)for(var i=0;i<t.components.length;i+=1){var n=t.components[i],r=e.get(n.glyphIndex);if(r.getPath(),r.points){var o=void 0;if(void 0===n.matchedPoints)o=It(r.points,n);else{if(n.matchedPoints[0]>t.points.length-1||n.matchedPoints[1]>r.points.length-1)throw Error("Matched points out of range in "+t.name);var s=t.points[n.matchedPoints[0]],a=r.points[n.matchedPoints[1]],u={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};a=It([a],u)[0],u.dx=s.x-a.x,u.dy=s.y-a.y,o=It(r.points,u)}t.points=t.points.concat(o)}}return Vt(t.points)}St.prototype={searchTag:wt,binSearch:bt,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,i=0;i<e.scripts.length;i++){var n=e.scripts[i].tag;if("DFLT"===n)return n;"latn"===n&&(t=!0)}return t?"latn":void 0}},getScriptTable:function(e,t){var i=this.getTable(t);if(i){e=e||"DFLT";var n=i.scripts,r=wt(i.scripts,e);if(r>=0)return n[r].script;if(t){var o={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-r,0,o),o.script}}},getLangSysTable:function(e,t,i){var n=this.getScriptTable(e,i);if(n){if(!t||"dflt"===t||"DFLT"===t)return n.defaultLangSys;var r=wt(n.langSysRecords,t);if(r>=0)return n.langSysRecords[r].langSys;if(i){var o={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(e,t,i,n){var r=this.getLangSysTable(e,t,n);if(r){for(var o,s=r.featureIndexes,a=this.font.tables[this.tableName].features,u=0;u<s.length;u++)if((o=a[s[u]]).tag===i)return o.feature;if(n){var l=a.length;return E.assert(0===l||i>=a[l-1].tag,"Features must be added in alphabetical order."),o={tag:i,feature:{params:0,lookupListIndexes:[]}},a.push(o),s.push(l),o.feature}}},getLookupTables:function(e,t,i,n,r){var o=this.getFeatureTable(e,t,i,r),s=[];if(o){for(var a,u=o.lookupListIndexes,l=this.font.tables[this.tableName].lookups,c=0;c<u.length;c++)(a=l[u[c]]).lookupType===n&&s.push(a);if(0===s.length&&r){a={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var h=l.length;return l.push(a),u.push(h),[a]}}return s},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:var i=vt(e.ranges,t);return i?i.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var i=bt(e.glyphs,t);return i>=0?i:-1;case 2:var n=vt(e.ranges,t);return n?n.index+t-n.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],i=e.ranges,n=0;n<i.length;n++)for(var r=i[n],o=r.start,s=r.end,a=o;a<=s;a++)t.push(a);return t}},Tt.prototype=St.prototype,Tt.prototype.init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},Tt.prototype.getKerningValue=function(e,t,i){for(var n=0;n<e.length;n++)for(var r=e[n].subtables,o=0;o<r.length;o++){var s=r[o],a=this.getCoverageIndex(s.coverage,t);if(!(a<0))switch(s.posFormat){case 1:for(var u=s.pairSets[a],l=0;l<u.length;l++){var c=u[l];if(c.secondGlyph===i)return c.value1&&c.value1.xAdvance||0}break;case 2:var h=this.getGlyphClass(s.classDef1,t),d=this.getGlyphClass(s.classDef2,i),p=s.classRecords[h][d];return p.value1&&p.value1.xAdvance||0}}return 0},Tt.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)},Ct.prototype=St.prototype,Ct.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Ct.prototype.getSingle=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,1),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var u=s[a],l=this.expandCoverage(u.coverage),c=void 0;if(1===u.substFormat){var h=u.deltaGlyphId;for(c=0;c<l.length;c++){var d=l[c];n.push({sub:d,by:d+h})}}else{var p=u.substitute;for(c=0;c<l.length;c++)n.push({sub:l[c],by:p[c]})}}return n},Ct.prototype.getMultiple=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,2),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var u=s[a],l=this.expandCoverage(u.coverage),c=void 0;for(c=0;c<l.length;c++){var h=l[c],d=u.sequences[c];n.push({sub:h,by:d})}}return n},Ct.prototype.getAlternates=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,3),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var u=s[a],l=this.expandCoverage(u.coverage),c=u.alternateSets,h=0;h<l.length;h++)n.push({sub:l[h],by:c[h]});return n},Ct.prototype.getLigatures=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,4),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var u=s[a],l=this.expandCoverage(u.coverage),c=u.ligatureSets,h=0;h<l.length;h++)for(var d=l[h],p=c[h],f=0;f<p.length;f++){var g=p[f];n.push({sub:[d].concat(g.components),by:g.ligGlyph})}return n},Ct.prototype.addSingle=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});E.assert(1===r.coverage.format,"Single: unable to modify coverage table format "+r.coverage.format);var o=t.sub,s=this.binSearch(r.coverage.glyphs,o);s<0&&(s=-1-s,r.coverage.glyphs.splice(s,0,o),r.substitute.splice(s,0,0)),r.substitute[s]=t.by},Ct.prototype.addMultiple=function(e,t,i,n){E.assert(t.by instanceof Array&&t.by.length>1,'Multiple: "by" must be an array of two or more ids');var r=Ft(this.getLookupTables(i,n,e,2,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});E.assert(1===r.coverage.format,"Multiple: unable to modify coverage table format "+r.coverage.format);var o=t.sub,s=this.binSearch(r.coverage.glyphs,o);s<0&&(s=-1-s,r.coverage.glyphs.splice(s,0,o),r.sequences.splice(s,0,0)),r.sequences[s]=t.by},Ct.prototype.addAlternate=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});E.assert(1===r.coverage.format,"Alternate: unable to modify coverage table format "+r.coverage.format);var o=t.sub,s=this.binSearch(r.coverage.glyphs,o);s<0&&(s=-1-s,r.coverage.glyphs.splice(s,0,o),r.alternateSets.splice(s,0,0)),r.alternateSets[s]=t.by},Ct.prototype.addLigature=function(e,t,i,n){var r=this.getLookupTables(i,n,e,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),E.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var s=t.sub[0],a=t.sub.slice(1),u={ligGlyph:t.by,components:a},l=this.binSearch(o.coverage.glyphs,s);if(l>=0){for(var c=o.ligatureSets[l],h=0;h<c.length;h++)if(Nt(c[h].components,a))return;c.push(u)}else l=-1-l,o.coverage.glyphs.splice(l,0,s),o.ligatureSets.splice(l,0,[u])},Ct.prototype.getFeature=function(e,t,i){if(/ss\d\d/.test(e))return this.getSingle(e,t,i);switch(e){case"aalt":case"salt":return this.getSingle(e,t,i).concat(this.getAlternates(e,t,i));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,i);case"ccmp":return this.getMultiple(e,t,i).concat(this.getLigatures(e,t,i));case"stch":return this.getMultiple(e,t,i)}},Ct.prototype.add=function(e,t,i,n){if(/ss\d\d/.test(e))return this.addSingle(e,t,i,n);switch(e){case"aalt":case"salt":return"number"==typeof t.by?this.addSingle(e,t,i,n):this.addAlternate(e,t,i,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,i,n);case"ccmp":return t.by instanceof Array?this.addMultiple(e,t,i,n):this.addLigature(e,t,i,n)}};var At,Pt,Rt,Lt,kt={getPath:Vt,parse:function(e,t,i,n,r){return r.lowMemory?function(e,t,i,n){var r=new be.GlyphSet(n);return n._push=function(o){var s=i[o];s!==i[o+1]?r.push(o,be.ttfGlyphLoader(n,o,Mt,e,t+s,Bt)):r.push(o,be.glyphLoader(n,o))},r}(e,t,i,n):function(e,t,i,n){for(var r=new be.GlyphSet(n),o=0;o<i.length-1;o+=1){var s=i[o];s!==i[o+1]?r.push(o,be.ttfGlyphLoader(n,o,Mt,e,t+s,Bt)):r.push(o,be.glyphLoader(n,o))}return r}(e,t,i,n)}};function Ut(e){this.font=e,this.getCommands=function(e){return kt.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Xt(e){return e}function zt(e){return Math.sign(e)*Math.round(Math.abs(e))}function jt(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function Gt(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function qt(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function Ht(e){return Math.sign(e)*Math.floor(Math.abs(e))}var Wt=function(e){var t=this.srPeriod,i=this.srPhase,n=1;return e<0&&(e=-e,n=-1),e+=this.srThreshold-i,e=Math.trunc(e/t)*t,(e+=i)<0?i*n:e*n},Yt={x:1,y:0,axis:"x",distance:function(e,t,i,n){return(i?e.xo:e.x)-(n?t.xo:t.x)},interpolate:function(e,t,i,n){var r,o,s,a,u,l,c;if(!n||n===this)return r=e.xo-t.xo,o=e.xo-i.xo,u=t.x-t.xo,l=i.x-i.xo,0===(c=(s=Math.abs(r))+(a=Math.abs(o)))?void(e.x=e.xo+(u+l)/2):void(e.x=e.xo+(u*a+l*s)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),u=n.distance(t,t,!1,!0),l=n.distance(i,i,!1,!0),0!==(c=(s=Math.abs(r))+(a=Math.abs(o)))?Yt.setRelative(e,e,(u*a+l*s)/c,n,!0):Yt.setRelative(e,e,(u+l)/2,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,s=r?t.yo:t.y,a=o+i*n.x,u=s+i*n.y;e.x=a+(e.y-u)/n.normalSlope}else e.x=(r?t.xo:t.x)+i},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},$t={x:0,y:1,axis:"y",distance:function(e,t,i,n){return(i?e.yo:e.y)-(n?t.yo:t.y)},interpolate:function(e,t,i,n){var r,o,s,a,u,l,c;if(!n||n===this)return r=e.yo-t.yo,o=e.yo-i.yo,u=t.y-t.yo,l=i.y-i.yo,0===(c=(s=Math.abs(r))+(a=Math.abs(o)))?void(e.y=e.yo+(u+l)/2):void(e.y=e.yo+(u*a+l*s)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),u=n.distance(t,t,!1,!0),l=n.distance(i,i,!1,!0),0!==(c=(s=Math.abs(r))+(a=Math.abs(o)))?$t.setRelative(e,e,(u*a+l*s)/c,n,!0):$t.setRelative(e,e,(u+l)/2,n,!0)},normalSlope:0,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,s=r?t.yo:t.y,a=o+i*n.x,u=s+i*n.y;e.y=u+n.normalSlope*(e.x-a)}else e.y=(r?t.yo:t.y)+i},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function Zt(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function Kt(e,t){var i=Math.sqrt(e*e+t*t);return t/=i,1===(e/=i)&&0===t?Yt:0===e&&1===t?$t:new Zt(e,t)}function Qt(e,t,i,n){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=i,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(Yt),Object.freeze($t),Zt.prototype.distance=function(e,t,i,n){return this.x*Yt.distance(e,t,i,n)+this.y*$t.distance(e,t,i,n)},Zt.prototype.interpolate=function(e,t,i,n){var r,o,s,a,u,l,c;s=n.distance(e,t,!0,!0),a=n.distance(e,i,!0,!0),r=n.distance(t,t,!1,!0),o=n.distance(i,i,!1,!0),0!==(c=(u=Math.abs(s))+(l=Math.abs(a)))?this.setRelative(e,e,(r*l+o*u)/c,n,!0):this.setRelative(e,e,(r+o)/2,n,!0)},Zt.prototype.setRelative=function(e,t,i,n,r){n=n||this;var o=r?t.xo:t.x,s=r?t.yo:t.y,a=o+i*n.x,u=s+i*n.y,l=n.normalSlope,c=this.slope,h=e.x,d=e.y;e.x=(c*h-l*a+u-d)/(c-l),e.y=c*(e.x-h)+d},Zt.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},Qt.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},Qt.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var Jt=Object.freeze(new Qt(0,0)),ei={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function ti(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Yt,this.round=zt}}function ii(e){for(var t=e.tZone=new Array(e.gZone.length),i=0;i<t.length;i++)t[i]=new Qt(0,0)}function ni(e,t){var i,n=e.prog,r=e.ip,o=1;do{if(88===(i=n[++r]))o++;else if(89===i)o--;else if(64===i)r+=n[r+1]+1;else if(65===i)r+=2*n[r+1]+1;else if(i>=176&&i<=183)r+=i-176+1;else if(i>=184&&i<=191)r+=2*(i-184+1);else if(t&&1===o&&27===i)break}while(o>0);e.ip=r}function ri(t,i){e.DEBUG&&console.log(i.step,"SVTCA["+t.axis+"]"),i.fv=i.pv=i.dpv=t}function oi(t,i){e.DEBUG&&console.log(i.step,"SPVTCA["+t.axis+"]"),i.pv=i.dpv=t}function si(t,i){e.DEBUG&&console.log(i.step,"SFVTCA["+t.axis+"]"),i.fv=t}function ai(t,i){var n,r,o=i.stack,s=o.pop(),a=o.pop(),u=i.z2[s],l=i.z1[a];e.DEBUG&&console.log("SPVTL["+t+"]",s,a),t?(n=u.y-l.y,r=l.x-u.x):(n=l.x-u.x,r=l.y-u.y),i.pv=i.dpv=Kt(n,r)}function ui(t,i){var n,r,o=i.stack,s=o.pop(),a=o.pop(),u=i.z2[s],l=i.z1[a];e.DEBUG&&console.log("SFVTL["+t+"]",s,a),t?(n=u.y-l.y,r=l.x-u.x):(n=l.x-u.x,r=l.y-u.y),i.fv=Kt(n,r)}function li(t){e.DEBUG&&console.log(t.step,"POP[]"),t.stack.pop()}function ci(t,i){var n=i.stack.pop(),r=i.z0[n],o=i.fv,s=i.pv;e.DEBUG&&console.log(i.step,"MDAP["+t+"]",n);var a=s.distance(r,Jt);t&&(a=i.round(a)),o.setRelative(r,Jt,a,s),o.touch(r),i.rp0=i.rp1=n}function hi(t,i){var n,r,o,s=i.z2,a=s.length-2;e.DEBUG&&console.log(i.step,"IUP["+t.axis+"]");for(var u=0;u<a;u++)n=s[u],t.touched(n)||(r=n.prevTouched(t))!==n&&(r===(o=n.nextTouched(t))&&t.setRelative(n,n,t.distance(r,r,!1,!0),t,!0),t.interpolate(n,r,o,t))}function di(t,i){for(var n=i.stack,r=t?i.rp1:i.rp2,o=(t?i.z0:i.z1)[r],s=i.fv,a=i.pv,u=i.loop,l=i.z2;u--;){var c=n.pop(),h=l[c],d=a.distance(o,o,!1,!0);s.setRelative(h,h,d,a),s.touch(h),e.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-u)+": ":"")+"SHP["+(t?"rp1":"rp2")+"]",c)}i.loop=1}function pi(t,i){var n=i.stack,r=t?i.rp1:i.rp2,o=(t?i.z0:i.z1)[r],s=i.fv,a=i.pv,u=n.pop(),l=i.z2[i.contours[u]],c=l;e.DEBUG&&console.log(i.step,"SHC["+t+"]",u);var h=a.distance(o,o,!1,!0);do{c!==o&&s.setRelative(c,c,h,a),c=c.nextPointOnContour}while(c!==l)}function fi(t,i){var n,r,o=i.stack,s=t?i.rp1:i.rp2,a=(t?i.z0:i.z1)[s],u=i.fv,l=i.pv,c=o.pop();switch(e.DEBUG&&console.log(i.step,"SHZ["+t+"]",c),c){case 0:n=i.tZone;break;case 1:n=i.gZone;break;default:throw new Error("Invalid zone")}for(var h=l.distance(a,a,!1,!0),d=n.length-2,p=0;p<d;p++)r=n[p],u.setRelative(r,r,h,l)}function gi(t,i){var n=i.stack,r=n.pop()/64,o=n.pop(),s=i.z1[o],a=i.z0[i.rp0],u=i.fv,l=i.pv;u.setRelative(s,a,r,l),u.touch(s),e.DEBUG&&console.log(i.step,"MSIRP["+t+"]",r,o),i.rp1=i.rp0,i.rp2=o,t&&(i.rp0=o)}function mi(t,i){var n=i.stack,r=n.pop(),o=n.pop(),s=i.z0[o],a=i.fv,u=i.pv,l=i.cvt[r];e.DEBUG&&console.log(i.step,"MIAP["+t+"]",r,"(",l,")",o);var c=u.distance(s,Jt);t&&(Math.abs(c-l)<i.cvCutIn&&(c=l),c=i.round(c)),a.setRelative(s,Jt,c,u),0===i.zp0&&(s.xo=s.x,s.yo=s.y),a.touch(s),i.rp0=i.rp1=o}function _i(t,i){var n=i.stack,r=n.pop(),o=i.z2[r];e.DEBUG&&console.log(i.step,"GC["+t+"]",r),n.push(64*i.dpv.distance(o,Jt,t,!1))}function yi(t,i){var n=i.stack,r=n.pop(),o=n.pop(),s=i.z1[r],a=i.z0[o],u=i.dpv.distance(a,s,t,t);e.DEBUG&&console.log(i.step,"MD["+t+"]",r,o,"->",u),i.stack.push(Math.round(64*u))}function xi(t,i){var n=i.stack,r=n.pop(),o=i.fv,s=i.pv,a=i.ppem,u=i.deltaBase+16*(t-1),l=i.deltaShift,c=i.z0;e.DEBUG&&console.log(i.step,"DELTAP["+t+"]",r,n);for(var h=0;h<r;h++){var d=n.pop(),p=n.pop();if(u+((240&p)>>4)===a){var f=(15&p)-8;f>=0&&f++,e.DEBUG&&console.log(i.step,"DELTAPFIX",d,"by",f*l);var g=c[d];o.setRelative(g,g,f*l,s)}}}function wi(t,i){var n=i.stack,r=n.pop();e.DEBUG&&console.log(i.step,"ROUND[]"),n.push(64*i.round(r/64))}function bi(t,i){var n=i.stack,r=n.pop(),o=i.ppem,s=i.deltaBase+16*(t-1),a=i.deltaShift;e.DEBUG&&console.log(i.step,"DELTAC["+t+"]",r,n);for(var u=0;u<r;u++){var l=n.pop(),c=n.pop();if(s+((240&c)>>4)===o){var h=(15&c)-8;h>=0&&h++;var d=h*a;e.DEBUG&&console.log(i.step,"DELTACFIX",l,"by",d),i.cvt[l]+=d}}}function vi(t,i){var n,r,o=i.stack,s=o.pop(),a=o.pop(),u=i.z2[s],l=i.z1[a];e.DEBUG&&console.log(i.step,"SDPVTL["+t+"]",s,a),t?(n=u.y-l.y,r=l.x-u.x):(n=l.x-u.x,r=l.y-u.y),i.dpv=Kt(n,r)}function Si(t,i){var n=i.stack,r=i.prog,o=i.ip;e.DEBUG&&console.log(i.step,"PUSHB["+t+"]");for(var s=0;s<t;s++)n.push(r[++o]);i.ip=o}function Ti(t,i){var n=i.ip,r=i.prog,o=i.stack;e.DEBUG&&console.log(i.ip,"PUSHW["+t+"]");for(var s=0;s<t;s++){var a=r[++n]<<8|r[++n];32768&a&&(a=-(1+(65535^a))),o.push(a)}i.ip=n}function Ci(t,i,n,r,o,s){var a,u,l,c,h=s.stack,d=t&&h.pop(),p=h.pop(),f=s.rp0,g=s.z0[f],m=s.z1[p],_=s.minDis,y=s.fv,x=s.dpv;l=(u=a=x.distance(m,g,!0,!0))>=0?1:-1,u=Math.abs(u),t&&(c=s.cvt[d],r&&Math.abs(u-c)<s.cvCutIn&&(u=c)),n&&u<_&&(u=_),r&&(u=s.round(u)),y.setRelative(m,g,l*u,x),y.touch(m),e.DEBUG&&console.log(s.step,(t?"MIRP[":"MDRP[")+(i?"M":"m")+(n?">":"_")+(r?"R":"_")+(0===o?"Gr":1===o?"Bl":2===o?"Wh":"")+"]",t?d+"("+s.cvt[d]+","+c+")":"",p,"(d =",a,"->",l*u,")"),s.rp1=s.rp0,s.rp2=p,i&&(s.rp0=p)}function Ni(e){this.char=e,this.state={},this.activeState=null}function Fi(e,t,i){this.contextName=i,this.startIndex=e,this.endOffset=t}function Oi(e,t,i){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=i}function Ei(e,t){this.context=e,this.index=t,this.length=e.length,this.current=e[t],this.backtrack=e.slice(0,t),this.lookahead=e.slice(t+1)}function Di(e){this.eventId=e,this.subscribers=[]}function Mi(e){var t=this,i=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];i.forEach((function(e){Object.defineProperty(t.events,e,{value:new Di(e)})})),e&&i.forEach((function(i){var n=e[i];"function"==typeof n&&t.events[i].subscribe(n)}));["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"].forEach((function(e){t.events[e].subscribe(t.updateContextsRanges)}))}function Ii(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],Mi.call(this,e)}function Vi(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function Bi(e){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e)}function Ai(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}function Pi(e){return/[A-z]/.test(e)}function Ri(e){this.font=e,this.features={}}function Li(e){this.id=e.id,this.tag=e.tag,this.substitution=e.substitution}function ki(e,t){if(!e)return-1;switch(t.format){case 1:return t.glyphs.indexOf(e);case 2:for(var i=t.ranges,n=0;n<i.length;n++){var r=i[n];if(e>=r.start&&e<=r.end){var o=e-r.start;return r.index+o}}break;default:return-1}return-1}function Ui(e,t){return-1===ki(e,t.coverage)?null:e+t.deltaGlyphId}function Xi(e,t){var i=ki(e,t.coverage);return-1===i?null:t.substitute[i]}function zi(e,t){for(var i=[],n=0;n<e.length;n++){var r=e[n],o=t.current,s=ki(o=Array.isArray(o)?o[0]:o,r);-1!==s&&i.push(s)}return i.length!==e.length?-1:i}function ji(e,t){var i=t.inputCoverage.length+t.lookaheadCoverage.length+t.backtrackCoverage.length;if(e.context.length<i)return[];var n=zi(t.inputCoverage,e);if(-1===n)return[];var r=t.inputCoverage.length-1;if(e.lookahead.length<t.lookaheadCoverage.length)return[];for(var o=e.lookahead.slice(r);o.length&&Ai(o[0].char);)o.shift();var s=new Ei(o,0),a=zi(t.lookaheadCoverage,s),u=[].concat(e.backtrack);for(u.reverse();u.length&&Ai(u[0].char);)u.shift();if(u.length<t.backtrackCoverage.length)return[];var l=new Ei(u,0),c=zi(t.backtrackCoverage,l),h=[];if(n.length===t.inputCoverage.length&&a.length===t.lookaheadCoverage.length&&c.length===t.backtrackCoverage.length)for(var d=0;d<t.lookupRecords.length;d++)for(var p=t.lookupRecords[d].lookupListIndex,f=this.getLookupByIndex(p),g=0;g<f.subtables.length;g++){var m=f.subtables[g],_=this.getLookupMethod(f,m);if("12"===this.getSubstitutionType(f,m))for(var y=0;y<n.length;y++){var x=_(e.get(y));x&&h.push(x)}}return h}function Gi(e,t){var i,n=ki(e.current,t.coverage);if(-1===n)return null;for(var r=t.ligatureSets[n],o=0;o<r.length;o++){i=r[o];for(var s=0;s<i.components.length;s++){if(e.lookahead[s]!==i.components[s])break;if(s===i.components.length-1)return i}}return null}function qi(e,t){var i=ki(e,t.coverage);return-1===i?null:t.sequences[i]}Ut.prototype.exec=function(t,i){if("number"!=typeof i)throw new Error("Point size is not a number!");if(!(this._errorState>2)){var n=this.font,r=this._prepState;if(!r||r.ppem!==i){var o=this._fpgmState;if(!o){ti.prototype=ei,(o=this._fpgmState=new ti("fpgm",n.tables.fpgm)).funcs=[],o.font=n,e.DEBUG&&(console.log("---EXEC FPGM---"),o.step=-1);try{Pt(o)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}ti.prototype=o,(r=this._prepState=new ti("prep",n.tables.prep)).ppem=i;var s=n.tables.cvt;if(s)for(var a=r.cvt=new Array(s.length),u=i/n.unitsPerEm,l=0;l<s.length;l++)a[l]=s[l]*u;else r.cvt=[];e.DEBUG&&(console.log("---EXEC PREP---"),r.step=-1);try{Pt(r)}catch(e){this._errorState<2&&console.log("Hinting error in PREP:"+e),this._errorState=2}}if(!(this._errorState>1))try{return Rt(t,r)}catch(e){return this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},Rt=function(t,i){var n,r,o,s=i.ppem/i.font.unitsPerEm,a=s,u=t.components;if(ti.prototype=i,u){var l=i.font;r=[],n=[];for(var c=0;c<u.length;c++){var h=u[c],d=l.glyphs.get(h.glyphIndex);o=new ti("glyf",d.instructions),e.DEBUG&&(console.log("---EXEC COMP "+c+"---"),o.step=-1),Lt(d,o,s,a);for(var p=Math.round(h.dx*s),f=Math.round(h.dy*a),g=o.gZone,m=o.contours,_=0;_<g.length;_++){var y=g[_];y.xTouched=y.yTouched=!1,y.xo=y.x=y.x+p,y.yo=y.y=y.y+f}var x=r.length;r.push.apply(r,g);for(var w=0;w<m.length;w++)n.push(m[w]+x)}t.instructions&&!o.inhibitGridFit&&((o=new ti("glyf",t.instructions)).gZone=o.z0=o.z1=o.z2=r,o.contours=n,r.push(new Qt(0,0),new Qt(Math.round(t.advanceWidth*s),0)),e.DEBUG&&(console.log("---EXEC COMPOSITE---"),o.step=-1),Pt(o),r.length-=2)}else o=new ti("glyf",t.instructions),e.DEBUG&&(console.log("---EXEC GLYPH---"),o.step=-1),Lt(t,o,s,a),r=o.gZone;return r},Lt=function(t,i,n,r){for(var o,s,a,u=t.points||[],l=u.length,c=i.gZone=i.z0=i.z1=i.z2=[],h=i.contours=[],d=0;d<l;d++)o=u[d],c[d]=new Qt(o.x*n,o.y*r,o.lastPointOfContour,o.onCurve);for(var p=0;p<l;p++)o=c[p],s||(s=o,h.push(p)),o.lastPointOfContour?(o.nextPointOnContour=s,s.prevPointOnContour=o,s=void 0):(a=c[p+1],o.nextPointOnContour=a,a.prevPointOnContour=o);if(!i.inhibitGridFit){if(e.DEBUG){console.log("PROCESSING GLYPH",i.stack);for(var f=0;f<l;f++)console.log(f,c[f].x,c[f].y)}if(c.push(new Qt(0,0),new Qt(Math.round(t.advanceWidth*n),0)),Pt(i),c.length-=2,e.DEBUG){console.log("FINISHED GLYPH",i.stack);for(var g=0;g<l;g++)console.log(g,c[g].x,c[g].y)}}},Pt=function(t){var i=t.prog;if(i){var n,r=i.length;for(t.ip=0;t.ip<r;t.ip++){if(e.DEBUG&&t.step++,!(n=At[i[t.ip]]))throw new Error("unknown instruction: 0x"+Number(i[t.ip]).toString(16));n(t)}}},At=[ri.bind(void 0,$t),ri.bind(void 0,Yt),oi.bind(void 0,$t),oi.bind(void 0,Yt),si.bind(void 0,$t),si.bind(void 0,Yt),ai.bind(void 0,0),ai.bind(void 0,1),ui.bind(void 0,0),ui.bind(void 0,1),function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SPVFS[]",n,r),t.pv=t.dpv=Kt(r,n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SPVFS[]",n,r),t.fv=Kt(r,n)},function(t){var i=t.stack,n=t.pv;e.DEBUG&&console.log(t.step,"GPV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(t){var i=t.stack,n=t.fv;e.DEBUG&&console.log(t.step,"GFV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(t){t.fv=t.pv,e.DEBUG&&console.log(t.step,"SFVTPV[]")},function(t){var i=t.stack,n=i.pop(),r=i.pop(),o=i.pop(),s=i.pop(),a=i.pop(),u=t.z0,l=t.z1,c=u[n],h=u[r],d=l[o],p=l[s],f=t.z2[a];e.DEBUG&&console.log("ISECT[], ",n,r,o,s,a);var g=c.x,m=c.y,_=h.x,y=h.y,x=d.x,w=d.y,b=p.x,v=p.y,S=(g-_)*(w-v)-(m-y)*(x-b),T=g*y-m*_,C=x*v-w*b;f.x=(T*(x-b)-C*(g-_))/S,f.y=(T*(w-v)-C*(m-y))/S},function(t){t.rp0=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP0[]",t.rp0)},function(t){t.rp1=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP1[]",t.rp1)},function(t){t.rp2=t.stack.pop(),e.DEBUG&&console.log(t.step,"SRP2[]",t.rp2)},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP0[]",i),t.zp0=i,i){case 0:t.tZone||ii(t),t.z0=t.tZone;break;case 1:t.z0=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP1[]",i),t.zp1=i,i){case 0:t.tZone||ii(t),t.z1=t.tZone;break;case 1:t.z1=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZP2[]",i),t.zp2=i,i){case 0:t.tZone||ii(t),t.z2=t.tZone;break;case 1:t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){var i=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SZPS[]",i),t.zp0=t.zp1=t.zp2=i,i){case 0:t.tZone||ii(t),t.z0=t.z1=t.z2=t.tZone;break;case 1:t.z0=t.z1=t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}},function(t){t.loop=t.stack.pop(),e.DEBUG&&console.log(t.step,"SLOOP[]",t.loop)},function(t){e.DEBUG&&console.log(t.step,"RTG[]"),t.round=zt},function(t){e.DEBUG&&console.log(t.step,"RTHG[]"),t.round=Gt},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SMD[]",i),t.minDis=i/64},function(t){e.DEBUG&&console.log(t.step,"ELSE[]"),ni(t,!1)},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"JMPR[]",i),t.ip+=i-1},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCVTCI[]",i),t.cvCutIn=i/64},void 0,void 0,function(t){var i=t.stack;e.DEBUG&&console.log(t.step,"DUP[]"),i.push(i[i.length-1])},li,function(t){e.DEBUG&&console.log(t.step,"CLEAR[]"),t.stack.length=0},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SWAP[]"),i.push(n),i.push(r)},function(t){var i=t.stack;e.DEBUG&&console.log(t.step,"DEPTH[]"),i.push(i.length)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"CINDEX[]",n),i.push(i[i.length-n])},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"MINDEX[]",n),i.push(i.splice(i.length-n,1)[0])},void 0,void 0,void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"LOOPCALL[]",n,r);var o=t.ip,s=t.prog;t.prog=t.funcs[n];for(var a=0;a<r;a++)Pt(t),e.DEBUG&&console.log(++t.step,a+1<r?"next loopcall":"done loopcall",a);t.ip=o,t.prog=s},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"CALL[]",i);var n=t.ip,r=t.prog;t.prog=t.funcs[i],Pt(t),t.ip=n,t.prog=r,e.DEBUG&&console.log(++t.step,"returning from",i)},function(t){if("fpgm"!==t.env)throw new Error("FDEF not allowed here");var i=t.stack,n=t.prog,r=t.ip,o=i.pop(),s=r;for(e.DEBUG&&console.log(t.step,"FDEF[]",o);45!==n[++r];);t.ip=r,t.funcs[o]=n.slice(s+1,r)},void 0,ci.bind(void 0,0),ci.bind(void 0,1),hi.bind(void 0,$t),hi.bind(void 0,Yt),di.bind(void 0,0),di.bind(void 0,1),pi.bind(void 0,0),pi.bind(void 0,1),fi.bind(void 0,0),fi.bind(void 0,1),function(t){for(var i=t.stack,n=t.loop,r=t.fv,o=i.pop()/64,s=t.z2;n--;){var a=i.pop(),u=s[a];e.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-n)+": ":"")+"SHPIX[]",a,o),r.setRelative(u,u,o),r.touch(u)}t.loop=1},function(t){for(var i=t.stack,n=t.rp1,r=t.rp2,o=t.loop,s=t.z0[n],a=t.z1[r],u=t.fv,l=t.dpv,c=t.z2;o--;){var h=i.pop(),d=c[h];e.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-o)+": ":"")+"IP[]",h,n,"<->",r),u.interpolate(d,s,a,l),u.touch(d)}t.loop=1},gi.bind(void 0,0),gi.bind(void 0,1),function(t){for(var i=t.stack,n=t.rp0,r=t.z0[n],o=t.loop,s=t.fv,a=t.pv,u=t.z1;o--;){var l=i.pop(),c=u[l];e.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-o)+": ":"")+"ALIGNRP[]",l),s.setRelative(c,r,0,a),s.touch(c)}t.loop=1},function(t){e.DEBUG&&console.log(t.step,"RTDG[]"),t.round=jt},mi.bind(void 0,0),mi.bind(void 0,1),function(t){var i=t.prog,n=t.ip,r=t.stack,o=i[++n];e.DEBUG&&console.log(t.step,"NPUSHB[]",o);for(var s=0;s<o;s++)r.push(i[++n]);t.ip=n},function(t){var i=t.ip,n=t.prog,r=t.stack,o=n[++i];e.DEBUG&&console.log(t.step,"NPUSHW[]",o);for(var s=0;s<o;s++){var a=n[++i]<<8|n[++i];32768&a&&(a=-(1+(65535^a))),r.push(a)}t.ip=i},function(t){var i=t.stack,n=t.store;n||(n=t.store=[]);var r=i.pop(),o=i.pop();e.DEBUG&&console.log(t.step,"WS",r,o),n[o]=r},function(t){var i=t.stack,n=t.store,r=i.pop();e.DEBUG&&console.log(t.step,"RS",r);var o=n&&n[r]||0;i.push(o)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"WCVTP",n,r),t.cvt[r]=n/64},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"RCVT",n),i.push(64*t.cvt[n])},_i.bind(void 0,0),_i.bind(void 0,1),void 0,yi.bind(void 0,0),yi.bind(void 0,1),function(t){e.DEBUG&&console.log(t.step,"MPPEM[]"),t.stack.push(t.ppem)},void 0,function(t){e.DEBUG&&console.log(t.step,"FLIPON[]"),t.autoFlip=!0},void 0,void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"LT[]",n,r),i.push(r<n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"LTEQ[]",n,r),i.push(r<=n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"GT[]",n,r),i.push(r>n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"GTEQ[]",n,r),i.push(r>=n?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"EQ[]",n,r),i.push(n===r?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"NEQ[]",n,r),i.push(n!==r?1:0)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"ODD[]",n),i.push(Math.trunc(n)%2?1:0)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"EVEN[]",n),i.push(Math.trunc(n)%2?0:1)},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"IF[]",i),i||(ni(t,!0),e.DEBUG&&console.log(t.step,"EIF[]"))},function(t){e.DEBUG&&console.log(t.step,"EIF[]")},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"AND[]",n,r),i.push(n&&r?1:0)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"OR[]",n,r),i.push(n||r?1:0)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"NOT[]",n),i.push(n?0:1)},xi.bind(void 0,1),function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SDB[]",i),t.deltaBase=i},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SDS[]",i),t.deltaShift=Math.pow(.5,i)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"ADD[]",n,r),i.push(r+n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"SUB[]",n,r),i.push(r-n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"DIV[]",n,r),i.push(64*r/n)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"MUL[]",n,r),i.push(r*n/64)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"ABS[]",n),i.push(Math.abs(n))},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"NEG[]",n),i.push(-n)},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"FLOOR[]",n),i.push(64*Math.floor(n/64))},function(t){var i=t.stack,n=i.pop();e.DEBUG&&console.log(t.step,"CEILING[]",n),i.push(64*Math.ceil(n/64))},wi.bind(void 0,0),wi.bind(void 0,1),wi.bind(void 0,2),wi.bind(void 0,3),void 0,void 0,void 0,void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"WCVTF[]",n,r),t.cvt[r]=n*t.ppem/t.font.unitsPerEm},xi.bind(void 0,2),xi.bind(void 0,3),bi.bind(void 0,1),bi.bind(void 0,2),bi.bind(void 0,3),function(t){var i,n=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"SROUND[]",n),t.round=Wt,192&n){case 0:i=.5;break;case 64:i=1;break;case 128:i=2;break;default:throw new Error("invalid SROUND value")}switch(t.srPeriod=i,48&n){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*i;break;case 32:t.srPhase=.5*i;break;case 48:t.srPhase=.75*i;break;default:throw new Error("invalid SROUND value")}n&=15,t.srThreshold=0===n?0:(n/8-.5)*i},function(t){var i,n=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"S45ROUND[]",n),t.round=Wt,192&n){case 0:i=Math.sqrt(2)/2;break;case 64:i=Math.sqrt(2);break;case 128:i=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(t.srPeriod=i,48&n){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*i;break;case 32:t.srPhase=.5*i;break;case 48:t.srPhase=.75*i;break;default:throw new Error("invalid S45ROUND value")}n&=15,t.srThreshold=0===n?0:(n/8-.5)*i},void 0,void 0,function(t){e.DEBUG&&console.log(t.step,"ROFF[]"),t.round=Xt},void 0,function(t){e.DEBUG&&console.log(t.step,"RUTG[]"),t.round=qt},function(t){e.DEBUG&&console.log(t.step,"RDTG[]"),t.round=Ht},li,li,void 0,void 0,void 0,void 0,void 0,function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCANCTRL[]",i)},vi.bind(void 0,0),vi.bind(void 0,1),function(t){var i=t.stack,n=i.pop(),r=0;e.DEBUG&&console.log(t.step,"GETINFO[]",n),1&n&&(r=35),32&n&&(r|=4096),i.push(r)},void 0,function(t){var i=t.stack,n=i.pop(),r=i.pop(),o=i.pop();e.DEBUG&&console.log(t.step,"ROLL[]"),i.push(r),i.push(n),i.push(o)},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"MAX[]",n,r),i.push(Math.max(r,n))},function(t){var i=t.stack,n=i.pop(),r=i.pop();e.DEBUG&&console.log(t.step,"MIN[]",n,r),i.push(Math.min(r,n))},function(t){var i=t.stack.pop();e.DEBUG&&console.log(t.step,"SCANTYPE[]",i)},function(t){var i=t.stack.pop(),n=t.stack.pop();switch(e.DEBUG&&console.log(t.step,"INSTCTRL[]",i,n),i){case 1:return void(t.inhibitGridFit=!!n);case 2:return void(t.ignoreCvt=!!n);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Si.bind(void 0,1),Si.bind(void 0,2),Si.bind(void 0,3),Si.bind(void 0,4),Si.bind(void 0,5),Si.bind(void 0,6),Si.bind(void 0,7),Si.bind(void 0,8),Ti.bind(void 0,1),Ti.bind(void 0,2),Ti.bind(void 0,3),Ti.bind(void 0,4),Ti.bind(void 0,5),Ti.bind(void 0,6),Ti.bind(void 0,7),Ti.bind(void 0,8),Ci.bind(void 0,0,0,0,0,0),Ci.bind(void 0,0,0,0,0,1),Ci.bind(void 0,0,0,0,0,2),Ci.bind(void 0,0,0,0,0,3),Ci.bind(void 0,0,0,0,1,0),Ci.bind(void 0,0,0,0,1,1),Ci.bind(void 0,0,0,0,1,2),Ci.bind(void 0,0,0,0,1,3),Ci.bind(void 0,0,0,1,0,0),Ci.bind(void 0,0,0,1,0,1),Ci.bind(void 0,0,0,1,0,2),Ci.bind(void 0,0,0,1,0,3),Ci.bind(void 0,0,0,1,1,0),Ci.bind(void 0,0,0,1,1,1),Ci.bind(void 0,0,0,1,1,2),Ci.bind(void 0,0,0,1,1,3),Ci.bind(void 0,0,1,0,0,0),Ci.bind(void 0,0,1,0,0,1),Ci.bind(void 0,0,1,0,0,2),Ci.bind(void 0,0,1,0,0,3),Ci.bind(void 0,0,1,0,1,0),Ci.bind(void 0,0,1,0,1,1),Ci.bind(void 0,0,1,0,1,2),Ci.bind(void 0,0,1,0,1,3),Ci.bind(void 0,0,1,1,0,0),Ci.bind(void 0,0,1,1,0,1),Ci.bind(void 0,0,1,1,0,2),Ci.bind(void 0,0,1,1,0,3),Ci.bind(void 0,0,1,1,1,0),Ci.bind(void 0,0,1,1,1,1),Ci.bind(void 0,0,1,1,1,2),Ci.bind(void 0,0,1,1,1,3),Ci.bind(void 0,1,0,0,0,0),Ci.bind(void 0,1,0,0,0,1),Ci.bind(void 0,1,0,0,0,2),Ci.bind(void 0,1,0,0,0,3),Ci.bind(void 0,1,0,0,1,0),Ci.bind(void 0,1,0,0,1,1),Ci.bind(void 0,1,0,0,1,2),Ci.bind(void 0,1,0,0,1,3),Ci.bind(void 0,1,0,1,0,0),Ci.bind(void 0,1,0,1,0,1),Ci.bind(void 0,1,0,1,0,2),Ci.bind(void 0,1,0,1,0,3),Ci.bind(void 0,1,0,1,1,0),Ci.bind(void 0,1,0,1,1,1),Ci.bind(void 0,1,0,1,1,2),Ci.bind(void 0,1,0,1,1,3),Ci.bind(void 0,1,1,0,0,0),Ci.bind(void 0,1,1,0,0,1),Ci.bind(void 0,1,1,0,0,2),Ci.bind(void 0,1,1,0,0,3),Ci.bind(void 0,1,1,0,1,0),Ci.bind(void 0,1,1,0,1,1),Ci.bind(void 0,1,1,0,1,2),Ci.bind(void 0,1,1,0,1,3),Ci.bind(void 0,1,1,1,0,0),Ci.bind(void 0,1,1,1,0,1),Ci.bind(void 0,1,1,1,0,2),Ci.bind(void 0,1,1,1,0,3),Ci.bind(void 0,1,1,1,1,0),Ci.bind(void 0,1,1,1,1,1),Ci.bind(void 0,1,1,1,1,2),Ci.bind(void 0,1,1,1,1,3)],Ni.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},Ni.prototype.getState=function(e){return this.state[e]||null},Ii.prototype.inboundIndex=function(e){return e>=0&&e<this.tokens.length},Ii.prototype.composeRUD=function(e){var t=this,i=e.map((function(e){return t[e[0]].apply(t,e.slice(1).concat(true))})),n=function(e){return"object"==typeof e&&e.hasOwnProperty("FAIL")};if(i.every(n))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:i.filter(n)};this.dispatch("composeRUD",[i.filter((function(e){return!n(e)}))])},Ii.prototype.replaceRange=function(e,t,i,n){t=null!==t?t:this.tokens.length;var r=i.every((function(e){return e instanceof Ni}));if(!isNaN(e)&&this.inboundIndex(e)&&r){var o=this.tokens.splice.apply(this.tokens,[e,t].concat(i));return n||this.dispatch("replaceToken",[e,t,i]),[o,i]}return{FAIL:"replaceRange: invalid tokens or startIndex."}},Ii.prototype.replaceToken=function(e,t,i){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Ni){var n=this.tokens.splice(e,1,t);return i||this.dispatch("replaceToken",[e,t]),[n[0],t]}return{FAIL:"replaceToken: invalid token or index."}},Ii.prototype.removeRange=function(e,t,i){t=isNaN(t)?this.tokens.length:t;var n=this.tokens.splice(e,t);return i||this.dispatch("removeRange",[n,e,t]),n},Ii.prototype.removeToken=function(e,t){if(!isNaN(e)&&this.inboundIndex(e)){var i=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[i,e]),i}return{FAIL:"removeToken: invalid token index."}},Ii.prototype.insertToken=function(e,t,i){return e.every((function(e){return e instanceof Ni}))?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),i||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}},Ii.prototype.registerModifier=function(e,t,i){this.events.newToken.subscribe((function(n,r){var o=[n,r],s=[n,r];if(null===t||!0===t.apply(this,o)){var a=i.apply(this,s);n.setState(e,a)}})),this.registeredModifiers.push(e)},Di.prototype.subscribe=function(e){return"function"==typeof e?this.subscribers.push(e)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}},Di.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},Ei.prototype.setCurrentIndex=function(e){this.index=e,this.current=this.context[e],this.backtrack=this.context.slice(0,e),this.lookahead=this.context.slice(e+1)},Ei.prototype.get=function(e){switch(!0){case 0===e:return this.current;case e<0&&Math.abs(e)<=this.backtrack.length:return this.backtrack.slice(e)[0];case e>0&&e<=this.lookahead.length:return this.lookahead[e-1];default:return null}},Ii.prototype.rangeToText=function(e){if(e instanceof Fi)return this.getRangeTokens(e).map((function(e){return e.char})).join("")},Ii.prototype.getText=function(){return this.tokens.map((function(e){return e.char})).join("")},Ii.prototype.getContext=function(e){var t=this.registeredContexts[e];return t||null},Ii.prototype.on=function(e,t){var i=this.events[e];return i?i.subscribe(t):null},Ii.prototype.dispatch=function(e,t){var i=this,n=this.events[e];n instanceof Di&&n.subscribers.forEach((function(e){e.apply(i,t||[])}))},Ii.prototype.registerContextChecker=function(e,t,i){if(this.getContext(e))return{FAIL:"context name '"+e+"' is already registered."};if("function"!=typeof t)return{FAIL:"missing context start check."};if("function"!=typeof i)return{FAIL:"missing context end check."};var n=new Oi(e,t,i);return this.registeredContexts[e]=n,this.contextCheckers.push(n),n},Ii.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},Ii.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:"context checker '"+e+"' is not registered."}},Ii.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e){if(e.hasOwnProperty(t))e[t].ranges=[]}},Ii.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map((function(e){return e.char})),t=0;t<e.length;t++){var i=new Ei(e,t);this.runContextCheck(i)}this.dispatch("updateContextsRanges",[this.registeredContexts])},Ii.prototype.setEndOffset=function(e,t){var i=new Fi(this.getContext(t).openRange.startIndex,e,t),n=this.getContext(t).ranges;return i.rangeId=t+"."+n.length,n.push(i),this.getContext(t).openRange=null,i},Ii.prototype.runContextCheck=function(e){var t=this,i=e.index;this.contextCheckers.forEach((function(n){var r=n.contextName,o=t.getContext(r).openRange;if(!o&&n.checkStart(e)&&(o=new Fi(i,null,r),t.getContext(r).openRange=o,t.dispatch("contextStart",[r,i])),o&&n.checkEnd(e)){var s=i-o.startIndex+1,a=t.setEndOffset(s,r);t.dispatch("contextEnd",[r,a])}}))},Ii.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();var t=Array.from(e);this.dispatch("start");for(var i=0;i<t.length;i++){var n=t[i],r=new Ei(t,i);this.dispatch("next",[r]),this.runContextCheck(r);var o=new Ni(n);this.tokens.push(o),this.dispatch("newToken",[o,r])}return this.dispatch("end",[this.tokens]),this.tokens},Ri.prototype.getDefaultScriptFeaturesIndexes=function(){for(var e=this.font.tables.gsub.scripts,t=0;t<e.length;t++){var i=e[t];if("DFLT"===i.tag)return i.script.defaultLangSys.featureIndexes}return[]},Ri.prototype.getScriptFeaturesIndexes=function(e){if(!this.font.tables.gsub)return[];if(!e)return this.getDefaultScriptFeaturesIndexes();for(var t=this.font.tables.gsub.scripts,i=0;i<t.length;i++){var n=t[i];if(n.tag===e&&n.script.defaultLangSys)return n.script.defaultLangSys.featureIndexes;var r=n.langSysRecords;if(r)for(var o=0;o<r.length;o++){var s=r[o];if(s.tag===e)return s.langSys.featureIndexes}}return this.getDefaultScriptFeaturesIndexes()},Ri.prototype.mapTagsToFeatures=function(e,t){for(var i={},n=0;n<e.length;n++){var r=e[n].tag,o=e[n].feature;i[r]=o}this.features[t].tags=i},Ri.prototype.getScriptFeatures=function(e){var t=this.features[e];if(this.features.hasOwnProperty(e))return t;var i=this.getScriptFeaturesIndexes(e);if(!i)return null;var n=this.font.tables.gsub;return t=i.map((function(e){return n.features[e]})),this.features[e]=t,this.mapTagsToFeatures(t,e),t},Ri.prototype.getSubstitutionType=function(e,t){return e.lookupType.toString()+t.substFormat.toString()},Ri.prototype.getLookupMethod=function(e,t){var i=this;switch(this.getSubstitutionType(e,t)){case"11":return function(e){return Ui.apply(i,[e,t])};case"12":return function(e){return Xi.apply(i,[e,t])};case"63":return function(e){return ji.apply(i,[e,t])};case"41":return function(e){return Gi.apply(i,[e,t])};case"21":return function(e){return qi.apply(i,[e,t])};default:throw new Error("lookupType: "+e.lookupType+" - substFormat: "+t.substFormat+" is not yet supported")}},Ri.prototype.lookupFeature=function(e){var t=e.contextParams,i=t.index,n=this.getFeature({tag:e.tag,script:e.script});if(!n)return new Error("font '"+this.font.names.fullName.en+"' doesn't support feature '"+e.tag+"' for script '"+e.script+"'.");for(var r=this.getFeatureLookups(n),o=[].concat(t.context),s=0;s<r.length;s++)for(var a=r[s],u=this.getLookupSubtables(a),l=0;l<u.length;l++){var c=u[l],h=this.getSubstitutionType(a,c),d=this.getLookupMethod(a,c),p=void 0;switch(h){case"11":(p=d(t.current))&&o.splice(i,1,new Li({id:11,tag:e.tag,substitution:p}));break;case"12":(p=d(t.current))&&o.splice(i,1,new Li({id:12,tag:e.tag,substitution:p}));break;case"63":p=d(t),Array.isArray(p)&&p.length&&o.splice(i,1,new Li({id:63,tag:e.tag,substitution:p}));break;case"41":(p=d(t))&&o.splice(i,1,new Li({id:41,tag:e.tag,substitution:p}));break;case"21":(p=d(t.current))&&o.splice(i,1,new Li({id:21,tag:e.tag,substitution:p}))}t=new Ei(o,i),Array.isArray(p)&&!p.length||(p=null)}return o.length?o:null},Ri.prototype.supports=function(e){if(!e.script)return!1;this.getScriptFeatures(e.script);var t=this.features.hasOwnProperty(e.script);if(!e.tag)return t;var i=this.features[e.script].some((function(t){return t.tag===e.tag}));return t&&i},Ri.prototype.getLookupSubtables=function(e){return e.subtables||null},Ri.prototype.getLookupByIndex=function(e){return this.font.tables.gsub.lookups[e]||null},Ri.prototype.getFeatureLookups=function(e){return e.lookupListIndexes.map(this.getLookupByIndex.bind(this))},Ri.prototype.getFeature=function(e){if(!this.font)return{FAIL:"No font was found"};this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script);var t=this.features[e.script];return t?t.tags[e.tag]?this.features[e.script].tags[e.tag]:null:{FAIL:"No feature for script "+e.script}};var Hi={startCheck:function(e){var t=e.current,i=e.get(-1);return null===i&&Vi(t)||!Vi(i)&&Vi(t)},endCheck:function(e){var t=e.get(1);return null===t||!Vi(t)}};var Wi={startCheck:function(e){var t=e.current,i=e.get(-1);return(Vi(t)||Ai(t))&&!Vi(i)},endCheck:function(e){var t=e.get(1);switch(!0){case null===t:return!0;case!Vi(t)&&!Ai(t):var i=/\s/.test(t);if(!i)return!0;if(i){var n;if(n=e.lookahead.some((function(e){return Vi(e)||Ai(e)})),!n)return!0}break;default:return!1}}};var Yi={11:function(e,t,i){t[i].setState(e.tag,e.substitution)},12:function(e,t,i){t[i].setState(e.tag,e.substitution)},63:function(e,t,i){e.substitution.forEach((function(n,r){t[i+r].setState(e.tag,n)}))},41:function(e,t,i){var n=t[i];n.setState(e.tag,e.substitution.ligGlyph);for(var r=e.substitution.components.length,o=0;o<r;o++)(n=t[i+o+1]).setState("deleted",!0)}};function $i(e,t,i){e instanceof Li&&Yi[e.id]&&Yi[e.id](e,t,i)}function Zi(e){var t=this,i="arab",n=this.featuresTags.arab,r=this.tokenizer.getRangeTokens(e);if(1!==r.length){var o=new Ei(r.map((function(e){return e.getState("glyphIndex")})),0),s=new Ei(r.map((function(e){return e.char})),0);r.forEach((function(e,a){if(!Ai(e.char)){o.setCurrentIndex(a),s.setCurrentIndex(a);var u,l=0;switch(function(e){for(var t=[].concat(e.backtrack),i=t.length-1;i>=0;i--){var n=t[i],r=Bi(n),o=Ai(n);if(!r&&!o)return!0;if(r)return!1}return!1}(s)&&(l|=1),function(e){if(Bi(e.current))return!1;for(var t=0;t<e.lookahead.length;t++)if(!Ai(e.lookahead[t]))return!0;return!1}(s)&&(l|=2),l){case 1:u="fina";break;case 2:u="init";break;case 3:u="medi"}if(-1!==n.indexOf(u)){var c=t.query.lookupFeature({tag:u,script:i,contextParams:o});if(c instanceof Error)return console.info(c.message);c.forEach((function(e,t){e instanceof Li&&($i(e,r,t),o.context[t]=e.substitution)}))}}}))}}function Ki(e,t){return new Ei(e.map((function(e){return e.activeState.value})),t||0)}function Qi(e){var t=this,i=this.tokenizer.getRangeTokens(e),n=Ki(i);n.context.forEach((function(e,r){n.setCurrentIndex(r);var o=t.query.lookupFeature({tag:"rlig",script:"arab",contextParams:n});o.length&&(o.forEach((function(e){return $i(e,i,r)})),n=Ki(i))}))}var Ji={startCheck:function(e){var t=e.current,i=e.get(-1);return null===i&&Pi(t)||!Pi(i)&&Pi(t)},endCheck:function(e){var t=e.get(1);return null===t||!Pi(t)}};function en(e,t){return new Ei(e.map((function(e){return e.activeState.value})),t||0)}function tn(e){var t=this,i=this.tokenizer.getRangeTokens(e),n=en(i);n.context.forEach((function(e,r){n.setCurrentIndex(r);var o=t.query.lookupFeature({tag:"liga",script:"latn",contextParams:n});o.length&&(o.forEach((function(e){return $i(e,i,r)})),n=en(i))}))}function nn(e){this.baseDir=e||"ltr",this.tokenizer=new Ii,this.featuresTags={}}function rn(e){var t=this.contextChecks[e+"Check"];return this.tokenizer.registerContextChecker(e,t.startCheck,t.endCheck)}function on(){return rn.call(this,"latinWord"),rn.call(this,"arabicWord"),rn.call(this,"arabicSentence"),this.tokenizer.tokenize(this.text)}function sn(){var e=this;this.tokenizer.getContextRanges("arabicSentence").forEach((function(t){var i=e.tokenizer.getRangeTokens(t);e.tokenizer.replaceRange(t.startIndex,t.endOffset,i.reverse())}))}function an(){if(-1===this.tokenizer.registeredModifiers.indexOf("glyphIndex"))throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function un(){var e=this;this.featuresTags.hasOwnProperty("arab")&&(an.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){Zi.call(e,t)})))}function ln(){var e=this,t="arab";this.featuresTags.hasOwnProperty(t)&&(-1!==this.featuresTags.arab.indexOf("rlig")&&(an.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){Qi.call(e,t)}))))}function cn(){var e=this,t="latn";this.featuresTags.hasOwnProperty(t)&&(-1!==this.featuresTags.latn.indexOf("liga")&&(an.call(this),this.tokenizer.getContextRanges("latinWord").forEach((function(t){tn.call(e,t)}))))}function hn(e){(e=e||{}).tables=e.tables||{},e.empty||(Et(e.familyName,"When creating a new Font object, familyName is required."),Et(e.styleName,"When creating a new Font object, styleName is required."),Et(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Et(e.ascender,"When creating a new Font object, ascender is required."),Et(e.descender<=0,"When creating a new Font object, negative descender value is required."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\s/g,"")},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables=Object.assign(e.tables,{os2:Object.assign({usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR},e.tables.os2)})),this.supported=!0,this.glyphs=new be.GlyphSet(this,e.glyphs||[]),this.encoding=new de(this),this.position=new Tt(this),this.substitution=new Ct(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Ut(this):void 0}})}function dn(e,t){var i=JSON.stringify(e),n=256;for(var r in t){var o=parseInt(r);if(o&&!(o<256)){if(JSON.stringify(t[r])===i)return o;n<=o&&(n=o+1)}}return t[n]=e,n}function pn(e,t,i){var n=dn(t.name,i);return[{name:"tag_"+e,type:"TAG",value:t.tag},{name:"minValue_"+e,type:"FIXED",value:t.minValue<<16},{name:"defaultValue_"+e,type:"FIXED",value:t.defaultValue<<16},{name:"maxValue_"+e,type:"FIXED",value:t.maxValue<<16},{name:"flags_"+e,type:"USHORT",value:0},{name:"nameID_"+e,type:"USHORT",value:n}]}function fn(e,t,i){var n={},r=new oe.Parser(e,t);return n.tag=r.parseTag(),n.minValue=r.parseFixed(),n.defaultValue=r.parseFixed(),n.maxValue=r.parseFixed(),r.skip("uShort",1),n.name=i[r.parseUShort()]||{},n}function gn(e,t,i,n){for(var r=[{name:"nameID_"+e,type:"USHORT",value:dn(t.name,n)},{name:"flags_"+e,type:"USHORT",value:0}],o=0;o<i.length;++o){var s=i[o].tag;r.push({name:"axis_"+e+" "+s,type:"FIXED",value:t.coordinates[s]<<16})}return r}function mn(e,t,i,n){var r={},o=new oe.Parser(e,t);r.name=n[o.parseUShort()]||{},o.skip("uShort",1),r.coordinates={};for(var s=0;s<i.length;++s)r.coordinates[i[s].tag]=o.parseFixed();return r}nn.prototype.setText=function(e){this.text=e},nn.prototype.contextChecks={latinWordCheck:Ji,arabicWordCheck:Hi,arabicSentenceCheck:Wi},nn.prototype.registerFeatures=function(e,t){var i=this,n=t.filter((function(t){return i.query.supports({script:e,tag:t})}));this.featuresTags.hasOwnProperty(e)?this.featuresTags[e]=this.featuresTags[e].concat(n):this.featuresTags[e]=n},nn.prototype.applyFeatures=function(e,t){if(!e)throw new Error("No valid font was provided to apply features");this.query||(this.query=new Ri(e));for(var i=0;i<t.length;i++){var n=t[i];this.query.supports({script:n.script})&&this.registerFeatures(n.script,n.tags)}},nn.prototype.registerModifier=function(e,t,i){this.tokenizer.registerModifier(e,t,i)},nn.prototype.checkContextReady=function(e){return!!this.tokenizer.getContext(e)},nn.prototype.applyFeaturesToContexts=function(){this.checkContextReady("arabicWord")&&(un.call(this),ln.call(this)),this.checkContextReady("latinWord")&&cn.call(this),this.checkContextReady("arabicSentence")&&sn.call(this)},nn.prototype.processText=function(e){this.text&&this.text===e||(this.setText(e),on.call(this),this.applyFeaturesToContexts())},nn.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},nn.prototype.getTextGlyphs=function(e){this.processText(e);for(var t=[],i=0;i<this.tokenizer.tokens.length;i++){var n=this.tokenizer.tokens[i];if(!n.state.deleted){var r=n.activeState.value;t.push(Array.isArray(r)?r[0]:r)}}return t},hn.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},hn.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},hn.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},hn.prototype.updateFeatures=function(e){return this.defaultRenderOptions.features.map((function(t){return"latn"===t.script?{script:"latn",tags:t.tags.filter((function(t){return e[t]}))}:t}))},hn.prototype.stringToGlyphs=function(e,t){var i=this,n=new nn;n.registerModifier("glyphIndex",null,(function(e){return i.charToGlyphIndex(e.char)}));var r=t?this.updateFeatures(t.features):this.defaultRenderOptions.features;n.applyFeatures(this,r);for(var o=n.getTextGlyphs(e),s=o.length,a=new Array(s),u=this.glyphs.get(0),l=0;l<s;l+=1)a[l]=this.glyphs.get(o[l])||u;return a},hn.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},hn.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},hn.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},hn.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var i=this.position.defaultKerningTables;return i?this.position.getKerningValue(i,e,t):this.kerningPairs[e+","+t]||0},hn.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]}]},hn.prototype.forEachGlyph=function(e,t,i,n,r,o){t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:72,r=Object.assign({},this.defaultRenderOptions,r);var s,a=1/this.unitsPerEm*n,u=this.stringToGlyphs(e,r);if(r.kerning){var l=r.script||this.position.getDefaultScriptName();s=this.position.getKerningTables(l,r.language)}for(var c=0;c<u.length;c+=1){var h=u[c];if(o.call(this,h,t,i,n,r),h.advanceWidth&&(t+=h.advanceWidth*a),r.kerning&&c<u.length-1)t+=(s?this.position.getKerningValue(s,h.index,u[c+1].index):this.getKerningValue(h,u[c+1]))*a;r.letterSpacing?t+=r.letterSpacing*n:r.tracking&&(t+=r.tracking/1e3*n)}return t},hn.prototype.getPath=function(e,t,i,n,r){var o=new N;return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var s=e.getPath(t,i,n,r,this);o.extend(s)})),o},hn.prototype.getPaths=function(e,t,i,n,r){var o=[];return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var s=e.getPath(t,i,n,r,this);o.push(s)})),o},hn.prototype.getAdvanceWidth=function(e,t,i){return this.forEachGlyph(e,0,0,t,i,(function(){}))},hn.prototype.draw=function(e,t,i,n,r,o){this.getPath(t,i,n,r,o).draw(e)},hn.prototype.drawPoints=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawPoints(e,i,n,r)}))},hn.prototype.drawMetrics=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawMetrics(e,i,n,r)}))},hn.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},hn.prototype.validate=function(){var e=this;function t(t){var i=e.getEnglishName(t);i&&i.trim().length}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm},hn.prototype.toTables=function(){return xt.fontToTable(this)},hn.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},hn.prototype.toArrayBuffer=function(){for(var e=this.toTables().encode(),t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;n++)i[n]=e[n];return t},hn.prototype.download=function(e){var t=this.getEnglishName("fontFamily"),i=this.getEnglishName("fontSubfamily");e=e||t.replace(/\s/g,"")+"-"+i+".otf";var n=this.toArrayBuffer();if("undefined"!=typeof window)if(window.URL=window.URL||window.webkitURL,window.URL){var r=new DataView(n),o=new Blob([r],{type:"font/opentype"}),s=document.createElement("a");s.href=window.URL.createObjectURL(o),s.download=e;var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!1),s.dispatchEvent(a)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var u=require("fs"),l=function(e){for(var t=new Buffer(e.byteLength),i=new Uint8Array(e),n=0;n<t.length;++n)t[n]=i[n];return t}(n);u.writeFileSync(e,l)}},hn.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},hn.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},hn.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var _n={make:function(e,t){var i=new K.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+4*e.axes.length}]);i.offsetToData=i.sizeOf();for(var n=0;n<e.axes.length;n++)i.fields=i.fields.concat(pn(n,e.axes[n],t));for(var r=0;r<e.instances.length;r++)i.fields=i.fields.concat(gn(r,e.instances[r],e.axes,t));return i},parse:function(e,t,i){var n=new oe.Parser(e,t),r=n.parseULong();E.argument(65536===r,"Unsupported fvar table version.");var o=n.parseOffset16();n.skip("uShort",1);for(var s=n.parseUShort(),a=n.parseUShort(),u=n.parseUShort(),l=n.parseUShort(),c=[],h=0;h<s;h++)c.push(fn(e,t+o+h*a,i));for(var d=[],p=t+o+s*a,f=0;f<u;f++)d.push(mn(e,p+f*l,c,i));return{axes:c,instances:d}}},yn=function(){return{coverage:this.parsePointer(ne.coverage),attachPoints:this.parseList(ne.pointer(ne.uShortList))}},xn=function(){var e=this.parseUShort();return E.argument(1===e||2===e||3===e,"Unsupported CaretValue table version."),1===e?{coordinate:this.parseShort()}:2===e?{pointindex:this.parseShort()}:3===e?{coordinate:this.parseShort()}:void 0},wn=function(){return this.parseList(ne.pointer(xn))},bn=function(){return{coverage:this.parsePointer(ne.coverage),ligGlyphs:this.parseList(ne.pointer(wn))}},vn=function(){return this.parseUShort(),this.parseList(ne.pointer(ne.coverage))};var Sn={parse:function(e,t){var i=new ne(e,t=t||0),n=i.parseVersion(1);E.argument(1===n||1.2===n||1.3===n,"Unsupported GDEF table version.");var r={version:n,classDef:i.parsePointer(ne.classDef),attachList:i.parsePointer(yn),ligCaretList:i.parsePointer(bn),markAttachClassDef:i.parsePointer(ne.classDef)};return n>=1.2&&(r.markGlyphSets=i.parsePointer(vn)),r}},Tn=new Array(10);Tn[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(ne.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(ne.coverage),values:this.parseValueRecordList()}:void E.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Tn[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();E.assert(1===t||2===t,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var i=this.parsePointer(ne.coverage),n=this.parseUShort(),r=this.parseUShort();if(1===t)return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,pairSets:this.parseList(ne.pointer(ne.list((function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}}))))};if(2===t){var o=this.parsePointer(ne.classDef),s=this.parsePointer(ne.classDef),a=this.parseUShort(),u=this.parseUShort();return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,classDef1:o,classDef2:s,class1Count:a,class2Count:u,classRecords:this.parseList(a,ne.list(u,(function(){return{value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}})))}}},Tn[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Tn[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Tn[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Tn[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Tn[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Tn[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Tn[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var Cn=new Array(10);var Nn={parse:function(e,t){var i=new ne(e,t=t||0),n=i.parseVersion(1);return E.argument(1===n||1.1===n,"Unsupported GPOS table version "+n),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(Tn)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(Tn),variations:i.parseFeatureVariationsList()}},make:function(e){return new K.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new K.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new K.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new K.LookupList(e.lookups,Cn)}])}};var Fn={parse:function(e,t){var i=new oe.Parser(e,t),n=i.parseUShort();if(0===n)return function(e){var t={};e.skip("uShort");var i=e.parseUShort();E.argument(0===i,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),s=e.parseUShort(),a=e.parseShort();t[o+","+s]=a}return t}(i);if(1===n)return function(e){var t={};e.skip("uShort"),e.parseULong()>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var i=255&e.parseUShort();if(e.skip("uShort"),0===i){var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),s=e.parseUShort(),a=e.parseShort();t[o+","+s]=a}}return t}(i);throw new Error("Unsupported kern table version ("+n+").")}};var On={parse:function(e,t,i,n){for(var r=new oe.Parser(e,t),o=n?r.parseUShort:r.parseULong,s=[],a=0;a<i+1;a+=1){var u=o.call(r);n&&(u*=2),s.push(u)}return s}};function En(e,t){require("fs").readFile(e,(function(e,i){if(e)return t(e.message);t(null,Ot(i))}))}function Dn(e,t){var i=new XMLHttpRequest;i.open("get",e,!0),i.responseType="arraybuffer",i.onload=function(){return i.response?t(null,i.response):t("Font could not be loaded: "+i.statusText)},i.onerror=function(){t("Font could not be loaded")},i.send()}function Mn(e,t){for(var i=[],n=12,r=0;r<t;r+=1){var o=oe.getTag(e,n),s=oe.getULong(e,n+4),a=oe.getULong(e,n+8),u=oe.getULong(e,n+12);i.push({tag:o,checksum:s,offset:a,length:u,compression:!1}),n+=16}return i}function In(e,t){if("WOFF"===t.compression){var i=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),n=new Uint8Array(t.length);if(S(i,n),n.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(n.buffer,0),offset:0}}return{data:e,offset:t.offset}}function Vn(e,t){var i,n;t=null==t?{}:t;var r,o,s,a,u,l,c,h,d,p,f,g,m,_=new hn({empty:!0}),y=new DataView(e,0),x=[],w=oe.getTag(y,0);if(w===String.fromCharCode(0,1,0,0)||"true"===w||"typ1"===w)_.outlinesFormat="truetype",x=Mn(y,r=oe.getUShort(y,4));else if("OTTO"===w)_.outlinesFormat="cff",x=Mn(y,r=oe.getUShort(y,4));else{if("wOFF"!==w)throw new Error("Unsupported OpenType signature "+w);var b=oe.getTag(y,4);if(b===String.fromCharCode(0,1,0,0))_.outlinesFormat="truetype";else{if("OTTO"!==b)throw new Error("Unsupported OpenType flavor "+w);_.outlinesFormat="cff"}x=function(e,t){for(var i=[],n=44,r=0;r<t;r+=1){var o=oe.getTag(e,n),s=oe.getULong(e,n+4),a=oe.getULong(e,n+8),u=oe.getULong(e,n+12),l=void 0;l=a<u&&"WOFF",i.push({tag:o,offset:s,compression:l,compressedLength:a,length:u}),n+=20}return i}(y,r=oe.getUShort(y,12))}for(var v=0;v<r;v+=1){var S=x[v],T=void 0;switch(S.tag){case"cmap":T=In(y,S),_.tables.cmap=ae.parse(T.data,T.offset),_.encoding=new pe(_.tables.cmap);break;case"cvt ":T=In(y,S),m=new oe.Parser(T.data,T.offset),_.tables.cvt=m.parseShortList(S.length/2);break;case"fvar":s=S;break;case"fpgm":T=In(y,S),m=new oe.Parser(T.data,T.offset),_.tables.fpgm=m.parseByteList(S.length);break;case"head":T=In(y,S),_.tables.head=Xe.parse(T.data,T.offset),_.unitsPerEm=_.tables.head.unitsPerEm,i=_.tables.head.indexToLocFormat;break;case"hhea":T=In(y,S),_.tables.hhea=ze.parse(T.data,T.offset),_.ascender=_.tables.hhea.ascender,_.descender=_.tables.hhea.descender,_.numberOfHMetrics=_.tables.hhea.numberOfHMetrics;break;case"hmtx":h=S;break;case"ltag":T=In(y,S),n=Ge.parse(T.data,T.offset);break;case"maxp":T=In(y,S),_.tables.maxp=qe.parse(T.data,T.offset),_.numGlyphs=_.tables.maxp.numGlyphs;break;case"name":f=S;break;case"OS/2":T=In(y,S),_.tables.os2=st.parse(T.data,T.offset);break;case"post":T=In(y,S),_.tables.post=at.parse(T.data,T.offset),_.glyphNames=new ge(_.tables.post);break;case"prep":T=In(y,S),m=new oe.Parser(T.data,T.offset),_.tables.prep=m.parseByteList(S.length);break;case"glyf":a=S;break;case"loca":p=S;break;case"CFF ":o=S;break;case"kern":d=S;break;case"GDEF":u=S;break;case"GPOS":l=S;break;case"GSUB":c=S;break;case"meta":g=S}}var C=In(y,f);if(_.tables.name=rt.parse(C.data,C.offset,n),_.names=_.tables.name,a&&p){var N=0===i,F=In(y,p),O=On.parse(F.data,F.offset,_.numGlyphs,N),E=In(y,a);_.glyphs=kt.parse(E.data,E.offset,O,_,t)}else{if(!o)throw new Error("Font doesn't contain TrueType or CFF outlines.");var D=In(y,o);Ue.parse(D.data,D.offset,_,t)}var M=In(y,h);if(je.parse(_,M.data,M.offset,_.numberOfHMetrics,_.numGlyphs,_.glyphs,t),me(_,t),d){var I=In(y,d);_.kerningPairs=Fn.parse(I.data,I.offset)}else _.kerningPairs={};if(u){var V=In(y,u);_.tables.gdef=Sn.parse(V.data,V.offset)}if(l){var B=In(y,l);_.tables.gpos=Nn.parse(B.data,B.offset),_.position.init()}if(c){var A=In(y,c);_.tables.gsub=ht.parse(A.data,A.offset)}if(s){var P=In(y,s);_.tables.fvar=_n.parse(P.data,P.offset,_.names)}if(g){var R=In(y,g);_.tables.meta=dt.parse(R.data,R.offset),_.metas=_.tables.meta}return _}function Bn(e,t,i){i=null==i?{}:i;var n="undefined"==typeof window&&!i.isUrl?En:Dn;return new Promise((function(r,o){n(e,(function(e,n){if(e){if(t)return t(e);o(e)}var s;try{s=Vn(n,i)}catch(e){if(t)return t(e,null);o(e)}if(t)return t(null,s);r(s)}))}))}function An(e,t){return Vn(Ot(require("fs").readFileSync(e)),t)}var Pn=Object.freeze({__proto__:null,Font:hn,Glyph:ye,Path:N,BoundingBox:C,_parse:oe,parse:Vn,load:Bn,loadSync:An});e.BoundingBox=C,e.Font=hn,e.Glyph=ye,e.Path=N,e._parse=oe,e.default=Pn,e.load=Bn,e.loadSync=An,e.parse=Vn,Object.defineProperty(e,"__esModule",{value:!0})})),define("opentype",["opentype/dist/opentype"],(function(e){return e})),define("x_ite/Browser/Text/X3DTextContext",["jquery","x_ite/Components/Text/FontStyle","opentype"],(function(e,t,i){"use strict";const n=Symbol(),r=Symbol(),o=Symbol();function s(){this[r]=new Map,this[o]=new Map}return s.prototype={initialize:function(){},getDefaultFontStyle:function(){return this[n]=new t(this.getPrivateScene()),this[n].setup(),this.getDefaultFontStyle=function(){return this[n]},Object.defineProperty(this,"getDefaultFontStyle",{enumerable:!1}),this[n]},getFont:function(t){t=t.toString();let n=this[r].get(t);return void 0===n&&(this[r].set(t,n=e.Deferred()),i.load(t,this.setFont.bind(this,n))),n},setFont:function(e,t,i){t?e.reject(t):e.resolve(i)},getGlyph:function(e,t,i){let n=this[o].get(e);n||this[o].set(e,n=[]);let r=n[t];r||(r=n[t]=[]);let s=r[i];return s||(s=r[i]={}),s}},s})),define("x_ite/Components/Texturing/X3DTextureTransformNode",["x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i){"use strict";function n(n){e.call(this,n),this.addType(t.X3DTextureTransformNode),this.matrixArray=new Float32Array(i.Identity)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,setMatrix:function(e){this.matrixArray.set(e)},setShaderUniformsToChannel:function(e,t,i){e.uniformMatrix4fv(t.x3d_TextureMatrix[i],!1,this.matrixArray)}}),n})),define("x_ite/Components/Texturing/X3DSingleTextureTransformNode",["x_ite/Components/Texturing/X3DTextureTransformNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DSingleTextureTransformNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,getTextureMapping:function(e,t=0){this._mapping.getValue()&&e.set(this._mapping.getValue(),t)},setShaderUniforms:function(e,t){for(let i=0,n=t.x3d_MaxTextures;i<n;++i)this.setShaderUniformsToChannel(e,t,i)}}),i})),define("x_ite/Components/Texturing/TextureTransform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DSingleTextureTransformNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2","standard/Math/Numbers/Matrix3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(r.TextureTransform),this._rotation.setUnit("angle"),this.matrix=new a}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"mapping",new e.SFString),new t(r.inputOutput,"translation",new e.SFVec2f),new t(r.inputOutput,"rotation",new e.SFFloat),new t(r.inputOutput,"scale",new e.SFVec2f(1,1)),new t(r.inputOutput,"center",new e.SFVec2f)]),getTypeName:function(){return"TextureTransform"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"textureTransform"},initialize:function(){n.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},getMatrix:function(){return this.matrix},eventsProcessed:function(){const e=new o(0,0),t=new s;return function(){const i=this._translation.getValue(),n=this._rotation.getValue(),r=this._scale.getValue(),s=this._center.getValue(),a=this.matrix;t.identity(),s.equals(o.Zero)||t.translate(e.assign(s).negate()),r.equals(o.One)||t.scale(r),0!==n&&t.rotate(n),s.equals(o.Zero)||t.translate(s),i.equals(o.Zero)||t.translate(i),a[0]=t[0],a[1]=t[1],a[4]=t[3],a[5]=t[4],a[12]=t[6],a[13]=t[7],this.setMatrix(a)}}()}),u})),define("x_ite/Browser/Texturing/X3DTexturingContext",["x_ite/Components/Texturing/TextureProperties","x_ite/Components/Texturing/TextureTransform","x_ite/Components/Texturing/TextureCoordinate"],(function(e,t,i){"use strict";const n=Symbol(),r=Symbol(),o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),h=Symbol(),d=Symbol(),p=Symbol(),f=Symbol(),g=Symbol(),m=Symbol(),_=Symbol(),y=Symbol(),x=Symbol(),w=Symbol(),b=Symbol(),v=Symbol(),S=Symbol(),T=Symbol();function C(){const e=this.getContext(),t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this[n]=t>8?2:1,this[r]=t>8,this[o]=t>8}return C.prototype={initialize:function(){const e=this.getContext();this[s]=e.getParameter(e.MAX_TEXTURE_SIZE),this[a]=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this[u]=NaN,this[l]=[...Array(this[a]).keys()],this[c]=this[l].pop(),this[h]=this[l].pop(),this[d]=this[l].pop(),this[p]=[this[c]],this[f]=[this[h]],this[g]=[this[d]];const t=new Uint8Array([255,255,255,255]);this[x]=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this[x]),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.activeTexture(e.TEXTURE0+this[c]),e.bindTexture(e.TEXTURE_2D,this[x]),e.getVersion()>=2&&(this[w]=e.createTexture(),e.bindTexture(e.TEXTURE_3D,this[w]),e.texImage3D(e.TEXTURE_3D,0,e.RGBA,1,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.activeTexture(e.TEXTURE0+this[h]),e.bindTexture(e.TEXTURE_3D,this[w])),this[b]=e.createTexture(),e.bindTexture(e.TEXTURE_CUBE_MAP,this[b]),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_Z,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_NEGATIVE_X,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_Y,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.texImage2D(e.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,t),e.activeTexture(e.TEXTURE0+this[d]),e.bindTexture(e.TEXTURE_CUBE_MAP,this[b]),this.resetTextureUnits()},getMaxTextures:function(){return this[n]},getMinTextureSize:function(){return 16},getMaxTextureSize:function(){return this[s]},getMaxCombinedTextureUnits:function(){return this[a]},popTexture2DUnit:function(){return this[m]>0?(--this[m],this[p].shift()):this[l].pop()},pushTexture2DUnit:function(e){void 0!==e&&(this[m]=Math.max(this[m]+1,1),this[p].unshift(e))},getTexture2DUnit:function(){if(this[m]>0)return this[p][--this[m]];const e=this[l].pop();return void 0!==e&&this[p].push(e),e},getTexture3DUnit:function(){if(this[_]>0)return this[f][--this[_]];const e=this[l].pop();return void 0!==e&&this[f].push(e),e},getTextureCubeUnit:function(){if(this[y]>0)return this[g][--this[y]];const e=this[l].pop();return void 0!==e&&this[g].push(e),e},getTextureUnit:function(e){switch(e){case 2:return this.getTexture2DUnit();case 3:return this.getTexture3DUnit();case 4:return this.getTextureCubeUnit()}},resetTextureUnits:function(){this[m]=this[p].length,this[_]=this[f].length,this[y]=this[g].length},getDefaultTexture2DUnit:function(){return this[c]},getDefaultTexture3DUnit:function(){return this[h]},getDefaultTextureCubeUnit:function(){return this[d]},getTextureMemory:function(){return this[u]},getMultiTexturing:function(){return this[r]},getProjectiveTextureMapping:function(){return this[o]},getDefaultTextureProperties:function(){return this[v]=new e(this.getPrivateScene()),this[v]._magnificationFilter="NICEST",this[v]._minificationFilter="AVG_PIXEL_AVG_MIPMAP",this[v]._textureCompression="NICEST",this[v]._generateMipMaps=!0,this[v].setup(),this.getDefaultTextureProperties=function(){return this[v]},Object.defineProperty(this,"getDefaultTextureProperties",{enumerable:!1}),this[v]},getDefaultTextureTransform:function(){return this[S]=new t(this.getPrivateScene()),this[S].setup(),this.getDefaultTextureTransform=function(){return this[S]},Object.defineProperty(this,"getDefaultTextureTransform",{enumerable:!1}),this[S]},getDefaultTextureCoordinate:function(){return this[T]=new i(this.getPrivateScene()),this[T].setup(),this.getDefaultTextureCoordinate=function(){return this[T]},Object.defineProperty(this,"getDefaultTextureCoordinate",{enumerable:!1}),this[T]}},C})),define("x_ite/Browser/Time/X3DTimeContext",["standard/Math/Numbers/Vector3"],(function(e){"use strict";const t=Symbol(),i=Symbol(),n=Symbol(),r=Symbol();function o(){this[t]=0,this[i]=60,this[n]=new e(0,0,0),this[r]=0}return o.prototype={initialize:function(){this.advanceTime(performance.now())},getCurrentTime:function(){return this[t]},getCurrentFrameRate:function(){return this[i]},getCurrentSpeed:function(){return this[r]},advanceTime:function(){const o=new e(0,0,0);return function(e){const s=(e+performance.timeOrigin)/1e3,a=s-this[t];if(this[t]=s,this[i]=a?1/a:60,this.getWorld()&&this.getActiveLayer()){const e=this.getActiveLayer().getViewpoint().getCameraSpaceMatrix();o.assign(this[n]),this[n].set(e[12],e[13],e[14]),this[r]=o.subtract(this[n]).abs()*this[i]}else this[r]=0}}()},o})),define("x_ite/Browser/X3DBrowserContext",["jquery","x_ite/Fields/SFTime","x_ite/Base/X3DBaseNode","x_ite/Browser/Core/X3DCoreContext","x_ite/Routing/X3DRoutingContext","x_ite/Browser/Scripting/X3DScriptingContext","x_ite/Browser/Networking/X3DNetworkingContext","x_ite/Browser/Shaders/X3DShadersContext","x_ite/Browser/Rendering/X3DRenderingContext","x_ite/Browser/Shape/X3DShapeContext","x_ite/Browser/Grouping/X3DGroupingContext","x_ite/Browser/Geometry3D/X3DGeometry3DContext","x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext","x_ite/Browser/Navigation/X3DNavigationContext","x_ite/Browser/Layering/X3DLayeringContext","x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext","x_ite/Browser/Lighting/X3DLightingContext","x_ite/Browser/Picking/X3DPickingContext","x_ite/Browser/Sound/X3DSoundContext","x_ite/Browser/Text/X3DTextContext","x_ite/Browser/Texturing/X3DTexturingContext","x_ite/Browser/Time/X3DTimeContext","x_ite/Execution/X3DWorld","x_ite/Rendering/TraverseType"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w,b,v,S){"use strict";const T=Symbol(),C=Symbol(),N=Symbol(),F=Symbol(),O=Symbol(),E=Symbol(),D=Symbol(),M=Symbol(),I=Symbol(),V=[];function B(e){i.call(this,this),r.call(this),n.call(this,e),o.call(this),s.call(this),a.call(this),u.call(this),l.call(this),c.call(this),h.call(this),d.call(this),p.call(this),f.call(this),g.call(this),m.call(this),_.call(this),y.call(this),x.call(this),w.call(this),b.call(this);for(const e of V)e.call(this);this.addChildObjects("initialized",new t,"shutdown",new t,"prepareEvents",new t,"timeEvents",new t,"sensorEvents",new t,"finished",new t),this[C]=0,this[N]=this.traverse.bind(this),this[F]=0,this[O]=0,this[E]=0,this[D]=0,this[M]=0,this[I]=0}B.prototype=Object.assign(Object.create(i.prototype),r.prototype,n.prototype,o.prototype,s.prototype,a.prototype,u.prototype,l.prototype,c.prototype,h.prototype,d.prototype,p.prototype,f.prototype,g.prototype,m.prototype,_.prototype,y.prototype,x.prototype,w.prototype,b.prototype,{constructor:B,initialize:function(){i.prototype.initialize.call(this),r.prototype.initialize.call(this),n.prototype.initialize.call(this),o.prototype.initialize.call(this),s.prototype.initialize.call(this),a.prototype.initialize.call(this),u.prototype.initialize.call(this),l.prototype.initialize.call(this),c.prototype.initialize.call(this),h.prototype.initialize.call(this),d.prototype.initialize.call(this),p.prototype.initialize.call(this),f.prototype.initialize.call(this),g.prototype.initialize.call(this),m.prototype.initialize.call(this),_.prototype.initialize.call(this),y.prototype.initialize.call(this),x.prototype.initialize.call(this),w.prototype.initialize.call(this),b.prototype.initialize.call(this);for(const e of V)e.prototype.initialize&&e.prototype.initialize.call(this)},initialized:function(){return this._initialized},shutdown:function(){return this._shutdown},prepareEvents:function(){return this._prepareEvents},timeEvents:function(){return this._timeEvents},sensorEvents:function(){return this._sensorEvents},finished:function(){return this._finished},getBrowser:function(){return this},getWorld:function(){return this[T]},setExecutionContext:function(e){this[T]=new v(e),this[T].setup()},getExecutionContext:function(){return this[T].getExecutionContext()},addBrowserEvent:function(){this[C]!==this.getCurrentTime()&&(this[C]=this.getCurrentTime(),this.requestAnimationFrame())},requestAnimationFrame:function(){window.requestAnimationFrame(this[N])},traverse:function(e){const t=this.getContext(),i=performance.now();this[F]=i-this[O],this.advanceTime(e),this._prepareEvents.processInterests(),this.processEvents(),this._timeEvents.processInterests(),this.processEvents();const n=performance.now();this[T].traverse(S.CAMERA,null),this[D]=performance.now()-n;const r=performance.now();this.getCollisionCount()&&this[T].traverse(S.COLLISION,null),this[M]=performance.now()-r,this._sensorEvents.processInterests(),this.processEvents();const o=performance.now();t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this[T].traverse(S.DISPLAY,null),this[I]=performance.now()-o,this[E]=performance.now()-i,this[O]=performance.now(),this._finished.processInterests()},getSystemTime:function(){return this[F]},getBrowserTime:function(){return this[E]},getCameraTime:function(){return this[D]},getCollisionTime:function(){return this[M]},getDisplayTime:function(){return this[I]}});for(const e of Reflect.ownKeys(B.prototype))Object.defineProperty(B.prototype,e,{enumerable:!1});return Object.assign(B,{addContext:function(t){const i=require("x_ite/X3D");V.push(t),Object.assign(B.prototype,t.prototype);for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(B.prototype,e,{enumerable:!1});e("X3DCanvas").each((function(e,n){const r=i.getBrowser(n);t.call(r),t.prototype.initialize&&t.prototype.initialize.call(r)}))}}),B})),define("x_ite/Components/Core/X3DMetadataObject",["x_ite/Base/X3DConstants"],(function(e){"use strict";function t(t){this.addType(e.X3DMetadataObject)}return t.prototype={constructor:t,initialize:function(){}},t})),define("x_ite/Components/Core/MetadataBoolean",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataBoolean)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFBool)]),getTypeName:function(){return"MetadataBoolean"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataDouble",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataDouble)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFDouble)]),getTypeName:function(){return"MetadataDouble"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataFloat",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataFloat)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFFloat)]),getTypeName:function(){return"MetadataFloat"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataInteger",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataInteger)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFInt32)]),getTypeName:function(){return"MetadataInteger"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataSet)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFNode)]),getTypeName:function(){return"MetadataSet"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/MetadataString",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.MetadataString)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"name",new e.SFString),new t(o.inputOutput,"reference",new e.SFString),new t(o.inputOutput,"value",new e.MFString)]),getTypeName:function(){return"MetadataString"},getComponentName:function(){return"Core"},getContainerField:function(){return"metadata"}}),s})),define("x_ite/Components/Core/X3DInfoNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DInfoNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Core/WorldInfo",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DInfoNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.WorldInfo)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"title",new e.SFString),new t(r.inputOutput,"info",new e.MFString)]),getTypeName:function(){return"WorldInfo"},getComponentName:function(){return"Core"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.getExecutionContext().addWorldInfo(this)},dispose:function(){this.getExecutionContext().removeWorldInfo(this),n.prototype.dispose.call(this)}}),o})),define("x_ite/Components/Core",["x_ite/Configuration/SupportedNodes","x_ite/Components/Core/MetadataBoolean","x_ite/Components/Core/MetadataDouble","x_ite/Components/Core/MetadataFloat","x_ite/Components/Core/MetadataInteger","x_ite/Components/Core/MetadataSet","x_ite/Components/Core/MetadataString","x_ite/Components/Core/WorldInfo","x_ite/Components/Core/X3DBindableNode","x_ite/Components/Core/X3DChildNode","x_ite/Components/Core/X3DInfoNode","x_ite/Components/Core/X3DMetadataObject","x_ite/Components/Core/X3DNode","x_ite/Components/Core/X3DPrototypeInstance","x_ite/Components/Core/X3DSensorNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f){"use strict";const g={MetadataBoolean:t,MetadataDouble:i,MetadataFloat:n,MetadataInteger:r,MetadataSet:o,MetadataString:s,WorldInfo:a},m={X3DBindableNode:u,X3DChildNode:l,X3DInfoNode:c,X3DMetadataObject:h,X3DNode:d,X3DPrototypeInstance:p,X3DSensorNode:f};for(const t in g)e.addType(t,g[t]);for(const t in m)e.addAbstractType(t,m[t])})),define("x_ite/Components/EnvironmentalEffects/FogCoordinate",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.FogCoordinate),this._depth.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"depth",new e.MFFloat)]),getTypeName:function(){return"FogCoordinate"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"fogCoord"},initialize:function(){n.prototype.initialize.call(this),this._depth.addInterest("set_depth__",this),this.set_depth__()},set_depth__:function(){this.depth=this._depth.getValue(),this.length=this._depth.length},isEmpty:function(){return 0===this.length},getSize:function(){return this.length},addDepth:function(e,t){e<this.length?t.push(this.depth[e]):this.length?t.push(this.depth[this.length-1]):t.push(0)},addDepths:function(e,t){const i=this.length;if(i){const n=this.depth;for(let t=0;t<i;++t)e.push(n[t]);const r=n[i-1];for(let n=i;n<t;++n)e.push(r)}else for(let i=0;i<t;++i)e.push(0)}}),o})),define("x_ite/Components/EnvironmentalEffects/LocalFog",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/EnvironmentalEffects/X3DFogObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),r.call(this,e),this.addType(o.LocalFog)}return s.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"fogType",new e.SFString("LINEAR")),new t(o.inputOutput,"color",new e.SFColor(1,1,1)),new t(o.inputOutput,"visibilityRange",new e.SFFloat)]),getTypeName:function(){return"LocalFog"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this)},push:function(e){if(this._enabled.getValue()){const t=this.getFogs().pop();t.set(this,e.getModelViewMatrix().get()),e.pushLocalFog(t)}},pop:function(e){this._enabled.getValue()&&e.getBrowser().getLocalObjects().push(e.popLocalFog())}}),s})),define("x_ite/Components/EnvironmentalEffects/TextureBackground",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalEffects/X3DBackgroundNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.TextureBackground)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_bind",new e.SFBool),new t(o.inputOutput,"skyAngle",new e.MFFloat),new t(o.inputOutput,"skyColor",new e.MFColor(0,0,0)),new t(o.inputOutput,"groundAngle",new e.MFFloat),new t(o.inputOutput,"groundColor",new e.MFColor),new t(o.inputOutput,"transparency",new e.SFFloat),new t(o.outputOnly,"isBound",new e.SFBool),new t(o.outputOnly,"bindTime",new e.SFTime),new t(o.inputOutput,"frontTexture",new e.SFNode),new t(o.inputOutput,"backTexture",new e.SFNode),new t(o.inputOutput,"leftTexture",new e.SFNode),new t(o.inputOutput,"rightTexture",new e.SFNode),new t(o.inputOutput,"topTexture",new e.SFNode),new t(o.inputOutput,"bottomTexture",new e.SFNode)]),getTypeName:function(){return"TextureBackground"},getComponentName:function(){return"EnvironmentalEffects"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._frontTexture.addInterest("set_frontTexture__",this),this._backTexture.addInterest("set_backTexture__",this),this._leftTexture.addInterest("set_leftTexture__",this),this._rightTexture.addInterest("set_rightTexture__",this),this._topTexture.addInterest("set_topTexture__",this),this._bottomTexture.addInterest("set_bottomTexture__",this),this.set_frontTexture__(this._frontTexture),this.set_backTexture__(this._backTexture),this.set_leftTexture__(this._leftTexture),this.set_rightTexture__(this._rightTexture),this.set_topTexture__(this._topTexture),this.set_bottomTexture__(this._bottomTexture)},set_frontTexture__:function(){n.prototype.set_frontTexture__.call(this,r(o.X3DTextureNode,this._frontTexture))},set_backTexture__:function(){n.prototype.set_backTexture__.call(this,r(o.X3DTextureNode,this._backTexture))},set_leftTexture__:function(){n.prototype.set_leftTexture__.call(this,r(o.X3DTextureNode,this._leftTexture))},set_rightTexture__:function(){n.prototype.set_rightTexture__.call(this,r(o.X3DTextureNode,this._rightTexture))},set_topTexture__:function(){n.prototype.set_topTexture__.call(this,r(o.X3DTextureNode,this._topTexture))},set_bottomTexture__:function(){n.prototype.set_bottomTexture__.call(this,r(o.X3DTextureNode,this._bottomTexture))}}),s})),define("x_ite/Components/EnvironmentalEffects",["x_ite/Configuration/SupportedNodes","x_ite/Components/EnvironmentalEffects/Background","x_ite/Components/EnvironmentalEffects/Fog","x_ite/Components/EnvironmentalEffects/FogCoordinate","x_ite/Components/EnvironmentalEffects/LocalFog","x_ite/Components/EnvironmentalEffects/TextureBackground","x_ite/Components/EnvironmentalEffects/X3DBackgroundNode","x_ite/Components/EnvironmentalEffects/X3DFogObject"],(function(e,t,i,n,r,o,s,a){"use strict";const u={Background:t,Fog:i,FogCoordinate:n,LocalFog:r,TextureBackground:o},l={X3DBackgroundNode:s,X3DFogObject:a};for(const t in u)e.addType(t,u[t]);for(const t in l)e.addAbstractType(t,l[t])})),define("x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode",["x_ite/Fields","x_ite/Components/Core/X3DSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n){"use strict";function r(n){t.call(this,n),this.addType(i.X3DEnvironmentalSensorNode),this.addChildObjects("traversed",new e.SFBool(!0)),this._size.setUnit("length"),this._center.setUnit("length"),this.zeroTest=!1,this.currentTraversed=!0}return r.prototype=Object.assign(Object.create(t.prototype),{constructor:r,initialize:function(){t.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._enabled.addInterest("set_live__",this),this._size.addInterest("set_live__",this),this._traversed.addInterest("set_live__",this),this.set_live__()},set_live__:function(){!(this._traversed.getValue()&&this.isLive().getValue()&&this._enabled.getValue())||this.zeroTest&&this._size.getValue().equals(n.Zero)?(this.getBrowser().sensorEvents().removeInterest("update",this),this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime())):this.getBrowser().sensorEvents().addInterest("update",this)},setZeroTest:function(e){this.zeroTest=e},getZeroTest:function(){return this.zeroTest},setTraversed:function(e){e?!1===this._traversed.getValue()&&(this._traversed=!0):this.currentTraversed!==this._traversed.getValue()&&(this._traversed=this.currentTraversed),this.currentTraversed=e},getTraversed:function(){return this.currentTraversed},update:function(){}}),r})),define("x_ite/Components/EnvironmentalSensor/ProximitySensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),this.addType(o.ProximitySensor),this.setCameraObject(!0),this._centerOfRotation_changed.setUnit("length"),this._position_changed.setUnit("length"),this.setZeroTest(!0),this.min=new s(0,0,0),this.max=new s(0,0,0),this.viewpointNode=null,this.modelMatrix=new u,this.inside=!1}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"size",new e.SFVec3f),new t(o.inputOutput,"center",new e.SFVec3f),new t(o.outputOnly,"enterTime",new e.SFTime),new t(o.outputOnly,"exitTime",new e.SFTime),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"position_changed",new e.SFVec3f),new t(o.outputOnly,"orientation_changed",new e.SFRotation),new t(o.outputOnly,"centerOfRotation_changed",new e.SFVec3f)]),getTypeName:function(){return"ProximitySensor"},getComponentName:function(){return"EnvironmentalSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this),this._size.addInterest("set_extents__",this),this._center.addInterest("set_extents__",this),this._traversed.addFieldInterest(this._isCameraObject),this.set_enabled__(),this.set_extents__()},set_enabled__:function(){this.setCameraObject(this._enabled.getValue()),this._enabled.getValue()?delete this.traverse:this.traverse=Function.prototype},set_extents__:function(){const e=this._size.getValue(),t=this._center.getValue(),i=e.x/2,n=e.y/2,r=e.z/2,o=t.x,s=t.y,a=t.z;this.min.set(o-i,s-n,a-r),this.max.set(o+i,s+n,a+r)},update:function(){const e=new u,t=new u,i=new s(0,0,0),n=new a(0,0,1,0),r=new s(0,0,0);return function(){try{if(this.inside&&this.getTraversed()){if(this.viewpointNode){const o=this.modelMatrix;t.assign(this.viewpointNode.getModelMatrix()),t.translate(this.viewpointNode.getUserCenterOfRotation()),t.multRight(e.assign(o).inverse()),o.multRight(this.viewpointNode.getViewMatrix()),o.get(null,n),o.inverse(),i.set(o[12],o[13],o[14]),n.inverse(),r.set(t[12],t[13],t[14]),this._isActive.getValue()?(this._position_changed.getValue().equals(i)||(this._position_changed=i),this._orientation_changed.getValue().equals(n)||(this._orientation_changed=n),this._centerOfRotation_changed.getValue().equals(r)||(this._centerOfRotation_changed=r)):(this._isActive=!0,this._enterTime=this.getBrowser().getCurrentTime(),this._position_changed=i,this._orientation_changed=n,this._centerOfRotation_changed=r)}}else this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime())}catch(e){}this.inside=!1,this.viewpointNode=null,this.setTraversed(!1)}}(),traverse:function(){const e=new u,t=new s(-1,-1,-1);return function(i,n){try{switch(i){case r.CAMERA:return this.viewpointNode=n.getViewpoint(),void this.modelMatrix.assign(n.getModelViewMatrix().get());case r.DISPLAY:if(this.setTraversed(!0),this.inside)return;return void(this._size.getValue().equals(t)?this.inside=!0:(e.assign(n.getModelViewMatrix().get()).inverse(),this.inside=this.containsPoint(e.origin)))}}catch(e){console.error(e)}}}(),containsPoint:function(e){const t=this.min,i=this.max;return t.x<=e.x&&i.x>=e.x&&t.y<=e.y&&i.y>=e.y&&t.z<=e.z&&i.z>=e.z}}),l})),define("x_ite/Components/EnvironmentalSensor/TransformSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";const c=l(u),h=l(u);function d(e){n.call(this,e),this.addType(o.TransformSensor),this._position_changed.setUnit("length"),this.setZeroTest(!0),this.min=new s,this.max=new s,this.targetObjectNode=null,this.modelMatrices=[],this.targetMatrices=[]}return d.prototype=Object.assign(Object.create(n.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"size",new e.SFVec3f),new t(o.inputOutput,"center",new e.SFVec3f),new t(o.outputOnly,"enterTime",new e.SFTime),new t(o.outputOnly,"exitTime",new e.SFTime),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"position_changed",new e.SFVec3f),new t(o.outputOnly,"orientation_changed",new e.SFRotation),new t(o.inputOutput,"targetObject",new e.SFNode)]),getTypeName:function(){return"TransformSensor"},getComponentName:function(){return"EnvironmentalSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_enabled__",this),this._enabled.addInterest("set_enabled__",this),this._size.addInterest("set_enabled__",this),this._size.addInterest("set_extents__",this),this._center.addInterest("set_extents__",this),this._targetObject.addInterest("set_targetObject__",this),this.set_extents__(),this.set_targetObject__()},set_live__:function(){},set_enabled__:function(){this.isLive().getValue()&&this.targetObjectNode&&this._enabled.getValue()&&!this._size.getValue().equals(s.Zero)?(this.setPickableObject(!0),this.getBrowser().addTransformSensor(this),this.targetObjectNode.addTransformSensor(this)):(this.setPickableObject(!1),this.getBrowser().removeTransformSensor(this),this.targetObjectNode&&this.targetObjectNode.removeTransformSensor(this),this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime()))},set_extents__:function(){const e=this._size.getValue(),t=this._center.getValue(),i=e.x/2,n=e.y/2,r=e.z/2,o=t.x,s=t.y,a=t.z;this.min.set(o-i,s-n,a-r),this.max.set(o+i,s+n,a+r)},set_targetObject__:function(){this.targetObjectNode=null;try{const e=this._targetObject.getValue().getInnerNode(),t=e.getType();for(let i=t.length-1;i>=0;--i){switch(t[i]){case o.X3DGroupingNode:case o.X3DShapeNode:this.targetObjectNode=e;break;default:continue}break}}catch(e){}this.set_enabled__()},traverse:function(e,t){e===r.PICKING&&this.getPickableObject()&&this.modelMatrices.push(c.pop().assign(t.getModelViewMatrix().get()))},collect:function(e){this.targetMatrices.push(h.pop().assign(e))},process:function(){const e=new s(0,0,0),t=new a(0,0,1,0);return function(){const i=this.modelMatrices,n=this.targetMatrices,r=this.intersects();r?(r.get(e,t),this._isActive.getValue()?(this._position_changed.getValue().equals(e)||(this._position_changed=e),this._orientation_changed.getValue().equals(t)||(this._orientation_changed=t)):(this._isActive=!0,this._enterTime=this.getBrowser().getCurrentTime(),this._position_changed=e,this._orientation_changed=t)):this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime());for(const e of i)c.push(e);for(const e of n)h.push(e);i.length=0,n.length=0}}(),intersects:function(){const e=new s(-1,-1,-1);return function(){const t=this.modelMatrices,i=this.targetMatrices,n=this._size.getValue().equals(e);for(const e of t){const t=e.inverse();for(const e of i){const i=e.multRight(t);if(n||this.containsPoint(i.origin))return i}}return null}}(),containsPoint:function(e){const t=this.min,i=this.max;return t.x<=e.x&&i.x>=e.x&&t.y<=e.y&&i.y>=e.y&&t.z<=e.z&&i.z>=e.z}}),d})),define("x_ite/Components/EnvironmentalSensor/VisibilitySensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Geometry/Box3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(o.VisibilitySensor),this.setZeroTest(!1),this.visible=!1}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"enabled",new e.SFBool(!0)),new t(o.inputOutput,"size",new e.SFVec3f),new t(o.inputOutput,"center",new e.SFVec3f),new t(o.outputOnly,"enterTime",new e.SFTime),new t(o.outputOnly,"exitTime",new e.SFTime),new t(o.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"VisibilitySensor"},getComponentName:function(){return"EnvironmentalSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this),this.set_enabled__()},set_enabled__:function(){this._enabled.getValue()?delete this.traverse:this.traverse=Function.prototype},update:function(){this.visible&&this.getTraversed()?(this._isActive.getValue()||(this._isActive=!0,this._enterTime=this.getBrowser().getCurrentTime()),this.visible=!1):this._isActive.getValue()&&(this._isActive=!1,this._exitTime=this.getBrowser().getCurrentTime()),this.setTraversed(!1)},traverse:function(){const e=new a,t=new s(-1,-1,-1);return function(i,n){i===r.DISPLAY&&(this.setTraversed(!0),this.visible||(this._size.getValue().equals(t)?this.visible=!0:(e.set(this._size.getValue(),this._center.getValue()).multRight(n.getModelViewMatrix().get()),this.visible=n.getViewVolume().intersectsBox(e))))}}()}),u})),define("x_ite/Components/EnvironmentalSensor",["x_ite/Configuration/SupportedNodes","x_ite/Components/EnvironmentalSensor/ProximitySensor","x_ite/Components/EnvironmentalSensor/TransformSensor","x_ite/Components/EnvironmentalSensor/VisibilitySensor","x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode"],(function(e,t,i,n,r){"use strict";const o={ProximitySensor:t,TransformSensor:i,VisibilitySensor:n},s={X3DEnvironmentalSensorNode:r};for(const t in o)e.addType(t,o[t]);for(const t in s)e.addAbstractType(t,s[t])})),define("x_ite/Components/Followers/ColorChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Color3","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=new s(0,0,0),u=new s(0,0,0),l=new s(0,0,0),c=new s(0,0,0);function h(e){n.call(this,e),this.addType(r.ColorChaser)}return h.prototype=Object.assign(Object.create(n.prototype),{constructor:h,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFColor),new t(r.inputOnly,"set_destination",new e.SFColor),new t(r.initializeOnly,"initialValue",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"initialDestination",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFColor)]),getTypeName:function(){return"ColorChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)},getValue:function(){return this._set_value.getValue().getHSV(c)},getDestination:function(){return this._set_destination.getValue().getHSV(c)},getInitialValue:function(){return this._initialValue.getValue().getHSV(a)},getInitialDestination:function(){return this._initialDestination.getValue().getHSV(u)},setValue:function(e){this._value_changed.setHSV(e.x,e.y,e.z)},interpolate:function(e,t,i){return o.lerp(e,t,i,c)},step:function(e,t,i){l.assign(this.output).add(e).subtract(t),o.lerp(this.output,l,i,this.output)}}),h})),define("x_ite/Components/Followers/X3DDamperNode",["x_ite/Components/Followers/X3DFollowerNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i){"use strict";function n(i){e.call(this,i),this.addType(t.X3DDamperNode)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,initialize:function(){e.prototype.initialize.call(this),this._order.addInterest("set_order__",this),this._set_value.addInterest("set_value__",this),this._set_destination.addInterest("set_destination__",this);var t=this.getBuffer(),i=this.getInitialValue(),n=this.getInitialDestination();t[0]=this.duplicate(n);for(var r=1,o=this.getOrder()+1;r<o;++r)t[r]=this.duplicate(i);this.equals(n,i,this.getTolerance())?this.setValue(n):this.set_active(!0)},getOrder:function(){return i.clamp(this._order.getValue(),0,5)},getTolerance:function(){return this._tolerance.getValue()<0?1e-4:this._tolerance.getValue()},prepareEvents:function(){var e=this.getBuffer(),t=e.length-1;if(this._tau.getValue()){for(var i=1/this.getBrowser().currentFrameRate,n=Math.exp(-i/this._tau.getValue()),r=0;r<t;++r)try{this.assign(e,r+1,this.interpolate(e[r],e[r+1],n))}catch(e){}if(this.setValue(e[t]),!this.equals(e[t],e[0],this.getTolerance()))return}else this.setValue(e[0]),t=0;r=1;for(var o=e.length;r<o;++r)this.assign(e,r,e[t]);this.set_active(!1)},set_value__:function(){for(var e=this.getBuffer(),t=this.getValue(),i=1,n=e.length;i<n;++i)this.assign(e,i,t);this.setValue(t),this.set_active(!0)},set_destination__:function(){this.assign(this.getBuffer(),0,this.getDestination()),this.set_active(!0)},set_order__:function(){for(var e=this.getBuffer(),t=e[e.length-1],i=e.length,n=this.getOrder()+1;i<n;++i)e[i]=this.duplicate(t);e.length=n}}),n})),define("x_ite/Components/Followers/ColorDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Color3","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=new s(0,0,0),u=new s(0,0,0),l=new s(0,0,0),c=new s(0,0,0);function h(e){n.call(this,e),this.addType(r.ColorDamper)}return h.prototype=Object.assign(Object.create(n.prototype),{constructor:h,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFColor),new t(r.inputOnly,"set_destination",new e.SFColor),new t(r.initializeOnly,"initialValue",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"initialDestination",new e.SFColor(.8,.8,.8)),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFColor)]),getTypeName:function(){return"ColorDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)},getValue:function(){return this._set_value.getValue().getHSV(c)},getDestination:function(){return this._set_destination.getValue().getHSV(c)},getInitialValue:function(){return this._initialValue.getValue().getHSV(u)},getInitialDestination:function(){return this._initialDestination.getValue().getHSV(l)},setValue:function(e){this._value_changed.setHSV(e.x,e.y,e.z)},equals:function(e,t,i){return a.assign(e).subtract(t).abs()<i},interpolate:function(e,t,i){return o.lerp(e,t,i,c)}}),h})),define("x_ite/Browser/Followers/X3DArrayFollowerTemplate",[],(function(){"use strict";return function(e){function t(){this.array=this.getArray(),this.zero=this.getVector()}return t.prototype={getArray:function(){const e=[];return e.assign=function(e){if(Array.isArray(e)){for(var t=0,i=Math.min(this.length,e.length);t<i;++t)this[t].assign(e[t]);for(t=i,i=e.length;t<i;++t)this[t]=e[t].copy();this.length=i}else{for(t=0,i=Math.min(this.length,e.length);t<i;++t)this[t].assign(e[t].getValue());for(t=i,i=e.length;t<i;++t)this[t]=e[t].getValue().copy();this.length=i}},e},getValue:function(){return this._set_value},getDestination:function(){return this._set_destination},getInitialValue:function(){return this._initialValue},getInitialDestination:function(){return this._initialDestination},setValue:function(e){if(Array.isArray(e)){const n=this._value_changed;for(var t=0,i=e.length;t<i;++t)n[t]=e[t];n.length=i}else this._value_changed=e},duplicate:function(e){const t=this.getArray();return t.assign(e),t},equals:function(e,t,i){if(e.length!==t.length)return!1;const n=this.a;let r=0;for(let i=0,o=e.length;i<o;++i)r=Math.max(n.assign(e[i]).subtract(t[i]).abs());return r<i},interpolate:function(e,t,i){const n=this.array;n.assign(e);for(let e=0,r=n.length;e<r;++e)n[e].lerp(t[e]||this.zero,i);return n},set_destination__:function(){const t=this.getBuffer(),i=this._set_destination.length;for(let e=0,n=t.length;e<n;++e){const n=t[e];for(let e=n.length;e<i;++e)n[e]=this.getVector();n.length=i}e.prototype.set_destination__.call(this)}},t}})),define("x_ite/Browser/Followers/X3DArrayChaserTemplate",["x_ite/Browser/Followers/X3DArrayFollowerTemplate"],(function(e){"use strict";return function(t){const i=e(t);function n(){i.call(this),this.array=this.getArray()}return Object.assign(n.prototype,i.prototype,{step:function(e,t,i){const n=this.output,r=this.deltaOut;for(let o=0,s=n.length;o<s;++o)n[o].add(r.assign(e[o]||this.zero).subtract(t[o]||this.zero).multiply(i))}}),n}})),define("x_ite/Components/Followers/CoordinateChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Browser/Followers/X3DArrayChaserTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.CoordinateChaser)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec3f),new t(o.inputOnly,"set_destination",new e.MFVec3f),new t(o.initializeOnly,"initialValue",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"initialDestination",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"duration",new e.SFTime(1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"CoordinateChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)}}),u})),define("x_ite/Components/Followers/CoordinateDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Browser/Followers/X3DArrayFollowerTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.CoordinateDamper)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec3f),new t(o.inputOnly,"set_destination",new e.MFVec3f),new t(o.initializeOnly,"initialValue",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"initialDestination",new e.MFVec3f(new s(0,0,0))),new t(o.initializeOnly,"order",new e.SFInt32(3)),new t(o.inputOutput,"tau",new e.SFTime(.3)),new t(o.inputOutput,"tolerance",new e.SFFloat(-1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"CoordinateDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)}}),u})),define("x_ite/Components/Followers/OrientationDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Rotation4"],(function(e,t,i,n,r,o){"use strict";var s=new o(0,0,1,0),a=new o(0,0,1,0);function u(e){n.call(this,e),this.addType(r.OrientationDamper),this._set_value.setUnit("angle"),this._set_destination.setUnit("angle"),this._initialValue.setUnit("angle"),this._initialDestination.setUnit("angle"),this._value_changed.setUnit("angle")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFRotation),new t(r.inputOnly,"set_destination",new e.SFRotation),new t(r.initializeOnly,"initialValue",new e.SFRotation),new t(r.initializeOnly,"initialDestination",new e.SFRotation),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFRotation)]),getTypeName:function(){return"OrientationDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0,1,0)},equals:function(e,t,i){return s.assign(e).inverse().multRight(t),Math.abs(s.angle)<i},interpolate:function(e,t,i){return a.assign(e).slerp(t,i)}}),u})),define("x_ite/Components/Followers/PositionChaser2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionChaser2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFVec2f),new t(r.inputOnly,"set_destination",new e.SFVec2f),new t(r.initializeOnly,"initialValue",new e.SFVec2f),new t(r.initializeOnly,"initialDestination",new e.SFVec2f),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"PositionChaser2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0)}}),s})),define("x_ite/Components/Followers/PositionDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionDamper)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFVec3f),new t(r.inputOnly,"set_destination",new e.SFVec3f),new t(r.initializeOnly,"initialValue",new e.SFVec3f),new t(r.initializeOnly,"initialDestination",new e.SFVec3f),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.outputOnly,"value_changed",new e.SFVec3f),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"PositionDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0,0)}}),s})),define("x_ite/Components/Followers/PositionDamper2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionDamper2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFVec2f),new t(r.inputOnly,"set_destination",new e.SFVec2f),new t(r.initializeOnly,"initialValue",new e.SFVec2f),new t(r.initializeOnly,"initialDestination",new e.SFVec2f),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"PositionDamper2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new o(0,0)}}),s})),define("x_ite/Components/Followers/ScalarChaser",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ScalarChaser)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFFloat),new t(r.inputOnly,"set_destination",new e.SFFloat),new t(r.initializeOnly,"initialValue",new e.SFFloat),new t(r.initializeOnly,"initialDestination",new e.SFFloat),new t(r.initializeOnly,"duration",new e.SFTime(1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFFloat)]),getTypeName:function(){return"ScalarChaser"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return 0},setPreviousValue:function(e){this.previousValue=e},setDestination:function(e){this.destination=e},duplicate:function(e){return e},assign:function(e,t,i){e[t]=i},equals:function(e,t,i){return Math.abs(e-t)<i},interpolate:function(e,t,i){return o.lerp(e,t,i)},step:function(e,t,i){this.output+=(e-t)*i}}),s})),define("x_ite/Components/Followers/ScalarDamper",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ScalarDamper)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_value",new e.SFFloat),new t(r.inputOnly,"set_destination",new e.SFFloat),new t(r.initializeOnly,"initialValue",new e.SFFloat),new t(r.initializeOnly,"initialDestination",new e.SFFloat),new t(r.initializeOnly,"order",new e.SFInt32(3)),new t(r.inputOutput,"tau",new e.SFTime(.3)),new t(r.inputOutput,"tolerance",new e.SFFloat(-1)),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"value_changed",new e.SFFloat)]),getTypeName:function(){return"ScalarDamper"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return 0},duplicate:function(e){return e},assign:function(e,t,i){e[t]=i},equals:function(e,t,i){return Math.abs(e-t)<i},interpolate:function(e,t,i){return o.lerp(e,t,i)}}),s})),define("x_ite/Components/Followers/TexCoordChaser2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DChaserNode","x_ite/Browser/Followers/X3DArrayChaserTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.TexCoordChaser2D)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec2f),new t(o.inputOnly,"set_destination",new e.MFVec2f),new t(o.initializeOnly,"initialValue",new e.MFVec2f),new t(o.initializeOnly,"initialDestination",new e.MFVec2f),new t(o.initializeOnly,"duration",new e.SFTime(1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec2f)]),getTypeName:function(){return"TexCoordChaser2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0)}}),u})),define("x_ite/Components/Followers/TexCoordDamper2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Followers/X3DDamperNode","x_ite/Browser/Followers/X3DArrayFollowerTemplate","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o,s){"use strict";var a=r(n);function u(e){n.call(this,e),a.call(this,e),this.addType(o.TexCoordDamper2D)}return u.prototype=Object.assign(Object.create(n.prototype),a.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_value",new e.MFVec2f),new t(o.inputOnly,"set_destination",new e.MFVec2f),new t(o.initializeOnly,"initialValue",new e.MFVec2f),new t(o.initializeOnly,"initialDestination",new e.MFVec2f),new t(o.initializeOnly,"order",new e.SFInt32(3)),new t(o.inputOutput,"tau",new e.SFTime(.3)),new t(o.inputOutput,"tolerance",new e.SFFloat(-1)),new t(o.outputOnly,"isActive",new e.SFBool),new t(o.outputOnly,"value_changed",new e.MFVec2f)]),getTypeName:function(){return"TexCoordDamper2D"},getComponentName:function(){return"Followers"},getContainerField:function(){return"children"},getVector:function(){return new s(0,0,0)}}),u})),define("x_ite/Components/Followers",["x_ite/Configuration/SupportedNodes","x_ite/Components/Followers/ColorChaser","x_ite/Components/Followers/ColorDamper","x_ite/Components/Followers/CoordinateChaser","x_ite/Components/Followers/CoordinateDamper","x_ite/Components/Followers/OrientationChaser","x_ite/Components/Followers/OrientationDamper","x_ite/Components/Followers/PositionChaser","x_ite/Components/Followers/PositionChaser2D","x_ite/Components/Followers/PositionDamper","x_ite/Components/Followers/PositionDamper2D","x_ite/Components/Followers/ScalarChaser","x_ite/Components/Followers/ScalarDamper","x_ite/Components/Followers/TexCoordChaser2D","x_ite/Components/Followers/TexCoordDamper2D","x_ite/Components/Followers/X3DChaserNode","x_ite/Components/Followers/X3DDamperNode","x_ite/Components/Followers/X3DFollowerNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_){"use strict";const y={ColorChaser:t,ColorDamper:i,CoordinateChaser:n,CoordinateDamper:r,OrientationChaser:o,OrientationDamper:s,PositionChaser:a,PositionChaser2D:u,PositionDamper:l,PositionDamper2D:c,ScalarChaser:h,ScalarDamper:d,TexCoordChaser2D:p,TexCoordDamper2D:f},x={X3DChaserNode:g,X3DDamperNode:m,X3DFollowerNode:_};for(const t in y)e.addType(t,y[t]);for(const t in x)e.addAbstractType(t,x[t])})),define("x_ite/Components/Geometry3D/Box",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.Box),this._size.setUnit("length")}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"size",new e.SFVec3f(2,2,2)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Box"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},build:function(){const e=new o(2,2,2);return function(){const t=this.getBrowser().getBoxOptions().getGeometry(),i=this._size.getValue();if(this.setMultiTexCoords(t.getMultiTexCoords()),this.setNormals(t.getNormals()),i.equals(e))this.setVertices(t.getVertices()),this.getMin().assign(t.getMin()),this.getMax().assign(t.getMax());else{const e=o.divide(i,2),n=t.getVertices().getValue(),r=this.getVertices();let s=e.x,a=e.y,u=e.z;for(let e=0,t=n.length;e<t;e+=4)r.push(s*n[e],a*n[e+1],u*n[e+2],1);s=Math.abs(s),a=Math.abs(a),u=Math.abs(u),this.getMin().set(-s,-a,-u),this.getMax().set(s,a,u)}this.setSolid(this._solid.getValue())}}()}),s})),define("x_ite/Components/Geometry3D/Cone",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(r.Cone),this._height.setUnit("length"),this._bottomRadius.setUnit("length")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"side",new e.SFBool(!0)),new t(r.initializeOnly,"bottom",new e.SFBool(!0)),new t(r.initializeOnly,"height",new e.SFFloat(2)),new t(r.initializeOnly,"bottomRadius",new e.SFFloat(1)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Cone"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getConeOptions().addInterest("requestRebuild",this):this.getBrowser().getConeOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getConeOptions()._xDimension.getValue(),t=this._height.getValue(),i=this._bottomRadius.getValue(),n=this.getTexCoords(),r=this.getNormals(),u=this.getVertices();this.getMultiTexCoords().push(n);const l=t/2,c=-l,h=o.Polar(1,-Math.PI/2+Math.atan(i/t));if(this._side.getValue())for(let t=0;t<e;++t){const s=(t+.5)/e,a=2*Math.PI*s,d=o.Polar(h.imag,a),p=t/e,f=2*Math.PI*p,g=o.Polar(-i,f),m=o.Polar(h.imag,f),_=(t+1)/e,y=2*Math.PI*_,x=o.Polar(-i,y),w=o.Polar(h.imag,y);n.push(s,1,0,1),r.push(d.imag,h.real,d.real),u.push(0,l,0,1),n.push(p,0,0,1),r.push(m.imag,h.real,m.real),u.push(g.imag,c,g.real,1),n.push(_,0,0,1),r.push(w.imag,h.real,w.real),u.push(x.imag,c,x.real,1)}if(this._bottom.getValue()){const t=[],l=[];for(let n=e-1;n>-1;--n){const r=n/e,u=2*Math.PI*r,h=o.Polar(-1,u),d=o.multiply(h,i);t.push(new s((h.imag+1)/2,(h.real+1)/2)),l.push(new a(d.imag,c,d.real))}const h=t[0],d=l[0];for(let e=1,i=l.length-1;e<i;++e){const i=t[e],o=t[e+1],s=l[e],a=l[e+1];n.push(h.x,h.y,0,1),r.push(0,-1,0),u.push(d.x,d.y,d.z,1),n.push(i.x,i.y,0,1),r.push(0,-1,0),u.push(s.x,s.y,s.z,1),n.push(o.x,o.y,0,1),r.push(0,-1,0),u.push(a.x,a.y,a.z,1)}}this.setSolid(this._solid.getValue()),this.setExtents()},setExtents:function(){const e=this._bottomRadius.getValue(),t=this._height.getValue()/2,i=-t;this._side.getValue()||this._bottom.getValue()?this._side.getValue()?(this.getMin().set(-e,i,-e),this.getMax().set(e,t,e)):(this.getMin().set(-e,i,-e),this.getMax().set(e,i,e)):(this.getMin().set(0,0,0),this.getMax().set(0,0,0))}}),u})),define("x_ite/Components/Geometry3D/Cylinder",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Complex","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(r.Cylinder),this._height.setUnit("length"),this._radius.setUnit("length")}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"top",new e.SFBool(!0)),new t(r.initializeOnly,"side",new e.SFBool(!0)),new t(r.initializeOnly,"bottom",new e.SFBool(!0)),new t(r.initializeOnly,"height",new e.SFFloat(2)),new t(r.initializeOnly,"radius",new e.SFFloat(1)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Cylinder"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getCylinderOptions().addInterest("requestRebuild",this):this.getBrowser().getCylinderOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getCylinderOptions()._xDimension.getValue(),t=this.getTexCoords(),i=this.getNormals(),n=this.getVertices();this.getMultiTexCoords().push(t);const r=this._radius.getValue(),u=this._height.getValue()/2,l=-u;if(this._side.getValue())for(let s=0;s<e;++s){const a=s/e,c=2*Math.PI*a,h=o.Polar(-1,c),d=o.multiply(h,r),p=(s+1)/e,f=2*Math.PI*p,g=o.Polar(-1,f),m=o.multiply(g,r);t.push(a,1,0,1),i.push(h.imag,0,h.real),n.push(d.imag,u,d.real,1),t.push(a,0,0,1),i.push(h.imag,0,h.real),n.push(d.imag,l,d.real,1),t.push(p,0,0,1),i.push(g.imag,0,g.real),n.push(m.imag,l,m.real,1),t.push(a,1,0,1),i.push(h.imag,0,h.real),n.push(d.imag,u,d.real,1),t.push(p,0,0,1),i.push(g.imag,0,g.real),n.push(m.imag,l,m.real,1),t.push(p,1,0,1),i.push(g.imag,0,g.real),n.push(m.imag,u,m.real,1)}if(this._top.getValue()){const l=[],c=[];for(let t=0;t<e;++t){const i=t/e,n=2*Math.PI*i,h=o.Polar(-1,n);l.push(new s((h.imag+1)/2,-(h.real-1)/2)),c.push(new a(h.imag*r,u,h.real*r))}const h=l[0],d=c[0];for(let e=1,r=c.length-1;e<r;++e){const r=l[e],o=l[e+1],s=c[e],a=c[e+1];t.push(h.x,h.y,0,1),i.push(0,1,0),n.push(d.x,d.y,d.z,1),t.push(r.x,r.y,0,1),i.push(0,1,0),n.push(s.x,s.y,s.z,1),t.push(o.x,o.y,0,1),i.push(0,1,0),n.push(a.x,a.y,a.z,1)}}if(this._bottom.getValue()){const u=[],c=[];for(let t=e-1;t>-1;--t){const i=t/e,n=2*Math.PI*i,h=o.Polar(-1,n);u.push(new s((h.imag+1)/2,(h.real+1)/2)),c.push(new a(h.imag*r,l,h.real*r))}const h=u[0],d=c[0];for(let e=1,r=c.length-1;e<r;++e){const r=u[e],o=u[e+1],s=c[e],a=c[e+1];t.push(h.x,h.y,0,1),i.push(0,-1,0),n.push(d.x,d.y,d.z,1),t.push(r.x,r.y,0,1),i.push(0,-1,0),n.push(s.x,s.y,s.z,1),t.push(o.x,o.y,0,1),i.push(0,-1,0),n.push(a.x,a.y,a.z,1)}}this.setSolid(this._solid.getValue()),this.setExtents()},setExtents:function(){const e=this._radius.getValue(),t=this._height.getValue()/2,i=-t;this._top.getValue()||this._side.getValue()||this._bottom.getValue()?this._top.getValue()||this._side.getValue()?this._bottom.getValue()||this._side.getValue()?(this.getMin().set(-e,i,-e),this.getMax().set(e,t,e)):(this.getMin().set(-e,t,-e),this.getMax().set(e,t,e)):(this.getMin().set(-e,i,-e),this.getMax().set(e,i,e)):(this.getMin().set(0,0,0),this.getMax().set(0,0,0))}}),u})),define("x_ite/Components/Geometry3D/ElevationGrid",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Geometry/Triangle3","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),this.addType(o.ElevationGrid),this._xSpacing.setUnit("length"),this._zSpacing.setUnit("length"),this._creaseAngle.setUnit("angle"),this._height.setUnit("length"),this.fogCoordNode=null,this.colorNode=null,this.texCoordNode=null,this.normalNode=null,this.coordNode=null}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_height",new e.MFFloat),new t(o.initializeOnly,"xDimension",new e.SFInt32),new t(o.initializeOnly,"zDimension",new e.SFInt32),new t(o.initializeOnly,"xSpacing",new e.SFFloat(1)),new t(o.initializeOnly,"zSpacing",new e.SFFloat(1)),new t(o.initializeOnly,"solid",new e.SFBool(!0)),new t(o.initializeOnly,"ccw",new e.SFBool(!0)),new t(o.initializeOnly,"creaseAngle",new e.SFFloat),new t(o.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(o.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"texCoord",new e.SFNode),new t(o.inputOutput,"normal",new e.SFNode),new t(o.initializeOnly,"height",new e.MFFloat)]),getTypeName:function(){return"ElevationGrid"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_height.addFieldInterest(this._height),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._texCoord.addInterest("set_texCoord__",this),this._normal.addInterest("set_normal__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_texCoord__(),this.set_normal__()},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const t of this._attrib){const i=r(o.X3DVertexAttributeNode,t);i&&e.push(i)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=r(o.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&(this.colorNode.removeInterest("requestRebuild",this),this.colorNode._transparent.removeInterest("set_transparent__",this)),this.colorNode=r(o.X3DColorNode,this._color),this.colorNode?(this.colorNode.addInterest("requestRebuild",this),this.colorNode._transparent.addInterest("set_transparent__",this),this.set_transparent__()):this.setTransparent(!1)},set_transparent__:function(){this.setTransparent(this.colorNode.getTransparent())},set_texCoord__:function(){this.texCoordNode&&this.texCoordNode.removeInterest("requestRebuild",this),this.texCoordNode=r(o.X3DTextureCoordinateNode,this._texCoord),this.texCoordNode&&this.texCoordNode.addInterest("requestRebuild",this),this.setTextureCoordinate(this.texCoordNode)},set_normal__:function(){this.normalNode&&this.normalNode.removeInterest("requestRebuild",this),this.normalNode=r(o.X3DNormalNode,this._normal),this.normalNode&&this.normalNode.addInterest("requestRebuild",this)},getColor:function(){return this.colorNode},getTexCoord:function(){return this.texCoordNode},getNormal:function(){return this.normalNode},getHeight:function(e){return e<this._height.length?this._height[e]:0},createTexCoords:function(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=t-1,r=i-1;for(let o=0;o<i;++o)for(let i=0;i<t;++i)e.push(new a(i/n,o/r));return e},createNormals:function(e,t,i){const n=!this._ccw.getValue(),r=[],o=[];for(let t=0,i=e.length;t<i;++t)r[t]=[];for(let i=0,a=t.length;i<a;i+=3){const a=t[i],l=t[i+1],c=t[i+2];r[a].push(o.length),r[l].push(o.length+1),r[c].push(o.length+2);const h=s.normal(e[a],e[l],e[c],new u(0,0,0));n&&h.negate(),o.push(h),o.push(h),o.push(h)}return this.refineNormals(r,o,this._creaseAngle.getValue())},createCoordIndex:function(){const e=[],t=this._xDimension.getValue(),i=t-1,n=this._zDimension.getValue()-1;for(let r=0;r<n;++r)for(let n=0;n<i;++n){const i=r*t+n,o=(r+1)*t+n,s=(r+1)*t+(n+1),a=r*t+(n+1);e.push(i),e.push(o),e.push(s),e.push(i),e.push(s),e.push(a)}return e},createPoints:function(){const e=[],t=this._xDimension.getValue(),i=this._zDimension.getValue(),n=this._xSpacing.getValue(),r=this._zSpacing.getValue();for(let o=0;o<i;++o)for(let i=0;i<t;++i)e.push(new u(n*i,this.getHeight(i+o*t),r*o));return e},build:function(){if(this._xDimension.getValue()<2||this._zDimension.getValue()<2)return;const e=this._colorPerVertex.getValue(),t=this._normalPerVertex.getValue(),i=this.createCoordIndex(),n=this.getAttrib(),r=n.length,o=this.getAttribs(),s=this.fogCoordNode,a=this.getColor(),u=this.getTexCoord(),l=this.getNormal(),c=this.createPoints(),h=this.getFogDepths(),d=this.getColors(),p=this.getMultiTexCoords(),f=this.getNormals(),g=this.getVertices();let m=0;if(u)u.init(p);else{var _=this.createTexCoords(),y=this.getTexCoords();p.push(y)}for(let x=0,w=i.length;x<w;++m)for(let w=0;w<6;++w,++x){const w=i[x],b=c[w];for(let e=0;e<r;++e)n[e].addValue(w,o[e]);if(s&&s.addDepth(w,h),a&&(e?a.addColor(w,d):a.addColor(m,d)),u)u.addTexCoord(w,p);else{const e=_[w];y.push(e.x,e.y,0,1)}l&&(t?l.addVector(w,f):l.addVector(m,f)),g.push(b.x,b.y,b.z,1)}if(!l){const e=this.createNormals(c,i);for(const t of e)f.push(t.x,t.y,t.z)}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}}),l})),define("x_ite/Components/Geometry3D/Extrusion",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants","standard/Math/Geometry/Triangle3","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),this.addType(r.Extrusion),this._creaseAngle.setUnit("angle"),this._crossSection.setUnit("length"),this._spine.setUnit("length")}return c.prototype=Object.assign(Object.create(n.prototype),{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_crossSection",new e.MFVec2f),new t(r.inputOnly,"set_orientation",new e.MFRotation),new t(r.inputOnly,"set_scale",new e.MFVec2f),new t(r.inputOnly,"set_spine",new e.MFVec3f),new t(r.initializeOnly,"beginCap",new e.SFBool(!0)),new t(r.initializeOnly,"endCap",new e.SFBool(!0)),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"convex",new e.SFBool(!0)),new t(r.initializeOnly,"creaseAngle",new e.SFFloat),new t(r.initializeOnly,"crossSection",new e.MFVec2f(new s(1,1),new s(1,-1),new s(-1,-1),new s(-1,1),new s(1,1))),new t(r.initializeOnly,"orientation",new e.MFRotation(new u)),new t(r.initializeOnly,"scale",new e.MFVec2f(new s(1,1))),new t(r.initializeOnly,"spine",new e.MFVec3f(new a(0,0,0),new a(0,1,0)))]),getTypeName:function(){return"Extrusion"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_crossSection.addFieldInterest(this._crossSection),this._set_orientation.addFieldInterest(this._orientation),this._set_scale.addFieldInterest(this._scale),this._set_spine.addFieldInterest(this._spine)},getClosedOrientation:function(){const e=this._orientation;if(e.length){const t=e[0].getValue(),i=e[e.length-1].getValue();return t.equals(i)}return!0},createPoints:function(){const e=new a(1,1,1);return function(){const t=this._crossSection,i=this._orientation,n=this._scale,r=this._spine,o=[],s=this.createRotations();for(let u=0,l=r.length;u<l;++u){const r=s[u];if(i.length&&r.rotate(i[Math.min(u,i.length-1)].getValue()),n.length){const t=n[Math.min(u,n.length-1)].getValue();r.scale(e.set(t.x,1,t.y))}for(let e=0,i=t.length;e<i;++e){const i=t[e].getValue();o.push(r.multVecMatrix(new a(i.x,0,i.y)))}}return o}}(),createRotations:function(){const e=[],t=new a(0,0,0),i=new a(0,0,0),n=new a(0,0,0),r=new a(0,0,0),o=new a(0,0,0),s=new a(0,0,0),c=new u(0,0,1,0);return function(){const u=this._spine,h=u.length,d=u[0].getValue(),p=u[u.length-1].getValue(),f=d.equals(p)&&this.getClosedOrientation();for(let t=e.length;t<h;++t)e[t]=new l;if(e.length=h,t.set(0,0,0),i.set(0,0,0),n.set(0,0,0),f){const e=d;for(let t=1,n=h-2;t<n&&(i.assign(u[t].getValue()).subtract(e).normalize().subtract(s.assign(u[n].getValue()).subtract(e).normalize()).normalize(),i.equals(a.Zero));++t);for(let e=0,t=h-2;e<t&&(n.assign(u[e+1].getValue()).subtract(u[e].getValue()).cross(s.assign(u[t].getValue()).subtract(u[e].getValue())).normalize(),n.equals(a.Zero));++e);}else{for(let e=0,t=h-1;e<t&&(i.assign(u[e+1].getValue()).subtract(u[e].getValue()).normalize(),i.equals(a.Zero));++e);for(let e=1,t=h-1;e<t&&(n.assign(u[e+1].getValue()).subtract(u[e].getValue()).cross(s.assign(u[e-1].getValue()).subtract(u[e].getValue())).normalize(),n.equals(a.Zero));++e);}i.equals(a.Zero)&&i.set(0,1,0),n.equals(a.Zero)&&c.setFromToVec(a.yAxis,i).multVecRot(n.assign(a.zAxis)),t.assign(i).cross(n);const g=d;e[0].set(t.x,t.y,t.z,0,i.x,i.y,i.z,0,n.x,n.y,n.z,0,g.x,g.y,g.z,1),r.assign(i),o.assign(n);for(let l=1,c=h-1;l<c;++l){const c=u[l].getValue();i.assign(u[l+1].getValue()).subtract(c).normalize().subtract(s.assign(u[l-1].getValue()).subtract(c).normalize()).normalize(),n.assign(u[l+1].getValue()).subtract(c).cross(s.assign(u[l-1].getValue()).subtract(c)).normalize(),o.dot(n)<0&&n.negate(),i.equals(a.Zero)?i.assign(r):r.assign(i),n.equals(a.Zero)?n.assign(o):o.assign(n),t.assign(i).cross(n),e[l].set(t.x,t.y,t.z,0,i.x,i.y,i.z,0,n.x,n.y,n.z,0,c.x,c.y,c.z,1)}if(f)e[h-1].assign(e[0]);else{const l=p;i.assign(l).subtract(u[h-2].getValue()).normalize(),h>2&&n.assign(l).subtract(u[h-2].getValue()).cross(s.assign(u[h-3].getValue()).subtract(u[h-2].getValue())).normalize(),o.dot(n)<0&&n.negate(),i.equals(a.Zero)&&i.assign(r),n.equals(a.Zero)&&n.assign(o),t.assign(i).cross(n),e[h-1].set(t.x,t.y,t.z,0,i.x,i.y,i.z,0,n.x,n.y,n.z,0,l.x,l.y,l.z,1)}return e}}(),build:function(){const e=new s(0,0,0),t=new s(0,0,0),i=new s(0,0,0);return function(){const n=!this._ccw.getValue(),r=this._crossSection,u=this._spine,l=u.length,c=this.getTexCoords();if(l<2||r.length<2)return;this.getMultiTexCoords().push(c);const h=r.length;function d(e,t){return e*h+t}const p=u[0].getValue(),f=u[l-1].getValue(),g=p.equals(f)&&this.getClosedOrientation(),m=r[0].getValue(),_=r[r.length-1].getValue(),y=m.equals(_);e.assign(r[0].getValue()),t.assign(r[0].getValue());for(let i=1,n=r.length;i<n;++i)e.min(r[i].getValue()),t.max(r[i].getValue());const x=i.assign(t).subtract(e),w=Math.max(x.x,x.y),b=y?r.length-1:r.length,v=[],S=[],T=this.createPoints();for(let e=0,t=T.length;e<t;++e)v[e]=[];const C=this.getNormals(),N=this.getVertices(),F=r.length-1,O=l-1;let E=d(0,0),D=d(0,y?0:F);for(let e=0;e<O;++e)for(let t=0;t<F;++t){const i=g&&e===l-2?0:e+1,s=y&&t===r.length-2?0:t+1;let u=d(e,t),h=d(e,s),p=d(i,s),f=d(i,t),m=T[u],_=T[h],x=T[p],w=T[f],b=_.distance(x)>=1e-7,C=w.distance(m)>=1e-7;if(n)var M=o.normal(x,_,m,new a(0,0,0)),I=o.normal(w,x,m,new a(0,0,0));else M=o.normal(m,_,x,new a(0,0,0)),I=o.normal(m,x,w,new a(0,0,0));if(0==t&&(C?E=u:(u=E,m=T[u])),t==r.length-2&&(b?D=h:(p=D,x=T[p])),b){if(C)c.push(t/F,e/O,0,1);else{const i=(e/O+(e+1)/O)/2;c.push(t/F,i,0,1)}v[u].push(S.length),S.push(M),N.push(m.x,m.y,m.z,1),c.push((t+1)/F,e/O,0,1),v[h].push(S.length),S.push(M),N.push(_.x,_.y,_.z,1),c.push((t+1)/F,(e+1)/O,0,1),v[p].push(S.length),S.push(M),N.push(x.x,x.y,x.z,1)}if(C){if(c.push(t/F,e/O,0,1),v[u].push(S.length),S.push(I),N.push(m.x,m.y,m.z,1),b)c.push((t+1)/F,(e+1)/O,0,1);else{const i=((e+1)/O+e/O)/2;c.push((t+1)/F,i,0,1)}v[p].push(S.length),S.push(I),N.push(x.x,x.y,x.z,1),c.push(t/F,(e+1)/O,0,1),v[f].push(S.length),S.push(I),N.push(w.x,w.y,w.z,1)}}const V=this.refineNormals(v,S,this._creaseAngle.getValue());for(const e of V)C.push(e.x,e.y,e.z);if(w&&b>2){if(this._beginCap.getValue()){const t=0,i=[],u=[];for(let n=0;n<b;++n){const o=d(t,b-1-n),a=T[o].copy();a.index=o,a.texCoord=s.subtract(r[b-1-n].getValue(),e).divide(w),i.push(a)}if(this._convex.getValue()?o.triangulateConvexPolygon(i,u):o.triangulatePolygon(i,u),u.length>=3){const e=o.normal(T[u[0].index],T[u[1].index],T[u[2].index],new a(0,0,0));n&&e.negate(),this.addCap(c,e,T,u)}}if(this._endCap.getValue()){const t=l-1,i=[],u=[];for(let n=0;n<b;++n){const o=d(t,n),a=T[o].copy();a.index=o,a.texCoord=s.subtract(r[n].getValue(),e).divide(w),i.push(a)}if(this._convex.getValue()?o.triangulateConvexPolygon(i,u):o.triangulatePolygon(i,u),u.length>=3){const e=o.normal(T[u[0].index],T[u[1].index],T[u[2].index],new a(0,0,0));n&&e.negate(),this.addCap(c,e,T,u)}}}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}}(),addCap:function(e,t,i,n){const r=this.getNormals(),o=this.getVertices();for(let s=0,a=n.length;s<a;s+=3){const a=i[n[s].index],u=i[n[s+1].index],l=i[n[s+2].index],c=n[s].texCoord,h=n[s+1].texCoord,d=n[s+2].texCoord;e.push(c.x,c.y,0,1),e.push(h.x,h.y,0,1),e.push(d.x,d.y,0,1),r.push(t.x,t.y,t.z,t.x,t.y,t.z,t.x,t.y,t.z),o.push(a.x,a.y,a.z,1,u.x,u.y,u.z,1,l.x,l.y,l.z,1)}}}),c})),define("x_ite/Components/Geometry3D/Sphere",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Sphere),this._radius.setUnit("length")}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"radius",new e.SFFloat(1)),new t(r.initializeOnly,"solid",new e.SFBool(!0))]),getTypeName:function(){return"Sphere"},getComponentName:function(){return"Geometry3D"},getContainerField:function(){return"geometry"},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getSphereOptions().addInterest("requestRebuild",this):this.getBrowser().getSphereOptions().removeInterest("requestRebuild",this)},build:function(){const e=this.getBrowser().getSphereOptions().getGeometry(),t=Math.abs(this._radius.getValue());if(this.setMultiTexCoords(e.getMultiTexCoords()),this.setNormals(e.getNormals()),1===t)this.setVertices(e.getVertices()),this.getMin().assign(e.getMin()),this.getMax().assign(e.getMax());else{const i=e.getVertices().getValue(),n=this.getVertices();for(let e=0,r=i.length;e<r;e+=4)n.push(t*i[e],t*i[e+1],t*i[e+2],1);this.getMin().set(-t,-t,-t),this.getMax().set(t,t,t)}this.setSolid(this._solid.getValue())}}),o})),define("x_ite/Components/Geometry3D",["x_ite/Configuration/SupportedNodes","x_ite/Components/Geometry3D/Box","x_ite/Components/Geometry3D/Cone","x_ite/Components/Geometry3D/Cylinder","x_ite/Components/Geometry3D/ElevationGrid","x_ite/Components/Geometry3D/Extrusion","x_ite/Components/Geometry3D/IndexedFaceSet","x_ite/Components/Geometry3D/Sphere"],(function(e,t,i,n,r,o,s,a){"use strict";const u={Box:t,Cone:i,Cylinder:n,ElevationGrid:r,Extrusion:o,IndexedFaceSet:s,Sphere:a},l={};for(const t in u)e.addType(t,u[t]);for(const t in l)e.addAbstractType(t,l[t])})),define("x_ite/Components/Grouping/StaticGroup",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Components/Grouping/Group","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType","standard/Math/Geometry/Box3","standard/Math/Geometry/ViewVolume"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),r.call(this,e),this.addType(s.StaticGroup),this.group=new o(this.getExecutionContext()),this.collisionShapes=null,this.depthShapes=null,this.opaqueShapes=null,this.transparentShapes=null,this.bbox=new u,this.shadowBBox=new u}return c.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"visible",new e.SFBool(!0)),new t(s.inputOutput,"bboxDisplay",new e.SFBool),new t(s.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(s.initializeOnly,"bboxCenter",new e.SFVec3f),new t(s.initializeOnly,"children",new e.MFNode)]),getTypeName:function(){return"StaticGroup"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this),this._bboxSize.addFieldInterest(this.group._bboxSize),this._bboxCenter.addFieldInterest(this.group._bboxCenter),this._children.addFieldInterest(this.group._children),this.group._bboxSize=this._bboxSize,this.group._bboxCenter=this._bboxCenter,this.group._children=this._children,this.group.setPrivate(!0),this.group.setup(),this.group._isCameraObject.addFieldInterest(this._isCameraObject),this.group._isPickableObject.addFieldInterest(this._isPickableObject),this.group._children.addInterest("set_children__",this),this.setCameraObject(this.group.getCameraObject()),this.setPickableObject(this.group.getPickableObject()),this.set_children__()},getBBox:function(e,t){return e.assign(t?this.shadowBBox:this.bbox)},set_children__:function(){this.group.getBBox(this.bbox),this.group.getBBox(this.shadowBBox,!0),this.collisionShapes=null,this.depthShapes=null,this.opaqueShapes=null,this.transparentShapes=null},traverse:function(){const e=new l;return e.intersectsSphere=function(){return!0},function(t,i){switch(t){case a.CAMERA:return;case a.POINTER:case a.COLLISION:{if(!this.collisionShapes){const n=i.getViewVolumes(),r=i.getViewport(),o=i.getProjectionMatrix(),s=i.getModelViewMatrix(),a=i.getNumCollisionShapes();n.push(e.set(o,r,r)),s.push(),s.identity(),this.group.traverse(t,i),s.pop(),n.pop();const u=i.getNumCollisionShapes();this.collisionShapes=i.getCollisionShapes().splice(a,u-a),i.setNumCollisionShapes(a)}const n=i.getModelViewMatrix();for(const e of this.collisionShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();return}case a.SHADOW:{if(!this.depthShapes){const n=i.getViewVolumes(),r=i.getViewport(),o=i.getProjectionMatrix(),s=i.getModelViewMatrix(),a=i.getNumDepthShapes();n.push(e.set(o,r,r)),s.push(),s.identity(),this.group.traverse(t,i),s.pop(),n.pop();const u=i.getNumDepthShapes();this.depthShapes=i.getDepthShapes().splice(a,u-a),i.setNumDepthShapes(a)}const n=i.getModelViewMatrix();for(const e of this.depthShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();return}case a.DISPLAY:{if(!this.opaqueShapes){const n=i.getViewVolumes(),r=i.getViewport(),o=i.getProjectionMatrix(),s=i.getModelViewMatrix(),a=i.getNumOpaqueShapes(),u=i.getNumTransparentShapes();n.push(e.set(o,r,r)),s.push(),s.identity(),this.group.traverse(t,i),s.pop(),n.pop();const l=i.getNumOpaqueShapes(),c=i.getNumTransparentShapes();this.opaqueShapes=i.getOpaqueShapes().splice(a,l-a),this.transparentShapes=i.getTransparentShapes().splice(u,c-u),i.setNumOpaqueShapes(a),i.setNumTransparentShapes(u)}const n=i.getModelViewMatrix();for(const e of this.opaqueShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();for(const e of this.transparentShapes)n.push(),n.multLeft(e.modelViewMatrix),e.shapeNode.traverse(t,i),n.pop();return}}}}()}),c})),define("x_ite/Components/Grouping/Switch",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(s.Switch),"2.0"===e.getSpecificationVersion()&&this.addAlias("choice",this._children),this.childNode=null,this.visibleNode=null,this.boundedObject=null}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"whichChoice",new e.SFInt32(-1)),new t(s.inputOutput,"visible",new e.SFBool(!0)),new t(s.inputOutput,"bboxDisplay",new e.SFBool),new t(s.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(s.initializeOnly,"bboxCenter",new e.SFVec3f),new t(s.inputOnly,"addChildren",new e.MFNode),new t(s.inputOnly,"removeChildren",new e.MFNode),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Switch"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._whichChoice.addInterest("set_child__",this),this._children.addInterest("set_child__",this),this.set_child__()},getSubBBox:function(e,t){if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){const i=o(s.X3DBoundedObject,this.visibleNode);return i?i.getBBox(e,t):e.set()}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},clear:function(){},add:function(){},remove:function(){},set_child__:function(){this.childNode&&(this.childNode._isCameraObject.removeInterest("set_cameraObject__",this),this.childNode._isPickableObject.removeInterest("set_transformSensors__",this)),o(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.removeInterest("set_visible__",this),this.childNode._bboxDisplay.removeInterest("set_bboxDisplay__",this));const e=this._whichChoice.getValue();e>=0&&e<this._children.length?(this.childNode=o(s.X3DChildNode,this._children[e]),this.childNode&&(this.childNode._isCameraObject.addInterest("set_cameraObject__",this),this.childNode._isPickableObject.addInterest("set_transformSensors__",this),o(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.addInterest("set_visible__",this),this.childNode._bboxDisplay.addInterest("set_bboxDisplay__",this)),delete this.traverse)):(this.childNode=null,this.traverse=Function.prototype),this.set_transformSensors__(),this.set_visible__(),this.set_bboxDisplay__()},set_cameraObject__:function(){this.childNode&&this.childNode.getCameraObject()?o(s.X3DBoundedObject,this.childNode)?this.setCameraObject(this.childNode._visible.getValue()):this.setCameraObject(!0):this.setCameraObject(!1)},set_transformSensors__:function(){this.setPickableObject(Boolean(this.getTransformSensors().size||this.childNode&&this.childNode.getPickableObject()))},set_visible__:function(){o(s.X3DBoundedObject,this.childNode)?this.visibleNode=this.childNode._visible.getValue()?this.childNode:null:this.visibleNode=this.childNode,this.set_cameraObject__()},set_bboxDisplay__:function(){o(s.X3DBoundedObject,this.childNode)?this.boundedObject=this.childNode._bboxDisplay.getValue()?this.childNode:null:this.boundedObject=null},traverse:function(e,t){switch(e){case r.POINTER:case r.CAMERA:case r.SHADOW:{const i=this.visibleNode;return void(i&&i.traverse(e,t))}case r.PICKING:{if(this.getTransformSensors().size){const e=t.getModelViewMatrix().get();for(const t of this.getTransformSensors())t.collect(e)}const i=this.childNode;if(i){const n=t.getBrowser().getPickingHierarchy();n.push(this),i.traverse(e,t),n.pop()}return}case r.COLLISION:{const i=this.childNode;return void(i&&i.traverse(e,t))}case r.DISPLAY:{const i=this.visibleNode;i&&i.traverse(e,t);const n=this.boundedObject;return void(n&&n.displayBBox(e,t))}}}}),a})),define("x_ite/Components/Grouping/X3DTransformMatrix3DNode",["x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r){"use strict";function o(i){e.call(this,i),this.addType(t.X3DTransformMatrix3DNode),this.matrix=new r,this.getBBox=this.getGetGroupBBox(),this.traverse=this.getGroupTraverse()}return o.prototype=Object.assign(Object.create(e.prototype),{constructor:o,setMatrix:function(e){e.equals(r.Identity)?(this.matrix.identity(),this.getBBox=this.getGetGroupBBox(),this.traverse=this.getGroupTraverse()):(this.matrix.assign(e),this.getBBox=this.getGetBBox(),this.traverse=this.getTraverse())},getMatrix:function(){return this.matrix},setTransform:function(e,t,r,o,s){e.equals(i.Zero)&&t.equals(n.Identity)&&r.equals(i.One)?(this.matrix.identity(),this.getBBox=this.getGetGroupBBox(),this.traverse=this.getGroupTraverse()):(this.matrix.set(e,t,r,o,s),this.getBBox=this.getGetBBox(),this.traverse=this.getTraverse())},getGetBBox:function(){function e(e,t){return this.getSubBBox(e,t).multRight(this.matrix)}return function(){return e}}(),getGetGroupBBox:function(){return e.prototype.getBBox},getTraverse:function(){function t(t,i){const n=i.getModelViewMatrix();n.push(),n.multLeft(this.matrix),e.prototype.traverse.call(this,t,i),n.pop()}return function(){return t}}(),getGroupTraverse:function(){return e.prototype.traverse}}),o})),define("x_ite/Components/Grouping/X3DTransformNode",["x_ite/Components/Grouping/X3DTransformMatrix3DNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DTransformNode),this._translation.setUnit("length"),this._center.setUnit("length")}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,initialize:function(){e.prototype.initialize.call(this),this.addInterest("eventsProcessed",this),this.eventsProcessed()},eventsProcessed:function(){this.setHidden(0===this._scale.x||0===this._scale.y||0===this._scale.z),this.setTransform(this._translation.getValue(),this._rotation.getValue(),this._scale.getValue(),this._scaleOrientation.getValue(),this._center.getValue())}}),i})),define("x_ite/Components/Grouping/Transform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DTransformNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Transform)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"translation",new e.SFVec3f),new t(r.inputOutput,"rotation",new e.SFRotation),new t(r.inputOutput,"scale",new e.SFVec3f(1,1,1)),new t(r.inputOutput,"scaleOrientation",new e.SFRotation),new t(r.inputOutput,"center",new e.SFVec3f),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Transform"},getComponentName:function(){return"Grouping"},getContainerField:function(){return"children"}}),o})),define("x_ite/Components/Grouping",["x_ite/Configuration/SupportedNodes","x_ite/Components/Grouping/Group","x_ite/Components/Grouping/StaticGroup","x_ite/Components/Grouping/Switch","x_ite/Components/Grouping/Transform","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Grouping/X3DTransformMatrix3DNode","x_ite/Components/Grouping/X3DTransformNode"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l={Group:t,StaticGroup:i,Switch:n,Transform:r},c={X3DBoundedObject:o,X3DGroupingNode:s,X3DTransformMatrix3DNode:a,X3DTransformNode:u};for(const t in l)e.addType(t,l[t]);for(const t in c)e.addAbstractType(t,c[t])})),define("x_ite/Components/Interpolation/ColorInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Color3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ColorInterpolator),this.hsv=[]}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFColor),new t(r.outputOnly,"value_changed",new e.SFColor)]),getTypeName:function(){return"ColorInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){const t=this._keyValue;t.length<this._key.length&&this._keyValue.resize(this._key.length,t.length?t[this._keyValue.length-1]:new e.SFColor),this.hsv.length=0;for(const e of t)this.hsv.push(e.getHSV([]))},interpolate:function(){const e=[];return function(t,i,n){o.lerp(this.hsv[t],this.hsv[i],n,e),this._value_changed.setHSV(e[0],e[1],e[2])}}()}),s})),define("x_ite/Components/Interpolation/CoordinateInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.CoordinateInterpolator)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec3f),new t(r.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"CoordinateInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},set_keyValue__:function(){},interpolate:function(e,t,i){const n=this._keyValue.getValue();let r=this._key.length?Math.floor(this._keyValue.length/this._key.length):0;this._value_changed.length=r;const s=this._value_changed.getValue();t=(e*=r)+(this._key.length>1?r:0),e*=3,t*=3,r*=3;for(let a=0;a<r;a+=3){const r=a+1,u=a+2;s[a]=o.lerp(n[e+a],n[t+a],i),s[r]=o.lerp(n[e+r],n[t+r],i),s[u]=o.lerp(n[e+u],n[t+u],i)}this._value_changed.addEvent()}}),s})),define("x_ite/Components/Interpolation/CoordinateInterpolator2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.CoordinateInterpolator2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec2f),new t(r.outputOnly,"value_changed",new e.MFVec2f)]),getTypeName:function(){return"CoordinateInterpolator2D"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},set_keyValue__:function(){},interpolate:function(e,t,i){const n=this._keyValue.getValue();let r=this._key.length?Math.floor(this._keyValue.length/this._key.length):0;this._value_changed.length=r;const s=this._value_changed.getValue();t=(e*=r)+(this._key.length>1?r:0),e*=2,t*=2,r*=2;for(let a=0;a<r;a+=2){const r=a+1;s[a]=o.lerp(n[e+a],n[t+a],i),s[r]=o.lerp(n[e+r],n[t+r],i)}this._value_changed.addEvent()}}),s})),define("x_ite/Components/Interpolation/NormalInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(r.NormalInterpolator)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec3f),new t(r.outputOnly,"value_changed",new e.MFVec3f)]),getTypeName:function(){return"NormalInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){},interpolate:function(){const e=new o(0,0,0),t=new o(0,0,0);return function(i,n,r){const o=this._keyValue.getValue();let a=this._key.length>1?Math.floor(this._keyValue.length/this._key.length):0;this._value_changed.length=a;const u=this._value_changed.getValue();n=(i*=a)+a,i*=3,n*=3,a*=3;for(let l=0;l<a;l+=3)try{const a=l+1,c=l+2;e.set(o[i+l],o[i+a],o[i+c]),t.set(o[n+l],o[n+a],o[n+c]);const h=s.simpleSlerp(e,t,r);u[l]=h[0],u[a]=h[1],u[c]=h[2]}catch(e){}this._value_changed.addEvent()}}()}),a})),define("x_ite/Components/Interpolation/PositionInterpolator2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector2"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.PositionInterpolator2D)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_fraction",new e.SFFloat),new t(r.inputOutput,"key",new e.MFFloat),new t(r.inputOutput,"keyValue",new e.MFVec2f),new t(r.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"PositionInterpolator2D"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFVec2f)},interpolate:function(){const e=new o(0,0);return function(t,i,n){this._value_changed=e.assign(this._keyValue[t].getValue()).lerp(this._keyValue[i].getValue(),n)}}()}),s})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator",["standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4"],(function(e,t){"use strict";const i=[],n=[],r=[],o=new e(0,0,0,0),s=new t(2,-2,1,1,-3,3,-2,-1,0,0,1,0,1,0,0,0);function a(){this.T0=[],this.T1=[]}return a.prototype={constructor:a,generate:function(e,t,o,s,a){const u=this.T0,l=this.T1;if(u.length=0,l.length=0,i.length=0,n.length=0,r.length=0,t.length>1){if(0===s.length){e?i.push(this.divide(this.subtract(o[1],o[o.length-2]),2)):i.push(this.create());for(let e=1,t=o.length-1;e<t;++e)i.push(this.divide(this.subtract(o[e+1],o[e-1]),2));i.push(this.copy(i[0]))}else{for(let e=0,t=s.length;e<t;++e)i.push(this.copy(s[e]));if(a){let e=0;for(let t=0,i=o.length-1;t<i;++t)e+=this.abs(this.subtract(o[t],o[t+1]));for(let t=0,n=i.length-1;t<n;++t){const n=this.abs(i[t]);n&&(i[t]=this.multiply(i[t],e/n))}}}if(e){const e=t.length-1,i=t.length-2,o=t[1]-t[0]+t[e]-t[i];r.push(2*(t[1]-t[0])/o),n.push(2*(t[e]-t[i])/o)}else r.push(1),n.push(1);for(let e=1,i=t.length-1;e<i;++e){const i=t[e+1]-t[e-1];r.push(2*(t[e+1]-t[e])/i),n.push(2*(t[e]-t[e-1])/i)}r.push(r[0]),n.push(n[0]);for(let e=0,t=i.length;e<t;++e)u.push(this.multiply(i[e],n[e])),l.push(this.multiply(i[e],r[e]))}else u.push(this.create()),l.push(this.create())},interpolate:function(e,t,i,n){return o.set(Math.pow(i,3),Math.pow(i,2),i,1),this.dot(s.multVecMatrix(o),n[e],n[t],this.T0[e],this.T1[t])}},a})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolator"],(function(e){"use strict";return function(t){const i=new t(0,0,0,0),n=new t(0,0,0,0),r=new t(0,0,0,0),o=new t(0,0,0,0);function s(){this.T0=[],this.T1=[]}return s.prototype=Object.assign(Object.create(e.prototype),{constructor:s,create:function(){return new t(0,0,0,0)},copy:function(e){return e.copy()},subtract:function(e,i){return t.subtract(e,i)},multiply:function(e,i){return t.multiply(e,i)},divide:function(e,i){return t.divide(e,i)},abs:function(e){return e.abs()},dot:function(e,t,s,a,u){return i.assign(t).multiply(e[0]),n.assign(s).multiply(e[1]),r.assign(a).multiply(e[2]),o.assign(u).multiply(e[3]),i.add(n).add(r).add(o)}}),s}})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate","standard/Math/Numbers/Vector3"],(function(e,t){"use strict";return e(t)})),define("x_ite/Components/Interpolation/SplinePositionInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SplinePositionInterpolator),this.spline=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFVec3f),new t(o.inputOutput,"keyVelocity",new e.MFVec3f),new t(o.inputOutput,"normalizeVelocity",new e.SFBool),new t(o.outputOnly,"value_changed",new e.SFVec3f)]),getTypeName:function(){return"SplinePositionInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this),this._keyVelocity.addInterest("set_keyVelocity__",this),this._normalizeVelocity.addInterest("set_normalizeVelocity__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFVec3f),this.set_keyVelocity__()},set_keyVelocity__:function(){this._keyVelocity.length&&this._keyVelocity.length<this._key.length&&this._keyVelocity.resize(this._key.length,new e.SFVec3f),this.set_normalizeVelocity__()},set_normalizeVelocity__:function(){this.spline.generate(this._closed.getValue(),this._key,this._keyValue,this._keyVelocity,this._normalizeVelocity.getValue())},interpolate:function(e,t,i){this._value_changed=this.spline.interpolate(e,t,i,this._keyValue)}}),s})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate","standard/Math/Numbers/Vector2"],(function(e,t){"use strict";return e(t)})),define("x_ite/Components/Interpolation/SplinePositionInterpolator2D",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SplinePositionInterpolator2D),this.spline=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFVec2f),new t(o.inputOutput,"keyVelocity",new e.MFVec2f),new t(o.inputOutput,"normalizeVelocity",new e.SFBool),new t(o.outputOnly,"value_changed",new e.SFVec2f)]),getTypeName:function(){return"SplinePositionInterpolator2D"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this),this._keyVelocity.addInterest("set_keyVelocity__",this),this._normalizeVelocity.addInterest("set_normalizeVelocity__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFVec2f),this.set_keyVelocity__()},set_keyVelocity__:function(){this._keyVelocity.length&&this._keyVelocity.length<this._key.length&&this._keyVelocity.resize(this._key.length,new e.SFVec2f),this.set_normalizeVelocity__()},set_normalizeVelocity__:function(){this.spline.generate(this._closed.getValue(),this._key,this._keyValue,this._keyVelocity,this._normalizeVelocity.getValue())},interpolate:function(e,t,i){this._value_changed=this.spline.interpolate(e,t,i,this._keyValue)}}),s})),define("x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1",["x_ite/Browser/Interpolation/CatmullRomSplineInterpolator"],(function(e){"use strict";function t(){this.T0=[],this.T1=[]}return t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,create:function(){return 0},copy:function(e){return e},subtract:function(e,t){return e-t},multiply:function(e,t){return e*t},divide:function(e,t){return e/t},abs:function(e){return Math.abs(e)},dot:function(e,t,i,n,r){return t*e[0]+i*e[1]+n*e[2]+r*e[3]}}),t})),define("x_ite/Components/Interpolation/SplineScalarInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SplineScalarInterpolator),this.spline=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFFloat),new t(o.inputOutput,"keyVelocity",new e.MFFloat),new t(o.inputOutput,"normalizeVelocity",new e.SFBool),new t(o.outputOnly,"value_changed",new e.SFFloat)]),getTypeName:function(){return"SplineScalarInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this),this._keyVelocity.addInterest("set_keyVelocity__",this),this._normalizeVelocity.addInterest("set_normalizeVelocity__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFFloat),this.set_keyVelocity__()},set_keyVelocity__:function(){this._keyVelocity.length&&this._keyVelocity.length<this._key.length&&this._keyVelocity.resize(this._key.length,new e.SFFloat),this.set_normalizeVelocity__()},set_normalizeVelocity__:function(){this.spline.generate(this._closed.getValue(),this._key,this._keyValue,this._keyVelocity,this._normalizeVelocity.getValue())},interpolate:function(e,t,i){this._value_changed=this.spline.interpolate(e,t,i,this._keyValue)}}),s})),define("x_ite/Browser/Interpolation/SquatInterpolator",["standard/Math/Numbers/Rotation4"],(function(e){"use strict";const t=new e(0,0,1,0);function i(){this.s=[]}return i.prototype={constructor:i,generate:function(t,i,n){const r=this.s;if(r.length=0,i.length>1){t?r.push(e.spline(n[i.length-2].getValue(),n[0].getValue(),n[1].getValue())):r.push(n[0].getValue());for(let t=1,o=i.length-1;t<o;++t)r.push(e.spline(n[t-1].getValue(),n[t].getValue(),n[t+1].getValue()));t?r.push(e.spline(n[i.length-2].getValue(),n[i.length-1].getValue(),n[1].getValue())):r.push(n[i.length-1].getValue())}else i.length>0&&r.push(n[0].getValue().copy())},interpolate:function(e,i,n,r){return t.assign(r[e].getValue()).squad(this.s[e],this.s[i],r[i].getValue(),n)}},i})),define("x_ite/Components/Interpolation/SquadOrientationInterpolator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Interpolation/X3DInterpolatorNode","x_ite/Browser/Interpolation/SquatInterpolator","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.SquadOrientationInterpolator),this._keyValue.setUnit("angle"),this._value_changed.setUnit("angle"),this.squad=new r}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOnly,"set_fraction",new e.SFFloat),new t(o.inputOutput,"closed",new e.SFBool),new t(o.inputOutput,"key",new e.MFFloat),new t(o.inputOutput,"keyValue",new e.MFRotation),new t(o.outputOnly,"value_changed",new e.SFRotation)]),getTypeName:function(){return"SquadOrientationInterpolator"},getComponentName:function(){return"Interpolation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._keyValue.addInterest("set_keyValue__",this)},set_keyValue__:function(){const t=this._key,i=this._keyValue;i.length<t.length&&i.resize(t.length,i.length?i[i.length-1]:new e.SFRotation),this.squad.generate(this._closed.getValue(),this._key,this._keyValue)},interpolate:function(e,t,i){try{this._value_changed=this.squad.interpolate(e,t,i,this._keyValue)}catch(e){console.error(e)}}}),s})),define("x_ite/Components/Interpolation",["x_ite/Configuration/SupportedNodes","x_ite/Components/Interpolation/ColorInterpolator","x_ite/Components/Interpolation/CoordinateInterpolator","x_ite/Components/Interpolation/CoordinateInterpolator2D","x_ite/Components/Interpolation/EaseInEaseOut","x_ite/Components/Interpolation/NormalInterpolator","x_ite/Components/Interpolation/OrientationInterpolator","x_ite/Components/Interpolation/PositionInterpolator","x_ite/Components/Interpolation/PositionInterpolator2D","x_ite/Components/Interpolation/ScalarInterpolator","x_ite/Components/Interpolation/SplinePositionInterpolator","x_ite/Components/Interpolation/SplinePositionInterpolator2D","x_ite/Components/Interpolation/SplineScalarInterpolator","x_ite/Components/Interpolation/SquadOrientationInterpolator","x_ite/Components/Interpolation/X3DInterpolatorNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f){"use strict";const g={ColorInterpolator:t,CoordinateInterpolator:i,CoordinateInterpolator2D:n,EaseInEaseOut:r,NormalInterpolator:o,OrientationInterpolator:s,PositionInterpolator:a,PositionInterpolator2D:u,ScalarInterpolator:l,SplinePositionInterpolator:c,SplinePositionInterpolator2D:h,SplineScalarInterpolator:d,SquadOrientationInterpolator:p},m={X3DInterpolatorNode:f};for(const t in g)e.addType(t,g[t]);for(const t in m)e.addAbstractType(t,m[t])})),define("x_ite/Components/Layering",["x_ite/Configuration/SupportedNodes","x_ite/Components/Layering/Layer","x_ite/Components/Layering/LayerSet","x_ite/Components/Layering/Viewport","x_ite/Components/Layering/X3DLayerNode","x_ite/Components/Layering/X3DViewportNode"],(function(e,t,i,n,r,o){"use strict";const s={Layer:t,LayerSet:i,Viewport:n},a={X3DLayerNode:r,X3DViewportNode:o};for(const t in s)e.addType(t,s[t]);for(const t in a)e.addAbstractType(t,a[t])})),define("x_ite/Components/Lighting/PointLight",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Lighting/X3DLightNode","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/Camera","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix3","standard/Math/Numbers/Matrix4","standard/Math/Utility/MatrixStack","standard/Math/Algorithm","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m){"use strict";const _=[(new p).setRotation(new h(new l(1,0,0),l.zAxis)),(new p).setRotation(new h(new l(-1,0,0),l.zAxis)),(new p).setRotation(new h(new l(0,0,-1),l.zAxis)),(new p).setRotation(new h(new l(0,0,1),l.zAxis)),(new p).setRotation(new h(new l(0,1,0),l.zAxis)),(new p).setRotation(new h(new l(0,-1,0),l.zAxis))],y=[new c(0,.5,.25,.5),new c(.5,.5,.25,.5),new c(.75,.5,.25,.5),new c(.25,.5,.25,.5),new c(0,0,.5,.5),new c(.5,0,.5,.5)],x=m(w);function w(){this.location=new l(0,0,0),this.matrixArray=new Float32Array(9),this.shadowBuffer=null,this.viewVolume=new u,this.viewport=new c(0,0,0,0),this.projectionMatrix=new p,this.modelViewMatrix=new f(p),this.modelMatrix=new p,this.invLightSpaceMatrix=new p,this.invLightSpaceProjectionMatrix=new p,this.shadowMatrix=new p,this.shadowMatrixArray=new Float32Array(16),this.rotation=new h,this.rotationMatrix=new p,this.textureUnit=void 0}function b(e){n.call(this,e),this.addType(s.PointLight),this._location.setUnit("length"),this._radius.setUnit("length")}return w.prototype={constructor:w,getModelViewMatrix:function(){return this.modelViewMatrix},set:function(e,t,i,n){const r=t.getShadowMapSize();this.browser=e,this.lightNode=t,this.groupNode=i;try{this.matrixArray.set(n.submatrix.inverse())}catch(e){this.matrixArray.set(d.Identity)}this.modelViewMatrix.pushMatrix(n),t.getShadowIntensity()>0&&r>0&&(this.shadowBuffer=e.popShadowBuffer(r),this.shadowBuffer||console.warn("Couldn't create shadow buffer."))},renderShadowMap:function(e){try{if(!this.shadowBuffer)return;const t=this.lightNode,i=e.getCameraSpaceMatrix().get(),n=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),s=this.invLightSpaceMatrix.assign(t.getGlobal()?n:p.Identity);s.translate(t.getLocation()),s.inverse();const u=t.getShadowMapSize();this.shadowBuffer.bind();for(let t=0;t<6;++t){const i=y[t],n=this.viewport.set(i[0]*u,i[1]*u,i[2]*u,i[3]*u),l=a.perspective2(g.radians(90),.125,1e4,n[2],n[3],this.projectionMatrix);e.getViewVolumes().push(this.viewVolume.set(l,n,n)),e.getProjectionMatrix().pushMatrix(this.projectionMatrix),e.getModelViewMatrix().pushMatrix(_[t]),e.getModelViewMatrix().multLeft(s),e.render(o.SHADOW,r.prototype.traverse,this.groupNode),e.getModelViewMatrix().pop(),e.getProjectionMatrix().pop(),e.getViewVolumes().pop()}this.shadowBuffer.unbind(),t.getGlobal()||s.multLeft(n.inverse()),this.invLightSpaceProjectionMatrix.assign(s)}catch(e){console.error(e)}},setGlobalVariables:function(e){this.modelViewMatrix.get().multVecMatrix(this.location.assign(this.lightNode._location.getValue())),this.shadowMatrix.assign(e.getCameraSpaceMatrix().get()).multRight(this.invLightSpaceProjectionMatrix),this.shadowMatrixArray.set(this.shadowMatrix)},setShaderUniforms:function(e,t){const i=t.numLights++;if(t.hasLight(i,this))return;const n=this.lightNode,r=n.getColor(),o=n.getAttenuation(),s=this.location;if(e.uniform1i(t.x3d_LightType[i],2),e.uniform3f(t.x3d_LightColor[i],r.r,r.g,r.b),e.uniform1f(t.x3d_LightIntensity[i],n.getIntensity()),e.uniform1f(t.x3d_LightAmbientIntensity[i],n.getAmbientIntensity()),e.uniform3f(t.x3d_LightAttenuation[i],Math.max(0,o.x),Math.max(0,o.y),Math.max(0,o.z)),e.uniform3f(t.x3d_LightLocation[i],s.x,s.y,s.z),e.uniform1f(t.x3d_LightRadius[i],n.getRadius()),e.uniformMatrix3fv(t.x3d_LightMatrix[i],!1,this.matrixArray),this.shadowBuffer){const r=this.browser,o=n.getShadowColor();e.uniform3f(t.x3d_ShadowColor[i],o.r,o.g,o.b),e.uniform1f(t.x3d_ShadowIntensity[i],n.getShadowIntensity()),e.uniform1f(t.x3d_ShadowBias[i],n.getShadowBias()),e.uniformMatrix4fv(t.x3d_ShadowMatrix[i],!1,this.shadowMatrixArray),e.uniform1i(t.x3d_ShadowMapSize[i],n.getShadowMapSize()),this.textureUnit=n.getGlobal()?void 0===this.textureUnit?r.popTexture2DUnit():this.textureUnit:r.getTexture2DUnit(),void 0!==this.textureUnit?(e.activeTexture(e.TEXTURE0+this.textureUnit),e.getVersion()>=2||r.getExtension("WEBGL_depth_texture")?e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getDepthTexture()):e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getColorTexture()),e.uniform1i(t.x3d_ShadowMap[i],this.textureUnit)):console.warn("Not enough combined texture units for shadow map available.")}},dispose:function(){this.browser.pushShadowBuffer(this.shadowBuffer),this.lightNode.getGlobal()&&this.browser.pushTexture2DUnit(this.textureUnit),this.modelViewMatrix.clear(),this.browser=null,this.lightNode=null,this.groupNode=null,this.shadowBuffer=null,this.textureUnit=void 0,x.push(this)}},b.prototype=Object.assign(Object.create(n.prototype),{constructor:b,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"global",new e.SFBool(!0)),new t(s.inputOutput,"on",new e.SFBool(!0)),new t(s.inputOutput,"color",new e.SFColor(1,1,1)),new t(s.inputOutput,"intensity",new e.SFFloat(1)),new t(s.inputOutput,"ambientIntensity",new e.SFFloat),new t(s.inputOutput,"attenuation",new e.SFVec3f(1,0,0)),new t(s.inputOutput,"location",new e.SFVec3f),new t(s.inputOutput,"radius",new e.SFFloat(100)),new t(s.inputOutput,"shadows",new e.SFBool),new t(s.inputOutput,"shadowColor",new e.SFColor),new t(s.inputOutput,"shadowIntensity",new e.SFFloat(1)),new t(s.inputOutput,"shadowBias",new e.SFFloat(.005)),new t(s.initializeOnly,"shadowMapSize",new e.SFInt32(1024))]),getTypeName:function(){return"PointLight"},getComponentName:function(){return"Lighting"},getContainerField:function(){return"children"},getAttenuation:function(){return this._attenuation.getValue()},getLocation:function(){return this._location.getValue()},getRadius:function(){return Math.max(0,this._radius.getValue())},getLights:function(){return x}}),b})),define("x_ite/Components/Lighting/SpotLight",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Lighting/X3DLightNode","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Geometry/Box3","standard/Math/Geometry/Camera","standard/Math/Geometry/ViewVolume","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix3","standard/Math/Numbers/Matrix4","standard/Math/Utility/MatrixStack","standard/Math/Algorithm","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_){"use strict";const y=_(x);function x(){this.location=new c(0,0,0),this.direction=new c(0,0,0),this.matrixArray=new Float32Array(9),this.renderShadow=!0,this.shadowBuffer=null,this.bbox=new a,this.viewVolume=new l,this.viewport=new h(0,0,0,0),this.projectionMatrix=new f,this.modelViewMatrix=new g(f),this.modelMatrix=new f,this.invLightSpaceMatrix=new f,this.invLightSpaceProjectionMatrix=new f,this.shadowMatrix=new f,this.shadowMatrixArray=new Float32Array(16),this.rotation=new d,this.lightBBoxMin=new c(0,0,0),this.lightBBoxMax=new c(0,0,0),this.textureUnit=void 0}function w(e){switch(n.call(this,e),this.addType(s.SpotLight),e.getSpecificationVersion()){case"2.0":case"3.0":case"3.1":case"3.2":this._beamWidth=1.5708,this._cutOffAngle=.785398}this._location.setUnit("length"),this._radius.setUnit("length"),this._beamWidth.setUnit("angle"),this._cutOffAngle.setUnit("angle")}return x.prototype={constructor:x,getModelViewMatrix:function(){return this.modelViewMatrix},set:function(e,t,i,n){const r=t.getShadowMapSize();this.browser=e,this.lightNode=t,this.groupNode=i;try{this.matrixArray.set(n.submatrix.inverse())}catch(e){this.matrixArray.set(p.Identity)}this.modelViewMatrix.pushMatrix(n),t.getShadowIntensity()>0&&r>0&&(this.shadowBuffer=e.popShadowBuffer(r),this.shadowBuffer||console.warn("Couldn't create shadow buffer."))},renderShadowMap:function(e){try{if(!this.shadowBuffer)return;const t=this.lightNode,i=e.getCameraSpaceMatrix().get(),n=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),s=this.invLightSpaceMatrix.assign(t.getGlobal()?n:f.Identity);s.translate(t.getLocation()),s.rotate(this.rotation.setFromToVec(c.zAxis,this.direction.assign(t.getDirection()).negate())),s.inverse();const a=this.groupNode.getSubBBox(this.bbox,!0),l=(a.multRight(s).getExtents(this.lightBBoxMin,this.lightBBoxMax),t.getShadowMapSize()),h=Math.min(t.getRadius(),-this.lightBBoxMin.z),d=this.viewport.set(0,0,l,l),p=u.perspective(2*t.getCutOffAngle(),.125,Math.max(1e4,h),l,l,this.projectionMatrix);this.renderShadow=h>0,this.shadowBuffer.bind(),e.getViewVolumes().push(this.viewVolume.set(p,d,d)),e.getProjectionMatrix().pushMatrix(p),e.getModelViewMatrix().pushMatrix(s),e.render(o.SHADOW,r.prototype.traverse,this.groupNode),e.getModelViewMatrix().pop(),e.getProjectionMatrix().pop(),e.getViewVolumes().pop(),this.shadowBuffer.unbind(),t.getGlobal()||s.multLeft(n.inverse()),this.invLightSpaceProjectionMatrix.assign(s).multRight(p).multRight(t.getBiasMatrix())}catch(e){console.error(e)}},setGlobalVariables:function(e){const t=this.lightNode,i=this.modelViewMatrix.get();i.multVecMatrix(this.location.assign(t._location.getValue())),i.multDirMatrix(this.direction.assign(t._direction.getValue())).normalize(),this.shadowMatrix.assign(e.getCameraSpaceMatrix().get()).multRight(this.invLightSpaceProjectionMatrix),this.shadowMatrixArray.set(this.shadowMatrix)},setShaderUniforms:function(e,t){const i=t.numLights++;if(t.hasLight(i,this))return;const n=this.lightNode,r=n.getColor(),o=n.getAttenuation(),s=this.location,a=this.direction;if(e.uniform1i(t.x3d_LightType[i],3),e.uniform3f(t.x3d_LightColor[i],r.r,r.g,r.b),e.uniform1f(t.x3d_LightIntensity[i],n.getIntensity()),e.uniform1f(t.x3d_LightAmbientIntensity[i],n.getAmbientIntensity()),e.uniform3f(t.x3d_LightAttenuation[i],Math.max(0,o.x),Math.max(0,o.y),Math.max(0,o.z)),e.uniform3f(t.x3d_LightLocation[i],s.x,s.y,s.z),e.uniform3f(t.x3d_LightDirection[i],a.x,a.y,a.z),e.uniform1f(t.x3d_LightRadius[i],n.getRadius()),e.uniform1f(t.x3d_LightBeamWidth[i],n.getBeamWidth()),e.uniform1f(t.x3d_LightCutOffAngle[i],n.getCutOffAngle()),e.uniformMatrix3fv(t.x3d_LightMatrix[i],!1,this.matrixArray),this.renderShadow&&this.shadowBuffer){const r=this.browser,o=n.getShadowColor();e.uniform3f(t.x3d_ShadowColor[i],o.r,o.g,o.b),e.uniform1f(t.x3d_ShadowIntensity[i],n.getShadowIntensity()),e.uniform1f(t.x3d_ShadowBias[i],n.getShadowBias()),e.uniformMatrix4fv(t.x3d_ShadowMatrix[i],!1,this.shadowMatrixArray),e.uniform1i(t.x3d_ShadowMapSize[i],n.getShadowMapSize()),this.textureUnit=n.getGlobal()?void 0===this.textureUnit?r.popTexture2DUnit():this.textureUnit:r.getTexture2DUnit(),void 0!==this.textureUnit?(e.activeTexture(e.TEXTURE0+this.textureUnit),e.getVersion()>=2||r.getExtension("WEBGL_depth_texture")?e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getDepthTexture()):e.bindTexture(e.TEXTURE_2D,this.shadowBuffer.getColorTexture()),e.uniform1i(t.x3d_ShadowMap[i],this.textureUnit)):console.warn("Not enough combined texture units for shadow map available.")}},dispose:function(){this.browser.pushShadowBuffer(this.shadowBuffer),this.lightNode.getGlobal()&&this.browser.pushTexture2DUnit(this.textureUnit),this.modelViewMatrix.clear(),this.browser=null,this.lightNode=null,this.groupNode=null,this.shadowBuffer=null,this.textureUnit=void 0,y.push(this)}},w.prototype=Object.assign(Object.create(n.prototype),{constructor:w,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"global",new e.SFBool(!0)),new t(s.inputOutput,"on",new e.SFBool(!0)),new t(s.inputOutput,"color",new e.SFColor(1,1,1)),new t(s.inputOutput,"intensity",new e.SFFloat(1)),new t(s.inputOutput,"ambientIntensity",new e.SFFloat),new t(s.inputOutput,"attenuation",new e.SFVec3f(1,0,0)),new t(s.inputOutput,"location",new e.SFVec3f),new t(s.inputOutput,"direction",new e.SFVec3f(0,0,-1)),new t(s.inputOutput,"radius",new e.SFFloat(100)),new t(s.inputOutput,"beamWidth",new e.SFFloat(.785398)),new t(s.inputOutput,"cutOffAngle",new e.SFFloat(1.5708)),new t(s.inputOutput,"shadows",new e.SFBool),new t(s.inputOutput,"shadowColor",new e.SFColor),new t(s.inputOutput,"shadowIntensity",new e.SFFloat(1)),new t(s.inputOutput,"shadowBias",new e.SFFloat(.005)),new t(s.initializeOnly,"shadowMapSize",new e.SFInt32(1024))]),getTypeName:function(){return"SpotLight"},getComponentName:function(){return"Lighting"},getContainerField:function(){return"children"},getAttenuation:function(){return this._attenuation.getValue()},getLocation:function(){return this._location.getValue()},getRadius:function(){return Math.max(0,this._radius.getValue())},getBeamWidth:function(){const e=this._beamWidth.getValue(),t=this.getCutOffAngle();return e>t?t:m.clamp(e,0,Math.PI/2)},getCutOffAngle:function(){return m.clamp(this._cutOffAngle.getValue(),0,Math.PI/2)},getLights:function(){return y}}),w})),define("x_ite/Components/Lighting",["x_ite/Configuration/SupportedNodes","x_ite/Components/Lighting/DirectionalLight","x_ite/Components/Lighting/PointLight","x_ite/Components/Lighting/SpotLight","x_ite/Components/Lighting/X3DLightNode"],(function(e,t,i,n,r){"use strict";const o={DirectionalLight:t,PointLight:i,SpotLight:n},s={X3DLightNode:r};for(const t in o)e.addType(t,o[t]);for(const t in s)e.addAbstractType(t,s[t])})),define("x_ite/Components/Navigation/Billboard",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DConstants","x_ite/Rendering/TraverseType","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=new u,c=new s(0,1,0),h=new s(0,0,1),d=new s(0,0,0),p=new s(0,0,0),f=new s(0,0,0),g=new s(0,0,0),m=new s(0,0,0),_=new a(0,0,1,0);function y(e){n.call(this,e),this.addType(r.Billboard),this.matrix=new u}return y.prototype=Object.assign(Object.create(n.prototype),{constructor:y,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"axisOfRotation",new e.SFVec3f(0,1,0)),new t(r.inputOutput,"visible",new e.SFBool(!0)),new t(r.inputOutput,"bboxDisplay",new e.SFBool),new t(r.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(r.initializeOnly,"bboxCenter",new e.SFVec3f),new t(r.inputOnly,"addChildren",new e.MFNode),new t(r.inputOnly,"removeChildren",new e.MFNode),new t(r.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Billboard"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},getBBox:function(e,t){return n.prototype.getBBox.call(this,e,t).multRight(this.matrix)},getMatrix:function(){return this.matrix},rotate:function(e){l.assign(e).inverse();const t=l.origin.normalize();if(this._axisOfRotation.getValue().equals(s.Zero)){l.multDirMatrix(d.assign(c)).normalize(),p.assign(d).cross(t),f.assign(t).cross(p);const e=t;p.normalize(),f.normalize(),this.matrix.set(p[0],p[1],p[2],0,f[0],f[1],f[2],0,e[0],e[1],e[2],0,0,0,0,1)}else g.assign(this._axisOfRotation.getValue()).cross(t),m.assign(this._axisOfRotation.getValue()).cross(h),this.matrix.setRotation(_.setFromToVec(m,g));return this.matrix},traverse:function(e,t){const i=t.getModelViewMatrix();i.push();try{switch(e){case o.CAMERA:case o.PICKING:case o.SHADOW:i.multLeft(this.matrix);break;default:i.multLeft(this.rotate(i.get()))}n.prototype.traverse.call(this,e,t)}catch(e){console.error(e)}i.pop()}}),y})),define("x_ite/Components/Navigation/Collision",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Core/X3DSensorNode","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),r.call(this,e),this.addType(a.Collision),"2.0"===e.getSpecificationVersion()&&this.addAlias("collide",this._enabled)}return u.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(a.inputOutput,"metadata",new e.SFNode),new t(a.inputOutput,"enabled",new e.SFBool(!0)),new t(a.outputOnly,"isActive",new e.SFBool),new t(a.outputOnly,"collideTime",new e.SFTime),new t(a.inputOutput,"visible",new e.SFBool(!0)),new t(a.inputOutput,"bboxDisplay",new e.SFBool),new t(a.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(a.initializeOnly,"bboxCenter",new e.SFVec3f),new t(a.initializeOnly,"proxy",new e.SFNode),new t(a.inputOnly,"addChildren",new e.MFNode),new t(a.inputOnly,"removeChildren",new e.MFNode),new t(a.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Collision"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._enabled.addInterest("set_live__",this),this._proxy.addInterest("set_proxy__",this),this.set_live__(),this.set_proxy__()},set_live__:function(){this.isLive().getValue()&&this._enabled.getValue()?this.getBrowser().addCollision(this):this.getBrowser().removeCollision(this)},set_active:function(e){this._isActive.getValue()!==e&&(this._isActive=e,e&&(this._collideTime=this.getBrowser().getCurrentTime()))},set_proxy__:function(){this.proxyNode=o(a.X3DChildNode,this._proxy)},traverse:function(e,t){if(e!==s.COLLISION)n.prototype.traverse.call(this,e,t);else if(this._enabled.getValue()){const i=t.getCollisions();i.push(this),this.proxyNode?this.proxyNode.traverse(e,t):n.prototype.traverse.call(this,e,t),i.pop()}}}),u})),define("x_ite/Components/Navigation/LOD",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),this.addType(s.LOD),"2.0"===e.getSpecificationVersion()&&this.addAlias("level",this._children),this._center.setUnit("length"),this._range.setUnit("length"),this.frameRate=60,this.keepCurrentLevel=!1,this.childNode=null,this.visibleNode=null,this.boundedObject=null}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"forceTransitions",new e.SFBool),new t(s.initializeOnly,"center",new e.SFVec3f),new t(s.initializeOnly,"range",new e.MFFloat),new t(s.outputOnly,"level_changed",new e.SFInt32(-1)),new t(s.inputOutput,"visible",new e.SFBool(!0)),new t(s.inputOutput,"bboxDisplay",new e.SFBool),new t(s.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(s.initializeOnly,"bboxCenter",new e.SFVec3f),new t(s.inputOnly,"addChildren",new e.MFNode),new t(s.inputOnly,"removeChildren",new e.MFNode),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"LOD"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._children.addInterest("set_child__",this)},getSubBBox:function(e,t){if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){const i=r(s.X3DBoundedObject,this.visibleNode);return i?i.getBBox(e,t):e.set()}return e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},clear:function(){},add:function(){},remove:function(){},set_child__:function(){this.set_level__(Math.min(this._level_changed.getValue(),this._children.length-1))},set_level__:function(e){this.childNode&&(this.childNode._isCameraObject.removeInterest("set_cameraObject__",this),this.childNode._isPickableObject.removeInterest("set_transformSensors__",this)),r(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.removeInterest("set_visible__",this),this.childNode._bboxDisplay.removeInterest("set_bboxDisplay__",this)),e>=0&&e<this._children.length?(this.childNode=r(s.X3DChildNode,this._children[e]),this.childNode&&(this.childNode._isCameraObject.addInterest("set_cameraObject__",this),this.childNode._isPickableObject.addInterest("set_transformSensors__",this),r(s.X3DBoundedObject,this.childNode)&&(this.childNode._visible.addInterest("set_visible__",this),this.childNode._bboxDisplay.addInterest("set_bboxDisplay__",this)))):this.childNode=null,this.set_transformSensors__(),this.set_visible__(),this.set_bboxDisplay__()},set_cameraObject__:function(){this.childNode&&this.childNode.getCameraObject()?r(s.X3DBoundedObject,this.childNode)?this.setCameraObject(this.childNode._visible.getValue()):this.setCameraObject(!0):this.setCameraObject(!1)},set_transformSensors__:function(){this.setPickableObject(Boolean(this.getTransformSensors().size||this.childNode&&this.childNode.getPickableObject()))},set_visible__:function(){r(s.X3DBoundedObject,this.childNode)?this.visibleNode=this.childNode._visible.getValue()?this.childNode:null:this.visibleNode=this.childNode,this.set_cameraObject__()},set_bboxDisplay__:function(){r(s.X3DBoundedObject,this.childNode)?this.boundedObject=this.childNode._bboxDisplay.getValue()?this.childNode:null:this.boundedObject=null},getLevel:function(e,t){if(0===this._range.length){this.frameRate=(179*this.frameRate+e.currentFrameRate)/180;const t=this._children.length;switch(t){case 0:return-1;case 1:return 0;case 2:return+(this.frameRate>55);default:{const e=1-u.clamp((this.frameRate-20)/35,0,1);return Math.min(Math.floor(e*t),t-1)}}}const i=t.translate(this._center.getValue()).origin.abs();return u.upperBound(this._range,0,this._range.length,i,u.less)},traverse:function(){const e=new a;return function(t,i){switch(t){case o.POINTER:case o.CAMERA:case o.SHADOW:{const e=this.visibleNode;return void(e&&e.traverse(t,i))}case o.PICKING:{if(this.getTransformSensors().size){const e=i.getModelViewMatrix().get();for(const t of this.getTransformSensors())t.collect(e)}const e=this.childNode;if(e){const n=i.getBrowser().getPickingHierarchy();n.push(this),e.traverse(t,i),n.pop()}return}case o.COLLISION:{const e=this.childNode;return void(e&&e.traverse(t,i))}case o.DISPLAY:{if(!this.keepCurrentLevel){let t=this.getLevel(i.getBrowser(),e.assign(i.getModelViewMatrix().get())),n=this._level_changed.getValue();this._forceTransitions.getValue()&&(t>n?t=n+1:t<n&&(t=n-1)),t!==n&&(this._level_changed=t,this.set_level__(Math.min(t,this._children.length-1)))}const n=this.visibleNode;n&&n.traverse(t,i);const r=this.boundedObject;return void(r&&r.displayBBox(t,i))}}}}()}),l})),define("x_ite/Components/Navigation/ViewpointGroup",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/EnvironmentalSensor/ProximitySensor","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o,s,a){"use strict";function u(e){n.call(this,e),this.addType(s.ViewpointGroup),this._size.setUnit("length"),this._center.setUnit("length"),this.proximitySensor=new r(e),this.cameraObjects=[],this.viewpointGroups=[]}function l(e,t){switch(e){case o.CAMERA:if(this.proximitySensor.traverse(e,t),this.proximitySensor._isActive.getValue())for(var i=0,n=this.cameraObjects.length;i<n;++i)this.cameraObjects[i].traverse(e,t);return;case o.DISPLAY:if(this.proximitySensor.traverse(e,t),this.proximitySensor._isActive.getValue())for(i=0,n=this.viewpointGroups.length;i<n;++i)this.viewpointGroups[i].traverse(e,t);return}}function c(e,t){switch(e){case o.CAMERA:for(var i=0,n=this.cameraObjects.length;i<n;++i)this.cameraObjects[i].traverse(e,t);return;case o.DISPLAY:for(i=0,n=this.viewpointGroups.length;i<n;++i)this.viewpointGroups[i].traverse(e,t);return}}return u.prototype=Object.assign(Object.create(n.prototype),{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"description",new e.SFString),new t(s.inputOutput,"displayed",new e.SFBool(!0)),new t(s.inputOutput,"retainUserOffsets",new e.SFBool),new t(s.inputOutput,"size",new e.SFVec3f),new t(s.inputOutput,"center",new e.SFVec3f),new t(s.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"ViewpointGroup"},getComponentName:function(){return"Navigation"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.proximitySensor.setup(),this._size.addFieldInterest(this.proximitySensor._size),this._center.addFieldInterest(this.proximitySensor._center),this.proximitySensor._size=this._size,this.proximitySensor._center=this._center,this._displayed.addInterest("set_displayed__",this),this._size.addInterest("set_displayed__",this),this._children.addInterest("set_children__",this),this.set_displayed__(),this.set_children__()},isActive:function(){return this.proximitySensor._isActive.getValue()},set_displayed__:function(){var e=!this._size.getValue().equals(a.Zero),t=this._displayed.getValue();this.proximitySensor._enabled=t&&e,t&&e?(this.proximitySensor._isCameraObject.addFieldInterest(this._isCameraObject),this.proximitySensor._isPickableObject.addFieldInterest(this._isPickableObject),this.setCameraObject(this.proximitySensor.getCameraObject()),this.setPickableObject(this.proximitySensor.getPickableObject()),this.traverse=l):(this.proximitySensor._isCameraObject.removeFieldInterest(this._isCameraObject),this.proximitySensor._isPickableObject.removeFieldInterest(this._isPickableObject),this.setCameraObject(t),this.setPickableObject(!1),t?this.traverse=c:delete this.traverse)},set_children__:function(){this.cameraObjects.length=0,this.viewpointGroups.length=0;for(var e=this._children,t=0,i=e.length;t<i;++t)try{for(var n=e[t].getValue().getInnerNode(),r=n.getType(),o=r.length-1;o>=0;--o)switch(r[o]){case s.X3DViewpointNode:this.cameraObjects.push(n);break;case s.ViewpointGroup:this.cameraObjects.push(n),this.viewpointGroups.push(n)}}catch(e){}},traverse:function(){}}),u})),define("x_ite/Components/Navigation",["x_ite/Configuration/SupportedNodes","x_ite/Components/Navigation/Billboard","x_ite/Components/Navigation/Collision","x_ite/Components/Navigation/LOD","x_ite/Components/Navigation/NavigationInfo","x_ite/Components/Navigation/OrthoViewpoint","x_ite/Components/Navigation/Viewpoint","x_ite/Components/Navigation/ViewpointGroup","x_ite/Components/Navigation/X3DViewpointNode"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l={Billboard:t,Collision:i,LOD:n,NavigationInfo:r,OrthoViewpoint:o,Viewpoint:s,ViewpointGroup:a},c={X3DViewpointNode:u};for(const t in l)e.addType(t,l[t]);for(const t in c)e.addAbstractType(t,c[t])})),define("x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer",["standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4"],(function(e,t){"use strict";function i(i,n,r,o){this.node=null,this.modelViewMatrix=new t,this.projectionMatrix=new t,this.viewport=new e(0,0,0,0),this.set(i,n,r,o)}return i.prototype={set:function(e,t,i,n){this.node=e,this.modelViewMatrix.assign(t),this.projectionMatrix.assign(i),this.viewport.assign(n)},set_over__:function(e,t){this.node.set_over__(e,t,this.modelViewMatrix,this.projectionMatrix,this.viewport)},set_active__:function(e,t){this.node.set_active__(e,t,this.modelViewMatrix,this.projectionMatrix,this.viewport)},set_motion__:function(e){this.node.set_motion__(e,this.modelViewMatrix,this.projectionMatrix,this.viewport)}},i})),define("x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode",["x_ite/Components/Core/X3DSensorNode","x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer","x_ite/Base/X3DConstants"],(function(e,t,i){"use strict";function n(t){e.call(this,t),this.addType(i.X3DPointingDeviceSensorNode)}return n.prototype=Object.assign(Object.create(e.prototype),{constructor:n,initialize:function(){e.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this)},getMatrices:function(){return this.matrices},set_enabled__:function(){this._enabled.getValue()||(this._isActive.getValue()&&(this._isActive=!1),this._isOver.getValue()&&(this._isOver=!1))},set_over__:function(e,t){e!==this._isOver.getValue()&&(this._isOver=e,e&&(this.getBrowser().getNotification()._string=this._description))},set_active__:function(e,t){e!==this._isActive.getValue()&&(this._isActive=e)},set_motion__:function(e){},push:function(e,i){this._enabled.getValue()&&i.set(this,new t(this,e.getModelViewMatrix().get(),e.getProjectionMatrix().get(),e.getViewVolume().getViewport()))}}),n})),define("x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode",["x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DTouchSensorNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i,set_active__:function(t,i){e.prototype.set_active__.call(this,t,i),this._enabled.getValue()&&this._isOver.getValue()&&!t&&(this._touchTime=this.getBrowser().getCurrentTime())}}),i})),define("x_ite/Components/PointingDeviceSensor/TouchSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix4"],(function(e,t,i,n,r,o){"use strict";var s=new o;function a(e){n.call(this,e),this.addType(r.TouchSensor),this._hitPoint_changed.setUnit("length")}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.outputOnly,"hitTexCoord_changed",new e.SFVec2f),new t(r.outputOnly,"hitNormal_changed",new e.SFVec3f),new t(r.outputOnly,"hitPoint_changed",new e.SFVec3f),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool),new t(r.outputOnly,"touchTime",new e.SFTime)]),getTypeName:function(){return"TouchSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},set_over__:function(e,t,i,r,o){try{if(n.prototype.set_over__.call(this,e,t,i,r,o),this._isOver.getValue()){var a=t.intersection;s.assign(i).inverse(),this._hitTexCoord_changed=a.texCoord,this._hitNormal_changed=i.multMatrixDir(a.normal.copy()).normalize(),this._hitPoint_changed=s.multVecMatrix(a.point.copy())}}catch(e){console.error(e)}}}),a})),define("x_ite/Components/Networking/Anchor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Grouping/X3DGroupingNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/PointingDeviceSensor/TouchSensor","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","x_ite/InputOutput/FileLoader"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(e){n.call(this,e),r.call(this,e),this.addType(a.Anchor),this.touchSensorNode=new o(e),this.sensors=new Map}return l.prototype=Object.assign(Object.create(n.prototype),r.prototype,{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(a.inputOutput,"metadata",new e.SFNode),new t(a.inputOutput,"description",new e.SFString),new t(a.inputOutput,"load",new e.SFBool(!0)),new t(a.inputOutput,"url",new e.MFString),new t(a.inputOutput,"parameter",new e.MFString),new t(a.inputOutput,"autoRefresh",new e.SFTime),new t(a.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600)),new t(a.inputOutput,"visible",new e.SFBool(!0)),new t(a.inputOutput,"bboxDisplay",new e.SFBool),new t(a.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(a.initializeOnly,"bboxCenter",new e.SFVec3f),new t(a.inputOnly,"addChildren",new e.MFNode),new t(a.inputOnly,"removeChildren",new e.MFNode),new t(a.inputOutput,"children",new e.MFNode)]),getTypeName:function(){return"Anchor"},getComponentName:function(){return"Networking"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this),this._description.addFieldInterest(this.touchSensorNode._description),this._load.addFieldInterest(this.touchSensorNode._enabled),this.touchSensorNode._description=this._description,this.touchSensorNode._enabled=this._load,this.touchSensorNode.setup();const e=this,t=this.touchSensorNode.set_active__;this.touchSensorNode.set_active__=function(i,n){t.call(this,i,n),this._isOver.getValue()&&!i&&e.requestImmediateLoad()}},set_load__:function(){},set_url__:function(){},requestImmediateLoad:function(e=!0){this.setCache(e),this.setLoadState(a.IN_PROGRESS_STATE,!1),new u(this).createX3DFromURL(this._url,this._parameter,function(e){e?(this.getBrowser().replaceWorld(e),this.setLoadState(a.COMPLETE_STATE,!1)):this.setLoadState(a.FAILED_STATE,!1)}.bind(this),function(e){this.getBrowser().changeViewpoint(e),this.setLoadState(a.COMPLETE_STATE,!1)}.bind(this),function(e,t){t?window.open(e,t):location=e,this.setLoadState(a.COMPLETE_STATE,!1)}.bind(this))},requestUnload(){},traverse:function(e,t){if(e===s.POINTER){const i=this.sensors;i.clear(),t.getBrowser().getSensors().push(i),this.touchSensorNode.push(t,i),n.prototype.traverse.call(this,e,t),t.getBrowser().getSensors().pop()}else n.prototype.traverse.call(this,e,t)}}),l})),define("x_ite/Components/Networking/Inline",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/Grouping/X3DBoundedObject","x_ite/Components/Grouping/Group","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","x_ite/InputOutput/FileLoader"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(e){n.call(this,e),r.call(this,e),o.call(this,e),this.addType(u.Inline),this.scene=this.getBrowser().getDefaultScene(),this.group=new s(e),this.group.addParent(this)}return c.prototype=Object.assign(Object.create(n.prototype),r.prototype,o.prototype,{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(u.inputOutput,"metadata",new e.SFNode),new t(u.inputOutput,"load",new e.SFBool(!0)),new t(u.inputOutput,"url",new e.MFString),new t(u.inputOutput,"autoRefresh",new e.SFTime),new t(u.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600)),new t(u.inputOutput,"visible",new e.SFBool(!0)),new t(u.inputOutput,"bboxDisplay",new e.SFBool),new t(u.initializeOnly,"bboxSize",new e.SFVec3f(-1,-1,-1)),new t(u.initializeOnly,"bboxCenter",new e.SFVec3f)]),getTypeName:function(){return"Inline"},getComponentName:function(){return"Networking"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),r.prototype.initialize.call(this),o.prototype.initialize.call(this),this.group.setPrivate(!0),this.group.setup(),this.group._isCameraObject.addFieldInterest(this._isCameraObject),this.group._isPickableObject.addFieldInterest(this._isPickableObject),this.requestImmediateLoad()},getBBox:function(e,t){return this._bboxSize.getValue().equals(this.getDefaultBBoxSize())?this.group.getBBox(e,t):e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},set_live__:function(){r.prototype.set_live__.call(this),this.getPrivate()||this.scene.setLive(this.isLive().getValue())},unloadNow:function(){this.setInternalScene(this.getBrowser().getDefaultScene())},loadNow:function(){new l(this).createX3DFromURL(this._url,null,this.setInternalSceneAsync.bind(this))},setInternalSceneAsync:function(e){e?(this.setLoadState(u.COMPLETE_STATE),this.setInternalScene(e)):(this.setLoadState(u.FAILED_STATE),this.setInternalScene(this.getBrowser().getDefaultScene()))},setInternalScene:function(e){this.scene.setLive(!1),this.scene.rootNodes.removeFieldInterest(this.group._children),this.scene=e,this.scene.setExecutionContext(this.getExecutionContext()),this.scene.setPrivate(this.getExecutionContext().getPrivate()),this.scene.rootNodes.addFieldInterest(this.group._children),this.group._children=this.scene.rootNodes,this.set_live__(),this.getBrowser().addBrowserEvent()},getInternalScene:function(){return this.scene},traverse:function(e,t){if(e===a.PICKING){const i=t.getBrowser().getPickingHierarchy();return i.push(this),this.group.traverse(e,t),void i.pop()}this.group.traverse(e,t)}}),c})),define("x_ite/Components/Networking",["x_ite/Configuration/SupportedNodes","x_ite/Components/Networking/Anchor","x_ite/Components/Networking/Inline","x_ite/Components/Networking/LoadSensor","x_ite/Components/Networking/X3DNetworkSensorNode","x_ite/Components/Networking/X3DUrlObject"],(function(e,t,i,n,r,o){"use strict";const s={Anchor:t,Inline:i,LoadSensor:n},a={X3DNetworkSensorNode:r,X3DUrlObject:o};for(const t in s)e.addType(t,s[t]);for(const t in a)e.addAbstractType(t,a[t])})),define("x_ite/Components/PointingDeviceSensor/X3DDragSensorNode",["x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DDragSensorNode),this._trackPoint_changed.setUnit("length")}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("standard/Math/Geometry/Cylinder3",["standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3"],(function(e,t,i,n){"use strict";function r(e,t){this.axis=e.copy(),this.radius=t}return r.prototype={constructor:r,intersectsLine:function(r,o,s){const a=new t(this.axis.direction,new e(0,1,0)),u=i.Rotation(a),l=1/this.radius,c=new i;c.scale(new e(l,l,l)),c.multLeft(u);const h=e.subtract(r.point,this.axis.point),d=new n(h,r.direction).multLineMatrix(c),p=this.unitCylinderIntersectsLine(d,o,s);if(p){const e=c.inverse();e.multVecMatrix(o),o.add(this.axis.point),e.multVecMatrix(s),s.add(this.axis.point)}return p},unitCylinderIntersectsLine:function(e,t,i){let n,r;const o=e.point,s=e.direction,a=s[0]*s[0]+s[2]*s[2],u=2*(o[0]*s[0]+o[2]*s[2]),l=o[0]*o[0]+o[2]*o[2]-1,c=u*u-4*a*l;if(c<0)return!1;const h=Math.sqrt(c);return u>0?(n=-2*l/(h+u),r=-(h+u)/(2*a)):(n=2*l/(h-u),r=(h-u)/(2*a)),t.assign(s).multiply(n).add(o),i.assign(s).multiply(r).add(o),!0},toString:function(){return this.axis.toString()+" "+this.radius}},r})),define("x_ite/Components/PointingDeviceSensor/CylinderSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3","standard/Math/Geometry/Plane3","standard/Math/Geometry/Cylinder3","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";function d(e){n.call(this,e),this.addType(r.CylinderSensor),this._diskAngle.setUnit("angle"),this._minAngle.setUnit("angle"),this._maxAngle.setUnit("angle"),this._offset.setUnit("angle")}return d.prototype=Object.assign(Object.create(n.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"axisRotation",new e.SFRotation),new t(r.inputOutput,"diskAngle",new e.SFFloat(.261792)),new t(r.inputOutput,"minAngle",new e.SFFloat),new t(r.inputOutput,"maxAngle",new e.SFFloat(-1)),new t(r.inputOutput,"offset",new e.SFFloat),new t(r.inputOutput,"autoOffset",new e.SFBool(!0)),new t(r.outputOnly,"trackPoint_changed",new e.SFVec3f),new t(r.outputOnly,"rotation_changed",new e.SFRotation),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"CylinderSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.modelViewMatrix=new a,this.invModelViewMatrix=new a,this.cylinder=new c(new u(new o(0,0,0),new o(0,0,0)),0),this.disk=!1,this.yPlane=null,this.zPlane=null,this.sxPlane=null,this.szNormal=null,this.behind=!1,this.fromVector=new o(0,0,0),this.startOffset=new s(0,0,1,0)},isBehind:function(e,t){const i=new o(0,0,0),n=new o(0,0,0);return this.cylinder.intersectsLine(e,i,n),o.subtract(t,i).abs()>o.subtract(t,n).abs()},getTrackPoint:function(e,t){const i=new o(0,0,0);this.zPlane.intersectsLine(e,i);const n=o.add(i,this.cylinder.axis.getPerpendicularVectorToPoint(i,new o(0,0,0))),r=this.sxPlane.getDistanceToPoint(i)/this.cylinder.radius,a=Math.floor((r+1)/2),u=h.interval(r,-1,1),l=(0===a?Math.asin(u):u*Math.PI/2)+a*Math.PI;new s(this.cylinder.axis.direction,l).multVecRot(t.assign(this.szNormal).multiply(this.cylinder.radius)),t.add(n)},getAngle:function(e){return o.dot(e.getAxis(),this.cylinder.axis.direction)>0?e.angle:-e.angle},set_active__:function(e,t,i,r,a){n.prototype.set_active__.call(this,e,t,i,r,a);try{if(this._isActive.getValue()){this.modelViewMatrix.assign(i),this.invModelViewMatrix.assign(i).inverse();const e=t.hitRay.copy().multLineMatrix(this.invModelViewMatrix),n=this.invModelViewMatrix.multVecMatrix(t.intersection.point.copy()),r=this._axisRotation.getValue().multVecRot(new o(0,1,0)),a=this.invModelViewMatrix.multDirMatrix(new o(0,0,1)).normalize(),h=new u(new o(0,0,0),r),d=h.getPerpendicularVectorToPoint(n,new o(0,0,0)).abs();this.cylinder=new c(h,d),this.disk=Math.abs(o.dot(a,r))>Math.cos(this._diskAngle.getValue()),this.behind=this.isBehind(e,n),this.yPlane=new l(n,r),this.zPlane=new l(n,a);const p=this.invModelViewMatrix.origin,f=o.cross(r,p).normalize();this.sxPlane=new l(new o(0,0,0),f),this.szNormal=o.cross(f,r).normalize();const g=new o(0,0,0);this.disk?this.yPlane.intersectsLine(e,g):this.getTrackPoint(e,g),this.fromVector=this.cylinder.axis.getPerpendicularVectorToPoint(g,new o(0,0,0)).negate(),this.startOffset=new s(r,this._offset.getValue()),this._trackPoint_changed=g,this._rotation_changed=this.startOffset,this.angle=this._offset.getValue(),this.startVector=this._rotation_changed.getValue().multVecRot(this._axisRotation.getValue().multVecRot(new o(0,0,1)))}else this._autoOffset.getValue()&&(this._offset=this.getAngle(this._rotation_changed.getValue()))}catch(e){console.error(e)}},set_motion__:function(e){try{const t=e.hitRay.copy().multLineMatrix(this.invModelViewMatrix),i=new o(0,0,0);this.disk?this.yPlane.intersectsLine(t,i):this.getTrackPoint(t,i),this._trackPoint_changed=i;const n=this.cylinder.axis.getPerpendicularVectorToPoint(i,new o(0,0,0)).negate(),r=new s(this.fromVector,n);if(this.disk){this.modelViewMatrix.multVecMatrix(i.copy()).z>0&&r.multRight(new s(this.yPlane.normal,Math.PI))}else this.behind&&r.inverse();if(r.multLeft(this.startOffset),this._minAngle.getValue()>this._maxAngle.getValue())this._rotation_changed=r;else{const e=r.multVecRot(this._axisRotation.getValue().multVecRot(new o(0,0,1))),t=new s(this.startVector,e),i=this._axisRotation.getValue().multVecRot(new o(0,1,0)).dot(t.getAxis())>0?1:-1,n=this._minAngle.getValue(),a=this._maxAngle.getValue();this.angle+=i*t.angle,this.startVector.assign(e),this.angle<n?r.setAxisAngle(this.cylinder.axis.direction,n):this.angle>a?r.setAxisAngle(this.cylinder.axis.direction,a):r.setAxisAngle(this.cylinder.axis.direction,this.angle),this._rotation_changed.getValue().equals(r)||(this._rotation_changed=r)}}catch(e){console.error(e),this._trackPoint_changed.addEvent(),this._rotation_changed.addEvent()}}}),d})),define("x_ite/Components/PointingDeviceSensor/PlaneSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3","standard/Math/Geometry/Plane3","standard/Math/Geometry/ViewVolume","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d){"use strict";var p=new l(s.Zero,s.Zero),f=new s(0,0,0),g=new l(s.Zero,s.Zero);function m(e){n.call(this,e),this.addType(r.PlaneSensor),this._offset.setUnit("length"),this._minPosition.setUnit("length"),this._maxPosition.setUnit("length"),this._translation_changed.setUnit("length")}return m.prototype=Object.assign(Object.create(n.prototype),{constructor:m,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"axisRotation",new e.SFRotation),new t(r.inputOutput,"autoOffset",new e.SFBool(!0)),new t(r.inputOutput,"offset",new e.SFVec3f),new t(r.inputOutput,"minPosition",new e.SFVec2f),new t(r.inputOutput,"maxPosition",new e.SFVec2f(-1,-1)),new t(r.outputOnly,"trackPoint_changed",new e.SFVec3f),new t(r.outputOnly,"translation_changed",new e.SFVec3f),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"PlaneSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.modelViewMatrix=new u,this.invModelViewMatrix=new u,this.projectionMatrix=new u,this.viewport=new a,this.planeSensor=!0,this.plane=null,this.line=null,this.startOffset=new s(0,0,0),this.startPoint=new s(0,0,0)},getLineTrackPoint:function(e,t,i){return h.projectLine(t,this.modelViewMatrix,this.projectionMatrix,this.viewport,p),p.getClosestPointToPoint(new s(e.pointer.x,e.pointer.y,0),f),h.unProjectRay(f.x,f.y,this.modelViewMatrix,this.projectionMatrix,this.viewport,g),t.getClosestPointToLine(g,i)},set_active__:function(e,t,i,r,o){n.prototype.set_active__.call(this,e,t,i,r,o);try{if(this._isActive.getValue()){this.modelViewMatrix.assign(i),this.projectionMatrix.assign(r),this.viewport.assign(o),this.invModelViewMatrix.assign(i).inverse();var a=t.hitRay.copy().multLineMatrix(this.invModelViewMatrix),u=this.invModelViewMatrix.multVecMatrix(t.intersection.point.copy()),h=this._axisRotation.getValue();if(this._minPosition.x===this._maxPosition.x){this.planeSensor=!1;var d=h.multVecRot(new s(0,Math.abs(this._maxPosition.y-this._minPosition.y),0));this.line=new l(u,d.normalize())}else if(this._minPosition.y===this._maxPosition.y){this.planeSensor=!1;d=h.multVecRot(new s(Math.abs(this._maxPosition.x-this._minPosition.x),0,0));this.line=new l(u,d.normalize())}else this.planeSensor=!0,this.plane=new c(u,h.multVecRot(new s(0,0,1)));if(this.planeSensor)this.plane.intersectsLine(a,this.startPoint)&&this.trackStart(this.startPoint);else if(this.getLineTrackPoint(t,this.line,this.startPoint)){var p=new s(0,0,0);try{this.getLineTrackPoint(t,new l(this.line.direction,this.line.direction),p)}catch(e){p=this.startPoint}this.trackStart(p)}}else this._autoOffset.getValue()&&(this._offset=this._translation_changed)}catch(e){console.error(e)}},trackStart:function(e){this.startOffset.assign(this._offset.getValue()),this._trackPoint_changed=e,this._translation_changed=this._offset.getValue()},set_motion__:function(e){try{if(this.planeSensor){var t=e.hitRay.copy().multLineMatrix(this.invModelViewMatrix),i=new s(0,0,0);if(!this.plane.intersectsLine(t,i))throw new Error("Plane and line are parallel.");this.track(i,i.copy())}else{i=new s(0,0,0);var n=new s(0,0,0);if(!this.getLineTrackPoint(e,this.line,i))throw new Error("Lines are parallel.");try{this.getLineTrackPoint(e,new l(s.Zero,this.line.direction),n)}catch(e){n.assign(i)}this.track(i,n)}}catch(e){this._trackPoint_changed.addEvent(),this._translation_changed.addEvent()}},track:function(e,t){var i=this._axisRotation.getValue(),n=o.inverse(i).multVecRot(e.add(this.startOffset).subtract(this.startPoint));this._minPosition.x>this._maxPosition.x||(n.x=d.clamp(n.x,this._minPosition.x,this._maxPosition.x)),this._minPosition.y>this._maxPosition.y||(n.y=d.clamp(n.y,this._minPosition.y,this._maxPosition.y)),i.multVecRot(n),this._trackPoint_changed.getValue().equals(t)||(this._trackPoint_changed=t),this._translation_changed.getValue().equals(n)||(this._translation_changed=n)}}),m})),define("standard/Math/Geometry/Sphere3",["standard/Math/Numbers/Vector3"],(function(e){"use strict";function t(e,t){this.radius=e,this.center=t.copy()}return t.prototype={constructor:t,set:function(e,t){this.radius=e,this.center.assign(t)},intersectsLine:function(e,t,i){const n=e.point,r=e.direction,o=this.center,s=this.radius,a=2*(n.dot(r)-o.dot(r)),u=a*a-4*(n.x*n.x+n.y*n.y+n.z*n.z+(o.x*o.x+o.y*o.y+o.z*o.z)-2*n.dot(o)-s*s);if(u>=0){let e=(-a+Math.sqrt(u))/2,o=(-a-Math.sqrt(u))/2;if(e>o){const t=e;e=o,o=t}return t.assign(r).multiply(e).add(n),i.assign(r).multiply(o).add(n),!0}return!1},intersectsTriangle:function(){const t=new e(0,0,0),i=new e(0,0,0),n=new e(0,0,0),r=new e(0,0,0),o=new e(0,0,0),s=new e(0,0,0),a=new e(0,0,0);return function(u,l,c){const h=this.center,d=this.radius;u.subtract(h),l.subtract(h),c.subtract(h),t.assign(l).subtract(u),i.assign(c).subtract(u);const p=d*d,f=t.cross(i),g=e.dot(u,f);if(g*g>p*e.dot(f,f))return!1;const m=e.dot(u,u),_=e.dot(u,l),y=e.dot(u,c),x=e.dot(l,l),w=e.dot(l,c),b=e.dot(c,c);if(m>p&&_>m&&y>m||x>p&&_>x&&w>x||b>p&&y>b&&w>b)return!1;t.assign(l).subtract(u),n.assign(c).subtract(l),r.assign(u).subtract(c);const v=_-m,S=w-x,T=y-b,C=e.dot(t,t),N=e.dot(n,n),F=e.dot(r,r);o.assign(u).multiply(C).subtract(t.multiply(v)),s.assign(l).multiply(N).subtract(n.multiply(S)),a.assign(c).multiply(F).subtract(r.multiply(T));const O=c.multiply(C).subtract(o),E=u.multiply(N).subtract(s),D=l.multiply(F).subtract(a),M=e.dot(o,o)>p*C*C&&e.dot(o,O)>0,I=e.dot(s,s)>p*N*N&&e.dot(s,E)>0,V=e.dot(a,a)>p*F*F&&e.dot(a,D)>0;return!(M||I||V)}}(),toString:function(){return this.radius+" "+this.center.toString()}},t})),define("x_ite/Components/PointingDeviceSensor/SphereSensor",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Triangle3","standard/Math/Geometry/Line3","standard/Math/Geometry/Plane3","standard/Math/Geometry/Sphere3"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";function d(e){n.call(this,e),this.addType(r.SphereSensor)}return d.prototype=Object.assign(Object.create(n.prototype),{constructor:d,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"autoOffset",new e.SFBool(!0)),new t(r.inputOutput,"offset",new e.SFRotation),new t(r.outputOnly,"trackPoint_changed",new e.SFVec3f),new t(r.outputOnly,"rotation_changed",new e.SFRotation),new t(r.outputOnly,"isOver",new e.SFBool),new t(r.outputOnly,"isActive",new e.SFBool)]),getTypeName:function(){return"SphereSensor"},getComponentName:function(){return"PointingDeviceSensor"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.modelViewMatrix=new a,this.invModelViewMatrix=new a,this.sphere=null,this.zPlane=null,this.behind=!1,this.fromVector=new o(0,0,0),this.startPoint=new o(0,0,0),this.startOffset=new s(0,0,1,0)},getTrackPoint:function(e,t,i){var n=new o(0,0,0);return!!this.sphere.intersectsLine(e,t,n)&&((o.subtract(e.point,n).abs()<o.subtract(e.point,t).abs())-i&&t.assign(n),!0)},set_active__:function(e,t,i,r,s){n.prototype.set_active__.call(this,e,t,i,r,s);try{if(this._isActive.getValue()){this.modelViewMatrix.assign(i),this.invModelViewMatrix.assign(i).inverse();var a=this.invModelViewMatrix.multVecMatrix(t.intersection.point.copy()),u=new o(0,0,0);this.zPlane=new c(u,this.invModelViewMatrix.multDirMatrix(new o(0,0,1)).normalize()),this.sphere=new h(a.abs(),u),this.behind=this.zPlane.getDistanceToPoint(a)<0,this.fromVector.assign(a),this.startPoint.assign(a),this.startOffset.assign(this._offset.getValue()),this._trackPoint_changed=a,this._rotation_changed=this._offset.getValue()}else this._autoOffset.getValue()&&(this._offset=this._rotation_changed)}catch(e){}},set_motion__:function(e){try{var t=e.hitRay.copy().multLineMatrix(this.invModelViewMatrix),i=new o(0,0,0);if(this.getTrackPoint(t,i,this.behind)){var n=this.invModelViewMatrix.multDirMatrix(new o(0,0,1)).normalize();this.zPlane=new c(i,n)}else{var r=new o(0,0,0);this.zPlane.intersectsLine(t,r),t=new l(r,o.subtract(this.sphere.center,r).normalize()),this.getTrackPoint(t,i,!1);var a=u.normal(this.sphere.center,i,this.startPoint,new o(0,0,0)),h=o.subtract(i,this.sphere.center).normalize(),d=o.cross(a,h).normalize(),p=o.subtract(i,d.multiply(o.subtract(r,i).abs()));t=new l(p,o.subtract(this.sphere.center,p).normalize()),this.getTrackPoint(t,i,!1)}this._trackPoint_changed=i;var f=o.subtract(i,this.sphere.center),g=new s(this.fromVector,f);this.behind&&g.inverse(),this._rotation_changed=s.multRight(this.startOffset,g)}catch(e){this._trackPoint_changed.addEvent(),this._rotation_changed.addEvent()}}}),d})),define("x_ite/Components/PointingDeviceSensor",["x_ite/Configuration/SupportedNodes","x_ite/Components/PointingDeviceSensor/CylinderSensor","x_ite/Components/PointingDeviceSensor/PlaneSensor","x_ite/Components/PointingDeviceSensor/SphereSensor","x_ite/Components/PointingDeviceSensor/TouchSensor","x_ite/Components/PointingDeviceSensor/X3DDragSensorNode","x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode","x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode"],(function(e,t,i,n,r,o,s,a){"use strict";const u={CylinderSensor:t,PlaneSensor:i,SphereSensor:n,TouchSensor:r},l={X3DDragSensorNode:o,X3DPointingDeviceSensorNode:s,X3DTouchSensorNode:a};for(const t in u)e.addType(t,u[t]);for(const t in l)e.addAbstractType(t,l[t])})),define("x_ite/Components/Rendering/ClipPlane",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Vector4","standard/Math/Geometry/Plane3","standard/Utility/ObjectCache"],(function(e,t,i,n,r,o,s,a,u){"use strict";const l=u(c);function c(){this.plane=new a(o.Zero,o.Zero)}function h(e){n.call(this,e),this.addType(r.ClipPlane),this.enabled=!1,this.plane=new s(0,0,0,0)}return c.prototype={constructor:c,isClipped:function(e){return this.plane.getDistanceToPoint(e)<0},set:function(e,t){const i=this.plane,n=e.plane;try{i.normal.assign(n),i.distanceFromOrigin=-n.w,i.multRight(t)}catch(e){i.normal.set(0,0,0),i.distanceFromOrigin=0}},setShaderUniforms:function(e,t){const i=this.plane,n=i.normal;e.uniform4f(t.x3d_ClipPlane[t.numClipPlanes++],n.x,n.y,n.z,i.distanceFromOrigin)},dispose:function(){l.push(this)}},h.prototype=Object.assign(Object.create(n.prototype),{constructor:h,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"plane",new e.SFVec4f(0,1,0,0))]),getTypeName:function(){return"ClipPlane"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this._enabled.addInterest("set_enabled__",this),this._plane.addInterest("set_enabled__",this),this.set_enabled__()},set_enabled__:function(){this.plane.assign(this._plane.getValue()),this.enabled=this._enabled.getValue()&&!this.plane.equals(s.Zero)},push:function(e){if(this.enabled){const t=l.pop();t.set(this,e.getModelViewMatrix().get()),e.getLocalObjects().push(t)}},pop:function(e){this.enabled&&e.getBrowser().getLocalObjects().push(e.getLocalObjects().pop())}}),h})),define("x_ite/Components/Rendering/ColorRGBA",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DColorNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector4"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.ColorRGBA),this.setTransparent(!0)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"color",new e.MFColorRGBA)]),getTypeName:function(){return"ColorRGBA"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"color"},initialize:function(){n.prototype.initialize.call(this),this._color.addInterest("set_color__",this),this.set_color__()},set_color__:function(){this.color=this._color.getValue(),this.length=this._color.length},addColor:function(e,t){if(e>=0&&e<this.length){const i=this.color;e*=4,t.push(i[e],i[e+1],i[e+2],i[e+3])}else if(this.length){const i=this.color;e=4*(this.length-1),t.push(i[e],i[e+1],i[e+2],i[e+3])}else t.push(1,1,1,1)},addColors:function(e,t){if(this.length){const r=this.color;for(var i=0,n=4*this.length;i<n;i+=4)e.push(r[i],r[i+1],r[i+2],r[i+3]);const o=r[i=4*(this.length-1)],s=r[i+1],a=r[i+2],u=r[i+2];for(i=n,n=4*t;i<n;i+=4)e.push(o,s,a,u)}else for(let i=0;i<t;++i)e.push(1,1,1,1)},getVectors:function(e){const t=this._color;for(var i=0,n=t.length;i<n;++i){const n=t[i];e[i]=new o(n.r,n.g,n.b,n.a)}return e.length=n,e}}),s})),define("x_ite/Components/Rendering/IndexedTriangleFanSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.IndexedTriangleFanSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_index",new e.MFInt32),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"index",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedTriangleFanSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index),this._index.addInterest("set_index__",this),this.set_index__()},set_index__:function(){const e=this._index,t=this.triangleIndex;t.length=0;for(let i=0,n=e.length;i<n;++i){const r=e[i];if(!(r<0)&&++i<n){let o=e[i];if(o<0)continue;for(++i;i<n;++i){const n=e[i];if(n<0)break;t.push(r,o,n),o=n}}}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering/IndexedTriangleSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.IndexedTriangleSet)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_index",new e.MFInt32),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"index",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedTriangleSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},getPolygonIndex:function(e){return this._index[e]},initialize:function(){n.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index)},build:function(){n.prototype.build.call(this,3,this._index.length,3,this._index.length)}}),o})),define("x_ite/Components/Rendering/IndexedTriangleStripSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.IndexedTriangleStripSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"set_index",new e.MFInt32),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"index",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"IndexedTriangleStripSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._set_index.addFieldInterest(this._index),this._index.addInterest("set_index__",this),this.set_index__()},set_index__:function(){const e=this._index,t=this.triangleIndex;t.length=0;for(let i=0,n=e.length;i<n;++i){let r=e[i];if(!(r<0)&&++i<n){let o=e[i];if(o<0)continue;++i;for(let s=0;i<n;++i,++s){const n=e[i];if(n<0)break;t.push(r,o,n),1&s?o=n:r=n}}}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering/LineSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.LineSet),this.fogCoordNode=null,this.colorNode=null,this.coordNode=null}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"vertexCount",new e.MFInt32),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"LineSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._coord.addInterest("set_coord__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_coord__()},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const t of this._attrib){const i=r(o.X3DVertexAttributeNode,t);i&&e.push(i)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=r(o.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&(this.colorNode.removeInterest("requestRebuild",this),this.colorNode._transparent.removeInterest("set_transparent__",this)),this.colorNode=r(o.X3DColorNode,this._color),this.colorNode?(this.colorNode.addInterest("requestRebuild",this),this.colorNode._transparent.addInterest("set_transparent__",this),this.set_transparent__()):this.setTransparent(!1)},set_transparent__:function(){this.setTransparent(this.colorNode.getTransparent())},set_coord__:function(){this.coordNode&&this.coordNode.removeInterest("requestRebuild",this),this.coordNode=r(o.X3DCoordinateNode,this._coord),this.coordNode&&this.coordNode.addInterest("requestRebuild",this)},build:function(){if(!this.coordNode||this.coordNode.isEmpty())return;const e=this._vertexCount,t=this.getAttrib(),i=t.length,n=this.getAttribs(),r=this.fogCoordNode,o=this.colorNode,s=this.coordNode,a=this.getFogDepths(),u=this.getColors(),l=this.getVertices(),c=s.getSize();let h=0;for(let d of e){if(h+d>c)break;if(d>1){d=2*d-2;for(let e=0;e<d;++e,h+=1&e){for(let e=0;e<i;++e)t[e].addValue(h,n[e]);r&&r.addDepth(h,a),o&&o.addColor(h,u),s.addPoint(h,l)}++h}else h+=d}}}),s})),define("x_ite/Components/Rendering/X3DNormalNode",["x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DNormalNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Rendering/Normal",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DNormalNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.Normal)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"vector",new e.MFVec3f)]),getTypeName:function(){return"Normal"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"normal"},initialize:function(){n.prototype.initialize.call(this),this._vector.addInterest("set_vector__",this),this.set_vector__()},set_vector__:function(){this.vector=this._vector.getValue(),this.length=this._vector.length},set1Vector:function(e,t){this._vector[e]=t},get1Vector:function(e,t){if(e>=0&&e<this.length){const i=this.vector;return e*=3,t.set(i[e],i[e+1],i[e+2])}if(e>=0&&this.length){const i=this.vector;return e%=this.length,e*=3,t.set(i[e],i[e+1],i[e+2])}return t.set(0,0,0)},addVector:function(e,t){if(e>=0&&e<this.length){const i=this.vector;e*=3,t.push(i[e],i[e+1],i[e+2])}else{if(!(e>=0&&this.length))return t.push(0,0,0);{const i=this.vector;e%=this.length,e*=3,t.push(i[e],i[e+1],i[e+2])}}}}),s})),define("x_ite/Components/Rendering/X3DPointGeometryNode",["x_ite/Components/Rendering/X3DGeometryNode","standard/Math/Numbers/Vector2","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix4"],(function(e,t,i,n){"use strict";function r(t){e.call(this,t);const i=this.getBrowser();this.setGeometryType(0),this.setPrimitiveMode(i.getContext().POINTS),this.setSolid(!1),this.setTransparent(!0)}return r.prototype=Object.assign(Object.create(e.prototype),{constructor:r,intersectsLine:function(){const e=new i(0,0,0),n=new i(0,0,0),r=new i(0,0,0);return function(o,s,a,u){if(this.intersectsBBox(o,1)){const l=this.getVertices();for(let c=0,h=l.length;c<h;c+=4)if(e.set(l[c+0],l[c+1],l[c+2]),o.getPerpendicularVectorToPoint(e,n).abs()<.0033333333333333335*o.point.distance(e)){if(this.isClipped(a.multVecMatrix(r.assign(e)),s))continue;return u.push({texCoord:new t(0,0),normal:new i(0,0,0),point:e.copy()}),!0}}return!1}}(),intersectsBox:function(e,t,i){return!1},display:function(e,t){try{const i=t.browser,n=t.shapeNode.getAppearance(),r=n.shaderNode||i.getPointShader();if(r.getValid()){const i=n.blendModeNode,o=this.attribNodes,s=this.attribBuffers;i&&i.enable(e),r.enable(e),r.setLocalUniforms(e,t);for(let t=0,i=o.length;t<i;++t)o[t].enable(e,r,s[t]);this.fogCoords&&r.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&r.enableColorAttribute(e,this.colorBuffer),this.getMultiTexCoords().length&&r.enableTexCoordAttribute(e,this.texCoordBuffers,!0),r.enableVertexAttribute(e,this.vertexBuffer),e.drawArrays(this.primitiveMode,0,this.vertexCount);for(const t of o)t.disable(e,r);this.fogCoords&&r.disableFogDepthAttribute(e),this.colorMaterial&&r.disableColorAttribute(e),this.getMultiTexCoords().length&&r.disableTexCoordAttribute(e),i&&i.disable(e)}}catch(e){console.error(e)}},displayParticles:function(e,t,i,r){try{const o=t.browser,s=t.shapeNode.getAppearance(),a=s.shaderNode||this.getShader(o);if(a.getValid()){const o=s.blendModeNode,u=this.attribNodes,l=this.attribBuffers;o&&o.enable(e),a.enable(e),a.setLocalUniforms(e,t);for(let t=0,i=u.length;t<i;++t)u[t].enable(e,a,l[t]);this.fogCoords&&a.enableFogDepthAttribute(e,this.fogDepthBuffer),this.colorMaterial&&a.enableColorAttribute(e,this.colorBuffer),this.getMultiTexCoords().length&&a.enableTexCoordAttribute(e,this.texCoordBuffers),a.enableVertexAttribute(e,this.vertexBuffer);const c=t.modelViewMatrix,h=c[12],d=c[13],p=c[14],f=this.primitiveMode;for(let t=0;t<r;++t){const r=i[t];c[12]=h,c[13]=d,c[14]=p,n.prototype.translate.call(c,r.position),a.setParticle(e,r,c),e.drawArrays(f,0,this.vertexCount)}for(const t of u)t.disable(e,a);this.fogCoords&&a.disableFogDepthAttribute(e),this.colorMaterial&&a.disableColorAttribute(e),a.disableTexCoordAttribute(e),o&&o.disable(e)}}catch(e){console.error(e)}}}),r})),define("x_ite/Components/Rendering/PointSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DPointGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.PointSet),this.fogCoordNode=null,this.colorNode=null,this.coordNode=null}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"attrib",new e.MFNode),new t(o.inputOutput,"fogCoord",new e.SFNode),new t(o.inputOutput,"color",new e.SFNode),new t(o.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"PointSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._attrib.addInterest("set_attrib__",this),this._fogCoord.addInterest("set_fogCoord__",this),this._color.addInterest("set_color__",this),this._coord.addInterest("set_coord__",this),this.set_attrib__(),this.set_fogCoord__(),this.set_color__(),this.set_coord__()},getCoord:function(){return this.coordNode},set_attrib__:function(){const e=this.getAttrib();for(const t of e)t.removeInterest("requestRebuild",this);e.length=0;for(const t of this._attrib){const i=r(o.X3DVertexAttributeNode,t);i&&e.push(i)}for(const t of e)t.addInterest("requestRebuild",this)},set_fogCoord__:function(){this.fogCoordNode&&this.fogCoordNode.removeInterest("requestRebuild",this),this.fogCoordNode=r(o.FogCoordinate,this._fogCoord),this.fogCoordNode&&this.fogCoordNode.addInterest("requestRebuild",this)},set_color__:function(){this.colorNode&&this.colorNode.removeInterest("requestRebuild",this),this.colorNode=r(o.X3DColorNode,this._color),this.colorNode&&this.colorNode.addInterest("requestRebuild",this)},set_coord__:function(){this.coordNode&&this.coordNode.removeInterest("requestRebuild",this),this.coordNode=r(o.X3DCoordinateNode,this._coord),this.coordNode&&this.coordNode.addInterest("requestRebuild",this)},build:function(){if(!this.coordNode||this.coordNode.isEmpty())return;const e=this.getAttrib(),t=e.length,i=this.getAttribs(),n=this.fogCoordNode,r=this.getFogDepths(),o=this.colorNode,s=this.getColors(),a=this.coordNode,u=this.getVertices(),l=a._point.length;for(let n=0;n<t;++n)for(let t=0;t<l;++t)e[n].addValue(t,i[n]);n&&n.addDepths(r,l),o&&o.addColors(s,l),a.addPoints(u,l)}}),s})),define("x_ite/Components/Rendering/TriangleFanSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.TriangleFanSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.inputOutput,"fanCount",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"TriangleFanSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._fanCount.addInterest("set_fanCount__",this),this.set_fanCount__()},set_fanCount__:function(){const e=this._fanCount,t=this.triangleIndex;t.length=0;let i=0;for(const n of e){for(let e=1,r=n-1;e<r;++e)t.push(i,i+e,i+e+1);i+=n}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering/TriangleSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.TriangleSet)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"TriangleSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},build:function(){this.getCoord()&&n.prototype.build.call(this,3,this.getCoord().getSize(),3,this.getCoord().getSize())},createNormals:function(e,t){return this.createFaceNormals(e,t)}}),o})),define("x_ite/Components/Rendering/TriangleStripSet",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.TriangleStripSet),this.triangleIndex=[]}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"solid",new e.SFBool(!0)),new t(r.initializeOnly,"ccw",new e.SFBool(!0)),new t(r.initializeOnly,"colorPerVertex",new e.SFBool(!0)),new t(r.initializeOnly,"normalPerVertex",new e.SFBool(!0)),new t(r.inputOutput,"stripCount",new e.MFInt32),new t(r.inputOutput,"attrib",new e.MFNode),new t(r.inputOutput,"fogCoord",new e.SFNode),new t(r.inputOutput,"color",new e.SFNode),new t(r.inputOutput,"texCoord",new e.SFNode),new t(r.inputOutput,"normal",new e.SFNode),new t(r.inputOutput,"coord",new e.SFNode)]),getTypeName:function(){return"TriangleStripSet"},getComponentName:function(){return"Rendering"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._stripCount.addInterest("set_stripCount__",this),this.set_stripCount__()},set_stripCount__:function(){const e=this._stripCount,t=this.triangleIndex;t.length=0;let i=0;for(const n of e){for(let e=0,r=n-2;e<r;++e){const n=1&e;t.push(i+(n?e+1:e),i+(n?e:e+1),i+(e+2))}i+=n}},getPolygonIndex:function(e){return this.triangleIndex[e]},build:function(){n.prototype.build.call(this,3,this.triangleIndex.length,3,this.triangleIndex.length)}}),o})),define("x_ite/Components/Rendering",["x_ite/Configuration/SupportedNodes","x_ite/Components/Rendering/ClipPlane","x_ite/Components/Rendering/Color","x_ite/Components/Rendering/ColorRGBA","x_ite/Components/Rendering/Coordinate","x_ite/Components/Rendering/IndexedLineSet","x_ite/Components/Rendering/IndexedTriangleFanSet","x_ite/Components/Rendering/IndexedTriangleSet","x_ite/Components/Rendering/IndexedTriangleStripSet","x_ite/Components/Rendering/LineSet","x_ite/Components/Rendering/Normal","x_ite/Components/Rendering/PointSet","x_ite/Components/Rendering/TriangleFanSet","x_ite/Components/Rendering/TriangleSet","x_ite/Components/Rendering/TriangleStripSet","x_ite/Components/Rendering/X3DColorNode","x_ite/Components/Rendering/X3DComposedGeometryNode","x_ite/Components/Rendering/X3DCoordinateNode","x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Components/Rendering/X3DLineGeometryNode","x_ite/Components/Rendering/X3DNormalNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w,b){"use strict";const v={ClipPlane:t,Color:i,ColorRGBA:n,Coordinate:r,IndexedLineSet:o,IndexedTriangleFanSet:s,IndexedTriangleSet:a,IndexedTriangleStripSet:u,LineSet:l,Normal:c,PointSet:h,TriangleFanSet:d,TriangleSet:p,TriangleStripSet:f},S={X3DColorNode:g,X3DComposedGeometryNode:m,X3DCoordinateNode:_,X3DGeometricPropertyNode:y,X3DGeometryNode:x,X3DLineGeometryNode:w,X3DNormalNode:b};for(const t in v)e.addType(t,v[t]);for(const t in S)e.addAbstractType(t,S[t])})),define("x_ite/Components/Shaders/X3DVertexAttributeNode",["x_ite/Components/Rendering/X3DGeometricPropertyNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DVertexAttributeNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Shaders/FloatVertexAttribute",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DVertexAttributeNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.FloatVertexAttribute)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"name",new e.SFString),new t(r.initializeOnly,"numComponents",new e.SFInt32(4)),new t(r.inputOutput,"value",new e.MFFloat)]),getTypeName:function(){return"FloatVertexAttribute"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"attrib"},initialize:function(){n.prototype.initialize.call(this),this._numComponents.addInterest("set_numComponents",this),this._value.addInterest("set_value",this),this.set_numComponents(),this.set_value()},set_numComponents:function(){this.numComponents=o.clamp(this._numComponents.getValue(),1,4)},set_value:function(){this.value=this._value.getValue(),this.length=this._value.length},addValue:function(e,t){const i=this.value;let n=e*this.numComponents,r=n+this.numComponents;if(r<=this.length)for(;n<r;++n)t.push(i[n]);else if(this.numComponents<=this.length)for(r=i.length,n=r-this.numComponents;n<r;++n)t.push(i[n]);else for(;n<r;++n)t.push(0)},enable:function(e,t,i){t.enableFloatAttrib(e,this._name.getValue(),i,this.numComponents)},disable:function(e,t){t.disableFloatAttrib(e,this._name.getValue())}}),s})),define("x_ite/Components/Shaders/Matrix3VertexAttribute",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DVertexAttributeNode","x_ite/Base/X3DConstants","standard/Math/Numbers/Matrix3"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.Matrix3VertexAttribute)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"name",new e.SFString),new t(r.inputOutput,"value",new e.MFMatrix3f)]),getTypeName:function(){return"Matrix3VertexAttribute"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"attrib"},initialize:function(){n.prototype.initialize.call(this),this._value.addInterest("set_value",this),this.set_value()},set_value:function(){this.value=this._value.getValue(),this.length=this._value.length},addValue:function(e,t){if(e<this.length)for(var i=this.value,n=(r=9*e)+9;r<n;++r)t.push(i[r]);else if(this.length)for(i=this.value,n=(r=9*(e=this.length-1))+9;r<n;++r)t.push(i[r]);else{i=o.Identity;for(var r=0;r<9;++r)t.push(i[r])}},enable:function(e,t,i){t.enableMatrix3Attrib(e,this._name.getValue(),i)},disable:function(e,t){t.disableMatrix3Attrib(e,this._name.getValue())}}),s})),define("x_ite/Components/Shaders/Matrix4VertexAttribute",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DVertexAttributeNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.Matrix4VertexAttribute)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.initializeOnly,"name",new e.SFString),new t(r.inputOutput,"value",new e.MFMatrix4f)]),getTypeName:function(){return"Matrix4VertexAttribute"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"attrib"},initialize:function(){n.prototype.initialize.call(this),this._value.addInterest("set_value",this),this.set_value()},set_value:function(){this.value=this._value.getValue(),this.length=this._value.length},addValue:function(e,t){if(e<this.length)for(var i=this.value,n=(r=16*e)+16;r<n;++r)t.push(i[r]);else if(this.length)for(i=this.value,n=(r=16*(e=this.length-1))+16;r<n;++r)t.push(i[r]);else{i=Matrix4.Identity;for(var r=0;r<16;++r)t.push(i[r])}},enable:function(e,t,i){t.enableMatrix4Attrib(e,this._name.getValue(),i)},disable:function(e,t){t.disableMatrix4Attrib(e,this._name.getValue())}}),o})),define("x_ite/Components/Shaders/PackagedShader",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DShaderNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/Shaders/X3DProgrammableShaderObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),r.call(this,e),o.call(this,e),this.addType(s.PackagedShader)}return a.prototype=Object.assign(Object.create(n.prototype),r.prototype,o.prototype,{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOnly,"activate",new e.SFBool),new t(s.outputOnly,"isSelected",new e.SFBool),new t(s.outputOnly,"isValid",new e.SFBool),new t(s.initializeOnly,"language",new e.SFString),new t(s.inputOutput,"load",new e.SFBool(!0)),new t(s.inputOutput,"url",new e.MFString),new t(s.inputOutput,"autoRefresh",new e.SFTime),new t(s.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600))]),getTypeName:function(){return"PackagedShader"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"shaders"},getSourceText:function(){return this._url},requestImmediateLoad:function(e=!0){},requestUnload:function(){}}),a})),define("x_ite/Components/Shaders/ProgramShader",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shaders/X3DShaderNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.ProgramShader)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOnly,"activate",new e.SFBool),new t(r.outputOnly,"isSelected",new e.SFBool),new t(r.outputOnly,"isValid",new e.SFBool),new t(r.initializeOnly,"language",new e.SFString),new t(r.inputOutput,"programs",new e.MFNode)]),getTypeName:function(){return"ProgramShader"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"shaders"}}),o})),define("x_ite/Components/Shaders/ShaderProgram",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Core/X3DNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Components/Shaders/X3DProgrammableShaderObject","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),r.call(this,e),o.call(this,e),this.addType(s.ShaderProgram)}return a.prototype=Object.assign(Object.create(n.prototype),r.prototype,o.prototype,{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.initializeOnly,"type",new e.SFString("VERTEX")),new t(s.inputOutput,"load",new e.SFBool(!0)),new t(s.inputOutput,"url",new e.MFString),new t(s.inputOutput,"autoRefresh",new e.SFTime),new t(s.inputOutput,"autoRefreshTimeLimit",new e.SFTime(3600))]),getTypeName:function(){return"ShaderProgram"},getComponentName:function(){return"Shaders"},getContainerField:function(){return"programs"},getSourceText:function(){return this._url},requestImmediateLoad:function(e=!0){},requestUnload:function(){}}),a})),define("x_ite/Components/Shaders",["x_ite/Configuration/SupportedNodes","x_ite/Components/Shaders/ComposedShader","x_ite/Components/Shaders/FloatVertexAttribute","x_ite/Components/Shaders/Matrix3VertexAttribute","x_ite/Components/Shaders/Matrix4VertexAttribute","x_ite/Components/Shaders/PackagedShader","x_ite/Components/Shaders/ProgramShader","x_ite/Components/Shaders/ShaderPart","x_ite/Components/Shaders/ShaderProgram","x_ite/Components/Shaders/X3DProgrammableShaderObject","x_ite/Components/Shaders/X3DShaderNode","x_ite/Components/Shaders/X3DVertexAttributeNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h){"use strict";const d={ComposedShader:t,FloatVertexAttribute:i,Matrix3VertexAttribute:n,Matrix4VertexAttribute:r,PackagedShader:o,ProgramShader:s,ShaderPart:a,ShaderProgram:u},p={X3DProgrammableShaderObject:l,X3DShaderNode:c,X3DVertexAttributeNode:h};for(const t in d)e.addType(t,d[t]);for(const t in p)e.addAbstractType(t,p[t])})),define("x_ite/Components/Shape/AcousticProperties",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Base/X3DConstants"],(function(e,t,i,n,r){"use strict";function o(e){n.call(this,e),this.addType(r.AcousticProperties)}return o.prototype=Object.assign(Object.create(n.prototype),{constructor:o,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"enabled",new e.SFBool(!0)),new t(r.inputOutput,"absorption",new e.SFFloat),new t(r.inputOutput,"refraction",new e.SFFloat),new t(r.inputOutput,"diffuse",new e.SFFloat),new t(r.inputOutput,"specular",new e.SFFloat)]),getTypeName:function(){return"AcousticProperties"},getComponentName:function(){return"Shape"},getContainerField:function(){return"AcousticProperties"}}),o})),define("x_ite/Components/Shape/Material",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DOneSidedMaterialNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(o.Material),this.diffuseColor=new Float32Array(3),this.specularColor=new Float32Array(3),this.shaderNode=this.getBrowser().getDefaultShader()}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"ambientIntensity",new e.SFFloat(.2)),new t(o.inputOutput,"ambientTexture",new e.SFNode),new t(o.inputOutput,"ambientTextureMapping",new e.SFString),new t(o.inputOutput,"diffuseColor",new e.SFColor(.8,.8,.8)),new t(o.inputOutput,"diffuseTexture",new e.SFNode),new t(o.inputOutput,"diffuseTextureMapping",new e.SFString),new t(o.inputOutput,"specularColor",new e.SFColor),new t(o.inputOutput,"specularTexture",new e.SFNode),new t(o.inputOutput,"specularTextureMapping",new e.SFString),new t(o.inputOutput,"emissiveColor",new e.SFColor),new t(o.inputOutput,"emissiveTexture",new e.SFNode),new t(o.inputOutput,"emissiveTextureMapping",new e.SFString),new t(o.inputOutput,"shininess",new e.SFFloat(.2)),new t(o.inputOutput,"shininessTexture",new e.SFNode),new t(o.inputOutput,"shininessTextureMapping",new e.SFString),new t(o.inputOutput,"occlusionStrength",new e.SFFloat(1)),new t(o.inputOutput,"occlusionTexture",new e.SFNode),new t(o.inputOutput,"occlusionTextureMapping",new e.SFString),new t(o.inputOutput,"normalScale",new e.SFFloat(1)),new t(o.inputOutput,"normalTexture",new e.SFNode),new t(o.inputOutput,"normalTextureMapping",new e.SFString),new t(o.inputOutput,"transparency",new e.SFFloat)]),getTypeName:function(){return"Material"},getComponentName:function(){return"Shape"},getContainerField:function(){return"material"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._ambientIntensity.addInterest("set_ambientIntensity__",this),this._ambientTexture.addInterest("set_ambientTexture__",this),this._diffuseColor.addInterest("set_diffuseColor__",this),this._diffuseTexture.addInterest("set_diffuseTexture__",this),this._specularColor.addInterest("set_specularColor__",this),this._specularTexture.addInterest("set_specularTexture__",this),this._shininess.addInterest("set_shininess__",this),this._shininessTexture.addInterest("set_shininessTexture__",this),this._occlusionStrength.addInterest("set_occlusionStrength__",this),this._occlusionTexture.addInterest("set_occlusionTexture__",this),this.set_live__(),this.set_ambientIntensity__(),this.set_ambientTexture__(),this.set_diffuseColor__(),this.set_diffuseTexture__(),this.set_specularColor__(),this.set_specularTexture__(),this.set_shininess__(),this.set_shininessTexture__(),this.set_occlusionStrength__(),this.set_occlusionTexture__(),this.set_transparent__()},set_live__:function(){this.isLive().getValue()?this.getBrowser().getBrowserOptions()._Shading.addInterest("set_shading__",this):this.getBrowser().getBrowserOptions()._Shading.removeInterest("set_shading__",this),this.set_shading__()},set_ambientIntensity__:function(){this.ambientIntensity=s.clamp(this._ambientIntensity.getValue(),0,1)},set_ambientTexture__:function(){this.ambientTextureNode=r(o.X3DSingleTextureNode,this._ambientTexture),this.setTexture(this.getTextureIndices().AMBIENT_TEXTURE,this.ambientTextureNode)},set_diffuseColor__:function(){const e=this.diffuseColor,t=this._diffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_diffuseTexture__:function(){this.diffuseTextureNode&&this.diffuseTextureNode._transparent.removeInterest("set_transparent__",this),this.diffuseTextureNode=r(o.X3DSingleTextureNode,this._diffuseTexture),this.diffuseTextureNode&&this.diffuseTextureNode._transparent.addInterest("set_transparent__",this),this.setTexture(this.getTextureIndices().DIFFUSE_TEXTURE,this.diffuseTextureNode)},set_specularColor__:function(){const e=this.specularColor,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_specularTexture__:function(){this.specularTextureNode=r(o.X3DSingleTextureNode,this._specularTexture),this.setTexture(this.getTextureIndices().SPECULAR_TEXTURE,this.specularTextureNode)},set_shininess__:function(){this.shininess=s.clamp(this._shininess.getValue(),0,1)},set_shininessTexture__:function(){this.shininessTextureNode=r(o.X3DSingleTextureNode,this._shininessTexture),this.setTexture(this.getTextureIndices().SHININESS_TEXTURE,this.shininessTextureNode)},set_occlusionStrength__:function(){this.occlusionStrength=s.clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__:function(){this.occlusionTextureNode=r(o.X3DSingleTextureNode,this._occlusionTexture),this.setTexture(this.getTextureIndices().OCCLUSION_TEXTURE,this.occlusionTextureNode)},set_transparent__:function(){this.setTransparent(Boolean(this.getTransparency()||this.diffuseTextureNode&&this.diffuseTextureNode.getTransparent()))},set_textures__:function(){if(this.getTextures()){const e=this.getBrowser(),t=["X3D_MATERIAL_TEXTURES"];this.ambientTextureNode&&t.push("X3D_AMBIENT_TEXTURE","X3D_AMBIENT_TEXTURE_"+this.ambientTextureNode.getTextureTypeString()),this.diffuseTextureNode&&t.push("X3D_DIFFUSE_TEXTURE","X3D_DIFFUSE_TEXTURE_"+this.diffuseTextureNode.getTextureTypeString()),this.specularTextureNode&&t.push("X3D_SPECULAR_TEXTURE","X3D_SPECULAR_TEXTURE_"+this.specularTextureNode.getTextureTypeString()),this.getEmissiveTexture()&&t.push("X3D_EMISSIVE_TEXTURE","X3D_EMISSIVE_TEXTURE_"+this.getEmissiveTexture().getTextureTypeString()),this.shininessTextureNode&&t.push("X3D_SHININESS_TEXTURE","X3D_SHININESS_TEXTURE_"+this.shininessTextureNode.getTextureTypeString()),this.occlusionTextureNode&&t.push("X3D_OCCLUSION_TEXTURE","X3D_OCCLUSION_TEXTURE_"+this.occlusionTextureNode.getTextureTypeString()),this.getNormalTexture()&&t.push("X3D_NORMAL_TEXTURE","X3D_NORMAL_TEXTURE_"+this.getNormalTexture().getTextureTypeString());const i=e.createShader("MaterialTexturesShader","Phong",t);i._isValid.addInterest("set_shader__",this,i)}else this.set_shading__()},set_shader__:function(e){e._isValid.removeInterest("set_shader__",this),this.shaderNode=e},set_shading__:function(){if(this.getTextures())return;const e=this.getBrowser().getDefaultShader();e._isValid.getValue()?this.shaderNode=e:e._isValid.addInterest("set_shader__",this,e)},getTextureIndices:function(){const e={AMBIENT_TEXTURE:0,DIFFUSE_TEXTURE:1,SPECULAR_TEXTURE:2,EMISSIVE_TEXTURE:3,SHININESS_TEXTURE:4,OCCLUSION_TEXTURE:5,NORMAL_TEXTURE:6};return function(){return e}}(),getShader:function(e,t){return t?e.getShadowShader():this.shaderNode},setShaderUniforms:function(e,t,i,r,o){if(n.prototype.setShaderUniforms.call(this,e,t,i,r,o),e.uniform1f(t.x3d_AmbientIntensity,this.ambientIntensity),e.uniform3fv(t.x3d_DiffuseColor,this.diffuseColor),e.uniform3fv(t.x3d_SpecularColor,this.specularColor),e.uniform1f(t.x3d_Shininess,this.shininess),this.getTextures()){const n=t.x3d_AmbientTexture,s=t.x3d_DiffuseTexture,a=t.x3d_SpecularTexture,u=t.x3d_ShininessTexture,l=t.x3d_OcclusionTexture;this.ambientTextureNode&&(this.ambientTextureNode.setShaderUniformsToChannel(e,t,i,n),e.uniform1i(n.textureTransformMapping,r.get(this._ambientTextureMapping.getValue())||0),e.uniform1i(n.textureCoordinateMapping,o.get(this._ambientTextureMapping.getValue())||0)),this.diffuseTextureNode&&(this.diffuseTextureNode.setShaderUniformsToChannel(e,t,i,s),e.uniform1i(s.textureTransformMapping,r.get(this._diffuseTextureMapping.getValue())||0),e.uniform1i(s.textureCoordinateMapping,o.get(this._diffuseTextureMapping.getValue())||0)),this.specularTextureNode&&(this.specularTextureNode.setShaderUniformsToChannel(e,t,i,a),e.uniform1i(a.textureTransformMapping,r.get(this._specularTextureMapping.getValue())||0),e.uniform1i(a.textureCoordinateMapping,o.get(this._specularTextureMapping.getValue())||0)),this.shininessTextureNode&&(this.shininessTextureNode.setShaderUniformsToChannel(e,t,i,u),e.uniform1i(u.textureTransformMapping,r.get(this._shininessTextureMapping.getValue())||0),e.uniform1i(u.textureCoordinateMapping,o.get(this._shininessTextureMapping.getValue())||0)),this.occlusionTextureNode&&(e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode.setShaderUniformsToChannel(e,t,i,l),e.uniform1i(l.textureTransformMapping,r.get(this._occlusionTextureMapping.getValue())||0),e.uniform1i(l.textureCoordinateMapping,o.get(this._occlusionTextureMapping.getValue())||0))}}}),a})),define("x_ite/Components/Shape/PhysicalMaterial",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DOneSidedMaterialNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s){"use strict";function a(e){n.call(this,e),this.addType(o.PhysicalMaterial),this.baseColor=new Float32Array(3)}return a.prototype=Object.assign(Object.create(n.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"baseColor",new e.SFColor(1,1,1)),new t(o.inputOutput,"baseTexture",new e.SFNode),new t(o.inputOutput,"baseTextureMapping",new e.SFString),new t(o.inputOutput,"emissiveColor",new e.SFColor(0,0,0)),new t(o.inputOutput,"emissiveTexture",new e.SFNode),new t(o.inputOutput,"emissiveTextureMapping",new e.SFString),new t(o.inputOutput,"metallic",new e.SFFloat(1)),new t(o.inputOutput,"roughness",new e.SFFloat(1)),new t(o.inputOutput,"metallicRoughnessTexture",new e.SFNode),new t(o.inputOutput,"metallicRoughnessTextureMapping",new e.SFString),new t(o.inputOutput,"occlusionStrength",new e.SFFloat(1)),new t(o.inputOutput,"occlusionTexture",new e.SFNode),new t(o.inputOutput,"occlusionTextureMapping",new e.SFString),new t(o.inputOutput,"normalScale",new e.SFFloat(1)),new t(o.inputOutput,"normalTexture",new e.SFNode),new t(o.inputOutput,"normalTextureMapping",new e.SFString),new t(o.inputOutput,"transparency",new e.SFFloat)]),getTypeName:function(){return"PhysicalMaterial"},getComponentName:function(){return"Shape"},getContainerField:function(){return"material"},initialize:function(){n.prototype.initialize.call(this),this.shaderNode=this.getBrowser().getPhysicalMaterialShader(),this._baseColor.addInterest("set_baseColor__",this),this._baseTexture.addInterest("set_baseTexture__",this),this._metallic.addInterest("set_metallic__",this),this._roughness.addInterest("set_roughness__",this),this._metallicRoughnessTexture.addInterest("set_metallicRoughnessTexture__",this),this._occlusionStrength.addInterest("set_occlusionStrength__",this),this._occlusionTexture.addInterest("set_occlusionTexture__",this),this.set_baseColor__(),this.set_baseTexture__(),this.set_metallic__(),this.set_roughness__(),this.set_metallicRoughnessTexture__(),this.set_occlusionStrength__(),this.set_occlusionTexture__(),this.set_transparent__()},set_baseColor__:function(){const e=this.baseColor,t=this._baseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_baseTexture__:function(){this.baseTextureNode&&this.baseTextureNode._transparent.removeInterest("set_transparent__",this),this.baseTextureNode=r(o.X3DSingleTextureNode,this._baseTexture),this.setTexture(this.getTextureIndices().BASE_TEXTURE,this.baseTextureNode),this.baseTextureNode&&this.baseTextureNode._transparent.addInterest("set_transparent__",this)},set_metallic__:function(){this.metallic=s.clamp(this._metallic.getValue(),0,1)},set_roughness__:function(){this.roughness=s.clamp(this._roughness.getValue(),0,1)},set_metallicRoughnessTexture__:function(){this.metallicRoughnessTextureNode=r(o.X3DSingleTextureNode,this._metallicRoughnessTexture),this.setTexture(this.getTextureIndices().METALLIC_ROUGHNESS_TEXTURE,this.metallicRoughnessTextureNode)},set_occlusionStrength__:function(){this.occlusionStrength=s.clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__:function(){this.occlusionTextureNode=r(o.X3DSingleTextureNode,this._occlusionTexture),this.setTexture(this.getTextureIndices().OCCLUSION_TEXTURE,this.occlusionTextureNode)},set_transparent__:function(){this.setTransparent(Boolean(this.getTransparency()||this.baseTextureNode&&this.baseTextureNode.getTransparent()))},set_textures__:function(){const e=this.getBrowser();if(this.getTextures()){const t=["X3D_MATERIAL_TEXTURES"];this.baseTextureNode&&t.push("X3D_BASE_TEXTURE","X3D_BASE_TEXTURE_"+this.baseTextureNode.getTextureTypeString()),this.getEmissiveTexture()&&t.push("X3D_EMISSIVE_TEXTURE","X3D_EMISSIVE_TEXTURE_"+this.getEmissiveTexture().getTextureTypeString()),this.metallicRoughnessTextureNode&&t.push("X3D_METALLIC_ROUGHNESS_TEXTURE","X3D_METALLIC_ROUGHNESS_TEXTURE_"+this.metallicRoughnessTextureNode.getTextureTypeString()),this.occlusionTextureNode&&t.push("X3D_OCCLUSION_TEXTURE","X3D_OCCLUSION_TEXTURE_"+this.occlusionTextureNode.getTextureTypeString()),this.getNormalTexture()&&t.push("X3D_NORMAL_TEXTURE","X3D_NORMAL_TEXTURE_"+this.getNormalTexture().getTextureTypeString());const i=e.createShader("PhysicalMaterialTexturesShader","PBR",t);i._isValid.addInterest("set_shader__",this,i)}else this.shaderNode=e.getPhysicalMaterialShader()},set_shader__:function(e){e._isValid.removeInterest("set_shader__",this),this.shaderNode=e},getTextureIndices:function(){const e={BASE_TEXTURE:0,EMISSIVE_TEXTURE:1,METALLIC_ROUGHNESS_TEXTURE:2,OCCLUSION_TEXTURE:3,NORMAL_TEXTURE:4};return function(){return e}}(),getShader:function(e,t){return this.shaderNode},setShaderUniforms:function(e,t,i,r,o){if(n.prototype.setShaderUniforms.call(this,e,t,i,r,o),e.uniform3fv(t.x3d_BaseColor,this.baseColor),e.uniform1f(t.x3d_Metallic,this.metallic),e.uniform1f(t.x3d_Roughness,this.roughness),this.getTextures()){const n=t.x3d_BaseTexture,s=t.x3d_MetallicRoughnessTexture,a=t.x3d_OcclusionTexture;this.baseTextureNode&&(this.baseTextureNode.setShaderUniformsToChannel(e,t,i,n),e.uniform1i(n.textureTransformMapping,r.get(this._baseTextureMapping.getValue())||0),e.uniform1i(n.textureCoordinateMapping,o.get(this._baseTextureMapping.getValue())||0)),this.metallicRoughnessTextureNode&&(this.metallicRoughnessTextureNode.setShaderUniformsToChannel(e,t,i,s),e.uniform1i(s.textureTransformMapping,r.get(this._metallicRoughnessTextureMapping.getValue())||0),e.uniform1i(s.textureCoordinateMapping,o.get(this._metallicRoughnessTextureMapping.getValue())||0)),this.occlusionTextureNode&&(e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode.setShaderUniformsToChannel(e,t,i,a),e.uniform1i(a.textureTransformMapping,r.get(this._occlusionTextureMapping.getValue())||0),e.uniform1i(a.textureCoordinateMapping,o.get(this._occlusionTextureMapping.getValue())||0))}}}),a})),define("x_ite/Components/Shape/TwoSidedMaterial",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Shape/X3DMaterialNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.TwoSidedMaterial),this.diffuseColor=new Float32Array(3),this.specularColor=new Float32Array(3),this.emissiveColor=new Float32Array(3),this.backDiffuseColor=new Float32Array(3),this.backSpecularColor=new Float32Array(3),this.backEmissiveColor=new Float32Array(3)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"separateBackColor",new e.SFBool),new t(r.inputOutput,"ambientIntensity",new e.SFFloat(.2)),new t(r.inputOutput,"diffuseColor",new e.SFColor(.8,.8,.8)),new t(r.inputOutput,"specularColor",new e.SFColor),new t(r.inputOutput,"emissiveColor",new e.SFColor),new t(r.inputOutput,"shininess",new e.SFFloat(.2)),new t(r.inputOutput,"transparency",new e.SFFloat),new t(r.inputOutput,"backAmbientIntensity",new e.SFFloat(.2)),new t(r.inputOutput,"backDiffuseColor",new e.SFColor(.8,.8,.8)),new t(r.inputOutput,"backSpecularColor",new e.SFColor),new t(r.inputOutput,"backEmissiveColor",new e.SFColor),new t(r.inputOutput,"backShininess",new e.SFFloat(.2)),new t(r.inputOutput,"backTransparency",new e.SFFloat)]),getTypeName:function(){return"TwoSidedMaterial"},getComponentName:function(){return"Shape"},getContainerField:function(){return"material"},initialize:function(){n.prototype.initialize.call(this),this._ambientIntensity.addInterest("set_ambientIntensity__",this),this._diffuseColor.addInterest("set_diffuseColor__",this),this._specularColor.addInterest("set_specularColor__",this),this._emissiveColor.addInterest("set_emissiveColor__",this),this._shininess.addInterest("set_shininess__",this),this._transparency.addInterest("set_transparency__",this),this._backAmbientIntensity.addInterest("set_backAmbientIntensity__",this),this._backDiffuseColor.addInterest("set_backDiffuseColor__",this),this._backSpecularColor.addInterest("set_backSpecularColor__",this),this._backEmissiveColor.addInterest("set_backEmissiveColor__",this),this._backShininess.addInterest("set_backShininess__",this),this._backTransparency.addInterest("set_backTransparency__",this),this._separateBackColor.addInterest("set_transparent__",this),this._transparency.addInterest("set_transparent__",this),this._backTransparency.addInterest("set_transparent__",this),this.set_ambientIntensity__(),this.set_diffuseColor__(),this.set_specularColor__(),this.set_emissiveColor__(),this.set_shininess__(),this.set_transparency__(),this.set_backAmbientIntensity__(),this.set_backDiffuseColor__(),this.set_backSpecularColor__(),this.set_backEmissiveColor__(),this.set_backShininess__(),this.set_backTransparency__(),this.set_transparent__()},set_ambientIntensity__:function(){this.ambientIntensity=Math.max(this._ambientIntensity.getValue(),0)},set_diffuseColor__:function(){const e=this.diffuseColor,t=this._diffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_specularColor__:function(){const e=this.specularColor,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_emissiveColor__:function(){const e=this.emissiveColor,t=this._emissiveColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_shininess__:function(){this.shininess=o.clamp(this._shininess.getValue(),0,1)},set_transparency__:function(){this.transparency=o.clamp(this._transparency.getValue(),0,1)},set_backAmbientIntensity__:function(){this.backAmbientIntensity=Math.max(this._backAmbientIntensity.getValue(),0)},set_backDiffuseColor__:function(){const e=this.backDiffuseColor,t=this._backDiffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_backSpecularColor__:function(){const e=this.backSpecularColor,t=this._backSpecularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_backEmissiveColor__:function(){const e=this.backEmissiveColor,t=this._backEmissiveColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_backShininess__:function(){this.backShininess=o.clamp(this._backShininess.getValue(),0,1)},set_backTransparency__:function(){this.backTransparency=o.clamp(this._backTransparency.getValue(),0,1)},set_transparent__:function(){this.setTransparent(Boolean(this._transparency.getValue()||this._separateBackColor.getValue()&&this._backTransparency.getValue()))},getShader:function(e,t){return t?e.getShadowShader():e.getDefaultShader()},setShaderUniforms:function(e,t,i,n,r,o){!o&&this._separateBackColor.getValue()?(e.uniform1f(t.x3d_AmbientIntensity,this.backAmbientIntensity),e.uniform3fv(t.x3d_DiffuseColor,this.backDiffuseColor),e.uniform3fv(t.x3d_SpecularColor,this.backSpecularColor),e.uniform3fv(t.x3d_EmissiveColor,this.backEmissiveColor),e.uniform1f(t.x3d_Shininess,this.backShininess),e.uniform1f(t.x3d_Transparency,this.backTransparency)):(e.uniform1f(t.x3d_AmbientIntensity,this.ambientIntensity),e.uniform3fv(t.x3d_DiffuseColor,this.diffuseColor),e.uniform3fv(t.x3d_SpecularColor,this.specularColor),e.uniform3fv(t.x3d_EmissiveColor,this.emissiveColor),e.uniform1f(t.x3d_Shininess,this.shininess),e.uniform1f(t.x3d_Transparency,this.transparency))}}),s})),define("x_ite/Components/Shape",["x_ite/Configuration/SupportedNodes","x_ite/Components/Shape/AcousticProperties","x_ite/Components/Shape/Appearance","x_ite/Components/Shape/FillProperties","x_ite/Components/Shape/LineProperties","x_ite/Components/Shape/Material","x_ite/Components/Shape/PhysicalMaterial","x_ite/Components/Shape/PointProperties","x_ite/Components/Shape/Shape","x_ite/Components/Shape/TwoSidedMaterial","x_ite/Components/Shape/UnlitMaterial","x_ite/Components/Shape/X3DAppearanceChildNode","x_ite/Components/Shape/X3DAppearanceNode","x_ite/Components/Shape/X3DMaterialNode","x_ite/Components/Shape/X3DOneSidedMaterialNode","x_ite/Components/Shape/X3DShapeNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g){"use strict";const m={AcousticProperties:t,Appearance:i,FillProperties:n,LineProperties:r,Material:o,PhysicalMaterial:s,PointProperties:a,Shape:u,TwoSidedMaterial:l,UnlitMaterial:c},_={X3DAppearanceChildNode:h,X3DAppearanceNode:d,X3DMaterialNode:p,X3DOneSidedMaterialNode:f,X3DShapeNode:g};for(const t in m)e.addType(t,m[t]);for(const t in _)e.addAbstractType(t,_[t])})),define("x_ite/Components/Sound/X3DSoundSourceNode",["x_ite/Fields","x_ite/Components/Core/X3DChildNode","x_ite/Components/Time/X3DTimeDependentNode","x_ite/Base/X3DConstants","standard/Math/Algorithm"],(function(e,t,i,n,r){"use strict";function o(e){t.call(this,e),i.call(this,e),this.addType(n.X3DSoundSourceNode),this.volume=0,this.media=null}return o.prototype=Object.assign(Object.create(t.prototype),i.prototype,{constructor:o,initialize:function(){t.prototype.initialize.call(this),i.prototype.initialize.call(this)},set_live__:function(){i.prototype.set_live__.call(this),this.getDisabled()?(this.getBrowser()._volume.removeInterest("set_volume__",this),this.getBrowser()._mute.removeInterest("set_volume__",this)):(this.getBrowser()._volume.addInterest("set_volume__",this),this.getBrowser()._mute.addInterest("set_volume__",this),this.set_volume__())},setMedia:function(e){if(this.media&&(this.media[0].volume=0,this.media[0].pause()),this.media=e,e){const t=e[0];t.loop=this._loop.getValue(),this.setVolume(0),this._duration_changed=t.duration,this.resetElapsedTime(),this._isActive.getValue()?this._isPaused.getValue()?this.set_pause():this.getLiveState()?this.set_start():this.set_pause():this.set_stop()}},getMedia:function(){return this.media},setVolume:function(e){this.volume=r.clamp(e,0,1),this.set_volume__()},set_loop:function(){this.media&&(this.media[0].loop=this._loop.getValue())},set_volume__:function(){if(!this.media)return;const e=!this.getBrowser()._mute.getValue()*r.clamp(this.getBrowser()._volume.getValue(),0,1)*this.volume;this.media[0].volume=e},set_speed:function(){},set_pitch:function(){},set_start:function(){this.media&&this._speed.getValue()&&(this.media[0].currentTime=0,this.media[0].play())},set_pause:function(){this.media&&this.media[0].pause()},set_resume:function(){this.media&&this._speed.getValue()&&this.media[0].play()},set_stop:function(){this.media&&this.media[0].pause()},set_ended:function(){if(this.media){const e=this.media[0];if(e.currentTime<e.duration)return;this._loop.getValue()||this.stop()}},set_time:function(){this.media&&(this._elapsedTime=this.getElapsedTime()),this.set_ended()}}),o})),define("x_ite/Components/Sound/AudioClip",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Sound/X3DSoundSourceNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a){"use strict";function u(i){r.call(this,i),o.call(this,i),this.addType(s.AudioClip),this.addChildObjects("speed",new t.SFFloat(1)),this.audio=e("<audio></audio>"),this.urlStack=new t.MFString}return u.prototype=Object.assign(Object.create(r.prototype),o.prototype,{constructor:u,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(s.inputOutput,"metadata",new t.SFNode),new i(s.inputOutput,"description",new t.SFString),new i(s.inputOutput,"enabled",new t.SFBool(!0)),new i(s.inputOutput,"load",new t.SFBool(!0)),new i(s.inputOutput,"url",new t.MFString),new i(s.inputOutput,"autoRefresh",new t.SFTime),new i(s.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(s.inputOutput,"gain",new t.SFFloat(1)),new i(s.inputOutput,"pitch",new t.SFFloat(1)),new i(s.inputOutput,"loop",new t.SFBool),new i(s.inputOutput,"startTime",new t.SFTime),new i(s.inputOutput,"resumeTime",new t.SFTime),new i(s.inputOutput,"pauseTime",new t.SFTime),new i(s.inputOutput,"stopTime",new t.SFTime),new i(s.outputOnly,"isPaused",new t.SFBool),new i(s.outputOnly,"isActive",new t.SFBool),new i(s.outputOnly,"elapsedTime",new t.SFTime),new i(s.outputOnly,"duration_changed",new t.SFTime(-1))]),getTypeName:function(){return"AudioClip"},getComponentName:function(){return"Sound"},getContainerField:function(){return"source"},initialize:function(){r.prototype.initialize.call(this),o.prototype.initialize.call(this),this.audio.on("error",this.setError.bind(this)),this.audio[0].preload="auto",this.audio[0].volume=0,this.audio[0].crossOrigin="Anonymous",this.requestImmediateLoad()},getElement:function(){return this.audio[0]},set_live__:function(){r.prototype.set_live__.call(this),o.prototype.set_live__.call(this)},unloadNow:function(){this.setMedia(null)},loadNow:function(){this.setMedia(null),this.urlStack.setValue(this._url),this.audio.bind("canplaythrough",this.setAudio.bind(this)),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.audio.unbind("canplaythrough"),this._duration_changed=-1,void this.setLoadState(s.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.audio.attr("src",this.URL.href),this.audio.get(0).load()},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading audio:",decodeURI(this.URL.href)),this.loadNext()},setAudio:function(){a&&"data:"!==this.URL.protocol&&console.info("Done loading audio:",decodeURI(this.URL.href)),this.audio.unbind("canplaythrough"),this.setMedia(this.audio),this.setLoadState(s.COMPLETE_STATE)}}),u})),define("x_ite/Components/Sound/X3DSoundNode",["x_ite/Components/Core/X3DChildNode","x_ite/Base/X3DConstants"],(function(e,t){"use strict";function i(i){e.call(this,i),this.addType(t.X3DSoundNode)}return i.prototype=Object.assign(Object.create(e.prototype),{constructor:i}),i})),define("x_ite/Components/Sound/Sound",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Sound/X3DSoundNode","x_ite/Base/X3DCast","x_ite/Rendering/TraverseType","x_ite/Base/X3DConstants","standard/Math/Numbers/Vector3","standard/Math/Numbers/Rotation4","standard/Math/Numbers/Matrix4","standard/Math/Geometry/Line3","standard/Math/Geometry/Sphere3","standard/Math/Algorithm"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d){"use strict";function p(t){n.call(this,t),this.addType(s.Sound),this.addChildObjects("traversed",new e.SFBool(!0)),this._location.setUnit("length"),this._minBack.setUnit("length"),this._minFront.setUnit("length"),this._maxBack.setUnit("length"),this._maxFront.setUnit("length"),this.currentTraversed=!0}return p.prototype=Object.assign(Object.create(n.prototype),{constructor:p,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(s.inputOutput,"metadata",new e.SFNode),new t(s.inputOutput,"intensity",new e.SFFloat(1)),new t(s.initializeOnly,"spatialize",new e.SFBool(!0)),new t(s.inputOutput,"location",new e.SFVec3f),new t(s.inputOutput,"direction",new e.SFVec3f(0,0,1)),new t(s.inputOutput,"minBack",new e.SFFloat(1)),new t(s.inputOutput,"minFront",new e.SFFloat(1)),new t(s.inputOutput,"maxBack",new e.SFFloat(10)),new t(s.inputOutput,"maxFront",new e.SFFloat(10)),new t(s.inputOutput,"priority",new e.SFFloat),new t(s.inputOutput,"source",new e.SFNode)]),getTypeName:function(){return"Sound"},getComponentName:function(){return"Sound"},getContainerField:function(){return"children"},initialize:function(){n.prototype.initialize.call(this),this.isLive().addInterest("set_live__",this),this._traversed.addInterest("set_live__",this),this._source.addInterest("set_source__",this),this.set_live__(),this.set_source__()},setTraversed:function(e){e?!1===this._traversed.getValue()&&(this._traversed=!0):this.currentTraversed!==this._traversed.getValue()&&(this._traversed=this.currentTraversed),this.currentTraversed=e},getTraversed:function(){return this.currentTraversed},set_live__:function(){this.isLive().getValue()&&this._traversed.getValue()?this.getBrowser().sensorEvents().addInterest("update",this):this.getBrowser().sensorEvents().removeInterest("update",this)},set_source__:function(){this.sourceNode&&this.sourceNode.setVolume(0),this.sourceNode=r(s.X3DSoundSourceNode,this._source)},update:function(){this.getTraversed()||this.sourceNode&&this.sourceNode.setVolume(0),this.setTraversed(!1)},traverse:function(){const e={distance:0,intersection:new a(0,0,0)},t={distance:0,intersection:new a(0,0,0)};return function(i,n){try{if(i!==o.DISPLAY)return;if(!this.sourceNode)return;if(!this.sourceNode._isActive.getValue()||this.sourceNode._isPaused.getValue())return;this.setTraversed(!0);const r=n.getModelViewMatrix().get();if(this.getEllipsoidParameter(r,Math.max(this._maxBack.getValue(),0),Math.max(this._maxFront.getValue(),0),t),t.distance<1)if(this.getEllipsoidParameter(r,Math.max(this._minBack.getValue(),0),Math.max(this._minFront.getValue(),0),e),e.distance<1)this.sourceNode.setVolume(this._intensity.getValue());else{const i=t.intersection.abs(),n=t.intersection.distance(e.intersection),r=Math.min(i/n,1),o=d.clamp(this._intensity.getValue(),0,1)*r;this.sourceNode.setVolume(o)}else this.sourceNode.setVolume(0)}catch(e){this.sourceNode&&this.sourceNode.setVolume(0)}}}(),getEllipsoidParameter:function(){const e=new a(0,0,0),t=new l,i=new l,n=new u,r=new a(1,1,1),o=new h(1,a.Zero),s=new a(0,0,0),d=new c(a.Zero,a.zAxis),p=new a(0,0,0),f=new a(0,0,0);return function(u,l,c,h){if(0==l||0==c)return t.multVecMatrix(h.intersection.assign(this._location.getValue())),void(h.distance=1);const g=(l+c)/2,m=g-l,_=Math.sqrt(g*g-m*m);e.set(0,0,m),r.set(_,_,g),n.setFromToVec(a.zAxis,this._direction.getValue()),t.assign(u).translate(this._location.getValue()).rotate(n).translate(e).scale(r),i.assign(t).inverse();const y=i.origin;e.negate().divVec(r),s.assign(e).subtract(y).normalize(),d.set(y,s),o.intersectsLine(d,p,f),h.intersection.assign(t.multVecMatrix(p)),h.distance=y.abs()}}()}),p})),define("x_ite/Components/Sound",["x_ite/Configuration/SupportedNodes","x_ite/Components/Sound/AudioClip","x_ite/Components/Sound/Sound","x_ite/Components/Sound/X3DSoundNode","x_ite/Components/Sound/X3DSoundSourceNode"],(function(e,t,i,n,r){"use strict";const o={AudioClip:t,Sound:i},s={X3DSoundNode:n,X3DSoundSourceNode:r};for(const t in o)e.addType(t,o[t]);for(const t in s)e.addAbstractType(t,s[t])})),define("x_ite/Components/Text/Text",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Rendering/X3DGeometryNode","x_ite/Base/X3DCast","x_ite/Base/X3DConstants"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(o.Text),this._length.setUnit("length"),this._maxExtent.setUnit("length"),this._origin.setUnit("length"),this._textBounds.setUnit("length"),this._lineBounds.setUnit("length")}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(o.inputOutput,"metadata",new e.SFNode),new t(o.inputOutput,"string",new e.MFString),new t(o.inputOutput,"length",new e.MFFloat),new t(o.inputOutput,"maxExtent",new e.SFFloat),new t(o.initializeOnly,"solid",new e.SFBool),new t(o.outputOnly,"origin",new e.SFVec3f),new t(o.outputOnly,"textBounds",new e.SFVec2f),new t(o.outputOnly,"lineBounds",new e.MFVec2f),new t(o.inputOutput,"fontStyle",new e.SFNode)]),getTypeName:function(){return"Text"},getComponentName:function(){return"Text"},getContainerField:function(){return"geometry"},initialize:function(){n.prototype.initialize.call(this),this._fontStyle.addInterest("set_fontStyle__",this),this.set_fontStyle__()},getMatrix:function(){return this.textGeometry.getMatrix()},getLength:function(e){return e<this._length.length?Math.max(0,this._length[e]):0},set_live__:function(){n.prototype.set_live__.call(this),this.isLive().getValue()?this.getBrowser().getBrowserOptions()._PrimitiveQuality.addInterest("requestRebuild",this):this.getBrowser().getBrowserOptions()._PrimitiveQuality.removeInterest("requestRebuild",this)},set_fontStyle__:function(){this.fontStyleNode&&this.fontStyleNode.removeInterest("requestRebuild",this),this.fontStyleNode=r(o.X3DFontStyleNode,this._fontStyle),this.fontStyleNode||(this.fontStyleNode=this.getBrowser().getDefaultFontStyle()),this.fontStyleNode.addInterest("requestRebuild",this),this.textGeometry=this.fontStyleNode.getTextGeometry(this),this.setTransparent(this.textGeometry.getTransparent())},build:function(){this.textGeometry.update(),this.textGeometry.build(),this.setSolid(this._solid.getValue())},traverse:function(e,t){try{this.textGeometry.traverse(e,t),n.prototype.traverse.call(this,e,t)}catch(e){console.error(e)}},display:function(e,t){try{this.textGeometry.display(e,t),n.prototype.display.call(this,e,t)}catch(e){console.error(e)}},transformLine:function(e){return this.textGeometry.transformLine(e)},transformMatrix:function(e){return this.textGeometry.transformMatrix(e)}}),s})),define("x_ite/Components/Text",["x_ite/Configuration/SupportedNodes","x_ite/Components/Text/FontStyle","x_ite/Components/Text/Text","x_ite/Components/Text/X3DFontStyleNode"],(function(e,t,i,n){"use strict";const r={FontStyle:t,Text:i},o={X3DFontStyleNode:n};for(const t in r)e.addType(t,r[t]);for(const t in o)e.addAbstractType(t,o[t])})),define("x_ite/Components/Texturing/MovieTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Components/Sound/X3DSoundSourceNode","x_ite/Components/Networking/X3DUrlObject","x_ite/Base/X3DConstants","standard/Math/Algorithm","x_ite/DEBUG"],(function(e,t,i,n,r,o,s,a,u,l){"use strict";function c(i){r.call(this,i),o.call(this,i),s.call(this,i),this.addType(a.MovieTexture),this.canvas=e("<canvas></canvas>"),this.video=e("<video></video>"),this.urlStack=new t.MFString}return c.prototype=Object.assign(Object.create(r.prototype),o.prototype,s.prototype,{constructor:c,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(a.inputOutput,"metadata",new t.SFNode),new i(a.inputOutput,"description",new t.SFString),new i(a.inputOutput,"enabled",new t.SFBool(!0)),new i(a.inputOutput,"load",new t.SFBool(!0)),new i(a.inputOutput,"url",new t.MFString),new i(a.inputOutput,"autoRefresh",new t.SFTime),new i(a.inputOutput,"autoRefreshTimeLimit",new t.SFTime(3600)),new i(a.inputOutput,"gain",new t.SFFloat(1)),new i(a.inputOutput,"speed",new t.SFFloat(1)),new i(a.inputOutput,"pitch",new t.SFFloat(1)),new i(a.inputOutput,"loop",new t.SFBool),new i(a.inputOutput,"startTime",new t.SFTime),new i(a.inputOutput,"resumeTime",new t.SFTime),new i(a.inputOutput,"pauseTime",new t.SFTime),new i(a.inputOutput,"stopTime",new t.SFTime),new i(a.outputOnly,"isPaused",new t.SFBool),new i(a.outputOnly,"isActive",new t.SFBool),new i(a.outputOnly,"elapsedTime",new t.SFTime),new i(a.outputOnly,"duration_changed",new t.SFTime(-1)),new i(a.initializeOnly,"repeatS",new t.SFBool(!0)),new i(a.initializeOnly,"repeatT",new t.SFBool(!0)),new i(a.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"MovieTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),o.prototype.initialize.call(this),s.prototype.initialize.call(this),this.video.on("error",this.setError.bind(this)),this.video[0].preload="auto",this.video[0].volume=0,this.video[0].crossOrigin="Anonymous",this.requestImmediateLoad()},getElement:function(){return this.video[0]},set_live__:function(){o.prototype.set_live__.call(this),s.prototype.set_live__.call(this)},unloadNow:function(){this.clearTexture()},loadNow:function(){this.setMedia(null),this.urlStack.setValue(this._url),this.video.bind("canplaythrough",this.setVideo.bind(this)),this.loadNext()},loadNext:function(){if(0===this.urlStack.length)return this.video.unbind("canplaythrough"),this._duration_changed=-1,this.clearTexture(),void this.setLoadState(a.FAILED_STATE);this.URL=new URL(this.urlStack.shift(),this.getExecutionContext().getWorldURL()),"data:"!==this.URL.protocol&&(this.getBrowser().getBrowserOptions().getCache()&&this.getCache()||this.URL.searchParams.set("_",Date.now())),this.video.attr("src",this.URL.href),this.video.get(0).load()},setError:function(){"data:"!==this.URL.protocol&&console.warn("Error loading movie:",decodeURI(this.URL.href)),this.loadNext()},setVideo:function(){l&&"data:"!==this.URL.protocol&&console.info("Done loading movie:",decodeURI(this.URL.href));try{this.video.unbind("canplaythrough");const e=this.video[0],t=e.videoWidth,i=e.videoHeight,n=this.canvas[0],r=n.getContext("2d");if(!u.isPowerOfTwo(t)||!u.isPowerOfTwo(i))throw new Error("The movie texture is a non power-of-two texture.");n.width=t,n.height=i,r.drawImage(e,0,0);const o=r.getImageData(0,0,t,i).data;this.setMedia(this.video),this.setTexture(t,i,!1,new Uint8Array(o.buffer),!0),this.setLoadState(a.COMPLETE_STATE)}catch(e){console.log(e.message),this.setError()}},set_time:function(){o.prototype.set_time.call(this),this.checkLoadState()===a.COMPLETE_STATE&&this.updateTexture(this.getMedia()[0],!0)},traverse:r.prototype.traverse}),c})),define("x_ite/Components/Texturing/MultiTexture",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTextureNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast","x_ite/Browser/Texturing/MultiTextureModeType","x_ite/Browser/Texturing/MultiTextureSourceType","x_ite/Browser/Texturing/MultiTextureFunctionType"],(function(e,t,i,n,r,o,s,a,u){"use strict";function l(t){n.call(this,t),this.addType(r.MultiTexture),this.addChildObjects("loadState",new e.SFInt32(r.NOT_STARTED_STATE)),this.color=new Float32Array(4),this.modes=[],this.alphaModes=[],this.sources=[],this.functions=[],this.textureNodes=[]}return l.prototype=Object.assign(Object.create(n.prototype),{constructor:l,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"description",new e.SFString),new t(r.inputOutput,"color",new e.SFColor(1,1,1)),new t(r.inputOutput,"alpha",new e.SFFloat(1)),new t(r.inputOutput,"mode",new e.MFString),new t(r.inputOutput,"source",new e.MFString),new t(r.inputOutput,"function",new e.MFString),new t(r.inputOutput,"texture",new e.MFNode)]),getTypeName:function(){return"MultiTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){n.prototype.initialize.call(this),this._color.addInterest("set_color__",this),this._alpha.addInterest("set_alpha__",this),this._mode.addInterest("set_mode__",this),this._source.addInterest("set_source__",this),this._function.addInterest("set_function__",this),this._texture.addInterest("set_texture__",this),this.set_color__(),this.set_alpha__(),this.set_mode__(),this.set_source__(),this.set_function__(),this.set_texture__(),this._loadState=r.COMPLETE_STATE},getMode:function(e){return e<this.modes.length?this.modes[e]:s.MODULATE},getAlphaMode:function(e){return e<this.alphaModes.length?this.alphaModes[e]:s.MODULATE},getSource:function(e){return e<this.sources.length?this.sources[e]:a.DEFAULT},getFunction:function(e){return e<this.functions.length?this.functions[e]:u.DEFAULT},set_color__:function(){this.color[0]=this._color.r,this.color[1]=this._color.g,this.color[2]=this._color.b},set_alpha__:function(){this.color[3]=this._alpha},set_mode__:function(){const e=new Map([["REPLACE",s.REPLACE],["MODULATE",s.MODULATE],["MODULATE2X",s.MODULATE2X],["MODULATE4X",s.MODULATE4X],["ADD",s.ADD],["ADDSIGNED",s.ADDSIGNED],["ADDSIGNED2X",s.ADDSIGNED2X],["ADDSMOOTH",s.ADDSMOOTH],["SUBTRACT",s.SUBTRACT],["BLENDDIFFUSEALPHA",s.BLENDDIFFUSEALPHA],["BLENDTEXTUREALPHA",s.BLENDTEXTUREALPHA],["BLENDFACTORALPHA",s.BLENDFACTORALPHA],["BLENDCURRENTALPHA",s.BLENDCURRENTALPHA],["MODULATEALPHA_ADDCOLOR",s.MODULATEALPHA_ADDCOLOR],["MODULATEINVALPHA_ADDCOLOR",s.MODULATEINVALPHA_ADDCOLOR],["MODULATEINVCOLOR_ADDALPHA",s.MODULATEINVCOLOR_ADDALPHA],["DOTPRODUCT3",s.DOTPRODUCT3],["SELECTARG1",s.SELECTARG1],["SELECTARG2",s.SELECTARG2],["OFF",s.OFF]]);return function(){this.modes.length=0,this.alphaModes.length=0;for(const t of this._mode){const i=t.split(",");for(let e=0,t=i.length;e<t;++e)i[e]=i[e].trim();0===i.length&&i.push("MODULATE"),i.length<2&&i.push(i[0]);const n=e.get(i[0]);void 0!==n?this.modes.push(n):this.modes.push(s.MODULATE);const r=e.get(i[1]);void 0!==r?this.alphaModes.push(r):this.alphaModes.push(s.MODULATE)}}}(),set_source__:function(){const e=new Map([["DIFFUSE",a.DIFFUSE],["SPECULAR",a.SPECULAR],["FACTOR",a.FACTOR]]);return function(){this.sources.length=0;for(const t of this._source){const i=e.get(t);void 0!==i?this.sources.push(i):this.sources.push(a.DEFAULT)}}}(),set_function__:function(){const e=new Map([["COMPLEMENT",u.COMPLEMENT],["ALPHAREPLICATE",u.ALPHAREPLICATE]]);return function(){this.functions.length=0;for(const t of this._function){const i=e.get(t);void 0!==i?this.functions.push(i):this.functions.push(u.DEFAULT)}}}(),set_texture__:function(){this.textureNodes.length=0;for(const e of this._texture){const t=o(r.X3DSingleTextureNode,e);t&&this.textureNodes.push(t)}},traverse:function(e,t){for(const i of this.textureNodes)i.traverse(e,t)},setShaderUniforms:function(e,t,i){const n=this.textureNodes,r=Math.min(t.getBrowser().getMaxTextures(),n.length);e.uniform1i(t.x3d_NumTextures,r),e.uniform4fv(t.x3d_MultiTextureColor,this.color);for(let o=0;o<r;++o)n[o].setShaderUniformsToChannel(e,t,i,t.x3d_Textures[o]),e.uniform1i(t.x3d_MultiTextureMode[o],this.getMode(o)),e.uniform1i(t.x3d_MultiTextureAlphaMode[o],this.getAlphaMode(o)),e.uniform1i(t.x3d_MultiTextureSource[o],this.getSource(o)),e.uniform1i(t.x3d_MultiTextureFunction[o],this.getFunction(o))}}),l})),define("x_ite/Components/Texturing/MultiTextureCoordinate",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTextureCoordinateNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.MultiTextureCoordinate),this.textureCoordinateNodes=[]}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"texCoord",new e.MFNode)]),getTypeName:function(){return"MultiTextureCoordinate"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texCoord"},initialize:function(){n.prototype.initialize.call(this),this._texCoord.addInterest("set_texCoord__",this),this.set_texCoord__()},set_texCoord__:function(){const e=this.textureCoordinateNodes;for(const t of e)t.removeInterest("addNodeEvent",this);e.length=0;for(const t of this._texCoord){const i=o(r.X3DSingleTextureCoordinateNode,t);i&&e.push(i)}for(const t of e)t.addInterest("addNodeEvent",this)},isEmpty:function(){return!0},getSize:function(){return 0},get1Point:function(e,t){for(const i of this.textureCoordinateNodes)return i.get1Point(e,t);return t.set(0,0,0,1)},init:function(e){for(const t of this.textureCoordinateNodes)t.init(e)},addTexCoord:function(e,t){const i=this.textureCoordinateNodes;for(let n=0,r=i.length;n<r;++n)i[n].addTexCoordToChannel(e,t[n])},addTexCoordToChannel:function(e,t){},getTexCoord:function(e){for(const t of this.textureCoordinateNodes)return t.getTexCoord(e);return e},getTextureMapping:function(e){const t=this.textureCoordinateNodes,i=Math.min(this.getBrowser().getMaxTextures(),t.length);for(let n=0;n<i;++n)t[n].getTextureMapping(e,n)},setShaderUniforms:function(e,t){const i=this.textureCoordinateNodes,n=Math.min(t.x3d_MaxTextures,i.length);for(let r=0;r<n;++r)i[r].setShaderUniformsToChannel(e,t,r);const r=n?i.at(-1):this;for(let i=n,o=t.x3d_MaxTextures;i<o;++i)r.setShaderUniformsToChannel(e,t,i)}}),s})),define("x_ite/Components/Texturing/MultiTextureTransform",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTextureTransformNode","x_ite/Base/X3DConstants","x_ite/Base/X3DCast"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.MultiTextureTransform),this.textureTransformNodes=[]}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"textureTransform",new e.MFNode)]),getTypeName:function(){return"MultiTextureTransform"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"textureTransform"},initialize:function(){n.prototype.initialize.call(this),this._textureTransform.addInterest("set_textureTransform__",this),this.set_textureTransform__()},set_textureTransform__:function(){const e=this.textureTransformNodes;e.length=0;for(const t of this._textureTransform){const i=o(r.X3DSingleTextureTransformNode,t);i&&e.push(i)}},getTextureMapping:function(e){const t=this.textureTransformNodes,i=Math.min(this.getBrowser().getMaxTextures(),t.length);for(let n=0;n<i;++n)t[n].getTextureMapping(e,n)},setShaderUniforms:function(e,t){const i=this.textureTransformNodes,n=Math.min(t.x3d_MaxTextures,i.length);for(let r=0;r<n;++r)i[r].setShaderUniformsToChannel(e,t,r);const r=n?i.at(-1):this;for(let i=n,o=t.x3d_MaxTextures;i<o;++i)r.setShaderUniformsToChannel(e,t,i)}}),s})),define("x_ite/Components/Texturing/PixelTexture",["jquery","x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Base/X3DConstants","standard/Math/Algorithm","standard/Math/Numbers/Vector3","standard/Math/Numbers/Matrix3"],(function(e,t,i,n,r,o,s){"use strict";function a(e){r.call(this,e),this.addType(o.PixelTexture),this.addChildObjects("loadState",new t.SFInt32(o.NOT_STARTED_STATE))}return a.prototype=Object.assign(Object.create(r.prototype),{constructor:a,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new n([new i(o.inputOutput,"metadata",new t.SFNode),new i(o.inputOutput,"description",new t.SFString),new i(o.inputOutput,"image",new t.SFImage(0,0,0,new t.MFInt32)),new i(o.initializeOnly,"repeatS",new t.SFBool(!0)),new i(o.initializeOnly,"repeatT",new t.SFBool(!0)),new i(o.initializeOnly,"textureProperties",new t.SFNode)]),getTypeName:function(){return"PixelTexture"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texture"},initialize:function(){r.prototype.initialize.call(this),this._image.addInterest("set_image__",this),this.canvas1=e("<canvas></canvas>"),this.canvas2=e("<canvas></canvas>"),this.set_image__()},checkLoadState:function(){return this._loadState.getValue()},convert:function(e,t,i,n){switch(t){case 1:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=e[r+1]=e[r+2]=255&n,e[r+3]=255}break;case 2:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=e[r+1]=e[r+2]=n>>>8&255,e[r+3]=255&n}break;case 3:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=n>>>16&255,e[r+1]=n>>>8&255,e[r+2]=255&n,e[r+3]=255}break;case 4:for(let t=0,r=0;t<n;++t,r+=4){const n=i[t];e[r]=n>>>24,e[r+1]=n>>>16&255,e[r+2]=n>>>8&255,e[r+3]=255&n}}},resize:function(e,t,i,n,r){const o=new Uint8Array(n*r*4),s=n/t,a=r/i;for(let i=0;i<r;++i){const r=Math.floor(i/a)*t,u=i*n;for(let t=0;t<n;++t){const i=4*(r+Math.floor(t/s)),n=4*(u+t);o[n]=e[i],o[n+1]=e[i+1],o[n+2]=e[i+2],o[n+3]=e[i+3]}}return o},set_image__:function(){const e=this.getBrowser().getContext(),t=this._image.comp,i=this._image.array,n=!(t%2);let r=this._image.width,a=this._image.height,u=null;if(r>0&&a>0&&t>0&&t<5){if(e.getVersion()>=2||s.isPowerOfTwo(r)&&s.isPowerOfTwo(a))u=new Uint8Array(r*a*4),this.convert(u,t,i.getValue(),i.length);else if(Math.max(r,a)<this.getBrowser().getMinTextureSize()&&!this._textureProperties.getValue()){u=new Uint8Array(r*a*4),this.convert(u,t,i.getValue(),i.length);const e=r,n=a;r=4*s.nextPowerOfTwo(e),a=4*s.nextPowerOfTwo(n),u=this.resize(u,e,n,r,a)}else{const e=this.canvas1[0],n=this.canvas2[0],o=e.getContext("2d"),l=n.getContext("2d"),c=o.createImageData(r,a);e.width=r,e.height=a,this.convert(c.data,t,i,i.length),o.putImageData(c,0,0),r=s.nextPowerOfTwo(r),a=s.nextPowerOfTwo(a),n.width=r,n.height=a,l.clearRect(0,0,r,a),l.drawImage(e,0,0,e.width,e.height,0,0,r,a),u=l.getImageData(0,0,r,a).data}this.setTexture(r,a,n,new Uint8Array(u.buffer),!1),this._loadState=o.COMPLETE_STATE}else this.clearTexture(),this._loadState=o.FAILED_STATE}}),a})),define("x_ite/Components/Texturing/TextureCoordinateGenerator",["x_ite/Fields","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Components/Texturing/X3DSingleTextureCoordinateNode","x_ite/Base/X3DConstants","x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType"],(function(e,t,i,n,r,o){"use strict";function s(e){n.call(this,e),this.addType(r.TextureCoordinateGenerator),this.mode=o.SPHERE,this.parameter=new Float32Array(6)}return s.prototype=Object.assign(Object.create(n.prototype),{constructor:s,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new i([new t(r.inputOutput,"metadata",new e.SFNode),new t(r.inputOutput,"mapping",new e.SFString),new t(r.inputOutput,"mode",new e.SFString("SPHERE")),new t(r.inputOutput,"parameter",new e.MFFloat)]),getTypeName:function(){return"TextureCoordinateGenerator"},getComponentName:function(){return"Texturing"},getContainerField:function(){return"texCoord"},initialize:function(){n.prototype.initialize.call(this),this._mode.addInterest("set_mode__",this),this._parameter.addInterest("set_parameter__",this),this.set_mode__(),this.set_parameter__()},set_mode__:function(){const e=new Map([["SPHERE",o.SPHERE],["CAMERASPACENORMAL",o.CAMERASPACENORMAL],["CAMERASPACEPOSITION",o.CAMERASPACEPOSITION],["CAMERASPACEREFLECTIONVECTOR",o.CAMERASPACEREFLECTIONVECTOR],["SPHERE-LOCAL",o.SPHERE_LOCAL],["COORD",o.COORD],["COORD-EYE",o.COORD_EYE],["NOISE",o.NOISE],["NOISE-EYE",o.NOISE_EYE],["SPHERE-REFLECT",o.SPHERE_REFLECT],["SPHERE-REFLECT-LOCAL",o.SPHERE_REFLECT_LOCAL]]);return function(){this.mode=e.get(this._mode.getValue()),void 0===this.mode&&(this.mode=o.SPHERE)}}(),set_parameter__:function(){const e=Math.min(this.parameter.length,this._parameter.length);for(let t=0;t<e;++t)this.parameter[t]=this._parameter[t];this.parameter.fill(0,e)},get1Point:function(e,t){return t},addTexCoordToChannel:function(e,t){t.push(0,0,0,1)},getTexCoord:function(e){return arrray},setShaderUniformsToChannel:function(e,t,i){e.uniform1i(t.x3d_TextureCoordinateGeneratorMode[i],this.mode),e.uniform1fv(t.x3d_TextureCoordinateGeneratorParameter[i],this.parameter)}}),s})),define("x_ite/Components/Texturing",["x_ite/Configuration/SupportedNodes","x_ite/Components/Texturing/ImageTexture","x_ite/Components/Texturing/MovieTexture","x_ite/Components/Texturing/MultiTexture","x_ite/Components/Texturing/MultiTextureCoordinate","x_ite/Components/Texturing/MultiTextureTransform","x_ite/Components/Texturing/PixelTexture","x_ite/Components/Texturing/TextureCoordinate","x_ite/Components/Texturing/TextureCoordinateGenerator","x_ite/Components/Texturing/TextureProperties","x_ite/Components/Texturing/TextureTransform","x_ite/Components/Texturing/X3DSingleTextureCoordinateNode","x_ite/Components/Texturing/X3DSingleTextureNode","x_ite/Components/Texturing/X3DSingleTextureTransformNode","x_ite/Components/Texturing/X3DTexture2DNode","x_ite/Components/Texturing/X3DTextureCoordinateNode","x_ite/Components/Texturing/X3DTextureNode","x_ite/Components/Texturing/X3DTextureTransformNode"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_){"use strict";const y={ImageTexture:t,MovieTexture:i,MultiTexture:n,MultiTextureCoordinate:r,MultiTextureTransform:o,PixelTexture:s,TextureCoordinate:a,TextureCoordinateGenerator:u,TextureProperties:l,TextureTransform:c},x={X3DSingleTextureCoordinateNode:h,X3DSingleTextureNode:d,X3DSingleTextureTransformNode:p,X3DTexture2DNode:f,X3DTextureCoordinateNode:g,X3DTextureNode:m,X3DTextureTransformNode:_};for(const t in y)e.addType(t,y[t]);for(const t in x)e.addAbstractType(t,x[t])})),define("x_ite/Components/Time",["x_ite/Configuration/SupportedNodes","x_ite/Components/Time/TimeSensor","x_ite/Components/Time/X3DTimeDependentNode"],(function(e,t,i){"use strict";const n={TimeSensor:t},r={X3DTimeDependentNode:i};for(const t in n)e.addType(t,n[t]);for(const t in r)e.addAbstractType(t,r[t])})),define("x_ite/Components",["x_ite/DEBUG","x_ite/Browser/X3DBrowserContext","x_ite/Configuration/SupportedNodes","x_ite/Components/Core","x_ite/Components/EnvironmentalEffects","x_ite/Components/EnvironmentalSensor","x_ite/Components/Followers","x_ite/Components/Geometry3D","x_ite/Components/Grouping","x_ite/Components/Interpolation","x_ite/Components/Layering","x_ite/Components/Lighting","x_ite/Components/Navigation","x_ite/Components/Networking","x_ite/Components/PointingDeviceSensor","x_ite/Components/Rendering","x_ite/Components/Shaders","x_ite/Components/Shape","x_ite/Components/Sound","x_ite/Components/Text","x_ite/Components/Texturing","x_ite/Components/Time"],(function(e,t,i){"use strict";function n(){}return n.prototype={addComponent:function(n){if(n.types)for(const e in n.types)i.addType(e,n.types[e]);if(n.abstractTypes)for(const e in n.abstractTypes)i.addAbstractType(e,n.abstractTypes[e]);n.browser&&t.addContext(n.browser),n.name&&e&&console.log("Done loading external component '"+n.name+"'.")}},new n})),define("x_ite/Configuration/ProfileInfo",["x_ite/Base/X3DObject"],(function(e){"use strict";function t(e,t,i,n){this.name=e,this.title=t,this.providerUrl=i,this.components=n}t.prototype=Object.assign(Object.create(e.prototype),{constructor:t,getTypeName:function(){return"ProfileInfo"},toVRMLStream:function(e){e.string+="PROFILE",e.string+=" ",e.string+=this.name},toXMLStream:function(e){e.string+=this.name}});for(const e of Reflect.ownKeys(t.prototype))Object.defineProperty(t.prototype,e,{enumerable:!1});return t})),define("x_ite/Configuration/ProfileInfoArray",["x_ite/Configuration/ComponentInfoArray","x_ite/Configuration/ProfileInfo","x_ite/Base/X3DInfoArray"],(function(e,t,i){"use strict";function n(e){return i.call(this,e)}n.prototype=Object.assign(Object.create(i.prototype),{constructor:n,getTypeName:function(){return"ProfileInfoArray"},addProfile:function(i){this.add(i.name,new t(i.name,i.title,i.providerUrl,new e(i.components)))}});for(const e of Reflect.ownKeys(n.prototype))Object.defineProperty(n.prototype,e,{enumerable:!1});return n})),define("x_ite/Configuration/SupportedComponents",["x_ite/Configuration/ComponentInfoArray","x_ite/Browser/Networking/urls"],(function(e,t){"use strict";const i=new e([]);return i.addComponent({title:"Annotation",name:"Annotation",level:2,providerUrl:t.getProviderUrl("annotation")}),i.addComponent({title:"Computer-Aided Design (CAD) model geometry",name:"CADGeometry",level:2,providerUrl:t.getProviderUrl("cad-geometry")}),i.addComponent({title:"Core",name:"Core",level:2,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Cube map environmental texturing",name:"CubeMapTexturing",level:3,providerUrl:t.getProviderUrl("cube-map-texturing")}),i.addComponent({title:"Distributed interactive simulation (DIS)",name:"DIS",level:2,providerUrl:t.getProviderUrl("dis")}),i.addComponent({title:"Environmental effects",name:"EnvironmentalEffects",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Environmental sensor",name:"EnvironmentalSensor",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Event utilities",name:"EventUtilities",level:4,providerUrl:t.getProviderUrl("event-utilities")}),i.addComponent({title:"Followers",name:"Followers",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Geometry2D",name:"Geometry2D",level:2,providerUrl:t.getProviderUrl("geometry2d")}),i.addComponent({title:"Geometry3D",name:"Geometry3D",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Geospatial",name:"Geospatial",level:2,providerUrl:t.getProviderUrl("geospatial")}),i.addComponent({title:"Grouping",name:"Grouping",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Humanoid animation (HAnim)",name:"HAnim",level:3,providerUrl:t.getProviderUrl("h-anim")}),i.addAlias("H-Anim","HAnim"),i.addComponent({title:"Interpolation",name:"Interpolation",level:5,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Key device sensor",name:"KeyDeviceSensor",level:2,providerUrl:t.getProviderUrl("key-device-sensor")}),i.addComponent({title:"Layering",name:"Layering",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Layout",name:"Layout",level:2,providerUrl:t.getProviderUrl("layout")}),i.addComponent({title:"Lighting",name:"Lighting",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Navigation",name:"Navigation",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Networking",name:"Networking",level:4,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Non-uniform Rational B-Spline (NURBS)",name:"NURBS",level:4,providerUrl:t.getProviderUrl("nurbs")}),i.addComponent({title:"Particle systems",name:"ParticleSystems",level:3,providerUrl:t.getProviderUrl("particle-systems")}),i.addComponent({title:"Picking sensor",name:"Picking",level:3,providerUrl:t.getProviderUrl("picking")}),i.addComponent({title:"Pointing device sensor",name:"PointingDeviceSensor",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Projective Texture Mapping",name:"ProjectiveTextureMapping",level:2,providerUrl:t.getProviderUrl("projective-texture-mapping")}),i.addComponent({title:"Programmable shaders",name:"Shaders",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Rendering",name:"Rendering",level:5,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Rigid body physics",name:"RigidBodyPhysics",level:5,providerUrl:t.getProviderUrl("rigid-body-physics")}),i.addComponent({title:"Scripting",name:"Scripting",level:1,providerUrl:t.getProviderUrl("scripting")}),i.addComponent({title:"Shape",name:"Shape",level:5,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Sound",name:"Sound",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Text",name:"Text",level:1,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Texturing",name:"Texturing",level:3,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Texturing3D",name:"Texturing3D",level:3,providerUrl:t.getProviderUrl("texturing-3d")}),i.addComponent({title:"Time",name:"Time",level:2,providerUrl:t.getProviderUrl()}),i.addComponent({title:"Volume rendering",name:"VolumeRendering",level:2,providerUrl:t.getProviderUrl("volume-rendering")}),i.addComponent({title:"X_ITE",name:"X_ITE",level:1,providerUrl:t.getProviderUrl("x_ite")}),i})),define("x_ite/Configuration/SupportedProfiles",["x_ite/Configuration/ProfileInfo","x_ite/Configuration/ProfileInfoArray","x_ite/Configuration/ComponentInfoArray","x_ite/Configuration/SupportedComponents","x_ite/Browser/Networking/urls"],(function(e,t,i,n,r){"use strict";const o=new t;return o.addProfile({title:"Computer-Aided Design (CAD) interchange",name:"CADInterchange",providerUrl:r.getProviderUrl(),components:[n.get("CADGeometry"),n.get("Core"),n.get("Grouping"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("Rendering"),n.get("Shaders"),n.get("Shape"),n.get("Texturing")]}),o.addProfile({title:"Core",name:"Core",providerUrl:r.getProviderUrl(),components:[n.get("Core")]}),o.addProfile({title:"Full",name:"Full",providerUrl:r.getProviderUrl(),components:[n.get("CADGeometry"),n.get("Core"),n.get("CubeMapTexturing"),n.get("DIS"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("EventUtilities"),n.get("Followers"),n.get("Geometry2D"),n.get("Geometry3D"),n.get("Geospatial"),n.get("Grouping"),n.get("HAnim"),n.get("Interpolation"),n.get("KeyDeviceSensor"),n.get("Layering"),n.get("Layout"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("NURBS"),n.get("ParticleSystems"),n.get("Picking"),n.get("PointingDeviceSensor"),n.get("ProjectiveTextureMapping"),n.get("Rendering"),n.get("RigidBodyPhysics"),n.get("Scripting"),n.get("Shaders"),n.get("Shape"),n.get("Sound"),n.get("Text"),n.get("Texturing"),n.get("Texturing3D"),n.get("Time"),n.get("VolumeRendering")]}),o.addProfile({title:"Immersive",name:"Immersive",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("EventUtilities"),n.get("Geometry2D"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("KeyDeviceSensor"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("PointingDeviceSensor"),n.get("Rendering"),n.get("Scripting"),n.get("Shape"),n.get("Sound"),n.get("Text"),n.get("Texturing"),n.get("Time")]}),o.addProfile({title:"Interactive",name:"Interactive",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("EventUtilities"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("KeyDeviceSensor"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("PointingDeviceSensor"),n.get("Rendering"),n.get("Shape"),n.get("Texturing"),n.get("Time")]}),o.addProfile({title:"Interchange",name:"Interchange",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("Rendering"),n.get("Shape"),n.get("Texturing"),n.get("Time")]}),o.addProfile({title:"Medical interchange",name:"MedicalInterchange",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EventUtilities"),n.get("Geometry2D"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("Rendering"),n.get("Shape"),n.get("Text"),n.get("Texturing"),n.get("Texturing3D"),n.get("Time"),n.get("VolumeRendering")]}),o.addProfile({title:"MPEG-4 interactive",name:"MPEG-4",providerUrl:r.getProviderUrl(),components:[n.get("Core"),n.get("EnvironmentalEffects"),n.get("EnvironmentalSensor"),n.get("Geometry3D"),n.get("Grouping"),n.get("Interpolation"),n.get("Lighting"),n.get("Navigation"),n.get("Networking"),n.get("PointingDeviceSensor"),n.get("Rendering"),n.get("Shape"),n.get("Texturing"),n.get("Time")]}),o})),define("x_ite/Browser/X3DBrowser",["jquery","x_ite/Browser/VERSION","x_ite/Fields","x_ite/Components","x_ite/Components/Layering/X3DLayerNode","x_ite/Browser/X3DBrowserContext","x_ite/Configuration/ProfileInfo","x_ite/Configuration/ComponentInfo","x_ite/Configuration/SupportedProfiles","x_ite/Configuration/SupportedComponents","x_ite/Configuration/SupportedNodes","x_ite/Execution/Scene","x_ite/Execution/X3DScene","x_ite/InputOutput/FileLoader","x_ite/Parser/XMLParser","x_ite/Parser/JSONParser","x_ite/Base/X3DCast","x_ite/Base/X3DConstants","standard/Utility/MapUtilities","locale/gettext"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x){"use strict";const w=Symbol(),b=Symbol();function v(e){o.call(this,e),this[b]=new Map,this.replaceWorld(this.createScene())}v.prototype=Object.assign(Object.create(o.prototype),{constructor:v,getTypeName:function(){return"X3DBrowser"},getComponentName:function(){return"X_ITE"},getContainerField:function(){return"browser"},initialize:function(){o.prototype.initialize.call(this);let e=this.getElement().attr("src");e=e?'"'+e+'"':this.getElement().attr("url"),e?(this.initialized().set(this.getCurrentTime()),this.load(e)):(this.initialized().setValue(this.getCurrentTime()),this.callBrowserCallbacks(_.INITIALIZED_EVENT),this.callBrowserEventHandler("onload")),this.getNumber()>1||this.print("Welcome to "+this.name+" X3D Browser "+this.version+":\n Current Graphics Renderer\n Name: "+this.getVendor()+" "+this.getRenderer()+"\n WebGL version: "+this.getWebGLVersion()+"\n Shading language: "+this.getShadingLanguageVersion()+"\n Rendering Properties\n Antialiased: "+this.getAntialiased()+"\n Depth size: "+this.getDepthSize()+" bits\n Color depth: "+this.getColorDepth()+" bits\n Max clip planes: "+this.getMaxClipPlanes()+"\n Max global lights: "+this.getMaxLights()+"\n Max textures: "+this.getMaxTextures()+"\n Texture units: "+this.getMaxCombinedTextureUnits()+"\n Max texture size: "+this.getMaxTextureSize()+" × "+this.getMaxTextureSize()+" pixel\n Texture memory: "+this.getTextureMemory()+"\n Max vertex uniform vectors: "+this.getMaxVertexUniformVectors()+"\n Max fragment uniform vectors: "+this.getMaxFragmentUniformVectors()+"\n Max vertex attribs: "+this.getMaxVertexAttribs()+"\n")},getName:function(){return"X_ITE"},getVersion:function(){return t},getDescription:function(){return this.getNotification()._string.getValue()},setDescription:function(e){this.getNotification()._string=e},getWorldURL:function(){return this.currentScene.worldURL},getProfile:function(e){e=String(e);const t=u.get(e);if(t)return t;throw Error("Profile '"+e+"' is not supported.")},getSupportedProfiles:function(){return u},getComponent:function(e,t){e=String(e),t=~~t;const i=l.get(e);if(i)return i.level,new a(e,t,i.title,i.providerUrl);throw Error("Component '"+e+"' at level '"+t+"' is not supported.")},getSupportedComponents:function(){return l},getSupportedNode:function(e){return c.getType(String(e))},getSupportedNodes:function(){return c.getTypes()},createScene:function(e,t){const i=new h(this);if(arguments.length){if(!(e instanceof s))throw new Error("Couldn't create scene: profile must be of type ProfileInfo.");i.setProfile(e);for(let e=1,t=arguments.length;e<t;++e){const t=arguments[e];if(!(t instanceof a))throw new Error("Couldn't create scene: component must be of type ComponentInfo.");i.addComponent(t)}}return i.setup(),i},replaceWorld:function(e){if(this._loadCount.removeInterest("set_loadCount__",this),this.prepareEvents().removeInterest("bind",this),this[w]&&this[w].abort(),this.getWorld()&&(this.getExecutionContext().setLive(!1),this.shutdown().processInterests(),this.callBrowserCallbacks(_.SHUTDOWN_EVENT),this.callBrowserEventHandler("onshutdown")),e instanceof i.MFNode){const t=e;e=this.createScene();for(const i of t)e.isLive().addInterest(i.getValue().getExecutionContext().isLive());e.setRootNodes(t)}e instanceof d||(e=this.createScene()),e.getExecutionContext().isLive().removeInterest("setLive",e),e.setExecutionContext(e),this.description="",this.getBrowserOptions().configure(),this.setBrowserLoading(!0),this._loadCount.addInterest("set_loadCount__",this),this.prepareEvents().removeInterest("bind",this);for(const t of e.getLoadingObjects())this.addLoadCount(t);this.setExecutionContext(e),this.getWorld().bind(),e.setLive(this.isLive().getValue())},set_loadCount__:function(e){e.getValue()||(this._loadCount.removeInterest("set_loadCount__",this),this.prepareEvents().addInterest("bind",this),this.addBrowserEvent())},bind:function(){this.prepareEvents().removeInterest("bind",this),this.setBrowserLoading(!1),this.initialized().getValue()&&(this.initialized().setValue(this.getCurrentTime()),this.callBrowserCallbacks(_.INITIALIZED_EVENT),this.callBrowserEventHandler("onload"))},createVrmlFromString:function(e){return this.createX3DFromString(e).rootNodes},createX3DFromString:function(e){e=String(e);const t=this.currentScene,i=this.isExternal(),n=new p(this.getWorld()).createX3DFromString(t.getWorldURL(),e);return i||(t.isLive().addInterest("setLive",n),n.setExecutionContext(t),n.setLive(t.getLive())),n},createVrmlFromURL:function(e,t,n){if(t=m(_.X3DNode,t,!1),n=String(n),!(e instanceof i.MFString))throw new Error("Browser.createVrmlFromURL: url must be of type MFString.");if(!t)throw new Error("Browser.createVrmlFromURL: node must be of type X3DNode.");const r=t.getField(n);if(!r.isInput())throw new Error("Browser.createVrmlFromURL: event named '"+n+"' must be a input field.");if(r.getType()!==_.MFNode)throw new Error("Browser.createVrmlFromURL: event named '"+n+"' must be of type MFNode.");const o=this.currentScene,s=this.isExternal(),a=new p(this.getWorld());this.addLoadCount(a),a.createX3DFromURL(e,null,function(e){this.removeLoadCount(a),e&&(s||(o.isLive().addInterest("setLive",e),e.setExecutionContext(o),e.setLive(o.getLive())),r.setValue(e.rootNodes))}.bind(this))},createX3DFromURL:function(e,t,n){if(3===arguments.length)return this.createVrmlFromURL(e,t,n);if(!(e instanceof i.MFString))throw new Error("Browser.createX3DFromURL: url must be of type MFString.");const r=this.currentScene,o=this.isExternal(),s=new p(this.getWorld()),a=s.createX3DFromURL(e,null);return o||(r.isLive().addInterest("setLive",a),a.setExecutionContext(r),a.setLive(r.getLive())),a},loadURL:function(e,t=new i.MFString){return new Promise(function(n,r){if(!(e instanceof i.MFString))throw new Error("Browser.loadURL: url must be of type MFString.");if(!(t instanceof i.MFString))throw new Error("Browser.loadURL: parameter must be of type MFString.");this._loadCount.removeInterest("set_loadCount__",this),this.prepareEvents().removeInterest("bind",this),this[w]&&this[w].abort(),this.setBrowserLoading(!0),this.addLoadCount(this);const o=this[w]=new p(this.getWorld());o.createX3DFromURL(e,t,function(e){o===this[w]?(this.getBrowserOptions().getSplashScreen()||this.getCanvas().fadeIn(0),e?(this.replaceWorld(e),this.removeLoadCount(this),n()):(this.callBrowserCallbacks(_.CONNECTION_ERROR),this.callBrowserEventHandler("onerror"),setTimeout(function(){this.getSplashScreen().find(".x_ite-private-spinner-text").text(x("Failed loading world."))}.bind(this),31),r())):r()}.bind(this),function(e){o===this[w]?(this.changeViewpoint(e),this.removeLoadCount(this),this.setBrowserLoading(!1),n()):r()}.bind(this),function(e,t){o===this[w]?(t?window.open(e,t):location=e,this.removeLoadCount(this),this.setBrowserLoading(!1),n()):r()}.bind(this))}.bind(this))},addBrowserListener:function(e,t){},removeBrowserListener:function(e){},addBrowserCallback:function(e,t){this[b].set(e,t)},removeBrowserCallback:function(e){this[b].delete(e)},getBrowserCallbacks:function(){return this[b]},callBrowserCallbacks:function(){const e=[];return function(t){if(this[b].size)for(const i of y.values(e,this[b]))i(t)}}(),importDocument:function(e,t,i){const n=this.currentScene,r=this.createScene(),o=this.isExternal();o||(n.isLive().addInterest("setLive",r),r.setExecutionContext(n),r.setLive(n.getLive()));const s=new f(r);if(s.setInput(e),s.parseIntoScene(t,i),1===arguments.length)return r},importJS:function(e,t,i){const n=this.currentScene,r=this.createScene(),o=this.isExternal();o||(n.isLive().addInterest("setLive",r),r.setExecutionContext(n),r.setLive(n.getLive()));const s=new g(r);if(s.setInput(e),s.parseIntoScene(t,i),1===arguments.length)return r},getBrowserProperty:function(e){return this.getBrowserProperties().getField(e).getValue()},setBrowserOption:function(e,t){this.getBrowserOptions().getField(e).setValue(t)},getBrowserOption:function(e){return this.getBrowserOptions().getField(e).getValue()},getRenderingProperty:function(e){return this.getRenderingProperties().getField(e).getValue()},firstViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();t.length&&this.bindViewpoint(e,t[0])},previousViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();if(0!==t.length){for(var i=0,n=t.length;i<n&&!t[i]._isBound.getValue();++i);i<t.length?0===i?this.bindViewpoint(e,t.at(-1)):this.bindViewpoint(e,t[i-1]):this.bindViewpoint(e,t.at(-1))}},nextViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();if(0!==t.length){for(var i=0,n=t.length;i<n&&!t[i]._isBound.getValue();++i);i<t.length?i===t.length-1?this.bindViewpoint(e,t[0]):this.bindViewpoint(e,t[i+1]):this.bindViewpoint(e,t[0])}},lastViewpoint:function(e){(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer());const t=e.getUserViewpoints();t.length&&this.bindViewpoint(e,t.at(-1))},changeViewpoint:function(e,t){if(1===arguments.length&&(t=String(e),e=this.getActiveLayer()),(e=m(_.X3DLayerNode,e,!1))||(e=this.getActiveLayer()),e instanceof r)for(const i of e.getViewpoints().get())if(i.getName()===t){this.bindViewpoint(e,i);break}},bindViewpoint:function(e,t){if(e=m(_.X3DLayerNode,e,!1),t=m(_.X3DViewpointNode,t,!1),!e)throw new Error("Browser.bindViewpoint: layerNode must be of type X3DLayerNode.");if(!t)throw new Error("Browser.bindViewpoint: viewpointNode must be of type X3DViewpointNode.");t.setVRMLTransition(!0),t._isBound.getValue()?t.transitionStart(e,t,t):t._set_bind=!0},addRoute:function(e,t,i,n){this.currentScene.addRoute(e,t,i,n)},deleteRoute:function(e,t,i,n){try{const r=this.currentScene.getRoute(e,t,i,n);r&&this.currentScene.deleteRoute(r)}catch(e){console.error(e)}},beginUpdate:function(){this.setLive(!0),this.getExecutionContext().setLive(!0),this.advanceTime(performance.now())},endUpdate:function(){this.setLive(!1),this.getExecutionContext().setLive(!1)},print:function(){const t=Array.prototype.join.call(arguments,"");console.log(t);const i=e(".x_ite-console");i.length&&i.append(document.createTextNode(t))},println:function(){const t=Array.prototype.join.call(arguments,"");console.log(t);const i=e(".x_ite-console");i.length&&i.append(document.createTextNode(t+"\n"))},toVRMLStream:function(e){this.currentScene.toVRMLStream(e)},toXMLStream:function(e){this.currentScene.toXMLStream(e)},toJSONStream:function(e){this.currentScene.toJSONStream(e)}});for(const e of Reflect.ownKeys(v.prototype))Object.defineProperty(v.prototype,e,{enumerable:!1});return Object.defineProperty(v.prototype,"name",{get:function(){return this.getName()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"version",{get:function(){return this.getVersion()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"currentFrameRate",{get:function(){return this.getCurrentFrameRate()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"currentSpeed",{get:function(){return this.getCurrentSpeed()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"description",{get:function(){return this.getDescription()},set:function(e){this.setDescription(e)},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"currentScene",{get:function(){return this.getScriptStack().at(-1).getExecutionContext()},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"supportedProfiles",{get:function(){return u},enumerable:!0,configurable:!1}),Object.defineProperty(v.prototype,"supportedComponents",{get:function(){return l},enumerable:!0,configurable:!1}),v})),define("x_ite/Fallback",["jquery"],(function(e){"use strict";return{error:function(t,i){e(function(){const n=e("X3DCanvas");this.show(n,t);for(const e of i)"function"==typeof e&&e(n,t)}.bind(this))},show:function(t,i){console.error(i);const n=e(".x_ite-console");n.length&&n.append(document.createTextNode(i)),t.addClass("x_ite-browser-fallback"),t.children(".x_ite-private-browser").hide(),t.children(":not(.x_ite-private-browser)").addClass("x_ite-fallback"),t.children(":not(.x_ite-private-browser)").show()}}})),define("standard/Time/MicroTime",[],(function(){"use strict";performance.now=function(){const e=performance.now;let t=0,i=0;return function(){const n=e.call(this);return n>i?(t=0,i=n,n):i=n+ ++t/1e3}}()})),define("x_ite/X3D",["jquery","x_ite/Base/X3DBaseNode","x_ite/Base/X3DFieldDefinition","x_ite/Base/FieldDefinitionArray","x_ite/Base/X3DField","x_ite/Base/X3DArrayField","x_ite/Fields","x_ite/Browser/X3DBrowser","x_ite/Configuration/ComponentInfo","x_ite/Configuration/ComponentInfoArray","x_ite/Configuration/ProfileInfo","x_ite/Configuration/ProfileInfoArray","x_ite/Configuration/UnitInfo","x_ite/Configuration/UnitInfoArray","x_ite/Execution/X3DExecutionContext","x_ite/Execution/X3DScene","x_ite/Execution/X3DImportedNode","x_ite/Execution/X3DExportedNode","x_ite/Prototype/ExternProtoDeclarationArray","x_ite/Prototype/ProtoDeclarationArray","x_ite/Prototype/X3DExternProtoDeclaration","x_ite/Prototype/X3DProtoDeclaration","x_ite/Prototype/X3DProtoDeclarationNode","x_ite/Routing/RouteArray","x_ite/Routing/X3DRoute","x_ite/Base/X3DConstants","x_ite/Browser/Networking/urls","x_ite/Fallback","standard/Time/MicroTime"],(function(e,t,i,n,r,o,s,a,u,l,c,h,d,p,f,g,m,_,y,x,w,b,v,S,T,C,N,F,O){"use strict";function E(t){if((t=e(t)).find(".x_ite-private-browser").length)return;const i=new a(t);return t.data("browser",i),i.setup(),i}e.noConflict(!0);const D=e.Deferred(),M=e.Deferred();let I=!1;function V(t,i){"function"==typeof t&&D.done(t),"function"==typeof i&&M.done(i),I||(I=!0,e((function(){const t=e("X3DCanvas");t.children().hide();try{e.map(t,E),D.resolve()}catch(e){F.show(t,e),M.resolve(e)}})))}return require.getComponentUrl=function(e){const t=N.getProviderUrl(e);return"function"==typeof __global_require__&&"string"==typeof __filename&&__global_require__(__global_require__("url").fileURLToPath(t)),t},Object.assign(V,{require:require,define:define,getBrowser:function(t){return e(t||"X3DCanvas").data("browser")},createBrowser:function(t,i){const n=e("<X3DCanvas></X3DCanvas>");return t instanceof s.MFString&&n.attr("url",t.toString()),E(n),n[0]},X3DConstants:C,X3DBrowser:a,X3DExecutionContext:f,X3DScene:g,ComponentInfo:u,ComponentInfoArray:l,ProfileInfo:c,ProfileInfoArray:h,UnitInfo:d,UnitInfoArray:p,ExternProtoDeclarationArray:y,ProtoDeclarationArray:x,X3DExternProtoDeclaration:w,X3DProtoDeclaration:b,RouteArray:S,X3DRoute:T,X3DBaseNode:t,X3DExportedNode:_,X3DImportedNode:m,X3DProtoDeclarationNode:v,X3DFieldDefinition:i,FieldDefinitionArray:n,X3DField:r,X3DArrayField:o,SFColor:s.SFColor,SFColorRGBA:s.SFColorRGBA,SFImage:s.SFImage,SFMatrix3d:s.SFMatrix3d,SFMatrix3f:s.SFMatrix3f,SFMatrix4d:s.SFMatrix4d,SFMatrix4f:s.SFMatrix4f,SFNode:s.SFNode,SFRotation:s.SFRotation,SFVec2d:s.SFVec2d,SFVec2f:s.SFVec2f,SFVec3d:s.SFVec3d,SFVec3f:s.SFVec3f,SFVec4d:s.SFVec4d,SFVec4f:s.SFVec4f,VrmlMatrix:s.VrmlMatrix,MFBool:s.MFBool,MFColor:s.MFColor,MFColorRGBA:s.MFColorRGBA,MFDouble:s.MFDouble,MFFloat:s.MFFloat,MFImage:s.MFImage,MFInt32:s.MFInt32,MFMatrix3d:s.MFMatrix3d,MFMatrix3f:s.MFMatrix3f,MFMatrix4d:s.MFMatrix4d,MFMatrix4f:s.MFMatrix4f,MFNode:s.MFNode,MFRotation:s.MFRotation,MFString:s.MFString,MFTime:s.MFTime,MFVec2d:s.MFVec2d,MFVec2f:s.MFVec2f,MFVec3d:s.MFVec3d,MFVec3f:s.MFVec3f,MFVec4d:s.MFVec4d,MFVec4f:s.MFVec4f}),V})),require.config({waitSeconds:0}),define.show=function(){this.define=window.define,window.define=this},define.hide=function(){void 0===this.define?delete window.define:window.define=this.define,delete this.define};const getScriptURL=function(){if(document.currentScript)var e=document.currentScript.src;else if("function"==typeof __global_require__&&"string"==typeof __filename)e=__global_require__("url").pathToFileURL(__filename).href;return function(){return e}}();!function(){"use strict";function e(e,t){return new Promise((function(i,n){require(["x_ite/X3D"],(function(r){r(e,t),r(i,n)}),(function(){"function"==typeof t&&t(),n()}))}))}e.noConflict=function(){return window.X3D===e&&(void 0===t?delete window.X3D:window.X3D=t),e},e.require=require,e.define=define;const t=window.X3D;window.X3D=e,window[Symbol.for("X_ITE.X3D-5.0.3")]=e,"object"==typeof __global_module__&&"object"==typeof __global_module__.exports&&(__global_module__.exports=e),document.createElement("X3DCanvas"),require(["x_ite/X3D"],(function(t){Object.assign(e,t),t()}))}(),function(){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})}(),define("x_ite",(function(){})),define("x_ite/Browser/Shaders/ShaderSource",[],(function(){"use strict";return{get:function(e,t){return t}}}))}));
|