@ndmspc/ndmvr 0.20231212.0 → 0.20240220.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/ndmvr.es.js +8236 -7412
  2. package/dist/ndmvr.umd.js +158 -125
  3. package/package.json +5 -3
package/dist/ndmvr.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(oe,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("aframe"),require("jsroot"),require("three")):typeof define=="function"&&define.amd?define(["exports","react","aframe","jsroot","three"],v):(oe=typeof globalThis<"u"?globalThis:oe||self,v(oe["React Library Vite"]={},oe.React,oe.AFRAME$3,oe.jsroot,oe.THREE$1))})(this,function(oe,v,he,wt,Sn){"use strict";var wa=Object.defineProperty;var Ca=(oe,v,he)=>v in oe?wa(oe,v,{enumerable:!0,configurable:!0,writable:!0,value:he}):oe[v]=he;var ze=(oe,v,he)=>(Ca(oe,typeof v!="symbol"?v+"":v,he),he),di=(oe,v,he)=>{if(!v.has(oe))throw TypeError("Cannot "+he)};var s=(oe,v,he)=>(di(oe,v,"read from private field"),he?he.call(oe):v.get(oe)),F=(oe,v,he)=>{if(v.has(oe))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(oe):v.set(oe,he)},B=(oe,v,he,wt)=>(di(oe,v,"write to private field"),wt?wt.call(oe,he):v.set(oe,he),he);var Dr=(oe,v,he)=>(di(oe,v,"access private method"),he);var yt,at,Ne,Er,qe,Tr,At,Ht,Pt,Ce,We,Ee,cr,L,Je,Z,ae,me,N,Ye,Le,Qe,lt,xt,ur,ge,Fe,et,tt,bt,rt,_t,Mt,re,vt,ct,Rt,Ue,kr,Ar,Pr,It,Bt,Yt,Ft,Nt,Lt,$r,_r,Or,jr,St,Vt,Xt,zr,Wt;function wn(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Ct=wn(Sn);function Cn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Hr={exports:{}},qt={};/**
1
+ (function(de,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("aframe"),require("jsroot"),require("three")):typeof define=="function"&&define.amd?define(["exports","react","aframe","jsroot","three"],v):(de=typeof globalThis<"u"?globalThis:de||self,v(de["React Library Vite"]={},de.React,de.AFRAME,de.jsroot,de.THREE$1))})(this,function(de,v,be,At,Xi){"use strict";var $a=Object.defineProperty;var za=(de,v,be)=>v in de?$a(de,v,{enumerable:!0,configurable:!0,writable:!0,value:be}):de[v]=be;var Re=(de,v,be)=>(za(de,typeof v!="symbol"?v+"":v,be),be),Yn=(de,v,be)=>{if(!v.has(de))throw TypeError("Cannot "+be)};var s=(de,v,be)=>(Yn(de,v,"read from private field"),be?be.call(de):v.get(de)),Z=(de,v,be)=>{if(v.has(de))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(de):v.set(de,be)},U=(de,v,be,At)=>(Yn(de,v,"write to private field"),At?At.call(de,be):v.set(de,be),be);var Kr=(de,v,be)=>(Yn(de,v,"access private method"),be);var Ue,Nr,it,Fr,$t,Ut,zt,dt,Pe,et,wt,Oe,gr,te,ot,oe,ge,ve,J,Xe,Ze,st,ft,Ct,yr,je,We,at,lt,Et,ht,Ht,Zt,Mt,ue,Tt,pt,Gt,tt,Lr,Vr,Xr,Kt,qt,Jt,Qt,er,tr,qr,Wr,Ur,Zr,kt,rr,nr,Gr,ir;function Wi(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Pt=Wi(Xi);function Ui(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Jr={exports:{}},or={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -6,17 +6,17 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var hi;function En(){return hi||(hi=1,process.env.NODE_ENV!=="production"&&function(){var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),b=Symbol.iterator,w="@@iterator";function y(f){if(f===null||typeof f!="object")return null;var j=b&&f[b]||f[w];return typeof j=="function"?j:null}var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(f){{for(var j=arguments.length,D=new Array(j>1?j-1:0),J=1;J<j;J++)D[J-1]=arguments[J];m("error",f,D)}}function m(f,j,D){{var J=_.ReactDebugCurrentFrame,xe=J.getStackAddendum();xe!==""&&(j+="%s",D=D.concat([xe]));var Ae=D.map(function(pe){return String(pe)});Ae.unshift("Warning: "+j),Function.prototype.apply.call(console[f],console,Ae)}}var T=!1,g=!1,X=!1,R=!1,P=!1,Y;Y=Symbol.for("react.module.reference");function se(f){return!!(typeof f=="string"||typeof f=="function"||f===i||f===o||P||f===n||f===d||f===c||R||f===A||T||g||X||typeof f=="object"&&f!==null&&(f.$$typeof===k||f.$$typeof===x||f.$$typeof===a||f.$$typeof===l||f.$$typeof===u||f.$$typeof===Y||f.getModuleId!==void 0))}function G(f,j,D){var J=f.displayName;if(J)return J;var xe=j.displayName||j.name||"";return xe!==""?D+"("+xe+")":D}function I(f){return f.displayName||"Context"}function W(f){if(f==null)return null;if(typeof f.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case i:return"Fragment";case t:return"Portal";case o:return"Profiler";case n:return"StrictMode";case d:return"Suspense";case c:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case l:var j=f;return I(j)+".Consumer";case a:var D=f;return I(D._context)+".Provider";case u:return G(f,f.render,"ForwardRef");case x:var J=f.displayName||null;return J!==null?J:W(f.type)||"Memo";case k:{var xe=f,Ae=xe._payload,pe=xe._init;try{return W(pe(Ae))}catch{return null}}}return null}var Q=Object.assign,U=0,V,fe,de,Te,ke,Re,H;function z(){}z.__reactDisabledLog=!0;function M(){{if(U===0){V=console.log,fe=console.info,de=console.warn,Te=console.error,ke=console.group,Re=console.groupCollapsed,H=console.groupEnd;var f={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}U++}}function S(){{if(U--,U===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Q({},f,{value:V}),info:Q({},f,{value:fe}),warn:Q({},f,{value:de}),error:Q({},f,{value:Te}),group:Q({},f,{value:ke}),groupCollapsed:Q({},f,{value:Re}),groupEnd:Q({},f,{value:H})})}U<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var p=_.ReactCurrentDispatcher,K;function E(f,j,D){{if(K===void 0)try{throw Error()}catch(xe){var J=xe.stack.trim().match(/\n( *(at )?)/);K=J&&J[1]||""}return`
10
- `+K+f}}var le=!1,ee;{var ie=typeof WeakMap=="function"?WeakMap:Map;ee=new ie}function O(f,j){if(!f||le)return"";{var D=ee.get(f);if(D!==void 0)return D}var J;le=!0;var xe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ae;Ae=p.current,p.current=null,M();try{if(j){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(ht){J=ht}Reflect.construct(f,[],pe)}else{try{pe.call()}catch(ht){J=ht}f.call(pe.prototype)}}else{try{throw Error()}catch(ht){J=ht}f()}}catch(ht){if(ht&&J&&typeof ht.stack=="string"){for(var ue=ht.stack.split(`
11
- `),Be=J.stack.split(`
12
- `),De=ue.length-1,He=Be.length-1;De>=1&&He>=0&&ue[De]!==Be[He];)He--;for(;De>=1&&He>=0;De--,He--)if(ue[De]!==Be[He]){if(De!==1||He!==1)do if(De--,He--,He<0||ue[De]!==Be[He]){var Xe=`
13
- `+ue[De].replace(" at new "," at ");return f.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",f.displayName)),typeof f=="function"&&ee.set(f,Xe),Xe}while(De>=1&&He>=0);break}}}finally{le=!1,p.current=Ae,S(),Error.prepareStackTrace=xe}var Kt=f?f.displayName||f.name:"",vn=Kt?E(Kt):"";return typeof f=="function"&&ee.set(f,vn),vn}function ne(f,j,D){return O(f,!1)}function $(f){var j=f.prototype;return!!(j&&j.isReactComponent)}function te(f,j,D){if(f==null)return"";if(typeof f=="function")return O(f,$(f));if(typeof f=="string")return E(f);switch(f){case d:return E("Suspense");case c:return E("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case u:return ne(f.render);case x:return te(f.type,j,D);case k:{var J=f,xe=J._payload,Ae=J._init;try{return te(Ae(xe),j,D)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,ce={},$e=_.ReactDebugCurrentFrame;function it(f){if(f){var j=f._owner,D=te(f.type,f._source,j?j.type:null);$e.setExtraStackFrame(D)}else $e.setExtraStackFrame(null)}function Me(f,j,D,J,xe){{var Ae=Function.call.bind(Pe);for(var pe in f)if(Ae(f,pe)){var ue=void 0;try{if(typeof f[pe]!="function"){var Be=Error((J||"React class")+": "+D+" type `"+pe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[pe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Be.name="Invariant Violation",Be}ue=f[pe](j,pe,J,D,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(De){ue=De}ue&&!(ue instanceof Error)&&(it(xe),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",J||"React class",D,pe,typeof ue),it(null)),ue instanceof Error&&!(ue.message in ce)&&(ce[ue.message]=!0,it(xe),C("Failed %s type: %s",D,ue.message),it(null))}}}var Ut=Array.isArray;function ut(f){return Ut(f)}function Ve(f){{var j=typeof Symbol=="function"&&Symbol.toStringTag,D=j&&f[Symbol.toStringTag]||f.constructor.name||"Object";return D}}function q(f){try{return Oe(f),!1}catch{return!0}}function Oe(f){return""+f}function Zt(f){if(q(f))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(f)),Oe(f)}var dt=_.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0},hn,fn,ai;ai={};function aa(f){if(Pe.call(f,"ref")){var j=Object.getOwnPropertyDescriptor(f,"ref").get;if(j&&j.isReactWarning)return!1}return f.ref!==void 0}function la(f){if(Pe.call(f,"key")){var j=Object.getOwnPropertyDescriptor(f,"key").get;if(j&&j.isReactWarning)return!1}return f.key!==void 0}function ca(f,j){if(typeof f.ref=="string"&&dt.current&&j&&dt.current.stateNode!==j){var D=W(dt.current.type);ai[D]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(dt.current.type),f.ref),ai[D]=!0)}}function ua(f,j){{var D=function(){hn||(hn=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",j))};D.isReactWarning=!0,Object.defineProperty(f,"key",{get:D,configurable:!0})}}function da(f,j){{var D=function(){fn||(fn=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",j))};D.isReactWarning=!0,Object.defineProperty(f,"ref",{get:D,configurable:!0})}}var ha=function(f,j,D,J,xe,Ae,pe){var ue={$$typeof:e,type:f,key:j,ref:D,props:pe,_owner:Ae};return ue._store={},Object.defineProperty(ue._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ue,"_self",{configurable:!1,enumerable:!1,writable:!1,value:J}),Object.defineProperty(ue,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.freeze&&(Object.freeze(ue.props),Object.freeze(ue)),ue};function fa(f,j,D,J,xe){{var Ae,pe={},ue=null,Be=null;D!==void 0&&(Zt(D),ue=""+D),la(j)&&(Zt(j.key),ue=""+j.key),aa(j)&&(Be=j.ref,ca(j,xe));for(Ae in j)Pe.call(j,Ae)&&!nt.hasOwnProperty(Ae)&&(pe[Ae]=j[Ae]);if(f&&f.defaultProps){var De=f.defaultProps;for(Ae in De)pe[Ae]===void 0&&(pe[Ae]=De[Ae])}if(ue||Be){var He=typeof f=="function"?f.displayName||f.name||"Unknown":f;ue&&ua(pe,He),Be&&da(pe,He)}return ha(f,ue,Be,xe,J,dt.current,pe)}}var li=_.ReactCurrentOwner,pn=_.ReactDebugCurrentFrame;function Gt(f){if(f){var j=f._owner,D=te(f.type,f._source,j?j.type:null);pn.setExtraStackFrame(D)}else pn.setExtraStackFrame(null)}var ci;ci=!1;function ui(f){return typeof f=="object"&&f!==null&&f.$$typeof===e}function mn(){{if(li.current){var f=W(li.current.type);if(f)return`
9
+ */var Nn;function Zi(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&function(){var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A=Symbol.iterator,S="@@iterator";function y(l){if(l===null||typeof l!="object")return null;var p=A&&l[A]||l[S];return typeof p=="function"?p:null}var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(l){{for(var p=arguments.length,x=new Array(p>1?p-1:0),z=1;z<p;z++)x[z-1]=arguments[z];$("error",l,x)}}function $(l,p,x){{var z=_.ReactDebugCurrentFrame,W=z.getStackAddendum();W!==""&&(p+="%s",x=x.concat([W]));var Q=x.map(function(V){return String(V)});Q.unshift("Warning: "+p),Function.prototype.apply.call(console[l],console,Q)}}var D=!1,b=!1,G=!1,O=!1,I=!1,X;X=Symbol.for("react.module.reference");function T(l){return!!(typeof l=="string"||typeof l=="function"||l===n||l===o||I||l===i||l===h||l===u||O||l===P||D||b||G||typeof l=="object"&&l!==null&&(l.$$typeof===E||l.$$typeof===g||l.$$typeof===a||l.$$typeof===c||l.$$typeof===d||l.$$typeof===X||l.getModuleId!==void 0))}function ee(l,p,x){var z=l.displayName;if(z)return z;var W=p.displayName||p.name||"";return W!==""?x+"("+W+")":x}function F(l){return l.displayName||"Context"}function N(l){if(l==null)return null;if(typeof l.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case n:return"Fragment";case t:return"Portal";case o:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case u:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case c:var p=l;return F(p)+".Consumer";case a:var x=l;return F(x._context)+".Provider";case d:return ee(l,l.render,"ForwardRef");case g:var z=l.displayName||null;return z!==null?z:N(l.type)||"Memo";case E:{var W=l,Q=W._payload,V=W._init;try{return N(V(Q))}catch{return null}}}return null}var L=Object.assign,K=0,q,ye,me,Se,Ae,Ie,R;function H(){}H.__reactDisabledLog=!0;function Y(){{if(K===0){q=console.log,ye=console.info,me=console.warn,Se=console.error,Ae=console.group,Ie=console.groupCollapsed,R=console.groupEnd;var l={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}K++}}function w(){{if(K--,K===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},l,{value:q}),info:L({},l,{value:ye}),warn:L({},l,{value:me}),error:L({},l,{value:Se}),group:L({},l,{value:Ae}),groupCollapsed:L({},l,{value:Ie}),groupEnd:L({},l,{value:R})})}K<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var m=_.ReactCurrentDispatcher,re;function k(l,p,x){{if(re===void 0)try{throw Error()}catch(W){var z=W.stack.trim().match(/\n( *(at )?)/);re=z&&z[1]||""}return`
10
+ `+re+l}}var fe=!1,ne;{var ae=typeof WeakMap=="function"?WeakMap:Map;ne=new ae}function j(l,p){if(!l||fe)return"";{var x=ne.get(l);if(x!==void 0)return x}var z;fe=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Q;Q=m.current,m.current=null,Y();try{if(p){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(Ye){z=Ye}Reflect.construct(l,[],V)}else{try{V.call()}catch(Ye){z=Ye}l.call(V.prototype)}}else{try{throw Error()}catch(Ye){z=Ye}l()}}catch(Ye){if(Ye&&z&&typeof Ye.stack=="string"){for(var B=Ye.stack.split(`
11
+ `),Ce=z.stack.split(`
12
+ `),ce=B.length-1,he=Ce.length-1;ce>=1&&he>=0&&B[ce]!==Ce[he];)he--;for(;ce>=1&&he>=0;ce--,he--)if(B[ce]!==Ce[he]){if(ce!==1||he!==1)do if(ce--,he--,he<0||B[ce]!==Ce[he]){var ze=`
13
+ `+B[ce].replace(" at new "," at ");return l.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",l.displayName)),typeof l=="function"&&ne.set(l,ze),ze}while(ce>=1&&he>=0);break}}}finally{fe=!1,m.current=Q,w(),Error.prepareStackTrace=W}var qe=l?l.displayName||l.name:"",kr=qe?k(qe):"";return typeof l=="function"&&ne.set(l,kr),kr}function le(l,p,x){return j(l,!1)}function M(l){var p=l.prototype;return!!(p&&p.isReactComponent)}function ie(l,p,x){if(l==null)return"";if(typeof l=="function")return j(l,M(l));if(typeof l=="string")return k(l);switch(l){case h:return k("Suspense");case u:return k("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case d:return le(l.render);case g:return ie(l.type,p,x);case E:{var z=l,W=z._payload,Q=z._init;try{return ie(Q(W),p,x)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,pe={},Me=_.ReactDebugCurrentFrame;function Fe(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);Me.setExtraStackFrame(x)}else Me.setExtraStackFrame(null)}function Be(l,p,x,z,W){{var Q=Function.call.bind(we);for(var V in l)if(Q(l,V)){var B=void 0;try{if(typeof l[V]!="function"){var Ce=Error((z||"React class")+": "+x+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}B=l[V](p,V,z,x,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){B=ce}B&&!(B instanceof Error)&&(Fe(W),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",z||"React class",x,V,typeof B),Fe(null)),B instanceof Error&&!(B.message in pe)&&(pe[B.message]=!0,Fe(W),C("Failed %s type: %s",x,B.message),Fe(null))}}}var _t=Array.isArray;function Ge(l){return _t(l)}function Le(l){{var p=typeof Symbol=="function"&&Symbol.toStringTag,x=p&&l[Symbol.toStringTag]||l.constructor.name||"Object";return x}}function se(l){try{return De(l),!1}catch{return!0}}function De(l){return""+l}function mt(l){if(se(l))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Le(l)),De(l)}var Ve=_.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},br,vr,Rt;Rt={};function Tn(l){if(we.call(l,"ref")){var p=Object.getOwnPropertyDescriptor(l,"ref").get;if(p&&p.isReactWarning)return!1}return l.ref!==void 0}function kn(l){if(we.call(l,"key")){var p=Object.getOwnPropertyDescriptor(l,"key").get;if(p&&p.isReactWarning)return!1}return l.key!==void 0}function _n(l,p){if(typeof l.ref=="string"&&Ve.current&&p&&Ve.current.stateNode!==p){var x=N(Ve.current.type);Rt[x]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',N(Ve.current.type),l.ref),Rt[x]=!0)}}function An(l,p){{var x=function(){br||(br=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};x.isReactWarning=!0,Object.defineProperty(l,"key",{get:x,configurable:!0})}}function Pn(l,p){{var x=function(){vr||(vr=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};x.isReactWarning=!0,Object.defineProperty(l,"ref",{get:x,configurable:!0})}}var On=function(l,p,x,z,W,Q,V){var B={$$typeof:e,type:l,key:p,ref:x,props:V,_owner:Q};return B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(B,"_self",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.defineProperty(B,"_source",{configurable:!1,enumerable:!1,writable:!1,value:W}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B};function jn(l,p,x,z,W){{var Q,V={},B=null,Ce=null;x!==void 0&&(mt(x),B=""+x),kn(p)&&(mt(p.key),B=""+p.key),Tn(p)&&(Ce=p.ref,_n(p,W));for(Q in p)we.call(p,Q)&&!Je.hasOwnProperty(Q)&&(V[Q]=p[Q]);if(l&&l.defaultProps){var ce=l.defaultProps;for(Q in ce)V[Q]===void 0&&(V[Q]=ce[Q])}if(B||Ce){var he=typeof l=="function"?l.displayName||l.name||"Unknown":l;B&&An(V,he),Ce&&Pn(V,he)}return On(l,B,Ce,W,z,Ve.current,V)}}var It=_.ReactCurrentOwner,xr=_.ReactDebugCurrentFrame;function Ke(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);xr.setExtraStackFrame(x)}else xr.setExtraStackFrame(null)}var Bt;Bt=!1;function Yt(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function Sr(){{if(It.current){var l=N(It.current.type);if(l)return`
14
14
 
15
- Check the render method of \``+f+"`."}return""}}function pa(f){{if(f!==void 0){var j=f.fileName.replace(/^.*[\\\/]/,""),D=f.lineNumber;return`
15
+ Check the render method of \``+l+"`."}return""}}function Dn(l){{if(l!==void 0){var p=l.fileName.replace(/^.*[\\\/]/,""),x=l.lineNumber;return`
16
16
 
17
- Check your code at `+j+":"+D+"."}return""}}var gn={};function ma(f){{var j=mn();if(!j){var D=typeof f=="string"?f:f.displayName||f.name;D&&(j=`
17
+ Check your code at `+p+":"+x+"."}return""}}var wr={};function $n(l){{var p=Sr();if(!p){var x=typeof l=="string"?l:l.displayName||l.name;x&&(p=`
18
18
 
19
- Check the top-level render call using <`+D+">.")}return j}}function yn(f,j){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var D=ma(j);if(gn[D])return;gn[D]=!0;var J="";f&&f._owner&&f._owner!==li.current&&(J=" It was passed a child from "+W(f._owner.type)+"."),Gt(f),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',D,J),Gt(null)}}function xn(f,j){{if(typeof f!="object")return;if(ut(f))for(var D=0;D<f.length;D++){var J=f[D];ui(J)&&yn(J,j)}else if(ui(f))f._store&&(f._store.validated=!0);else if(f){var xe=y(f);if(typeof xe=="function"&&xe!==f.entries)for(var Ae=xe.call(f),pe;!(pe=Ae.next()).done;)ui(pe.value)&&yn(pe.value,j)}}}function ga(f){{var j=f.type;if(j==null||typeof j=="string")return;var D;if(typeof j=="function")D=j.propTypes;else if(typeof j=="object"&&(j.$$typeof===u||j.$$typeof===x))D=j.propTypes;else return;if(D){var J=W(j);Me(D,f.props,"prop",J,f)}else if(j.PropTypes!==void 0&&!ci){ci=!0;var xe=W(j);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xe||"Unknown")}typeof j.getDefaultProps=="function"&&!j.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ya(f){{for(var j=Object.keys(f.props),D=0;D<j.length;D++){var J=j[D];if(J!=="children"&&J!=="key"){Gt(f),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",J),Gt(null);break}}f.ref!==null&&(Gt(f),C("Invalid attribute `ref` supplied to `React.Fragment`."),Gt(null))}}function bn(f,j,D,J,xe,Ae){{var pe=se(f);if(!pe){var ue="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(ue+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Be=pa(xe);Be?ue+=Be:ue+=mn();var De;f===null?De="null":ut(f)?De="array":f!==void 0&&f.$$typeof===e?(De="<"+(W(f.type)||"Unknown")+" />",ue=" Did you accidentally export a JSX literal instead of a component?"):De=typeof f,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",De,ue)}var He=fa(f,j,D,xe,Ae);if(He==null)return He;if(pe){var Xe=j.children;if(Xe!==void 0)if(J)if(ut(Xe)){for(var Kt=0;Kt<Xe.length;Kt++)xn(Xe[Kt],f);Object.freeze&&Object.freeze(Xe)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xn(Xe,f)}return f===i?ya(He):ga(He),He}}function xa(f,j,D){return bn(f,j,D,!0)}function ba(f,j,D){return bn(f,j,D,!1)}var va=ba,Sa=xa;qt.Fragment=i,qt.jsx=va,qt.jsxs=Sa}()),qt}var Jt={};/**
19
+ Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var x=$n(p);if(wr[x])return;wr[x]=!0;var z="";l&&l._owner&&l._owner!==It.current&&(z=" It was passed a child from "+N(l._owner.type)+"."),Ke(l),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',x,z),Ke(null)}}function Er(l,p){{if(typeof l!="object")return;if(Ge(l))for(var x=0;x<l.length;x++){var z=l[x];Yt(z)&&Cr(z,p)}else if(Yt(l))l._store&&(l._store.validated=!0);else if(l){var W=y(l);if(typeof W=="function"&&W!==l.entries)for(var Q=W.call(l),V;!(V=Q.next()).done;)Yt(V.value)&&Cr(V.value,p)}}}function zn(l){{var p=l.type;if(p==null||typeof p=="string")return;var x;if(typeof p=="function")x=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===d||p.$$typeof===g))x=p.propTypes;else return;if(x){var z=N(p);Be(x,l.props,"prop",z,l)}else if(p.PropTypes!==void 0&&!Bt){Bt=!0;var W=N(p);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",W||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hn(l){{for(var p=Object.keys(l.props),x=0;x<p.length;x++){var z=p[x];if(z!=="children"&&z!=="key"){Ke(l),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",z),Ke(null);break}}l.ref!==null&&(Ke(l),C("Invalid attribute `ref` supplied to `React.Fragment`."),Ke(null))}}function Tr(l,p,x,z,W,Q){{var V=T(l);if(!V){var B="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(B+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ce=Dn(W);Ce?B+=Ce:B+=Sr();var ce;l===null?ce="null":Ge(l)?ce="array":l!==void 0&&l.$$typeof===e?(ce="<"+(N(l.type)||"Unknown")+" />",B=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof l,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,B)}var he=jn(l,p,x,W,Q);if(he==null)return he;if(V){var ze=p.children;if(ze!==void 0)if(z)if(Ge(ze)){for(var qe=0;qe<ze.length;qe++)Er(ze[qe],l);Object.freeze&&Object.freeze(ze)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Er(ze,l)}return l===n?Hn(he):zn(he),he}}function Mn(l,p,x){return Tr(l,p,x,!0)}function Rn(l,p,x){return Tr(l,p,x,!1)}var In=Rn,Bn=Mn;or.Fragment=n,or.jsx=In,or.jsxs=Bn}()),or}var sr={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,7 +24,7 @@ Check the top-level render call using <`+D+">.")}return j}}function yn(f,j){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var fi;function Tn(){if(fi)return Jt;fi=1;var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,n=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,d){var c,x={},k=null,A=null;d!==void 0&&(k=""+d),u.key!==void 0&&(k=""+u.key),u.ref!==void 0&&(A=u.ref);for(c in u)i.call(u,c)&&!o.hasOwnProperty(c)&&(x[c]=u[c]);if(l&&l.defaultProps)for(c in u=l.defaultProps,u)x[c]===void 0&&(x[c]=u[c]);return{$$typeof:e,type:l,key:k,ref:A,props:x,_owner:n.current}}return Jt.Fragment=t,Jt.jsx=a,Jt.jsxs=a,Jt}process.env.NODE_ENV==="production"?Hr.exports=Tn():Hr.exports=En();var h=Hr.exports;/*! *****************************************************************************
27
+ */var Fn;function Gi(){if(Fn)return sr;Fn=1;var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var u,g={},E=null,P=null;h!==void 0&&(E=""+h),d.key!==void 0&&(E=""+d.key),d.ref!==void 0&&(P=d.ref);for(u in d)n.call(d,u)&&!o.hasOwnProperty(u)&&(g[u]=d[u]);if(c&&c.defaultProps)for(u in d=c.defaultProps,d)g[u]===void 0&&(g[u]=d[u]);return{$$typeof:e,type:c,key:E,ref:P,props:g,_owner:i.current}}return sr.Fragment=t,sr.jsx=a,sr.jsxs=a,sr}process.env.NODE_ENV==="production"?Jr.exports=Gi():Jr.exports=Zi();var f=Jr.exports;class Qr{constructor(){Z(this,Ue,void 0);Z(this,Nr,void 0);Z(this,it,[]);Z(this,Fr,e=>s(this,it).filter(t=>t.id!==e.id));Re(this,"containThisBin",e=>s(this,it).filter(n=>n.id===e.id).length!==0);Re(this,"storeBinToLocalStorage",e=>{this.containThisBin(e)||(s(this,it).push(e),s(this,Ue).setItem("selectedBins",JSON.stringify(s(this,it))))});Re(this,"deleteBinFromLocalStorage",e=>{this.containThisBin(e)&&(U(this,it,s(this,Fr).call(this,e)),s(this,Ue).setItem("selectedBins",JSON.stringify(s(this,it))))});Re(this,"getBinsFromLocalStorage",()=>{const e=JSON.parse(s(this,Ue).getItem("selectedBins"));return e===null?[]:e});U(this,Ue,window.localStorage),U(this,Nr,document.getElementById("cameraRig")),U(this,it,this.getBinsFromLocalStorage())}storeCurrentBinToLocalStorage(e){s(this,Ue).setItem("currentBin",JSON.stringify(e))}getCurrentBinFromLocalStorage(){const e=JSON.parse(s(this,Ue).getItem("currentBin"));return e===void 0||e===""?null:e}loadProperty(e){return JSON.parse(s(this,Ue).getItem(e))}storeProperty(e,t){s(this,Ue).setItem(e,JSON.stringify(t))}initHistogramData(e){e._typename.includes("TH3")?this.storeTH3HistogramLimits(e):e._typename.includes("TH2")&&this.storeTH2HistogramLimits(e)}storeTH2Offsets(e,t,n){let i=this.loadProperty("TH2"),o;i===null?(i={},o={name:"TH2",xOffset:1,yOffset:1,range:8}):o={name:"TH2",xOffset:e,yOffset:t,range:n},i.section=o,this.storeProperty("TH2",i)}storeTH3Offsets(e,t,n,i){let o=this.loadProperty("TH3"),a;o===null?(o={},a={name:"TH3",xOffset:1,yOffset:1,zOffset:1,range:4}):a={name:"TH3",xOffset:e,yOffset:t,zOffset:n,range:i},o.section=a,this.storeProperty("TH3",o)}storeOffsets(e){e.name.includes("TH3")||e.name.includes("th3")?this.storeTH3Offsets(e.xOffset,e.yOffset,e.zOffset,e.range):(e.name.includes("TH2")||e.name.includes("th2"))&&this.storeTH2Offsets(e.xOffset,e.yOffset,e.range)}storeFilePath(e){s(this,Ue).setItem("rootFile",e)}loadFilePath(){const e=s(this,Ue).getItem("rootFile");return e??"defaultHistogram"}loadTH2Offsets(){const e=this.loadProperty("TH2");return e!==null?e.section:null}loadTH3Offsets(){const e=this.loadProperty("TH3");return e!==null?e.section:null}loadOffsets(e){if(e.includes("TH3")||e.includes("th3"))return this.loadTH3Offsets();if(e.includes("TH2")||e.includes("th2"))return this.loadTH2Offsets()}}Ue=new WeakMap,Nr=new WeakMap,it=new WeakMap,Fr=new WeakMap;const Ln=new Qr;/*! *****************************************************************************
28
28
  Copyright (c) Microsoft Corporation.
29
29
 
30
30
  Permission to use, copy, modify, and/or distribute this software for any
@@ -37,9 +37,9 @@ Check the top-level render call using <`+D+">.")}return j}}function yn(f,j){{if(
37
37
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
38
38
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39
39
  PERFORMANCE OF THIS SOFTWARE.
40
- ***************************************************************************** */var Mr=function(r,e){return Mr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},Mr(r,e)};function Ot(r,e){Mr(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Rr(r){return typeof r=="function"}var pi=!1,Ze={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){if(r){var e=new Error;""+e.stack}pi=r},get useDeprecatedSynchronousErrorHandling(){return pi}};function Qt(r){setTimeout(function(){throw r},0)}var dr={closed:!0,next:function(r){},error:function(r){if(Ze.useDeprecatedSynchronousErrorHandling)throw r;Qt(r)},complete:function(){}},kn=function(){return Array.isArray||function(r){return r&&typeof r.length=="number"}}();function An(r){return r!==null&&typeof r=="object"}var Pn=function(){function r(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
41
- `+e.map(function(t,i){return i+1+") "+t.toString()}).join(`
42
- `):"",this.name="UnsubscriptionError",this.errors=e,this}return r.prototype=Object.create(Error.prototype),r}(),hr=Pn,er=function(){function r(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return r.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,i=t._parentOrParents,n=t._ctorUnsubscribe,o=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof r)i.remove(this);else if(i!==null)for(var l=0;l<i.length;++l){var u=i[l];u.remove(this)}if(Rr(o)){n&&(this._unsubscribe=void 0);try{o.call(this)}catch(x){e=x instanceof hr?mi(x.errors):[x]}}if(kn(a))for(var l=-1,d=a.length;++l<d;){var c=a[l];if(An(c))try{c.unsubscribe()}catch(k){e=e||[],k instanceof hr?e=e.concat(mi(k.errors)):e.push(k)}}if(e)throw new hr(e)}},r.prototype.add=function(e){var t=e;if(!e)return r.EMPTY;switch(typeof e){case"function":t=new r(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof r)){var i=t;t=new r,t._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=t._parentOrParents;if(n===null)t._parentOrParents=this;else if(n instanceof r){if(n===this)return t;t._parentOrParents=[n,this]}else if(n.indexOf(this)===-1)n.push(this);else return t;var o=this._subscriptions;return o===null?this._subscriptions=[t]:o.push(t),t},r.prototype.remove=function(e){var t=this._subscriptions;if(t){var i=t.indexOf(e);i!==-1&&t.splice(i,1)}},r.EMPTY=function(e){return e.closed=!0,e}(new r),r}();function mi(r){return r.reduce(function(e,t){return e.concat(t instanceof hr?t.errors:t)},[])}var fr=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),jt=function(r){Ot(e,r);function e(t,i,n){var o=r.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=dr;break;case 1:if(!t){o.destination=dr;break}if(typeof t=="object"){t instanceof e?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new gi(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new gi(o,t,i,n);break}return o}return e.prototype[fr]=function(){return this},e.create=function(t,i,n){var o=new e(t,i,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(er),gi=function(r){Ot(e,r);function e(t,i,n,o){var a=r.call(this)||this;a._parentSubscriber=t;var l,u=a;return Rr(i)?l=i:i&&(l=i.next,n=i.error,o=i.complete,i!==dr&&(u=Object.create(i),Rr(u.unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=l,a._error=n,a._complete=o,a}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var i=this._parentSubscriber;!Ze.useDeprecatedSynchronousErrorHandling||!i.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(i,this._next,t)&&this.unsubscribe()}},e.prototype.error=function(t){if(!this.isStopped){var i=this._parentSubscriber,n=Ze.useDeprecatedSynchronousErrorHandling;if(this._error)!n||!i.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(i,this._error,t),this.unsubscribe());else if(i.syncErrorThrowable)n?(i.syncErrorValue=t,i.syncErrorThrown=!0):Qt(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Qt(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var i=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};!Ze.useDeprecatedSynchronousErrorHandling||!i.syncErrorThrowable?(this.__tryOrUnsub(n),this.unsubscribe()):(this.__tryOrSetError(i,n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,i){try{t.call(this._context,i)}catch(n){if(this.unsubscribe(),Ze.useDeprecatedSynchronousErrorHandling)throw n;Qt(n)}},e.prototype.__tryOrSetError=function(t,i,n){if(!Ze.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{i.call(this._context,n)}catch(o){return Ze.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=o,t.syncErrorThrown=!0,!0):(Qt(o),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(jt);function _n(r){for(;r;){var e=r,t=e.closed,i=e.destination,n=e.isStopped;if(t||n)return!1;i&&i instanceof jt?r=i:r=null}return!0}function On(r,e,t){if(r){if(r instanceof jt)return r;if(r[fr])return r[fr]()}return!r&&!e&&!t?new jt(dr):new jt(r,e,t)}var jn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function zn(r){return r}function Dn(r){return r.length===0?zn:r.length===1?r[0]:function(t){return r.reduce(function(i,n){return n(i)},t)}}var yi=function(){function r(e){this._isScalar=!1,e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,i){var n=this.operator,o=On(e,t,i);if(n?o.add(n.call(o,this.source)):o.add(this.source||Ze.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),Ze.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Ze.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),_n(e)?e.error(t):console.warn(t)}},r.prototype.forEach=function(e,t){var i=this;return t=xi(t),new t(function(n,o){var a;a=i.subscribe(function(l){try{e(l)}catch(u){o(u),a&&a.unsubscribe()}},o,n)})},r.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},r.prototype[jn]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:Dn(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=xi(e),new e(function(i,n){var o;t.subscribe(function(a){return o=a},function(a){return n(a)},function(){return i(o)})})},r.create=function(e){return new r(e)},r}();function xi(r){if(r||(r=Promise),!r)throw new Error("no Promise impl found");return r}var $n=function(){function r(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return r.prototype=Object.create(Error.prototype),r}(),tr=$n,Hn=function(r){Ot(e,r);function e(t,i){var n=r.call(this)||this;return n.subject=t,n.subscriber=i,n.closed=!1,n}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,i=t.observers;if(this.subject=null,!(!i||i.length===0||t.isStopped||t.closed)){var n=i.indexOf(this.subscriber);n!==-1&&i.splice(n,1)}}},e}(er),Mn=function(r){Ot(e,r);function e(t){var i=r.call(this,t)||this;return i.destination=t,i}return e}(jt),ft=function(r){Ot(e,r);function e(){var t=r.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[fr]=function(){return new Mn(this)},e.prototype.lift=function(t){var i=new bi(this,this);return i.operator=t,i},e.prototype.next=function(t){if(this.closed)throw new tr;if(!this.isStopped)for(var i=this.observers,n=i.length,o=i.slice(),a=0;a<n;a++)o[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new tr;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var i=this.observers,n=i.length,o=i.slice(),a=0;a<n;a++)o[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new tr;this.isStopped=!0;for(var t=this.observers,i=t.length,n=t.slice(),o=0;o<i;o++)n[o].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new tr;return r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new tr;return this.hasError?(t.error(this.thrownError),er.EMPTY):this.isStopped?(t.complete(),er.EMPTY):(this.observers.push(t),new Hn(this,t))},e.prototype.asObservable=function(){var t=new yi;return t.source=this,t},e.create=function(t,i){return new bi(t,i)},e}(yi),bi=function(r){Ot(e,r);function e(t,i){var n=r.call(this)||this;return n.destination=t,n.source=i,n}return e.prototype.next=function(t){var i=this.destination;i&&i.next&&i.next(t)},e.prototype.error=function(t){var i=this.destination;i&&i.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var i=this.source;return i?this.source.subscribe(t):er.EMPTY},e}(ft);class Rn{constructor(){F(this,yt,void 0);B(this,yt,new ft)}setVisibilityOfBanners(e){s(this,yt).next({device:e})}shiftBanners(){s(this,yt).next("shift")}setUserState(){s(this,yt).next("show")}getCameraSubject(){return s(this,yt).asObservable()}}yt=new WeakMap;const Et=new Rn,pt=v.createContext();he.registerComponent("interaction",{init:function(){const r=this.el;r.addEventListener("click",e=>{console.log(e),r.setAttribute("material","color","orange")}),r.addEventListener("mouseenter",e=>{console.log(e),r.setAttribute("material","color","green")}),r.addEventListener("mouseleave",e=>{r.setAttribute("material","color","gray")})}});class Ir{constructor(){F(this,at,void 0);B(this,at,new ft)}changeHistogramSectionByOffset(e,t,i,n){s(this,at).next({name:t,axis:e,increment:i,defaultRange:n})}changeHistogramFunction(e,t){s(this,at).next({name:t,fFunction:e})}changeHistogramScale(e,t){s(this,at).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){s(this,at).next({name:t,minValue:e})}getChangedSection(){return s(this,at).asObservable()}}at=new WeakMap;const Ge=new Ir,_e=new Ir,je=new Ir;var Br={exports:{}},be={};/**
40
+ ***************************************************************************** */var en=function(r,e){return en=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])},en(r,e)};function Nt(r,e){en(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function tn(r){return typeof r=="function"}var Vn=!1,rt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){if(r){var e=new Error;""+e.stack}Vn=r},get useDeprecatedSynchronousErrorHandling(){return Vn}};function ar(r){setTimeout(function(){throw r},0)}var _r={closed:!0,next:function(r){},error:function(r){if(rt.useDeprecatedSynchronousErrorHandling)throw r;ar(r)},complete:function(){}},Ki=function(){return Array.isArray||function(r){return r&&typeof r.length=="number"}}();function qi(r){return r!==null&&typeof r=="object"}var Ji=function(){function r(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
41
+ `+e.map(function(t,n){return n+1+") "+t.toString()}).join(`
42
+ `):"",this.name="UnsubscriptionError",this.errors=e,this}return r.prototype=Object.create(Error.prototype),r}(),Ar=Ji,lr=function(){function r(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return r.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,n=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof r)n.remove(this);else if(n!==null)for(var c=0;c<n.length;++c){var d=n[c];d.remove(this)}if(tn(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(g){e=g instanceof Ar?Xn(g.errors):[g]}}if(Ki(a))for(var c=-1,h=a.length;++c<h;){var u=a[c];if(qi(u))try{u.unsubscribe()}catch(E){e=e||[],E instanceof Ar?e=e.concat(Xn(E.errors)):e.push(E)}}if(e)throw new Ar(e)}},r.prototype.add=function(e){var t=e;if(!e)return r.EMPTY;switch(typeof e){case"function":t=new r(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof r)){var n=t;t=new r,t._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=t._parentOrParents;if(i===null)t._parentOrParents=this;else if(i instanceof r){if(i===this)return t;t._parentOrParents=[i,this]}else if(i.indexOf(this)===-1)i.push(this);else return t;var o=this._subscriptions;return o===null?this._subscriptions=[t]:o.push(t),t},r.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}},r.EMPTY=function(e){return e.closed=!0,e}(new r),r}();function Xn(r){return r.reduce(function(e,t){return e.concat(t instanceof Ar?t.errors:t)},[])}var Pr=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Ft=function(r){Nt(e,r);function e(t,n,i){var o=r.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=_r;break;case 1:if(!t){o.destination=_r;break}if(typeof t=="object"){t instanceof e?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new Wn(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new Wn(o,t,n,i);break}return o}return e.prototype[Pr]=function(){return this},e.create=function(t,n,i){var o=new e(t,n,i);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(lr),Wn=function(r){Nt(e,r);function e(t,n,i,o){var a=r.call(this)||this;a._parentSubscriber=t;var c,d=a;return tn(n)?c=n:n&&(c=n.next,i=n.error,o=n.complete,n!==_r&&(d=Object.create(n),tn(d.unsubscribe)&&a.add(d.unsubscribe.bind(d)),d.unsubscribe=a.unsubscribe.bind(a))),a._context=d,a._next=c,a._error=i,a._complete=o,a}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var n=this._parentSubscriber;!rt.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(n,this._next,t)&&this.unsubscribe()}},e.prototype.error=function(t){if(!this.isStopped){var n=this._parentSubscriber,i=rt.useDeprecatedSynchronousErrorHandling;if(this._error)!i||!n.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(n,this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)i?(n.syncErrorValue=t,n.syncErrorThrown=!0):ar(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;ar(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var i=function(){return t._complete.call(t._context)};!rt.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?(this.__tryOrUnsub(i),this.unsubscribe()):(this.__tryOrSetError(n,i),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,n){try{t.call(this._context,n)}catch(i){if(this.unsubscribe(),rt.useDeprecatedSynchronousErrorHandling)throw i;ar(i)}},e.prototype.__tryOrSetError=function(t,n,i){if(!rt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,i)}catch(o){return rt.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=o,t.syncErrorThrown=!0,!0):(ar(o),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Ft);function Qi(r){for(;r;){var e=r,t=e.closed,n=e.destination,i=e.isStopped;if(t||i)return!1;n&&n instanceof Ft?r=n:r=null}return!0}function eo(r,e,t){if(r){if(r instanceof Ft)return r;if(r[Pr])return r[Pr]()}return!r&&!e&&!t?new Ft(_r):new Ft(r,e,t)}var to=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ro(r){return r}function no(r){return r.length===0?ro:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var Un=function(){function r(e){this._isScalar=!1,e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this.operator,o=eo(e,t,n);if(i?o.add(i.call(o,this.source)):o.add(this.source||rt.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),rt.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){rt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Qi(e)?e.error(t):console.warn(t)}},r.prototype.forEach=function(e,t){var n=this;return t=Zn(t),new t(function(i,o){var a;a=n.subscribe(function(c){try{e(c)}catch(d){o(d),a&&a.unsubscribe()}},o,i)})},r.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},r.prototype[to]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:no(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=Zn(e),new e(function(n,i){var o;t.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},r.create=function(e){return new r(e)},r}();function Zn(r){if(r||(r=Promise),!r)throw new Error("no Promise impl found");return r}var io=function(){function r(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return r.prototype=Object.create(Error.prototype),r}(),cr=io,oo=function(r){Nt(e,r);function e(t,n){var i=r.call(this)||this;return i.subject=t,i.subscriber=n,i.closed=!1,i}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,n=t.observers;if(this.subject=null,!(!n||n.length===0||t.isStopped||t.closed)){var i=n.indexOf(this.subscriber);i!==-1&&n.splice(i,1)}}},e}(lr),so=function(r){Nt(e,r);function e(t){var n=r.call(this,t)||this;return n.destination=t,n}return e}(Ft),gt=function(r){Nt(e,r);function e(){var t=r.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[Pr]=function(){return new so(this)},e.prototype.lift=function(t){var n=new Gn(this,this);return n.operator=t,n},e.prototype.next=function(t){if(this.closed)throw new cr;if(!this.isStopped)for(var n=this.observers,i=n.length,o=n.slice(),a=0;a<i;a++)o[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new cr;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var n=this.observers,i=n.length,o=n.slice(),a=0;a<i;a++)o[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new cr;this.isStopped=!0;for(var t=this.observers,n=t.length,i=t.slice(),o=0;o<n;o++)i[o].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new cr;return r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new cr;return this.hasError?(t.error(this.thrownError),lr.EMPTY):this.isStopped?(t.complete(),lr.EMPTY):(this.observers.push(t),new oo(this,t))},e.prototype.asObservable=function(){var t=new Un;return t.source=this,t},e.create=function(t,n){return new Gn(t,n)},e}(Un),Gn=function(r){Nt(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n=this.destination;n&&n.next&&n.next(t)},e.prototype.error=function(t){var n=this.destination;n&&n.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var n=this.source;return n?this.source.subscribe(t):lr.EMPTY},e}(gt);class ao{constructor(){Z(this,$t,void 0);U(this,$t,new gt)}saveSelectedBinToLocalStorage(){s(this,$t).next(!0)}deleteBinFromLocalStorage(){s(this,$t).next(!1)}getKeyboardEvent(){return s(this,$t).asObservable()}}$t=new WeakMap;const Or=new ao;class lo{constructor(){Z(this,Ut,void 0);U(this,Ut,new gt)}showBinProjection(e){s(this,Ut).next(e)}getServiceEvent(){return s(this,Ut).asObservable()}}Ut=new WeakMap;const Kn=new lo;class co{constructor(){Z(this,zt,void 0);U(this,zt,new gt)}sendDataOfTheSelectedBin(e){s(this,zt).next(e)}emmitCommand(e){s(this,zt).next({command:e})}getBinDistributor(){return s(this,zt).asObservable()}}zt=new WeakMap;const ur=new co,yt=v.createContext();be.registerComponent("interaction",{init:function(){const r=this.el;r.addEventListener("click",e=>{r.setAttribute("material","color","orange")}),r.addEventListener("mouseenter",e=>{r.object3D.position.z+=.002}),r.addEventListener("mouseleave",e=>{r.object3D.position.z-=.002})}});class rn{constructor(){Z(this,dt,void 0);U(this,dt,new gt)}changeHistogramSectionByOffset(e,t,n,i){s(this,dt).next({name:t,axis:e,increment:n,defaultRange:i})}changeHistogramFunction(e,t){s(this,dt).next({name:t,fFunction:e})}changeHistogramScale(e,t){s(this,dt).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){s(this,dt).next({name:t,minValue:e})}getChangedSection(){return s(this,dt).asObservable()}}dt=new WeakMap;const nt=new rn,$e=new rn,He=new rn;var nn={exports:{}},Ee={};/**
43
43
  * @license React
44
44
  * react-is.development.js
45
45
  *
@@ -47,7 +47,7 @@ Check the top-level render call using <`+D+">.")}return j}}function yn(f,j){{if(
47
47
  *
48
48
  * This source code is licensed under the MIT license found in the
49
49
  * LICENSE file in the root directory of this source tree.
50
- */var vi;function In(){return vi||(vi=1,process.env.NODE_ENV!=="production"&&function(){var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),b=!1,w=!1,y=!1,_=!1,C=!1,m;m=Symbol.for("react.module.reference");function T($){return!!(typeof $=="string"||typeof $=="function"||$===t||$===n||C||$===i||$===d||$===c||_||$===A||b||w||y||typeof $=="object"&&$!==null&&($.$$typeof===k||$.$$typeof===x||$.$$typeof===o||$.$$typeof===a||$.$$typeof===u||$.$$typeof===m||$.getModuleId!==void 0))}function g($){if(typeof $=="object"&&$!==null){var te=$.$$typeof;switch(te){case r:var Pe=$.type;switch(Pe){case t:case n:case i:case d:case c:return Pe;default:var ce=Pe&&Pe.$$typeof;switch(ce){case l:case a:case u:case k:case x:case o:return ce;default:return te}}case e:return te}}}var X=a,R=o,P=r,Y=u,se=t,G=k,I=x,W=e,Q=n,U=i,V=d,fe=c,de=!1,Te=!1;function ke($){return de||(de=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Re($){return Te||(Te=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H($){return g($)===a}function z($){return g($)===o}function M($){return typeof $=="object"&&$!==null&&$.$$typeof===r}function S($){return g($)===u}function p($){return g($)===t}function K($){return g($)===k}function E($){return g($)===x}function le($){return g($)===e}function ee($){return g($)===n}function ie($){return g($)===i}function O($){return g($)===d}function ne($){return g($)===c}be.ContextConsumer=X,be.ContextProvider=R,be.Element=P,be.ForwardRef=Y,be.Fragment=se,be.Lazy=G,be.Memo=I,be.Portal=W,be.Profiler=Q,be.StrictMode=U,be.Suspense=V,be.SuspenseList=fe,be.isAsyncMode=ke,be.isConcurrentMode=Re,be.isContextConsumer=H,be.isContextProvider=z,be.isElement=M,be.isForwardRef=S,be.isFragment=p,be.isLazy=K,be.isMemo=E,be.isPortal=le,be.isProfiler=ee,be.isStrictMode=ie,be.isSuspense=O,be.isSuspenseList=ne,be.isValidElementType=T,be.typeOf=g}()),be}var ve={};/**
50
+ */var qn;function uo(){return qn||(qn=1,process.env.NODE_ENV!=="production"&&function(){var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A=!1,S=!1,y=!1,_=!1,C=!1,$;$=Symbol.for("react.module.reference");function D(M){return!!(typeof M=="string"||typeof M=="function"||M===t||M===i||C||M===n||M===h||M===u||_||M===P||A||S||y||typeof M=="object"&&M!==null&&(M.$$typeof===E||M.$$typeof===g||M.$$typeof===o||M.$$typeof===a||M.$$typeof===d||M.$$typeof===$||M.getModuleId!==void 0))}function b(M){if(typeof M=="object"&&M!==null){var ie=M.$$typeof;switch(ie){case r:var we=M.type;switch(we){case t:case i:case n:case h:case u:return we;default:var pe=we&&we.$$typeof;switch(pe){case c:case a:case d:case E:case g:case o:return pe;default:return ie}}case e:return ie}}}var G=a,O=o,I=r,X=d,T=t,ee=E,F=g,N=e,L=i,K=n,q=h,ye=u,me=!1,Se=!1;function Ae(M){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ie(M){return Se||(Se=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function R(M){return b(M)===a}function H(M){return b(M)===o}function Y(M){return typeof M=="object"&&M!==null&&M.$$typeof===r}function w(M){return b(M)===d}function m(M){return b(M)===t}function re(M){return b(M)===E}function k(M){return b(M)===g}function fe(M){return b(M)===e}function ne(M){return b(M)===i}function ae(M){return b(M)===n}function j(M){return b(M)===h}function le(M){return b(M)===u}Ee.ContextConsumer=G,Ee.ContextProvider=O,Ee.Element=I,Ee.ForwardRef=X,Ee.Fragment=T,Ee.Lazy=ee,Ee.Memo=F,Ee.Portal=N,Ee.Profiler=L,Ee.StrictMode=K,Ee.Suspense=q,Ee.SuspenseList=ye,Ee.isAsyncMode=Ae,Ee.isConcurrentMode=Ie,Ee.isContextConsumer=R,Ee.isContextProvider=H,Ee.isElement=Y,Ee.isForwardRef=w,Ee.isFragment=m,Ee.isLazy=re,Ee.isMemo=k,Ee.isPortal=fe,Ee.isProfiler=ne,Ee.isStrictMode=ae,Ee.isSuspense=j,Ee.isSuspenseList=le,Ee.isValidElementType=D,Ee.typeOf=b}()),Ee}var Te={};/**
51
51
  * @license React
52
52
  * react-is.production.min.js
53
53
  *
@@ -55,21 +55,21 @@ Check the top-level render call using <`+D+">.")}return j}}function yn(f,j){{if(
55
55
  *
56
56
  * This source code is licensed under the MIT license found in the
57
57
  * LICENSE file in the root directory of this source tree.
58
- */var Si;function Bn(){if(Si)return ve;Si=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function w(y){if(typeof y=="object"&&y!==null){var _=y.$$typeof;switch(_){case r:switch(y=y.type,y){case t:case n:case i:case d:case c:return y;default:switch(y=y&&y.$$typeof,y){case l:case a:case u:case k:case x:case o:return y;default:return _}}case e:return _}}}return ve.ContextConsumer=a,ve.ContextProvider=o,ve.Element=r,ve.ForwardRef=u,ve.Fragment=t,ve.Lazy=k,ve.Memo=x,ve.Portal=e,ve.Profiler=n,ve.StrictMode=i,ve.Suspense=d,ve.SuspenseList=c,ve.isAsyncMode=function(){return!1},ve.isConcurrentMode=function(){return!1},ve.isContextConsumer=function(y){return w(y)===a},ve.isContextProvider=function(y){return w(y)===o},ve.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===r},ve.isForwardRef=function(y){return w(y)===u},ve.isFragment=function(y){return w(y)===t},ve.isLazy=function(y){return w(y)===k},ve.isMemo=function(y){return w(y)===x},ve.isPortal=function(y){return w(y)===e},ve.isProfiler=function(y){return w(y)===n},ve.isStrictMode=function(y){return w(y)===i},ve.isSuspense=function(y){return w(y)===d},ve.isSuspenseList=function(y){return w(y)===c},ve.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===t||y===n||y===i||y===d||y===c||y===A||typeof y=="object"&&y!==null&&(y.$$typeof===k||y.$$typeof===x||y.$$typeof===o||y.$$typeof===a||y.$$typeof===u||y.$$typeof===b||y.getModuleId!==void 0)},ve.typeOf=w,ve}process.env.NODE_ENV==="production"?Br.exports=Bn():Br.exports=In();var Yr=Br.exports;function Yn(r){function e(H,z,M,S,p){for(var K=0,E=0,le=0,ee=0,ie,O,ne=0,$=0,te,Pe=te=ie=0,ce=0,$e=0,it=0,Me=0,Ut=M.length,ut=Ut-1,Ve,q="",Oe="",Zt="",dt="",nt;ce<Ut;){if(O=M.charCodeAt(ce),ce===ut&&E+ee+le+K!==0&&(E!==0&&(O=E===47?10:47),ee=le=K=0,Ut++,ut++),E+ee+le+K===0){if(ce===ut&&(0<$e&&(q=q.replace(k,"")),0<q.trim().length)){switch(O){case 32:case 9:case 59:case 13:case 10:break;default:q+=M.charAt(ce)}O=59}switch(O){case 123:for(q=q.trim(),ie=q.charCodeAt(0),te=1,Me=++ce;ce<Ut;){switch(O=M.charCodeAt(ce)){case 123:te++;break;case 125:te--;break;case 47:switch(O=M.charCodeAt(ce+1)){case 42:case 47:e:{for(Pe=ce+1;Pe<ut;++Pe)switch(M.charCodeAt(Pe)){case 47:if(O===42&&M.charCodeAt(Pe-1)===42&&ce+2!==Pe){ce=Pe+1;break e}break;case 10:if(O===47){ce=Pe+1;break e}}ce=Pe}}break;case 91:O++;case 40:O++;case 34:case 39:for(;ce++<ut&&M.charCodeAt(ce)!==O;);}if(te===0)break;ce++}switch(te=M.substring(Me,ce),ie===0&&(ie=(q=q.replace(x,"").trim()).charCodeAt(0)),ie){case 64:switch(0<$e&&(q=q.replace(k,"")),O=q.charCodeAt(1),O){case 100:case 109:case 115:case 45:$e=z;break;default:$e=V}if(te=e(z,$e,te,O,p+1),Me=te.length,0<de&&($e=t(V,q,it),nt=l(3,te,$e,z,W,I,Me,O,p,S),q=$e.join(""),nt!==void 0&&(Me=(te=nt.trim()).length)===0&&(O=0,te="")),0<Me)switch(O){case 115:q=q.replace(X,a);case 100:case 109:case 45:te=q+"{"+te+"}";break;case 107:q=q.replace(C,"$1 $2"),te=q+"{"+te+"}",te=U===1||U===2&&o("@"+te,3)?"@-webkit-"+te+"@"+te:"@"+te;break;default:te=q+te,S===112&&(te=(Oe+=te,""))}else te="";break;default:te=e(z,t(z,q,it),te,S,p+1)}Zt+=te,te=it=$e=Pe=ie=0,q="",O=M.charCodeAt(++ce);break;case 125:case 59:if(q=(0<$e?q.replace(k,""):q).trim(),1<(Me=q.length))switch(Pe===0&&(ie=q.charCodeAt(0),ie===45||96<ie&&123>ie)&&(Me=(q=q.replace(" ",":")).length),0<de&&(nt=l(1,q,z,H,W,I,Oe.length,S,p,S))!==void 0&&(Me=(q=nt.trim()).length)===0&&(q="\0\0"),ie=q.charCodeAt(0),O=q.charCodeAt(1),ie){case 0:break;case 64:if(O===105||O===99){dt+=q+M.charAt(ce);break}default:q.charCodeAt(Me-1)!==58&&(Oe+=n(q,ie,O,q.charCodeAt(2)))}it=$e=Pe=ie=0,q="",O=M.charCodeAt(++ce)}}switch(O){case 13:case 10:E===47?E=0:1+ie===0&&S!==107&&0<q.length&&($e=1,q+="\0"),0<de*ke&&l(0,q,z,H,W,I,Oe.length,S,p,S),I=1,W++;break;case 59:case 125:if(E+ee+le+K===0){I++;break}default:switch(I++,Ve=M.charAt(ce),O){case 9:case 32:if(ee+K+E===0)switch(ne){case 44:case 58:case 9:case 32:Ve="";break;default:O!==32&&(Ve=" ")}break;case 0:Ve="\\0";break;case 12:Ve="\\f";break;case 11:Ve="\\v";break;case 38:ee+E+K===0&&($e=it=1,Ve="\f"+Ve);break;case 108:if(ee+E+K+Q===0&&0<Pe)switch(ce-Pe){case 2:ne===112&&M.charCodeAt(ce-3)===58&&(Q=ne);case 8:$===111&&(Q=$)}break;case 58:ee+E+K===0&&(Pe=ce);break;case 44:E+le+ee+K===0&&($e=1,Ve+="\r");break;case 34:case 39:E===0&&(ee=ee===O?0:ee===0?O:ee);break;case 91:ee+E+le===0&&K++;break;case 93:ee+E+le===0&&K--;break;case 41:ee+E+K===0&&le--;break;case 40:if(ee+E+K===0){if(ie===0)switch(2*ne+3*$){case 533:break;default:ie=1}le++}break;case 64:E+le+ee+K+Pe+te===0&&(te=1);break;case 42:case 47:if(!(0<ee+K+le))switch(E){case 0:switch(2*O+3*M.charCodeAt(ce+1)){case 235:E=47;break;case 220:Me=ce,E=42}break;case 42:O===47&&ne===42&&Me+2!==ce&&(M.charCodeAt(Me+2)===33&&(Oe+=M.substring(Me,ce+1)),Ve="",E=0)}}E===0&&(q+=Ve)}$=ne,ne=O,ce++}if(Me=Oe.length,0<Me){if($e=z,0<de&&(nt=l(2,Oe,$e,H,W,I,Me,S,p,S),nt!==void 0&&(Oe=nt).length===0))return dt+Oe+Zt;if(Oe=$e.join(",")+"{"+Oe+"}",U*Q!==0){switch(U!==2||o(Oe,2)||(Q=0),Q){case 111:Oe=Oe.replace(T,":-moz-$1")+Oe;break;case 112:Oe=Oe.replace(m,"::-webkit-input-$1")+Oe.replace(m,"::-moz-$1")+Oe.replace(m,":-ms-input-$1")+Oe}Q=0}}return dt+Oe+Zt}function t(H,z,M){var S=z.trim().split(y);z=S;var p=S.length,K=H.length;switch(K){case 0:case 1:var E=0;for(H=K===0?"":H[0]+" ";E<p;++E)z[E]=i(H,z[E],M).trim();break;default:var le=E=0;for(z=[];E<p;++E)for(var ee=0;ee<K;++ee)z[le++]=i(H[ee]+" ",S[E],M).trim()}return z}function i(H,z,M){var S=z.charCodeAt(0);switch(33>S&&(S=(z=z.trim()).charCodeAt(0)),S){case 38:return z.replace(_,"$1"+H.trim());case 58:return H.trim()+z.replace(_,"$1"+H.trim());default:if(0<1*M&&0<z.indexOf("\f"))return z.replace(_,(H.charCodeAt(0)===58?"":"$1")+H.trim())}return H+z}function n(H,z,M,S){var p=H+";",K=2*z+3*M+4*S;if(K===944){H=p.indexOf(":",9)+1;var E=p.substring(H,p.length-1).trim();return E=p.substring(0,H).trim()+E+";",U===1||U===2&&o(E,1)?"-webkit-"+E+E:E}if(U===0||U===2&&!o(p,1))return p;switch(K){case 1015:return p.charCodeAt(10)===97?"-webkit-"+p+p:p;case 951:return p.charCodeAt(3)===116?"-webkit-"+p+p:p;case 963:return p.charCodeAt(5)===110?"-webkit-"+p+p:p;case 1009:if(p.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+p+p;case 978:return"-webkit-"+p+"-moz-"+p+p;case 1019:case 983:return"-webkit-"+p+"-moz-"+p+"-ms-"+p+p;case 883:if(p.charCodeAt(8)===45)return"-webkit-"+p+p;if(0<p.indexOf("image-set(",11))return p.replace(G,"$1-webkit-$2")+p;break;case 932:if(p.charCodeAt(4)===45)switch(p.charCodeAt(5)){case 103:return"-webkit-box-"+p.replace("-grow","")+"-webkit-"+p+"-ms-"+p.replace("grow","positive")+p;case 115:return"-webkit-"+p+"-ms-"+p.replace("shrink","negative")+p;case 98:return"-webkit-"+p+"-ms-"+p.replace("basis","preferred-size")+p}return"-webkit-"+p+"-ms-"+p+p;case 964:return"-webkit-"+p+"-ms-flex-"+p+p;case 1023:if(p.charCodeAt(8)!==99)break;return E=p.substring(p.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+E+"-webkit-"+p+"-ms-flex-pack"+E+p;case 1005:return b.test(p)?p.replace(A,":-webkit-")+p.replace(A,":-moz-")+p:p;case 1e3:switch(E=p.substring(13).trim(),z=E.indexOf("-")+1,E.charCodeAt(0)+E.charCodeAt(z)){case 226:E=p.replace(g,"tb");break;case 232:E=p.replace(g,"tb-rl");break;case 220:E=p.replace(g,"lr");break;default:return p}return"-webkit-"+p+"-ms-"+E+p;case 1017:if(p.indexOf("sticky",9)===-1)break;case 975:switch(z=(p=H).length-10,E=(p.charCodeAt(z)===33?p.substring(0,z):p).substring(H.indexOf(":",7)+1).trim(),K=E.charCodeAt(0)+(E.charCodeAt(7)|0)){case 203:if(111>E.charCodeAt(8))break;case 115:p=p.replace(E,"-webkit-"+E)+";"+p;break;case 207:case 102:p=p.replace(E,"-webkit-"+(102<K?"inline-":"")+"box")+";"+p.replace(E,"-webkit-"+E)+";"+p.replace(E,"-ms-"+E+"box")+";"+p}return p+";";case 938:if(p.charCodeAt(5)===45)switch(p.charCodeAt(6)){case 105:return E=p.replace("-items",""),"-webkit-"+p+"-webkit-box-"+E+"-ms-flex-"+E+p;case 115:return"-webkit-"+p+"-ms-flex-item-"+p.replace(P,"")+p;default:return"-webkit-"+p+"-ms-flex-line-pack"+p.replace("align-content","").replace(P,"")+p}break;case 973:case 989:if(p.charCodeAt(3)!==45||p.charCodeAt(4)===122)break;case 931:case 953:if(se.test(H)===!0)return(E=H.substring(H.indexOf(":")+1)).charCodeAt(0)===115?n(H.replace("stretch","fill-available"),z,M,S).replace(":fill-available",":stretch"):p.replace(E,"-webkit-"+E)+p.replace(E,"-moz-"+E.replace("fill-",""))+p;break;case 962:if(p="-webkit-"+p+(p.charCodeAt(5)===102?"-ms-"+p:"")+p,M+S===211&&p.charCodeAt(13)===105&&0<p.indexOf("transform",10))return p.substring(0,p.indexOf(";",27)+1).replace(w,"$1-webkit-$2")+p}return p}function o(H,z){var M=H.indexOf(z===1?":":"{"),S=H.substring(0,z!==3?M:10);return M=H.substring(M+1,H.length-1),Te(z!==2?S:S.replace(Y,"$1"),M,z)}function a(H,z){var M=n(z,z.charCodeAt(0),z.charCodeAt(1),z.charCodeAt(2));return M!==z+";"?M.replace(R," or ($1)").substring(4):"("+z+")"}function l(H,z,M,S,p,K,E,le,ee,ie){for(var O=0,ne=z,$;O<de;++O)switch($=fe[O].call(c,H,ne,M,S,p,K,E,le,ee,ie)){case void 0:case!1:case!0:case null:break;default:ne=$}if(ne!==z)return ne}function u(H){switch(H){case void 0:case null:de=fe.length=0;break;default:if(typeof H=="function")fe[de++]=H;else if(typeof H=="object")for(var z=0,M=H.length;z<M;++z)u(H[z]);else ke=!!H|0}return u}function d(H){return H=H.prefix,H!==void 0&&(Te=null,H?typeof H!="function"?U=1:(U=2,Te=H):U=0),d}function c(H,z){var M=H;if(33>M.charCodeAt(0)&&(M=M.trim()),Re=M,M=[Re],0<de){var S=l(-1,z,M,M,W,I,0,0,0,0);S!==void 0&&typeof S=="string"&&(z=S)}var p=e(V,M,z,0,0);return 0<de&&(S=l(-2,p,M,M,W,I,p.length,0,0,0),S!==void 0&&(p=S)),Re="",Q=0,I=W=1,p}var x=/^\0+/g,k=/[\0\r\f]/g,A=/: */g,b=/zoo|gra/,w=/([,: ])(transform)/g,y=/,\r+?/g,_=/([\t\r\n ])*\f?&/g,C=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,T=/:(read-only)/g,g=/[svh]\w+-[tblr]{2}/,X=/\(\s*(.*)\s*\)/g,R=/([\s\S]*?);/g,P=/-self|flex-/g,Y=/[^]*?(:[rp][el]a[\w-]+)[^]*/,se=/stretch|:\s*\w+\-(?:conte|avail)/,G=/([^-])(image-set\()/,I=1,W=1,Q=0,U=1,V=[],fe=[],de=0,Te=null,ke=0,Re="";return c.use=u,c.set=d,r!==void 0&&d(r),c}var Fn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Nn(r){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=r(t)),e[t]}}var Ln=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,wi=Nn(function(r){return Ln.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),Fr={exports:{}},Se={};/** @license React v16.13.1
58
+ */var Jn;function fo(){if(Jn)return Te;Jn=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A;A=Symbol.for("react.module.reference");function S(y){if(typeof y=="object"&&y!==null){var _=y.$$typeof;switch(_){case r:switch(y=y.type,y){case t:case i:case n:case h:case u:return y;default:switch(y=y&&y.$$typeof,y){case c:case a:case d:case E:case g:case o:return y;default:return _}}case e:return _}}}return Te.ContextConsumer=a,Te.ContextProvider=o,Te.Element=r,Te.ForwardRef=d,Te.Fragment=t,Te.Lazy=E,Te.Memo=g,Te.Portal=e,Te.Profiler=i,Te.StrictMode=n,Te.Suspense=h,Te.SuspenseList=u,Te.isAsyncMode=function(){return!1},Te.isConcurrentMode=function(){return!1},Te.isContextConsumer=function(y){return S(y)===a},Te.isContextProvider=function(y){return S(y)===o},Te.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===r},Te.isForwardRef=function(y){return S(y)===d},Te.isFragment=function(y){return S(y)===t},Te.isLazy=function(y){return S(y)===E},Te.isMemo=function(y){return S(y)===g},Te.isPortal=function(y){return S(y)===e},Te.isProfiler=function(y){return S(y)===i},Te.isStrictMode=function(y){return S(y)===n},Te.isSuspense=function(y){return S(y)===h},Te.isSuspenseList=function(y){return S(y)===u},Te.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===t||y===i||y===n||y===h||y===u||y===P||typeof y=="object"&&y!==null&&(y.$$typeof===E||y.$$typeof===g||y.$$typeof===o||y.$$typeof===a||y.$$typeof===d||y.$$typeof===A||y.getModuleId!==void 0)},Te.typeOf=S,Te}process.env.NODE_ENV==="production"?nn.exports=fo():nn.exports=uo();var on=nn.exports;function ho(r){function e(R,H,Y,w,m){for(var re=0,k=0,fe=0,ne=0,ae,j,le=0,M=0,ie,we=ie=ae=0,pe=0,Me=0,Fe=0,Be=0,_t=Y.length,Ge=_t-1,Le,se="",De="",mt="",Ve="",Je;pe<_t;){if(j=Y.charCodeAt(pe),pe===Ge&&k+ne+fe+re!==0&&(k!==0&&(j=k===47?10:47),ne=fe=re=0,_t++,Ge++),k+ne+fe+re===0){if(pe===Ge&&(0<Me&&(se=se.replace(E,"")),0<se.trim().length)){switch(j){case 32:case 9:case 59:case 13:case 10:break;default:se+=Y.charAt(pe)}j=59}switch(j){case 123:for(se=se.trim(),ae=se.charCodeAt(0),ie=1,Be=++pe;pe<_t;){switch(j=Y.charCodeAt(pe)){case 123:ie++;break;case 125:ie--;break;case 47:switch(j=Y.charCodeAt(pe+1)){case 42:case 47:e:{for(we=pe+1;we<Ge;++we)switch(Y.charCodeAt(we)){case 47:if(j===42&&Y.charCodeAt(we-1)===42&&pe+2!==we){pe=we+1;break e}break;case 10:if(j===47){pe=we+1;break e}}pe=we}}break;case 91:j++;case 40:j++;case 34:case 39:for(;pe++<Ge&&Y.charCodeAt(pe)!==j;);}if(ie===0)break;pe++}switch(ie=Y.substring(Be,pe),ae===0&&(ae=(se=se.replace(g,"").trim()).charCodeAt(0)),ae){case 64:switch(0<Me&&(se=se.replace(E,"")),j=se.charCodeAt(1),j){case 100:case 109:case 115:case 45:Me=H;break;default:Me=q}if(ie=e(H,Me,ie,j,m+1),Be=ie.length,0<me&&(Me=t(q,se,Fe),Je=c(3,ie,Me,H,N,F,Be,j,m,w),se=Me.join(""),Je!==void 0&&(Be=(ie=Je.trim()).length)===0&&(j=0,ie="")),0<Be)switch(j){case 115:se=se.replace(G,a);case 100:case 109:case 45:ie=se+"{"+ie+"}";break;case 107:se=se.replace(C,"$1 $2"),ie=se+"{"+ie+"}",ie=K===1||K===2&&o("@"+ie,3)?"@-webkit-"+ie+"@"+ie:"@"+ie;break;default:ie=se+ie,w===112&&(ie=(De+=ie,""))}else ie="";break;default:ie=e(H,t(H,se,Fe),ie,w,m+1)}mt+=ie,ie=Fe=Me=we=ae=0,se="",j=Y.charCodeAt(++pe);break;case 125:case 59:if(se=(0<Me?se.replace(E,""):se).trim(),1<(Be=se.length))switch(we===0&&(ae=se.charCodeAt(0),ae===45||96<ae&&123>ae)&&(Be=(se=se.replace(" ",":")).length),0<me&&(Je=c(1,se,H,R,N,F,De.length,w,m,w))!==void 0&&(Be=(se=Je.trim()).length)===0&&(se="\0\0"),ae=se.charCodeAt(0),j=se.charCodeAt(1),ae){case 0:break;case 64:if(j===105||j===99){Ve+=se+Y.charAt(pe);break}default:se.charCodeAt(Be-1)!==58&&(De+=i(se,ae,j,se.charCodeAt(2)))}Fe=Me=we=ae=0,se="",j=Y.charCodeAt(++pe)}}switch(j){case 13:case 10:k===47?k=0:1+ae===0&&w!==107&&0<se.length&&(Me=1,se+="\0"),0<me*Ae&&c(0,se,H,R,N,F,De.length,w,m,w),F=1,N++;break;case 59:case 125:if(k+ne+fe+re===0){F++;break}default:switch(F++,Le=Y.charAt(pe),j){case 9:case 32:if(ne+re+k===0)switch(le){case 44:case 58:case 9:case 32:Le="";break;default:j!==32&&(Le=" ")}break;case 0:Le="\\0";break;case 12:Le="\\f";break;case 11:Le="\\v";break;case 38:ne+k+re===0&&(Me=Fe=1,Le="\f"+Le);break;case 108:if(ne+k+re+L===0&&0<we)switch(pe-we){case 2:le===112&&Y.charCodeAt(pe-3)===58&&(L=le);case 8:M===111&&(L=M)}break;case 58:ne+k+re===0&&(we=pe);break;case 44:k+fe+ne+re===0&&(Me=1,Le+="\r");break;case 34:case 39:k===0&&(ne=ne===j?0:ne===0?j:ne);break;case 91:ne+k+fe===0&&re++;break;case 93:ne+k+fe===0&&re--;break;case 41:ne+k+re===0&&fe--;break;case 40:if(ne+k+re===0){if(ae===0)switch(2*le+3*M){case 533:break;default:ae=1}fe++}break;case 64:k+fe+ne+re+we+ie===0&&(ie=1);break;case 42:case 47:if(!(0<ne+re+fe))switch(k){case 0:switch(2*j+3*Y.charCodeAt(pe+1)){case 235:k=47;break;case 220:Be=pe,k=42}break;case 42:j===47&&le===42&&Be+2!==pe&&(Y.charCodeAt(Be+2)===33&&(De+=Y.substring(Be,pe+1)),Le="",k=0)}}k===0&&(se+=Le)}M=le,le=j,pe++}if(Be=De.length,0<Be){if(Me=H,0<me&&(Je=c(2,De,Me,R,N,F,Be,w,m,w),Je!==void 0&&(De=Je).length===0))return Ve+De+mt;if(De=Me.join(",")+"{"+De+"}",K*L!==0){switch(K!==2||o(De,2)||(L=0),L){case 111:De=De.replace(D,":-moz-$1")+De;break;case 112:De=De.replace($,"::-webkit-input-$1")+De.replace($,"::-moz-$1")+De.replace($,":-ms-input-$1")+De}L=0}}return Ve+De+mt}function t(R,H,Y){var w=H.trim().split(y);H=w;var m=w.length,re=R.length;switch(re){case 0:case 1:var k=0;for(R=re===0?"":R[0]+" ";k<m;++k)H[k]=n(R,H[k],Y).trim();break;default:var fe=k=0;for(H=[];k<m;++k)for(var ne=0;ne<re;++ne)H[fe++]=n(R[ne]+" ",w[k],Y).trim()}return H}function n(R,H,Y){var w=H.charCodeAt(0);switch(33>w&&(w=(H=H.trim()).charCodeAt(0)),w){case 38:return H.replace(_,"$1"+R.trim());case 58:return R.trim()+H.replace(_,"$1"+R.trim());default:if(0<1*Y&&0<H.indexOf("\f"))return H.replace(_,(R.charCodeAt(0)===58?"":"$1")+R.trim())}return R+H}function i(R,H,Y,w){var m=R+";",re=2*H+3*Y+4*w;if(re===944){R=m.indexOf(":",9)+1;var k=m.substring(R,m.length-1).trim();return k=m.substring(0,R).trim()+k+";",K===1||K===2&&o(k,1)?"-webkit-"+k+k:k}if(K===0||K===2&&!o(m,1))return m;switch(re){case 1015:return m.charCodeAt(10)===97?"-webkit-"+m+m:m;case 951:return m.charCodeAt(3)===116?"-webkit-"+m+m:m;case 963:return m.charCodeAt(5)===110?"-webkit-"+m+m:m;case 1009:if(m.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+m+m;case 978:return"-webkit-"+m+"-moz-"+m+m;case 1019:case 983:return"-webkit-"+m+"-moz-"+m+"-ms-"+m+m;case 883:if(m.charCodeAt(8)===45)return"-webkit-"+m+m;if(0<m.indexOf("image-set(",11))return m.replace(ee,"$1-webkit-$2")+m;break;case 932:if(m.charCodeAt(4)===45)switch(m.charCodeAt(5)){case 103:return"-webkit-box-"+m.replace("-grow","")+"-webkit-"+m+"-ms-"+m.replace("grow","positive")+m;case 115:return"-webkit-"+m+"-ms-"+m.replace("shrink","negative")+m;case 98:return"-webkit-"+m+"-ms-"+m.replace("basis","preferred-size")+m}return"-webkit-"+m+"-ms-"+m+m;case 964:return"-webkit-"+m+"-ms-flex-"+m+m;case 1023:if(m.charCodeAt(8)!==99)break;return k=m.substring(m.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+k+"-webkit-"+m+"-ms-flex-pack"+k+m;case 1005:return A.test(m)?m.replace(P,":-webkit-")+m.replace(P,":-moz-")+m:m;case 1e3:switch(k=m.substring(13).trim(),H=k.indexOf("-")+1,k.charCodeAt(0)+k.charCodeAt(H)){case 226:k=m.replace(b,"tb");break;case 232:k=m.replace(b,"tb-rl");break;case 220:k=m.replace(b,"lr");break;default:return m}return"-webkit-"+m+"-ms-"+k+m;case 1017:if(m.indexOf("sticky",9)===-1)break;case 975:switch(H=(m=R).length-10,k=(m.charCodeAt(H)===33?m.substring(0,H):m).substring(R.indexOf(":",7)+1).trim(),re=k.charCodeAt(0)+(k.charCodeAt(7)|0)){case 203:if(111>k.charCodeAt(8))break;case 115:m=m.replace(k,"-webkit-"+k)+";"+m;break;case 207:case 102:m=m.replace(k,"-webkit-"+(102<re?"inline-":"")+"box")+";"+m.replace(k,"-webkit-"+k)+";"+m.replace(k,"-ms-"+k+"box")+";"+m}return m+";";case 938:if(m.charCodeAt(5)===45)switch(m.charCodeAt(6)){case 105:return k=m.replace("-items",""),"-webkit-"+m+"-webkit-box-"+k+"-ms-flex-"+k+m;case 115:return"-webkit-"+m+"-ms-flex-item-"+m.replace(I,"")+m;default:return"-webkit-"+m+"-ms-flex-line-pack"+m.replace("align-content","").replace(I,"")+m}break;case 973:case 989:if(m.charCodeAt(3)!==45||m.charCodeAt(4)===122)break;case 931:case 953:if(T.test(R)===!0)return(k=R.substring(R.indexOf(":")+1)).charCodeAt(0)===115?i(R.replace("stretch","fill-available"),H,Y,w).replace(":fill-available",":stretch"):m.replace(k,"-webkit-"+k)+m.replace(k,"-moz-"+k.replace("fill-",""))+m;break;case 962:if(m="-webkit-"+m+(m.charCodeAt(5)===102?"-ms-"+m:"")+m,Y+w===211&&m.charCodeAt(13)===105&&0<m.indexOf("transform",10))return m.substring(0,m.indexOf(";",27)+1).replace(S,"$1-webkit-$2")+m}return m}function o(R,H){var Y=R.indexOf(H===1?":":"{"),w=R.substring(0,H!==3?Y:10);return Y=R.substring(Y+1,R.length-1),Se(H!==2?w:w.replace(X,"$1"),Y,H)}function a(R,H){var Y=i(H,H.charCodeAt(0),H.charCodeAt(1),H.charCodeAt(2));return Y!==H+";"?Y.replace(O," or ($1)").substring(4):"("+H+")"}function c(R,H,Y,w,m,re,k,fe,ne,ae){for(var j=0,le=H,M;j<me;++j)switch(M=ye[j].call(u,R,le,Y,w,m,re,k,fe,ne,ae)){case void 0:case!1:case!0:case null:break;default:le=M}if(le!==H)return le}function d(R){switch(R){case void 0:case null:me=ye.length=0;break;default:if(typeof R=="function")ye[me++]=R;else if(typeof R=="object")for(var H=0,Y=R.length;H<Y;++H)d(R[H]);else Ae=!!R|0}return d}function h(R){return R=R.prefix,R!==void 0&&(Se=null,R?typeof R!="function"?K=1:(K=2,Se=R):K=0),h}function u(R,H){var Y=R;if(33>Y.charCodeAt(0)&&(Y=Y.trim()),Ie=Y,Y=[Ie],0<me){var w=c(-1,H,Y,Y,N,F,0,0,0,0);w!==void 0&&typeof w=="string"&&(H=w)}var m=e(q,Y,H,0,0);return 0<me&&(w=c(-2,m,Y,Y,N,F,m.length,0,0,0),w!==void 0&&(m=w)),Ie="",L=0,F=N=1,m}var g=/^\0+/g,E=/[\0\r\f]/g,P=/: */g,A=/zoo|gra/,S=/([,: ])(transform)/g,y=/,\r+?/g,_=/([\t\r\n ])*\f?&/g,C=/@(k\w+)\s*(\S*)\s*/,$=/::(place)/g,D=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,G=/\(\s*(.*)\s*\)/g,O=/([\s\S]*?);/g,I=/-self|flex-/g,X=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,ee=/([^-])(image-set\()/,F=1,N=1,L=0,K=1,q=[],ye=[],me=0,Se=null,Ae=0,Ie="";return u.use=d,u.set=h,r!==void 0&&h(r),u}var po={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function mo(r){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=r(t)),e[t]}}var go=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Qn=mo(function(r){return go.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),sn={exports:{}},ke={};/** @license React v16.13.1
59
59
  * react-is.development.js
60
60
  *
61
61
  * Copyright (c) Facebook, Inc. and its affiliates.
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var Ci;function Vn(){return Ci||(Ci=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,c=r?Symbol.for("react.forward_ref"):60112,x=r?Symbol.for("react.suspense"):60113,k=r?Symbol.for("react.suspense_list"):60120,A=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,w=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function m(O){return typeof O=="string"||typeof O=="function"||O===i||O===d||O===o||O===n||O===x||O===k||typeof O=="object"&&O!==null&&(O.$$typeof===b||O.$$typeof===A||O.$$typeof===a||O.$$typeof===l||O.$$typeof===c||O.$$typeof===y||O.$$typeof===_||O.$$typeof===C||O.$$typeof===w)}function T(O){if(typeof O=="object"&&O!==null){var ne=O.$$typeof;switch(ne){case e:var $=O.type;switch($){case u:case d:case i:case o:case n:case x:return $;default:var te=$&&$.$$typeof;switch(te){case l:case c:case b:case A:case a:return te;default:return ne}}case t:return ne}}}var g=u,X=d,R=l,P=a,Y=e,se=c,G=i,I=b,W=A,Q=t,U=o,V=n,fe=x,de=!1;function Te(O){return de||(de=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ke(O)||T(O)===u}function ke(O){return T(O)===d}function Re(O){return T(O)===l}function H(O){return T(O)===a}function z(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function M(O){return T(O)===c}function S(O){return T(O)===i}function p(O){return T(O)===b}function K(O){return T(O)===A}function E(O){return T(O)===t}function le(O){return T(O)===o}function ee(O){return T(O)===n}function ie(O){return T(O)===x}Se.AsyncMode=g,Se.ConcurrentMode=X,Se.ContextConsumer=R,Se.ContextProvider=P,Se.Element=Y,Se.ForwardRef=se,Se.Fragment=G,Se.Lazy=I,Se.Memo=W,Se.Portal=Q,Se.Profiler=U,Se.StrictMode=V,Se.Suspense=fe,Se.isAsyncMode=Te,Se.isConcurrentMode=ke,Se.isContextConsumer=Re,Se.isContextProvider=H,Se.isElement=z,Se.isForwardRef=M,Se.isFragment=S,Se.isLazy=p,Se.isMemo=K,Se.isPortal=E,Se.isProfiler=le,Se.isStrictMode=ee,Se.isSuspense=ie,Se.isValidElementType=m,Se.typeOf=T}()),Se}var we={};/** @license React v16.13.1
65
+ */var ei;function yo(){return ei||(ei=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,u=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,E=r?Symbol.for("react.suspense_list"):60120,P=r?Symbol.for("react.memo"):60115,A=r?Symbol.for("react.lazy"):60116,S=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function $(j){return typeof j=="string"||typeof j=="function"||j===n||j===h||j===o||j===i||j===g||j===E||typeof j=="object"&&j!==null&&(j.$$typeof===A||j.$$typeof===P||j.$$typeof===a||j.$$typeof===c||j.$$typeof===u||j.$$typeof===y||j.$$typeof===_||j.$$typeof===C||j.$$typeof===S)}function D(j){if(typeof j=="object"&&j!==null){var le=j.$$typeof;switch(le){case e:var M=j.type;switch(M){case d:case h:case n:case o:case i:case g:return M;default:var ie=M&&M.$$typeof;switch(ie){case c:case u:case A:case P:case a:return ie;default:return le}}case t:return le}}}var b=d,G=h,O=c,I=a,X=e,T=u,ee=n,F=A,N=P,L=t,K=o,q=i,ye=g,me=!1;function Se(j){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Ae(j)||D(j)===d}function Ae(j){return D(j)===h}function Ie(j){return D(j)===c}function R(j){return D(j)===a}function H(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function Y(j){return D(j)===u}function w(j){return D(j)===n}function m(j){return D(j)===A}function re(j){return D(j)===P}function k(j){return D(j)===t}function fe(j){return D(j)===o}function ne(j){return D(j)===i}function ae(j){return D(j)===g}ke.AsyncMode=b,ke.ConcurrentMode=G,ke.ContextConsumer=O,ke.ContextProvider=I,ke.Element=X,ke.ForwardRef=T,ke.Fragment=ee,ke.Lazy=F,ke.Memo=N,ke.Portal=L,ke.Profiler=K,ke.StrictMode=q,ke.Suspense=ye,ke.isAsyncMode=Se,ke.isConcurrentMode=Ae,ke.isContextConsumer=Ie,ke.isContextProvider=R,ke.isElement=H,ke.isForwardRef=Y,ke.isFragment=w,ke.isLazy=m,ke.isMemo=re,ke.isPortal=k,ke.isProfiler=fe,ke.isStrictMode=ne,ke.isSuspense=ae,ke.isValidElementType=$,ke.typeOf=D}()),ke}var _e={};/** @license React v16.13.1
66
66
  * react-is.production.min.js
67
67
  *
68
68
  * Copyright (c) Facebook, Inc. and its affiliates.
69
69
  *
70
70
  * This source code is licensed under the MIT license found in the
71
71
  * LICENSE file in the root directory of this source tree.
72
- */var Ei;function Xn(){if(Ei)return we;Ei=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,c=r?Symbol.for("react.forward_ref"):60112,x=r?Symbol.for("react.suspense"):60113,k=r?Symbol.for("react.suspense_list"):60120,A=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,w=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function m(g){if(typeof g=="object"&&g!==null){var X=g.$$typeof;switch(X){case e:switch(g=g.type,g){case u:case d:case i:case o:case n:case x:return g;default:switch(g=g&&g.$$typeof,g){case l:case c:case b:case A:case a:return g;default:return X}}case t:return X}}}function T(g){return m(g)===d}return we.AsyncMode=u,we.ConcurrentMode=d,we.ContextConsumer=l,we.ContextProvider=a,we.Element=e,we.ForwardRef=c,we.Fragment=i,we.Lazy=b,we.Memo=A,we.Portal=t,we.Profiler=o,we.StrictMode=n,we.Suspense=x,we.isAsyncMode=function(g){return T(g)||m(g)===u},we.isConcurrentMode=T,we.isContextConsumer=function(g){return m(g)===l},we.isContextProvider=function(g){return m(g)===a},we.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},we.isForwardRef=function(g){return m(g)===c},we.isFragment=function(g){return m(g)===i},we.isLazy=function(g){return m(g)===b},we.isMemo=function(g){return m(g)===A},we.isPortal=function(g){return m(g)===t},we.isProfiler=function(g){return m(g)===o},we.isStrictMode=function(g){return m(g)===n},we.isSuspense=function(g){return m(g)===x},we.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===i||g===d||g===o||g===n||g===x||g===k||typeof g=="object"&&g!==null&&(g.$$typeof===b||g.$$typeof===A||g.$$typeof===a||g.$$typeof===l||g.$$typeof===c||g.$$typeof===y||g.$$typeof===_||g.$$typeof===C||g.$$typeof===w)},we.typeOf=m,we}process.env.NODE_ENV==="production"?Fr.exports=Xn():Fr.exports=Vn();var Wn=Fr.exports,Nr=Wn,Un={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Zn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Gn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ti={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Lr={};Lr[Nr.ForwardRef]=Gn,Lr[Nr.Memo]=Ti;function ki(r){return Nr.isMemo(r)?Ti:Lr[r.$$typeof]||Un}var Kn=Object.defineProperty,qn=Object.getOwnPropertyNames,Ai=Object.getOwnPropertySymbols,Jn=Object.getOwnPropertyDescriptor,Qn=Object.getPrototypeOf,Pi=Object.prototype;function _i(r,e,t){if(typeof e!="string"){if(Pi){var i=Qn(e);i&&i!==Pi&&_i(r,i,t)}var n=qn(e);Ai&&(n=n.concat(Ai(e)));for(var o=ki(r),a=ki(e),l=0;l<n.length;++l){var u=n[l];if(!Zn[u]&&!(t&&t[u])&&!(a&&a[u])&&!(o&&o[u])){var d=Jn(e,u);try{Kn(r,u,d)}catch{}}}}return r}var eo=_i;const to=Cn(eo);function ot(){return(ot=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r}).apply(this,arguments)}var Oi=function(r,e){for(var t=[r[0]],i=0,n=e.length;i<n;i+=1)t.push(e[i],r[i+1]);return t},Vr=function(r){return r!==null&&typeof r=="object"&&(r.toString?r.toString():Object.prototype.toString.call(r))==="[object Object]"&&!Yr.typeOf(r)},pr=Object.freeze([]),mt=Object.freeze({});function rr(r){return typeof r=="function"}function Xr(r){return process.env.NODE_ENV!=="production"&&typeof r=="string"&&r||r.displayName||r.name||"Component"}function Wr(r){return r&&typeof r.styledComponentId=="string"}var zt=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Ur=typeof window<"u"&&"HTMLElement"in window,ro=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production")),io=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
72
+ */var ti;function bo(){if(ti)return _e;ti=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,u=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,E=r?Symbol.for("react.suspense_list"):60120,P=r?Symbol.for("react.memo"):60115,A=r?Symbol.for("react.lazy"):60116,S=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function $(b){if(typeof b=="object"&&b!==null){var G=b.$$typeof;switch(G){case e:switch(b=b.type,b){case d:case h:case n:case o:case i:case g:return b;default:switch(b=b&&b.$$typeof,b){case c:case u:case A:case P:case a:return b;default:return G}}case t:return G}}}function D(b){return $(b)===h}return _e.AsyncMode=d,_e.ConcurrentMode=h,_e.ContextConsumer=c,_e.ContextProvider=a,_e.Element=e,_e.ForwardRef=u,_e.Fragment=n,_e.Lazy=A,_e.Memo=P,_e.Portal=t,_e.Profiler=o,_e.StrictMode=i,_e.Suspense=g,_e.isAsyncMode=function(b){return D(b)||$(b)===d},_e.isConcurrentMode=D,_e.isContextConsumer=function(b){return $(b)===c},_e.isContextProvider=function(b){return $(b)===a},_e.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},_e.isForwardRef=function(b){return $(b)===u},_e.isFragment=function(b){return $(b)===n},_e.isLazy=function(b){return $(b)===A},_e.isMemo=function(b){return $(b)===P},_e.isPortal=function(b){return $(b)===t},_e.isProfiler=function(b){return $(b)===o},_e.isStrictMode=function(b){return $(b)===i},_e.isSuspense=function(b){return $(b)===g},_e.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===h||b===o||b===i||b===g||b===E||typeof b=="object"&&b!==null&&(b.$$typeof===A||b.$$typeof===P||b.$$typeof===a||b.$$typeof===c||b.$$typeof===u||b.$$typeof===y||b.$$typeof===_||b.$$typeof===C||b.$$typeof===S)},_e.typeOf=$,_e}process.env.NODE_ENV==="production"?sn.exports=bo():sn.exports=yo();var vo=sn.exports,an=vo,xo={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},So={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},wo={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ri={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ln={};ln[an.ForwardRef]=wo,ln[an.Memo]=ri;function ni(r){return an.isMemo(r)?ri:ln[r.$$typeof]||xo}var Co=Object.defineProperty,Eo=Object.getOwnPropertyNames,ii=Object.getOwnPropertySymbols,To=Object.getOwnPropertyDescriptor,ko=Object.getPrototypeOf,oi=Object.prototype;function si(r,e,t){if(typeof e!="string"){if(oi){var n=ko(e);n&&n!==oi&&si(r,n,t)}var i=Eo(e);ii&&(i=i.concat(ii(e)));for(var o=ni(r),a=ni(e),c=0;c<i.length;++c){var d=i[c];if(!So[d]&&!(t&&t[d])&&!(a&&a[d])&&!(o&&o[d])){var h=To(e,d);try{Co(r,d,h)}catch{}}}}return r}var _o=si;const Ao=Ui(_o);function ct(){return(ct=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}var ai=function(r,e){for(var t=[r[0]],n=0,i=e.length;n<i;n+=1)t.push(e[n],r[n+1]);return t},cn=function(r){return r!==null&&typeof r=="object"&&(r.toString?r.toString():Object.prototype.toString.call(r))==="[object Object]"&&!on.typeOf(r)},jr=Object.freeze([]),bt=Object.freeze({});function dr(r){return typeof r=="function"}function un(r){return process.env.NODE_ENV!=="production"&&typeof r=="string"&&r||r.displayName||r.name||"Component"}function dn(r){return r&&typeof r.styledComponentId=="string"}var Lt=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",fn=typeof window<"u"&&"HTMLElement"in window,Po=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production")),Oo=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
73
73
 
74
74
  `,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
75
75
 
@@ -110,12 +110,12 @@ as for instance in your render method then you may be running into this limitati
110
110
 
111
111
  `,17:`CSSStyleSheet could not be found on HTMLStyleElement.
112
112
  Has styled-components' style tag been unmounted or altered by another script?
113
- `}:{};function no(){for(var r=arguments.length<=0?void 0:arguments[0],e=[],t=1,i=arguments.length;t<i;t+=1)e.push(t<0||arguments.length<=t?void 0:arguments[t]);return e.forEach(function(n){r=r.replace(/%[a-z]/,n)}),r}function Dt(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];throw process.env.NODE_ENV==="production"?new Error("An error occurred. See https://git.io/JUIaE#"+r+" for more information."+(t.length>0?" Args: "+t.join(", "):"")):new Error(no.apply(void 0,[io[r]].concat(t)).trim())}var oo=function(){function r(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=r.prototype;return e.indexOfGroup=function(t){for(var i=0,n=0;n<t;n++)i+=this.groupSizes[n];return i},e.insertRules=function(t,i){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)(a<<=1)<0&&Dt(16,""+t);this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var l=o;l<a;l++)this.groupSizes[l]=0}for(var u=this.indexOfGroup(t+1),d=0,c=i.length;d<c;d++)this.tag.insertRule(u,i[d])&&(this.groupSizes[t]++,u++)},e.clearGroup=function(t){if(t<this.length){var i=this.groupSizes[t],n=this.indexOfGroup(t),o=n+i;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.getGroup=function(t){var i="";if(t>=this.length||this.groupSizes[t]===0)return i;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,l=o;l<a;l++)i+=this.tag.getRule(l)+`/*!sc*/
114
- `;return i},r}(),mr=new Map,gr=new Map,ir=1,yr=function(r){if(mr.has(r))return mr.get(r);for(;gr.has(ir);)ir++;var e=ir++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&Dt(16,""+e),mr.set(r,e),gr.set(e,r),e},so=function(r){return gr.get(r)},ao=function(r,e){e>=ir&&(ir=e+1),mr.set(r,e),gr.set(e,r)},lo="style["+zt+'][data-styled-version="5.3.11"]',co=new RegExp("^"+zt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),uo=function(r,e,t){for(var i,n=t.split(","),o=0,a=n.length;o<a;o++)(i=n[o])&&r.registerName(e,i)},ho=function(r,e){for(var t=(e.textContent||"").split(`/*!sc*/
115
- `),i=[],n=0,o=t.length;n<o;n++){var a=t[n].trim();if(a){var l=a.match(co);if(l){var u=0|parseInt(l[1],10),d=l[2];u!==0&&(ao(d,u),uo(r,d,l[3]),r.getTag().insertRules(u,i)),i.length=0}else i.push(a)}}},fo=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},ji=function(r){var e=document.head,t=r||e,i=document.createElement("style"),n=function(l){for(var u=l.childNodes,d=u.length;d>=0;d--){var c=u[d];if(c&&c.nodeType===1&&c.hasAttribute(zt))return c}}(t),o=n!==void 0?n.nextSibling:null;i.setAttribute(zt,"active"),i.setAttribute("data-styled-version","5.3.11");var a=fo();return a&&i.setAttribute("nonce",a),t.insertBefore(i,o),i},po=function(){function r(t){var i=this.element=ji(t);i.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var o=document.styleSheets,a=0,l=o.length;a<l;a++){var u=o[a];if(u.ownerNode===n)return u}Dt(17)}(i),this.length=0}var e=r.prototype;return e.insertRule=function(t,i){try{return this.sheet.insertRule(i,t),this.length++,!0}catch{return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var i=this.sheet.cssRules[t];return i!==void 0&&typeof i.cssText=="string"?i.cssText:""},r}(),mo=function(){function r(t){var i=this.element=ji(t);this.nodes=i.childNodes,this.length=0}var e=r.prototype;return e.insertRule=function(t,i){if(t<=this.length&&t>=0){var n=document.createTextNode(i),o=this.nodes[t];return this.element.insertBefore(n,o||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},r}(),go=function(){function r(t){this.rules=[],this.length=0}var e=r.prototype;return e.insertRule=function(t,i){return t<=this.length&&(this.rules.splice(t,0,i),this.length++,!0)},e.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.getRule=function(t){return t<this.length?this.rules[t]:""},r}(),zi=Ur,yo={isServer:!Ur,useCSSOMInjection:!ro},Di=function(){function r(t,i,n){t===void 0&&(t=mt),i===void 0&&(i={}),this.options=ot({},yo,{},t),this.gs=i,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Ur&&zi&&(zi=!1,function(o){for(var a=document.querySelectorAll(lo),l=0,u=a.length;l<u;l++){var d=a[l];d&&d.getAttribute(zt)!=="active"&&(ho(o,d),d.parentNode&&d.parentNode.removeChild(d))}}(this))}r.registerId=function(t){return yr(t)};var e=r.prototype;return e.reconstructWithOptions=function(t,i){return i===void 0&&(i=!0),new r(ot({},this.options,{},t),this.gs,i&&this.names||void 0)},e.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.getTag=function(){return this.tag||(this.tag=(n=(i=this.options).isServer,o=i.useCSSOMInjection,a=i.target,t=n?new go(a):o?new po(a):new mo(a),new oo(t)));var t,i,n,o,a},e.hasNameForId=function(t,i){return this.names.has(t)&&this.names.get(t).has(i)},e.registerName=function(t,i){if(yr(t),this.names.has(t))this.names.get(t).add(i);else{var n=new Set;n.add(i),this.names.set(t,n)}},e.insertRules=function(t,i,n){this.registerName(t,i),this.getTag().insertRules(yr(t),n)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(yr(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var i=t.getTag(),n=i.length,o="",a=0;a<n;a++){var l=so(a);if(l!==void 0){var u=t.names.get(l),d=i.getGroup(a);if(u&&d&&u.size){var c=zt+".g"+a+'[id="'+l+'"]',x="";u!==void 0&&u.forEach(function(k){k.length>0&&(x+=k+",")}),o+=""+d+c+'{content:"'+x+`"}/*!sc*/
116
- `}}}return o}(this)},r}(),xo=/(a)(d)/gi,$i=function(r){return String.fromCharCode(r+(r>25?39:97))};function Zr(r){var e,t="";for(e=Math.abs(r);e>52;e=e/52|0)t=$i(e%52)+t;return($i(e%52)+t).replace(xo,"$1-$2")}var Tt=function(r,e){for(var t=e.length;t;)r=33*r^e.charCodeAt(--t);return r},Hi=function(r){return Tt(5381,r)};function bo(r){for(var e=0;e<r.length;e+=1){var t=r[e];if(rr(t)&&!Wr(t))return!1}return!0}var vo=Hi("5.3.11"),So=function(){function r(e,t,i){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(i===void 0||i.isStatic)&&bo(e),this.componentId=t,this.baseHash=Tt(vo,t),this.baseStyle=i,Di.registerId(t)}return r.prototype.generateAndInjectStyles=function(e,t,i){var n=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,i)),this.isStatic&&!i.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))o.push(this.staticRulesId);else{var a=$t(this.rules,e,t,i).join(""),l=Zr(Tt(this.baseHash,a)>>>0);if(!t.hasNameForId(n,l)){var u=i(a,"."+l,void 0,n);t.insertRules(n,l,u)}o.push(l),this.staticRulesId=l}else{for(var d=this.rules.length,c=Tt(this.baseHash,i.hash),x="",k=0;k<d;k++){var A=this.rules[k];if(typeof A=="string")x+=A,process.env.NODE_ENV!=="production"&&(c=Tt(c,A+k));else if(A){var b=$t(A,e,t,i),w=Array.isArray(b)?b.join(""):b;c=Tt(c,w+k),x+=w}}if(x){var y=Zr(c>>>0);if(!t.hasNameForId(n,y)){var _=i(x,"."+y,void 0,n);t.insertRules(n,y,_)}o.push(y)}}return o.join(" ")},r}(),wo=/^\s*\/\/.*$/gm,Co=[":","[",".","#"];function Eo(r){var e,t,i,n,o=r===void 0?mt:r,a=o.options,l=a===void 0?mt:a,u=o.plugins,d=u===void 0?pr:u,c=new Yn(l),x=[],k=function(w){function y(_){if(_)try{w(_+"}")}catch{}}return function(_,C,m,T,g,X,R,P,Y,se){switch(_){case 1:if(Y===0&&C.charCodeAt(0)===64)return w(C+";"),"";break;case 2:if(P===0)return C+"/*|*/";break;case 3:switch(P){case 102:case 112:return w(m[0]+C),"";default:return C+(se===0?"/*|*/":"")}case-2:C.split("/*|*/}").forEach(y)}}}(function(w){x.push(w)}),A=function(w,y,_){return y===0&&Co.indexOf(_[t.length])!==-1||_.match(n)?w:"."+e};function b(w,y,_,C){C===void 0&&(C="&");var m=w.replace(wo,""),T=y&&_?_+" "+y+" { "+m+" }":m;return e=C,t=y,i=new RegExp("\\"+t+"\\b","g"),n=new RegExp("(\\"+t+"\\b){2,}"),c(_||!y?"":y,T)}return c.use([].concat(d,[function(w,y,_){w===2&&_.length&&_[0].lastIndexOf(t)>0&&(_[0]=_[0].replace(i,A))},k,function(w){if(w===-2){var y=x;return x=[],y}}])),b.hash=d.length?d.reduce(function(w,y){return y.name||Dt(15),Tt(w,y.name)},5381).toString():"",b}var Mi=v.createContext();Mi.Consumer;var Ri=v.createContext(),To=(Ri.Consumer,new Di),Gr=Eo();function ko(){return v.useContext(Mi)||To}function Ao(){return v.useContext(Ri)||Gr}var Po=function(){function r(e,t){var i=this;this.inject=function(n,o){o===void 0&&(o=Gr);var a=i.name+o.hash;n.hasNameForId(i.id,a)||n.insertRules(i.id,a,o(i.rules,a,"@keyframes"))},this.toString=function(){return Dt(12,String(i.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return r.prototype.getName=function(e){return e===void 0&&(e=Gr),this.name+e.hash},r}(),_o=/([A-Z])/,Oo=/([A-Z])/g,jo=/^ms-/,zo=function(r){return"-"+r.toLowerCase()};function Ii(r){return _o.test(r)?r.replace(Oo,zo).replace(jo,"-ms-"):r}var Bi=function(r){return r==null||r===!1||r===""};function $t(r,e,t,i){if(Array.isArray(r)){for(var n,o=[],a=0,l=r.length;a<l;a+=1)(n=$t(r[a],e,t,i))!==""&&(Array.isArray(n)?o.push.apply(o,n):o.push(n));return o}if(Bi(r))return"";if(Wr(r))return"."+r.styledComponentId;if(rr(r)){if(typeof(d=r)!="function"||d.prototype&&d.prototype.isReactComponent||!e)return r;var u=r(e);return process.env.NODE_ENV!=="production"&&Yr.isElement(u)&&console.warn(Xr(r)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),$t(u,e,t,i)}var d;return r instanceof Po?t?(r.inject(t,i),r.getName(i)):r:Vr(r)?function c(x,k){var A,b,w=[];for(var y in x)x.hasOwnProperty(y)&&!Bi(x[y])&&(Array.isArray(x[y])&&x[y].isCss||rr(x[y])?w.push(Ii(y)+":",x[y],";"):Vr(x[y])?w.push.apply(w,c(x[y],y)):w.push(Ii(y)+": "+(A=y,(b=x[y])==null||typeof b=="boolean"||b===""?"":typeof b!="number"||b===0||A in Fn||A.startsWith("--")?String(b).trim():b+"px")+";"));return k?[k+" {"].concat(w,["}"]):w}(r):r.toString()}var Yi=function(r){return Array.isArray(r)&&(r.isCss=!0),r};function Do(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return rr(r)||Vr(r)?Yi($t(Oi(pr,[r].concat(t)))):t.length===0&&r.length===1&&typeof r[0]=="string"?r:Yi($t(Oi(r,t)))}var Fi=/invalid hook call/i,xr=new Set,$o=function(r,e){if(process.env.NODE_ENV!=="production"){var t="The component "+r+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
113
+ `}:{};function jo(){for(var r=arguments.length<=0?void 0:arguments[0],e=[],t=1,n=arguments.length;t<n;t+=1)e.push(t<0||arguments.length<=t?void 0:arguments[t]);return e.forEach(function(i){r=r.replace(/%[a-z]/,i)}),r}function Vt(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];throw process.env.NODE_ENV==="production"?new Error("An error occurred. See https://git.io/JUIaE#"+r+" for more information."+(t.length>0?" Args: "+t.join(", "):"")):new Error(jo.apply(void 0,[Oo[r]].concat(t)).trim())}var Do=function(){function r(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=r.prototype;return e.indexOfGroup=function(t){for(var n=0,i=0;i<t;i++)n+=this.groupSizes[i];return n},e.insertRules=function(t,n){if(t>=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,a=o;t>=a;)(a<<=1)<0&&Vt(16,""+t);this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(var c=o;c<a;c++)this.groupSizes[c]=0}for(var d=this.indexOfGroup(t+1),h=0,u=n.length;h<u;h++)this.tag.insertRule(d,n[h])&&(this.groupSizes[t]++,d++)},e.clearGroup=function(t){if(t<this.length){var n=this.groupSizes[t],i=this.indexOfGroup(t),o=i+n;this.groupSizes[t]=0;for(var a=i;a<o;a++)this.tag.deleteRule(i)}},e.getGroup=function(t){var n="";if(t>=this.length||this.groupSizes[t]===0)return n;for(var i=this.groupSizes[t],o=this.indexOfGroup(t),a=o+i,c=o;c<a;c++)n+=this.tag.getRule(c)+`/*!sc*/
114
+ `;return n},r}(),Dr=new Map,$r=new Map,fr=1,zr=function(r){if(Dr.has(r))return Dr.get(r);for(;$r.has(fr);)fr++;var e=fr++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&Vt(16,""+e),Dr.set(r,e),$r.set(e,r),e},$o=function(r){return $r.get(r)},zo=function(r,e){e>=fr&&(fr=e+1),Dr.set(r,e),$r.set(e,r)},Ho="style["+Lt+'][data-styled-version="5.3.11"]',Mo=new RegExp("^"+Lt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Ro=function(r,e,t){for(var n,i=t.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&r.registerName(e,n)},Io=function(r,e){for(var t=(e.textContent||"").split(`/*!sc*/
115
+ `),n=[],i=0,o=t.length;i<o;i++){var a=t[i].trim();if(a){var c=a.match(Mo);if(c){var d=0|parseInt(c[1],10),h=c[2];d!==0&&(zo(h,d),Ro(r,h,c[3]),r.getTag().insertRules(d,n)),n.length=0}else n.push(a)}}},Bo=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},li=function(r){var e=document.head,t=r||e,n=document.createElement("style"),i=function(c){for(var d=c.childNodes,h=d.length;h>=0;h--){var u=d[h];if(u&&u.nodeType===1&&u.hasAttribute(Lt))return u}}(t),o=i!==void 0?i.nextSibling:null;n.setAttribute(Lt,"active"),n.setAttribute("data-styled-version","5.3.11");var a=Bo();return a&&n.setAttribute("nonce",a),t.insertBefore(n,o),n},Yo=function(){function r(t){var n=this.element=li(t);n.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var o=document.styleSheets,a=0,c=o.length;a<c;a++){var d=o[a];if(d.ownerNode===i)return d}Vt(17)}(n),this.length=0}var e=r.prototype;return e.insertRule=function(t,n){try{return this.sheet.insertRule(n,t),this.length++,!0}catch{return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var n=this.sheet.cssRules[t];return n!==void 0&&typeof n.cssText=="string"?n.cssText:""},r}(),No=function(){function r(t){var n=this.element=li(t);this.nodes=n.childNodes,this.length=0}var e=r.prototype;return e.insertRule=function(t,n){if(t<=this.length&&t>=0){var i=document.createTextNode(n),o=this.nodes[t];return this.element.insertBefore(i,o||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},r}(),Fo=function(){function r(t){this.rules=[],this.length=0}var e=r.prototype;return e.insertRule=function(t,n){return t<=this.length&&(this.rules.splice(t,0,n),this.length++,!0)},e.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.getRule=function(t){return t<this.length?this.rules[t]:""},r}(),ci=fn,Lo={isServer:!fn,useCSSOMInjection:!Po},ui=function(){function r(t,n,i){t===void 0&&(t=bt),n===void 0&&(n={}),this.options=ct({},Lo,{},t),this.gs=n,this.names=new Map(i),this.server=!!t.isServer,!this.server&&fn&&ci&&(ci=!1,function(o){for(var a=document.querySelectorAll(Ho),c=0,d=a.length;c<d;c++){var h=a[c];h&&h.getAttribute(Lt)!=="active"&&(Io(o,h),h.parentNode&&h.parentNode.removeChild(h))}}(this))}r.registerId=function(t){return zr(t)};var e=r.prototype;return e.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new r(ct({},this.options,{},t),this.gs,n&&this.names||void 0)},e.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.getTag=function(){return this.tag||(this.tag=(i=(n=this.options).isServer,o=n.useCSSOMInjection,a=n.target,t=i?new Fo(a):o?new Yo(a):new No(a),new Do(t)));var t,n,i,o,a},e.hasNameForId=function(t,n){return this.names.has(t)&&this.names.get(t).has(n)},e.registerName=function(t,n){if(zr(t),this.names.has(t))this.names.get(t).add(n);else{var i=new Set;i.add(n),this.names.set(t,i)}},e.insertRules=function(t,n,i){this.registerName(t,n),this.getTag().insertRules(zr(t),i)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(zr(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var n=t.getTag(),i=n.length,o="",a=0;a<i;a++){var c=$o(a);if(c!==void 0){var d=t.names.get(c),h=n.getGroup(a);if(d&&h&&d.size){var u=Lt+".g"+a+'[id="'+c+'"]',g="";d!==void 0&&d.forEach(function(E){E.length>0&&(g+=E+",")}),o+=""+h+u+'{content:"'+g+`"}/*!sc*/
116
+ `}}}return o}(this)},r}(),Vo=/(a)(d)/gi,di=function(r){return String.fromCharCode(r+(r>25?39:97))};function hn(r){var e,t="";for(e=Math.abs(r);e>52;e=e/52|0)t=di(e%52)+t;return(di(e%52)+t).replace(Vo,"$1-$2")}var Ot=function(r,e){for(var t=e.length;t;)r=33*r^e.charCodeAt(--t);return r},fi=function(r){return Ot(5381,r)};function Xo(r){for(var e=0;e<r.length;e+=1){var t=r[e];if(dr(t)&&!dn(t))return!1}return!0}var Wo=fi("5.3.11"),Uo=function(){function r(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(n===void 0||n.isStatic)&&Xo(e),this.componentId=t,this.baseHash=Ot(Wo,t),this.baseStyle=n,ui.registerId(t)}return r.prototype.generateAndInjectStyles=function(e,t,n){var i=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(i,this.staticRulesId))o.push(this.staticRulesId);else{var a=Xt(this.rules,e,t,n).join(""),c=hn(Ot(this.baseHash,a)>>>0);if(!t.hasNameForId(i,c)){var d=n(a,"."+c,void 0,i);t.insertRules(i,c,d)}o.push(c),this.staticRulesId=c}else{for(var h=this.rules.length,u=Ot(this.baseHash,n.hash),g="",E=0;E<h;E++){var P=this.rules[E];if(typeof P=="string")g+=P,process.env.NODE_ENV!=="production"&&(u=Ot(u,P+E));else if(P){var A=Xt(P,e,t,n),S=Array.isArray(A)?A.join(""):A;u=Ot(u,S+E),g+=S}}if(g){var y=hn(u>>>0);if(!t.hasNameForId(i,y)){var _=n(g,"."+y,void 0,i);t.insertRules(i,y,_)}o.push(y)}}return o.join(" ")},r}(),Zo=/^\s*\/\/.*$/gm,Go=[":","[",".","#"];function Ko(r){var e,t,n,i,o=r===void 0?bt:r,a=o.options,c=a===void 0?bt:a,d=o.plugins,h=d===void 0?jr:d,u=new ho(c),g=[],E=function(S){function y(_){if(_)try{S(_+"}")}catch{}}return function(_,C,$,D,b,G,O,I,X,T){switch(_){case 1:if(X===0&&C.charCodeAt(0)===64)return S(C+";"),"";break;case 2:if(I===0)return C+"/*|*/";break;case 3:switch(I){case 102:case 112:return S($[0]+C),"";default:return C+(T===0?"/*|*/":"")}case-2:C.split("/*|*/}").forEach(y)}}}(function(S){g.push(S)}),P=function(S,y,_){return y===0&&Go.indexOf(_[t.length])!==-1||_.match(i)?S:"."+e};function A(S,y,_,C){C===void 0&&(C="&");var $=S.replace(Zo,""),D=y&&_?_+" "+y+" { "+$+" }":$;return e=C,t=y,n=new RegExp("\\"+t+"\\b","g"),i=new RegExp("(\\"+t+"\\b){2,}"),u(_||!y?"":y,D)}return u.use([].concat(h,[function(S,y,_){S===2&&_.length&&_[0].lastIndexOf(t)>0&&(_[0]=_[0].replace(n,P))},E,function(S){if(S===-2){var y=g;return g=[],y}}])),A.hash=h.length?h.reduce(function(S,y){return y.name||Vt(15),Ot(S,y.name)},5381).toString():"",A}var hi=v.createContext();hi.Consumer;var pi=v.createContext(),qo=(pi.Consumer,new ui),pn=Ko();function Jo(){return v.useContext(hi)||qo}function Qo(){return v.useContext(pi)||pn}var es=function(){function r(e,t){var n=this;this.inject=function(i,o){o===void 0&&(o=pn);var a=n.name+o.hash;i.hasNameForId(n.id,a)||i.insertRules(n.id,a,o(n.rules,a,"@keyframes"))},this.toString=function(){return Vt(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return r.prototype.getName=function(e){return e===void 0&&(e=pn),this.name+e.hash},r}(),ts=/([A-Z])/,rs=/([A-Z])/g,ns=/^ms-/,is=function(r){return"-"+r.toLowerCase()};function mi(r){return ts.test(r)?r.replace(rs,is).replace(ns,"-ms-"):r}var gi=function(r){return r==null||r===!1||r===""};function Xt(r,e,t,n){if(Array.isArray(r)){for(var i,o=[],a=0,c=r.length;a<c;a+=1)(i=Xt(r[a],e,t,n))!==""&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}if(gi(r))return"";if(dn(r))return"."+r.styledComponentId;if(dr(r)){if(typeof(h=r)!="function"||h.prototype&&h.prototype.isReactComponent||!e)return r;var d=r(e);return process.env.NODE_ENV!=="production"&&on.isElement(d)&&console.warn(un(r)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),Xt(d,e,t,n)}var h;return r instanceof es?t?(r.inject(t,n),r.getName(n)):r:cn(r)?function u(g,E){var P,A,S=[];for(var y in g)g.hasOwnProperty(y)&&!gi(g[y])&&(Array.isArray(g[y])&&g[y].isCss||dr(g[y])?S.push(mi(y)+":",g[y],";"):cn(g[y])?S.push.apply(S,u(g[y],y)):S.push(mi(y)+": "+(P=y,(A=g[y])==null||typeof A=="boolean"||A===""?"":typeof A!="number"||A===0||P in po||P.startsWith("--")?String(A).trim():A+"px")+";"));return E?[E+" {"].concat(S,["}"]):S}(r):r.toString()}var yi=function(r){return Array.isArray(r)&&(r.isCss=!0),r};function os(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return dr(r)||cn(r)?yi(Xt(ai(jr,[r].concat(t)))):t.length===0&&r.length===1&&typeof r[0]=="string"?r:yi(Xt(ai(r,t)))}var bi=/invalid hook call/i,Hr=new Set,ss=function(r,e){if(process.env.NODE_ENV!=="production"){var t="The component "+r+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
117
117
  You may see this warning because you've called styled inside another component.
118
- To resolve this only create new StyledComponents outside of any render method and function component.`,i=console.error;try{var n=!0;console.error=function(o){if(Fi.test(o))n=!1,xr.delete(t);else{for(var a=arguments.length,l=new Array(a>1?a-1:0),u=1;u<a;u++)l[u-1]=arguments[u];i.apply(void 0,[o].concat(l))}},v.useRef(),n&&!xr.has(t)&&(console.warn(t),xr.add(t))}catch(o){Fi.test(o.message)&&xr.delete(t)}finally{console.error=i}}},Ho=function(r,e,t){return t===void 0&&(t=mt),r.theme!==t.theme&&r.theme||e||t.theme},Mo=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ro=/(^-|-$)/g;function Kr(r){return r.replace(Mo,"-").replace(Ro,"")}var Io=function(r){return Zr(Hi(r)>>>0)};function br(r){return typeof r=="string"&&(process.env.NODE_ENV==="production"||r.charAt(0)===r.charAt(0).toLowerCase())}var qr=function(r){return typeof r=="function"||typeof r=="object"&&r!==null&&!Array.isArray(r)},Bo=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};function Yo(r,e,t){var i=r[t];qr(e)&&qr(i)?Ni(i,e):r[t]=e}function Ni(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];for(var n=0,o=t;n<o.length;n++){var a=o[n];if(qr(a))for(var l in a)Bo(l)&&Yo(r,a[l],l)}return r}var Li=v.createContext();Li.Consumer;var Jr={};function Vi(r,e,t){var i=Wr(r),n=!br(r),o=e.attrs,a=o===void 0?pr:o,l=e.componentId,u=l===void 0?function(C,m){var T=typeof C!="string"?"sc":Kr(C);Jr[T]=(Jr[T]||0)+1;var g=T+"-"+Io("5.3.11"+T+Jr[T]);return m?m+"-"+g:g}(e.displayName,e.parentComponentId):l,d=e.displayName,c=d===void 0?function(C){return br(C)?"styled."+C:"Styled("+Xr(C)+")"}(r):d,x=e.displayName&&e.componentId?Kr(e.displayName)+"-"+e.componentId:e.componentId||u,k=i&&r.attrs?Array.prototype.concat(r.attrs,a).filter(Boolean):a,A=e.shouldForwardProp;i&&r.shouldForwardProp&&(A=e.shouldForwardProp?function(C,m,T){return r.shouldForwardProp(C,m,T)&&e.shouldForwardProp(C,m,T)}:r.shouldForwardProp);var b,w=new So(t,x,i?r.componentStyle:void 0),y=w.isStatic&&a.length===0,_=function(C,m){return function(T,g,X,R){var P=T.attrs,Y=T.componentStyle,se=T.defaultProps,G=T.foldedComponentIds,I=T.shouldForwardProp,W=T.styledComponentId,Q=T.target,U=function(S,p,K){S===void 0&&(S=mt);var E=ot({},p,{theme:S}),le={};return K.forEach(function(ee){var ie,O,ne,$=ee;for(ie in rr($)&&($=$(E)),$)E[ie]=le[ie]=ie==="className"?(O=le[ie],ne=$[ie],O&&ne?O+" "+ne:O||ne):$[ie]}),[E,le]}(Ho(g,v.useContext(Li),se)||mt,g,P),V=U[0],fe=U[1],de=function(S,p,K,E){var le=ko(),ee=Ao(),ie=p?S.generateAndInjectStyles(mt,le,ee):S.generateAndInjectStyles(K,le,ee);return process.env.NODE_ENV!=="production"&&!p&&E&&E(ie),ie}(Y,R,V,process.env.NODE_ENV!=="production"?T.warnTooManyClasses:void 0),Te=X,ke=fe.$as||g.$as||fe.as||g.as||Q,Re=br(ke),H=fe!==g?ot({},g,{},fe):g,z={};for(var M in H)M[0]!=="$"&&M!=="as"&&(M==="forwardedAs"?z.as=H[M]:(I?I(M,wi,ke):!Re||wi(M))&&(z[M]=H[M]));return g.style&&fe.style!==g.style&&(z.style=ot({},g.style,{},fe.style)),z.className=Array.prototype.concat(G,W,de!==W?de:null,g.className,fe.className).filter(Boolean).join(" "),z.ref=Te,v.createElement(ke,z)}(b,C,m,y)};return _.displayName=c,(b=v.forwardRef(_)).attrs=k,b.componentStyle=w,b.displayName=c,b.shouldForwardProp=A,b.foldedComponentIds=i?Array.prototype.concat(r.foldedComponentIds,r.styledComponentId):pr,b.styledComponentId=x,b.target=i?r.target:r,b.withComponent=function(C){var m=e.componentId,T=function(X,R){if(X==null)return{};var P,Y,se={},G=Object.keys(X);for(Y=0;Y<G.length;Y++)P=G[Y],R.indexOf(P)>=0||(se[P]=X[P]);return se}(e,["componentId"]),g=m&&m+"-"+(br(C)?C:Kr(Xr(C)));return Vi(C,ot({},T,{attrs:k,componentId:g}),t)},Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(C){this._foldedDefaultProps=i?Ni({},r.defaultProps,C):C}}),process.env.NODE_ENV!=="production"&&($o(c,x),b.warnTooManyClasses=function(C,m){var T={},g=!1;return function(X){if(!g&&(T[X]=!0,Object.keys(T).length>=200)){var R=m?' with the id of "'+m+'"':"";console.warn("Over 200 classes were generated for component "+C+R+`.
118
+ To resolve this only create new StyledComponents outside of any render method and function component.`,n=console.error;try{var i=!0;console.error=function(o){if(bi.test(o))i=!1,Hr.delete(t);else{for(var a=arguments.length,c=new Array(a>1?a-1:0),d=1;d<a;d++)c[d-1]=arguments[d];n.apply(void 0,[o].concat(c))}},v.useRef(),i&&!Hr.has(t)&&(console.warn(t),Hr.add(t))}catch(o){bi.test(o.message)&&Hr.delete(t)}finally{console.error=n}}},as=function(r,e,t){return t===void 0&&(t=bt),r.theme!==t.theme&&r.theme||e||t.theme},ls=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,cs=/(^-|-$)/g;function mn(r){return r.replace(ls,"-").replace(cs,"")}var us=function(r){return hn(fi(r)>>>0)};function Mr(r){return typeof r=="string"&&(process.env.NODE_ENV==="production"||r.charAt(0)===r.charAt(0).toLowerCase())}var gn=function(r){return typeof r=="function"||typeof r=="object"&&r!==null&&!Array.isArray(r)},ds=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};function fs(r,e,t){var n=r[t];gn(e)&&gn(n)?vi(n,e):r[t]=e}function vi(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i];if(gn(a))for(var c in a)ds(c)&&fs(r,a[c],c)}return r}var xi=v.createContext();xi.Consumer;var yn={};function Si(r,e,t){var n=dn(r),i=!Mr(r),o=e.attrs,a=o===void 0?jr:o,c=e.componentId,d=c===void 0?function(C,$){var D=typeof C!="string"?"sc":mn(C);yn[D]=(yn[D]||0)+1;var b=D+"-"+us("5.3.11"+D+yn[D]);return $?$+"-"+b:b}(e.displayName,e.parentComponentId):c,h=e.displayName,u=h===void 0?function(C){return Mr(C)?"styled."+C:"Styled("+un(C)+")"}(r):h,g=e.displayName&&e.componentId?mn(e.displayName)+"-"+e.componentId:e.componentId||d,E=n&&r.attrs?Array.prototype.concat(r.attrs,a).filter(Boolean):a,P=e.shouldForwardProp;n&&r.shouldForwardProp&&(P=e.shouldForwardProp?function(C,$,D){return r.shouldForwardProp(C,$,D)&&e.shouldForwardProp(C,$,D)}:r.shouldForwardProp);var A,S=new Uo(t,g,n?r.componentStyle:void 0),y=S.isStatic&&a.length===0,_=function(C,$){return function(D,b,G,O){var I=D.attrs,X=D.componentStyle,T=D.defaultProps,ee=D.foldedComponentIds,F=D.shouldForwardProp,N=D.styledComponentId,L=D.target,K=function(w,m,re){w===void 0&&(w=bt);var k=ct({},m,{theme:w}),fe={};return re.forEach(function(ne){var ae,j,le,M=ne;for(ae in dr(M)&&(M=M(k)),M)k[ae]=fe[ae]=ae==="className"?(j=fe[ae],le=M[ae],j&&le?j+" "+le:j||le):M[ae]}),[k,fe]}(as(b,v.useContext(xi),T)||bt,b,I),q=K[0],ye=K[1],me=function(w,m,re,k){var fe=Jo(),ne=Qo(),ae=m?w.generateAndInjectStyles(bt,fe,ne):w.generateAndInjectStyles(re,fe,ne);return process.env.NODE_ENV!=="production"&&!m&&k&&k(ae),ae}(X,O,q,process.env.NODE_ENV!=="production"?D.warnTooManyClasses:void 0),Se=G,Ae=ye.$as||b.$as||ye.as||b.as||L,Ie=Mr(Ae),R=ye!==b?ct({},b,{},ye):b,H={};for(var Y in R)Y[0]!=="$"&&Y!=="as"&&(Y==="forwardedAs"?H.as=R[Y]:(F?F(Y,Qn,Ae):!Ie||Qn(Y))&&(H[Y]=R[Y]));return b.style&&ye.style!==b.style&&(H.style=ct({},b.style,{},ye.style)),H.className=Array.prototype.concat(ee,N,me!==N?me:null,b.className,ye.className).filter(Boolean).join(" "),H.ref=Se,v.createElement(Ae,H)}(A,C,$,y)};return _.displayName=u,(A=v.forwardRef(_)).attrs=E,A.componentStyle=S,A.displayName=u,A.shouldForwardProp=P,A.foldedComponentIds=n?Array.prototype.concat(r.foldedComponentIds,r.styledComponentId):jr,A.styledComponentId=g,A.target=n?r.target:r,A.withComponent=function(C){var $=e.componentId,D=function(G,O){if(G==null)return{};var I,X,T={},ee=Object.keys(G);for(X=0;X<ee.length;X++)I=ee[X],O.indexOf(I)>=0||(T[I]=G[I]);return T}(e,["componentId"]),b=$&&$+"-"+(Mr(C)?C:mn(un(C)));return Si(C,ct({},D,{attrs:E,componentId:b}),t)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(C){this._foldedDefaultProps=n?vi({},r.defaultProps,C):C}}),process.env.NODE_ENV!=="production"&&(ss(u,g),A.warnTooManyClasses=function(C,$){var D={},b=!1;return function(G){if(!b&&(D[G]=!0,Object.keys(D).length>=200)){var O=$?' with the id of "'+$+'"':"";console.warn("Over 200 classes were generated for component "+C+O+`.
119
119
  Consider using the attrs method, together with a style object for frequently changed styles.
120
120
  Example:
121
121
  const Component = styled.div.attrs(props => ({
@@ -124,11 +124,11 @@ Example:
124
124
  },
125
125
  }))\`width: 100%;\`
126
126
 
127
- <Component />`),g=!0,T={}}}}(c,x)),Object.defineProperty(b,"toString",{value:function(){return"."+b.styledComponentId}}),n&&to(b,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),b}var Qr=function(r){return function e(t,i,n){if(n===void 0&&(n=mt),!Yr.isValidElementType(i))return Dt(1,String(i));var o=function(){return t(i,n,Do.apply(void 0,arguments))};return o.withConfig=function(a){return e(t,i,ot({},n,{},a))},o.attrs=function(a){return e(t,i,ot({},n,{attrs:Array.prototype.concat(n.attrs,a).filter(Boolean)}))},o}(Vi,r)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(r){Qr[r]=Qr(r)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
127
+ <Component />`),b=!0,D={}}}}(u,g)),Object.defineProperty(A,"toString",{value:function(){return"."+A.styledComponentId}}),i&&Ao(A,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var bn=function(r){return function e(t,n,i){if(i===void 0&&(i=bt),!on.isValidElementType(n))return Vt(1,String(n));var o=function(){return t(n,i,os.apply(void 0,arguments))};return o.withConfig=function(a){return e(t,n,ct({},i,{},a))},o.attrs=function(a){return e(t,n,ct({},i,{attrs:Array.prototype.concat(i.attrs,a).filter(Boolean)}))},o}(Si,r)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(r){bn[r]=bn(r)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
128
128
  Perhaps you're looking to import 'styled-components/native'?
129
129
  Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,window["__styled-components-init__"]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
130
130
 
131
- See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const Ke=Qr,Fo=Ke.div`
131
+ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const Qe=bn,hs=Qe.div`
132
132
  font-family: 'IBM Plex Mono', 'Roboto', sans-serif;
133
133
  background-color: #fafafa;
134
134
  color: #26272;
@@ -148,7 +148,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
148
148
  & h1 span {
149
149
  font-size: 0.5em;
150
150
  }
151
- `,No=Ke.div`
151
+ `,ps=Qe.div`
152
152
  display: flex;
153
153
  height: 100%;
154
154
  width: 170px;
@@ -181,7 +181,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
181
181
  & span {
182
182
  cursor: pointer;
183
183
  }
184
- `,Lo=Ke.div`
184
+ `,ms=Qe.div`
185
185
  width: 100%;
186
186
  cursor: grab;
187
187
  background-color: #eee;
@@ -196,7 +196,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
196
196
  font-size: 1.5em;
197
197
  font-weight: 600;
198
198
  }
199
- `,Vo=Ke.div`
199
+ `,gs=Qe.div`
200
200
  cursor: pointer;
201
201
  transform: rotate(90deg);
202
202
  color: gray;
@@ -207,14 +207,14 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
207
207
  &:hover {
208
208
  text-decoration: underline;
209
209
  }
210
- `,Xo=Ke.span`
210
+ `,ys=Qe.span`
211
211
  font-family: 'Open Sans';
212
212
  font-size: 15px;
213
213
  font-weight: 700;
214
214
  cursor: default !important;
215
215
  margin: 5px 15px 5px 0px;
216
216
  margin-left: 0.5rem;
217
- `,Wo=Ke.span`
217
+ `,bs=Qe.span`
218
218
  margin: 5px 15px 5px 0px;
219
219
  transition: all 500ms ease;
220
220
 
@@ -222,14 +222,14 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
222
222
  text-decoration: underline;
223
223
  margin-left: 1rem;
224
224
  }
225
- `,Uo=Ke.div`
225
+ `,vs=Qe.div`
226
226
  display: flex;
227
227
  flex-direction: column;
228
228
  overflow-y: scroll;
229
229
  overflow-x: hidden;
230
230
  padding-bottom: 50px;
231
231
  font-size: 0.8em;
232
- `,Xi=Ke.div`
232
+ `,wi=Qe.div`
233
233
  font-size: 3em;
234
234
  color: #0f52ba;
235
235
  font-weight: bold;
@@ -240,124 +240,148 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
240
240
  -moz-user-select: none;
241
241
  -ms-user-select: none;
242
242
  user-select: none;
243
- `,Zo=v.forwardRef(({activeToolLocal:r,tools:e,changeActiveToolLocalHandler:t},i)=>{v.useImperativeHandle(i,()=>({changeTabletDisplayHandler(a){o(a==="switch"?l=>l==="none"?"flex":"none":a)}}));const[n,o]=v.useState("none");return h.jsx(v.Fragment,{children:h.jsxs(Fo,{display:n,id:"desktop--tablet--container",children:[h.jsxs(No,{children:[h.jsxs("h1",{children:["NDMVR",h.jsx("span",{children:h.jsx("i",{children:"tablet"})})]}),h.jsx("p",{children:"Tools"}),h.jsx(Uo,{children:e.map((a,l)=>l===r?h.jsxs(Xo,{children:[h.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:l<10?(l+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},l):h.jsxs(Wo,{onClick:()=>t(l),children:[h.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:l<10?(l+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},l))})]}),h.jsxs("div",{style:{width:"100%",overflow:"scroll"},children:[h.jsxs(Lo,{id:"desktop--tablet--container--header",children:[h.jsx("h1",{children:e[r].name}),h.jsx(Vo,{id:"close--button",onClick:()=>o("none"),style:{cursor:"pointer",maxWidth:"30px"},children:h.jsx("i",{children:"Hide"})})]}),h.jsx("div",{style:{display:"flex",flexDirection:"row",height:"83%",padding:"10px",alignItems:"center",justifyContent:"center"},children:e[r].fun})]})]})})}),Go=window.AFRAME,ye=new ft;let ei,Wi;function Ui(){const r=v.useRef(),[e,t]=v.useState(0),[i,n]=v.useState(null),[o,a]=v.useState(null),[l,u]=v.useState(null),[d,c]=v.useState(null);ei=e;const[x,k]=v.useState({xPos:0,yPos:0,zPos:0,absoluteContent:0}),[A,b]=v.useState(1),[w]=v.useState(Go.utils.device.checkHeadsetConnected()?"oculus":"desktop"),y=v.useContext(pt),{source:_,theme:C,range:m,scene:T}=y.stores,[g,X]=v.useState([]),[R,P]=v.useState([]),[Y,se]=v.useState([]),[G,I]=v.useState([]);v.useEffect(()=>{const S=_!=null&&_.getOptions().length?_==null?void 0:_.getOptions():[];X(S)},[y]),v.useEffect(()=>{const S=C!=null&&C.getOptions().length?C==null?void 0:C.getOptions():[];P(S)},[y]),v.useEffect(()=>{const S=m!=null&&m.getOptions().length?m==null?void 0:m.getOptions():[];se(S)},[y]),v.useEffect(()=>{const S=T!=null&&T.getOptions().length?T==null?void 0:T.getOptions():[];I(S)},[y]),v.useEffect(()=>(Wi=ye.subscribe(W),()=>Wi.unsubscribe()),[g,R,Y,G]),v.useEffect(()=>{},[e]),v.useEffect(()=>{_&&i&&_.executeFunction(0,i)},[i]),v.useEffect(()=>{C&&o&&C.executeFunction(0,o)},[o]),v.useEffect(()=>{m&&l&&m.executeFunction(0,l)},[l]),v.useEffect(()=>{T&&d&&T.executeFunction(0,d)},[d]);const W=S=>{typeof S=="number"?S+1<=V.length&&(t(S),ei=e):S.changeTabletState?r.current.changeTabletDisplayHandler("switch"):S.binData?x!==S.binData&&k(S.binData):S.tool?(S.tool==="next"&&t(p=>p===V.length-1?0:p+1),S.tool==="prev"&&t(p=>p===0?V.length-1:p-1)):S.source?(S.source==="next"&&n(p=>g.indexOf(p)===g.length-1?g[0]:g[g.indexOf(p)+1]),S.source==="prev"&&n(p=>g.indexOf(p)===0?g[g.length-1]:g[g.indexOf(p)-1])):S.scale?U(S.scale):S.theme?(S.theme==="next"&&a(p=>R.indexOf(p)===R.length-1?R[0]:R[R.indexOf(p)+1]),S.theme==="prev"&&a(p=>R.indexOf(p)===0?R[R.length-1]:R[R.indexOf(p)-1])):S.range?(S.range==="next"&&u(p=>Y.indexOf(p)===Y.length-1?Y[0]:Y[Y.indexOf(p)+1]),S.range==="prev"&&u(p=>Y.indexOf(p)===0?Y[Y.length-1]:Y[Y.indexOf(p)-1])):S.scene&&(S.scene==="next"&&c(p=>G.indexOf(p)===G.length-1?G[0]:G[G.indexOf(p)+1]),S.scene==="prev"&&c(p=>G.indexOf(p)===0?G[G.length-1]:G[G.indexOf(p)-1]))},Q=()=>{switch(e){case 0:return h.jsx(v.Fragment,{children:h.jsx("a-text",{value:`Selected bin:
243
+ `,xs=v.forwardRef(({activeToolLocal:r,tools:e,changeActiveToolLocalHandler:t},n)=>{v.useImperativeHandle(n,()=>({changeTabletDisplayHandler(a){o(a==="switch"?c=>c==="none"?"flex":"none":a)}}));const[i,o]=v.useState("none");return f.jsx(v.Fragment,{children:f.jsxs(hs,{display:i,id:"desktop--tablet--container",children:[f.jsxs(ps,{children:[f.jsxs("h1",{children:["NDMVR",f.jsx("span",{children:f.jsx("i",{children:"tablet"})})]}),f.jsx("p",{children:"Tools"}),f.jsx(vs,{children:e.map((a,c)=>c===r?f.jsxs(ys,{children:[f.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:c<10?(c+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},c):f.jsxs(bs,{onClick:()=>t(c),children:[f.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:c<10?(c+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},c))})]}),f.jsxs("div",{style:{width:"100%",overflow:"scroll"},children:[f.jsxs(ms,{id:"desktop--tablet--container--header",children:[f.jsx("h1",{children:e[r].name}),f.jsx(gs,{id:"close--button",onClick:()=>o("none"),style:{cursor:"pointer",maxWidth:"30px"},children:f.jsx("i",{children:"Hide"})})]}),f.jsx("div",{style:{display:"flex",flexDirection:"row",height:"83%",padding:"10px",alignItems:"center",justifyContent:"center"},children:e[r].fun})]})]})})}),Ss=r=>{const[e,t]=v.useState(r.initialState);return v.useLayoutEffect(()=>{r.init();const n=r.subscribe(t);return()=>n.unsubscribe()},[]),e},ws=r=>{const[e,t]=v.useState(r.initialState);return v.useLayoutEffect(()=>{const n=r.subscribe(t);return()=>n.unsubscribe()},[]),e},hr=v.createContext(null),pr=(r="",e="zmq2ws")=>{const[t,n]=v.useState({}),i=v.useContext(hr)[e];return v.useLayoutEffect(()=>{if(i===null)return;const o=i.subscribeIn(n,r);return()=>o.unsubscribe()},[i]),t},Ci=v.createContext(null),Ei=r=>r&&Object.keys(r).length===0&&r.constructor===Object,Cs=(r="ndmspcApp")=>{const e=v.useContext(Ci)[r],t=Ss(e);return[t==null?void 0:t.data,e]},vt=(r="ndmspcApp")=>{const e=v.useContext(Ci)[r],t=ws(e);return Ei(t)?[null,e]:[t,e]};var Rr={};/**
244
+ * @license React
245
+ * react-jsx-runtime.development.js
246
+ *
247
+ * Copyright (c) Facebook, Inc. and its affiliates.
248
+ *
249
+ * This source code is licensed under the MIT license found in the
250
+ * LICENSE file in the root directory of this source tree.
251
+ */var Ti;function Es(){return Ti||(Ti=1,process.env.NODE_ENV!=="production"&&function(){var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A=Symbol.iterator,S="@@iterator";function y(l){if(l===null||typeof l!="object")return null;var p=A&&l[A]||l[S];return typeof p=="function"?p:null}var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(l){{for(var p=arguments.length,x=new Array(p>1?p-1:0),z=1;z<p;z++)x[z-1]=arguments[z];$("error",l,x)}}function $(l,p,x){{var z=_.ReactDebugCurrentFrame,W=z.getStackAddendum();W!==""&&(p+="%s",x=x.concat([W]));var Q=x.map(function(V){return String(V)});Q.unshift("Warning: "+p),Function.prototype.apply.call(console[l],console,Q)}}var D=!1,b=!1,G=!1,O=!1,I=!1,X;X=Symbol.for("react.module.reference");function T(l){return!!(typeof l=="string"||typeof l=="function"||l===n||l===o||I||l===i||l===h||l===u||O||l===P||D||b||G||typeof l=="object"&&l!==null&&(l.$$typeof===E||l.$$typeof===g||l.$$typeof===a||l.$$typeof===c||l.$$typeof===d||l.$$typeof===X||l.getModuleId!==void 0))}function ee(l,p,x){var z=l.displayName;if(z)return z;var W=p.displayName||p.name||"";return W!==""?x+"("+W+")":x}function F(l){return l.displayName||"Context"}function N(l){if(l==null)return null;if(typeof l.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case n:return"Fragment";case t:return"Portal";case o:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case u:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case c:var p=l;return F(p)+".Consumer";case a:var x=l;return F(x._context)+".Provider";case d:return ee(l,l.render,"ForwardRef");case g:var z=l.displayName||null;return z!==null?z:N(l.type)||"Memo";case E:{var W=l,Q=W._payload,V=W._init;try{return N(V(Q))}catch{return null}}}return null}var L=Object.assign,K=0,q,ye,me,Se,Ae,Ie,R;function H(){}H.__reactDisabledLog=!0;function Y(){{if(K===0){q=console.log,ye=console.info,me=console.warn,Se=console.error,Ae=console.group,Ie=console.groupCollapsed,R=console.groupEnd;var l={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}K++}}function w(){{if(K--,K===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},l,{value:q}),info:L({},l,{value:ye}),warn:L({},l,{value:me}),error:L({},l,{value:Se}),group:L({},l,{value:Ae}),groupCollapsed:L({},l,{value:Ie}),groupEnd:L({},l,{value:R})})}K<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var m=_.ReactCurrentDispatcher,re;function k(l,p,x){{if(re===void 0)try{throw Error()}catch(W){var z=W.stack.trim().match(/\n( *(at )?)/);re=z&&z[1]||""}return`
252
+ `+re+l}}var fe=!1,ne;{var ae=typeof WeakMap=="function"?WeakMap:Map;ne=new ae}function j(l,p){if(!l||fe)return"";{var x=ne.get(l);if(x!==void 0)return x}var z;fe=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Q;Q=m.current,m.current=null,Y();try{if(p){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(Ye){z=Ye}Reflect.construct(l,[],V)}else{try{V.call()}catch(Ye){z=Ye}l.call(V.prototype)}}else{try{throw Error()}catch(Ye){z=Ye}l()}}catch(Ye){if(Ye&&z&&typeof Ye.stack=="string"){for(var B=Ye.stack.split(`
253
+ `),Ce=z.stack.split(`
254
+ `),ce=B.length-1,he=Ce.length-1;ce>=1&&he>=0&&B[ce]!==Ce[he];)he--;for(;ce>=1&&he>=0;ce--,he--)if(B[ce]!==Ce[he]){if(ce!==1||he!==1)do if(ce--,he--,he<0||B[ce]!==Ce[he]){var ze=`
255
+ `+B[ce].replace(" at new "," at ");return l.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",l.displayName)),typeof l=="function"&&ne.set(l,ze),ze}while(ce>=1&&he>=0);break}}}finally{fe=!1,m.current=Q,w(),Error.prepareStackTrace=W}var qe=l?l.displayName||l.name:"",kr=qe?k(qe):"";return typeof l=="function"&&ne.set(l,kr),kr}function le(l,p,x){return j(l,!1)}function M(l){var p=l.prototype;return!!(p&&p.isReactComponent)}function ie(l,p,x){if(l==null)return"";if(typeof l=="function")return j(l,M(l));if(typeof l=="string")return k(l);switch(l){case h:return k("Suspense");case u:return k("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case d:return le(l.render);case g:return ie(l.type,p,x);case E:{var z=l,W=z._payload,Q=z._init;try{return ie(Q(W),p,x)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,pe={},Me=_.ReactDebugCurrentFrame;function Fe(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);Me.setExtraStackFrame(x)}else Me.setExtraStackFrame(null)}function Be(l,p,x,z,W){{var Q=Function.call.bind(we);for(var V in l)if(Q(l,V)){var B=void 0;try{if(typeof l[V]!="function"){var Ce=Error((z||"React class")+": "+x+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}B=l[V](p,V,z,x,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){B=ce}B&&!(B instanceof Error)&&(Fe(W),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",z||"React class",x,V,typeof B),Fe(null)),B instanceof Error&&!(B.message in pe)&&(pe[B.message]=!0,Fe(W),C("Failed %s type: %s",x,B.message),Fe(null))}}}var _t=Array.isArray;function Ge(l){return _t(l)}function Le(l){{var p=typeof Symbol=="function"&&Symbol.toStringTag,x=p&&l[Symbol.toStringTag]||l.constructor.name||"Object";return x}}function se(l){try{return De(l),!1}catch{return!0}}function De(l){return""+l}function mt(l){if(se(l))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Le(l)),De(l)}var Ve=_.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},br,vr,Rt;Rt={};function Tn(l){if(we.call(l,"ref")){var p=Object.getOwnPropertyDescriptor(l,"ref").get;if(p&&p.isReactWarning)return!1}return l.ref!==void 0}function kn(l){if(we.call(l,"key")){var p=Object.getOwnPropertyDescriptor(l,"key").get;if(p&&p.isReactWarning)return!1}return l.key!==void 0}function _n(l,p){if(typeof l.ref=="string"&&Ve.current&&p&&Ve.current.stateNode!==p){var x=N(Ve.current.type);Rt[x]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',N(Ve.current.type),l.ref),Rt[x]=!0)}}function An(l,p){{var x=function(){br||(br=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};x.isReactWarning=!0,Object.defineProperty(l,"key",{get:x,configurable:!0})}}function Pn(l,p){{var x=function(){vr||(vr=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};x.isReactWarning=!0,Object.defineProperty(l,"ref",{get:x,configurable:!0})}}var On=function(l,p,x,z,W,Q,V){var B={$$typeof:e,type:l,key:p,ref:x,props:V,_owner:Q};return B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(B,"_self",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.defineProperty(B,"_source",{configurable:!1,enumerable:!1,writable:!1,value:W}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B};function jn(l,p,x,z,W){{var Q,V={},B=null,Ce=null;x!==void 0&&(mt(x),B=""+x),kn(p)&&(mt(p.key),B=""+p.key),Tn(p)&&(Ce=p.ref,_n(p,W));for(Q in p)we.call(p,Q)&&!Je.hasOwnProperty(Q)&&(V[Q]=p[Q]);if(l&&l.defaultProps){var ce=l.defaultProps;for(Q in ce)V[Q]===void 0&&(V[Q]=ce[Q])}if(B||Ce){var he=typeof l=="function"?l.displayName||l.name||"Unknown":l;B&&An(V,he),Ce&&Pn(V,he)}return On(l,B,Ce,W,z,Ve.current,V)}}var It=_.ReactCurrentOwner,xr=_.ReactDebugCurrentFrame;function Ke(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);xr.setExtraStackFrame(x)}else xr.setExtraStackFrame(null)}var Bt;Bt=!1;function Yt(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function Sr(){{if(It.current){var l=N(It.current.type);if(l)return`
256
+
257
+ Check the render method of \``+l+"`."}return""}}function Dn(l){{if(l!==void 0){var p=l.fileName.replace(/^.*[\\\/]/,""),x=l.lineNumber;return`
244
258
 
245
- Value: `+x.absoluteContent+`
246
- X: `+x.xPos+`
247
- Y: `+x.yPos+`
248
- Z: `+x.zPos,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 2:return h.jsx(v.Fragment,{children:h.jsx("a-text",{value:`Bin height changer:
259
+ Check your code at `+p+":"+x+"."}return""}}var wr={};function $n(l){{var p=Sr();if(!p){var x=typeof l=="string"?l:l.displayName||l.name;x&&(p=`
260
+
261
+ Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var x=$n(p);if(wr[x])return;wr[x]=!0;var z="";l&&l._owner&&l._owner!==It.current&&(z=" It was passed a child from "+N(l._owner.type)+"."),Ke(l),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',x,z),Ke(null)}}function Er(l,p){{if(typeof l!="object")return;if(Ge(l))for(var x=0;x<l.length;x++){var z=l[x];Yt(z)&&Cr(z,p)}else if(Yt(l))l._store&&(l._store.validated=!0);else if(l){var W=y(l);if(typeof W=="function"&&W!==l.entries)for(var Q=W.call(l),V;!(V=Q.next()).done;)Yt(V.value)&&Cr(V.value,p)}}}function zn(l){{var p=l.type;if(p==null||typeof p=="string")return;var x;if(typeof p=="function")x=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===d||p.$$typeof===g))x=p.propTypes;else return;if(x){var z=N(p);Be(x,l.props,"prop",z,l)}else if(p.PropTypes!==void 0&&!Bt){Bt=!0;var W=N(p);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",W||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hn(l){{for(var p=Object.keys(l.props),x=0;x<p.length;x++){var z=p[x];if(z!=="children"&&z!=="key"){Ke(l),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",z),Ke(null);break}}l.ref!==null&&(Ke(l),C("Invalid attribute `ref` supplied to `React.Fragment`."),Ke(null))}}function Tr(l,p,x,z,W,Q){{var V=T(l);if(!V){var B="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(B+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ce=Dn(W);Ce?B+=Ce:B+=Sr();var ce;l===null?ce="null":Ge(l)?ce="array":l!==void 0&&l.$$typeof===e?(ce="<"+(N(l.type)||"Unknown")+" />",B=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof l,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,B)}var he=jn(l,p,x,W,Q);if(he==null)return he;if(V){var ze=p.children;if(ze!==void 0)if(z)if(Ge(ze)){for(var qe=0;qe<ze.length;qe++)Er(ze[qe],l);Object.freeze&&Object.freeze(ze)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Er(ze,l)}return l===n?Hn(he):zn(he),he}}function Mn(l,p,x){return Tr(l,p,x,!0)}function Rn(l,p,x){return Tr(l,p,x,!1)}var In=Rn,Bn=Mn;Rr.Fragment=n,Rr.jsx=In,Rr.jsxs=Bn}()),Rr}var mr={};/**
262
+ * @license React
263
+ * react-jsx-runtime.production.min.js
264
+ *
265
+ * Copyright (c) Facebook, Inc. and its affiliates.
266
+ *
267
+ * This source code is licensed under the MIT license found in the
268
+ * LICENSE file in the root directory of this source tree.
269
+ */var ki;function Ts(){if(ki)return mr;ki=1;var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var u,g={},E=null,P=null;h!==void 0&&(E=""+h),d.key!==void 0&&(E=""+d.key),d.ref!==void 0&&(P=d.ref);for(u in d)n.call(d,u)&&!o.hasOwnProperty(u)&&(g[u]=d[u]);if(c&&c.defaultProps)for(u in d=c.defaultProps,d)g[u]===void 0&&(g[u]=d[u]);return{$$typeof:e,type:c,key:E,ref:P,props:g,_owner:i.current}}return mr.Fragment=t,mr.jsx=a,mr.jsxs=a,mr}process.env.NODE_ENV==="production"?Ts():Es();const xe=new gt;let vn,_i;function Ai(){const[r]=vt("ndmvrInputDevice"),e=v.useRef(),[t,n]=v.useState(0),[i,o]=v.useState(null),[a,c]=v.useState(null),[d,h]=v.useState(null),[u,g]=v.useState(null);vn=t;const[E,P]=v.useState({xPos:0,yPos:0,zPos:0,absoluteContent:0}),[A,S]=v.useState(1),y=v.useContext(yt),{source:_,theme:C,range:$,scene:D}=y.stores,[b,G]=v.useState([]),[O,I]=v.useState([]),[X,T]=v.useState([]),[ee,F]=v.useState([]);v.useEffect(()=>{const w=_!=null&&_.getOptions().length?_==null?void 0:_.getOptions():[];G(w)},[y]),v.useEffect(()=>{const w=C!=null&&C.getOptions().length?C==null?void 0:C.getOptions():[];I(w)},[y]),v.useEffect(()=>{const w=$!=null&&$.getOptions().length?$==null?void 0:$.getOptions():[];T(w)},[y]),v.useEffect(()=>{const w=D!=null&&D.getOptions().length?D==null?void 0:D.getOptions():[];F(w)},[y]),v.useEffect(()=>(_i=xe.subscribe(N),()=>_i.unsubscribe()),[b,O,X,ee]),v.useEffect(()=>{},[t]),v.useEffect(()=>{_&&i&&_.executeFunction(0,i)},[i]),v.useEffect(()=>{C&&a&&C.executeFunction(0,a)},[a]),v.useEffect(()=>{$&&d&&$.executeFunction(0,d)},[d]),v.useEffect(()=>{D&&u&&D.executeFunction(0,u)},[u]);const N=w=>{typeof w=="number"?w+1<=q.length&&(n(w),vn=t):w.changeTabletState?e.current.changeTabletDisplayHandler("switch"):w.binData?E!==w.binData&&P(w.binData):w.tool?(w.tool==="next"&&n(m=>m===q.length-1?0:m+1),w.tool==="prev"&&n(m=>m===0?q.length-1:m-1)):w.source?(w.source==="next"&&o(m=>b.indexOf(m)===b.length-1?b[0]:b[b.indexOf(m)+1]),w.source==="prev"&&o(m=>b.indexOf(m)===0?b[b.length-1]:b[b.indexOf(m)-1])):w.scale?K(w.scale):w.theme?(w.theme==="next"&&c(m=>O.indexOf(m)===O.length-1?O[0]:O[O.indexOf(m)+1]),w.theme==="prev"&&c(m=>O.indexOf(m)===0?O[O.length-1]:O[O.indexOf(m)-1])):w.range?(w.range==="next"&&h(m=>X.indexOf(m)===X.length-1?X[0]:X[X.indexOf(m)+1]),w.range==="prev"&&h(m=>X.indexOf(m)===0?X[X.length-1]:X[X.indexOf(m)-1])):w.scene&&(w.scene==="next"&&g(m=>ee.indexOf(m)===ee.length-1?ee[0]:ee[ee.indexOf(m)+1]),w.scene==="prev"&&g(m=>ee.indexOf(m)===0?ee[ee.length-1]:ee[ee.indexOf(m)-1]))},L=()=>{switch(t){case 0:return f.jsx(v.Fragment,{children:f.jsx("a-text",{value:`Selected bin:
270
+
271
+ Value: `+E.absoluteContent+`
272
+ X: `+E.xPos+`
273
+ Y: `+E.yPos+`
274
+ Z: `+E.zPos,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 2:return f.jsx(v.Fragment,{children:f.jsx("a-text",{value:`Bin height changer:
249
275
 
250
276
  For changing
251
277
  the visual height of bins,
252
278
  use grip + joystick on
253
- the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return h.jsx("a-box",{id:"tablet",color:"white",depth:"0.001",height:"0.3",lenght:"0.01",width:"0.4",rotation:"-60 0 0",position:"0.28 0 0"});case 3:return h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:`Change source:
279
+ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return f.jsx("a-box",{id:"tablet",color:"white",depth:"0.001",height:"0.3",lenght:"0.01",width:"0.4",rotation:"-60 0 0",position:"0.28 0 0"});case 3:return f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:`Change source:
254
280
 
255
- `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),g.map(E=>h.jsx("a-text",{value:E,color:E===i?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*g.indexOf(E)+" 0","wrap-count":E===i?"360":"450"},E))]});case 4:return h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:`Change theme:
281
+ `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),b.map(k=>f.jsx("a-text",{value:k,color:k===i?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*b.indexOf(k)+" 0","wrap-count":k===i?"360":"450"},k))]});case 4:return f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:`Change theme:
256
282
 
257
- `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),R.map(E=>h.jsx("a-plane",{position:"0.15 "+-.025*R.indexOf(E)+" 0",height:"0.02",width:"0.1",interaction:!0,class:"clickable",children:h.jsx("a-text",{value:E,position:"-0.05 0 0.002",color:E===o?"white":"#A6ACAF",rotation:"0 0 0","wrap-count":E===o?"360":"450"},E)}))]});case 5:return h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:`Change range:
283
+ `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),O.map(k=>f.jsx("a-plane",{position:"0.15 "+-.025*O.indexOf(k)+" 0",height:"0.02",width:"0.1",interaction:!0,class:"clickable",children:f.jsx("a-text",{value:k,position:"-0.05 0 0.002",color:k===a?"white":"#A6ACAF",rotation:"0 0 0","wrap-count":k===a?"360":"450"},k)}))]});case 5:return f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:`Change range:
258
284
 
259
- `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),Y.map(E=>h.jsx("a-text",{value:E,color:E===l?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*Y.indexOf(E)+" 0","wrap-count":E===l?"360":"450"},E))]});case 6:const S=15,p=Math.ceil(G.length/S),K=[];for(let E=0;E<p;E++){const le=E*S,ee=le+S,ie=G.slice(le,ee),O=h.jsx("a-entity",{position:`${E*.3} 0 0`,children:ie.map(ne=>h.jsx("a-text",{value:ne,color:ne===d?"white":"#A6ACAF",rotation:"0 0 0",position:`0.1 ${-.025*ie.indexOf(ne)} 0`,"wrap-count":ne===d?"360":"450"},ne))},`column-${E}`);K.push(O)}return h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:"Change scene:",rotation:"0 0 0",position:"0.1 +0.035 0","wrap-count":"450"}),K]});default:return h.jsx("a-text",{value:`This tool does not have
260
- an interface for Oculus Tablet`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})}};function U(S){b(p=>{let K,E=0;return S<0?(p-.01).toFixed(2)>=.01&&((p-.01).toFixed(2)>.7?E=-.1:(p-.01).toFixed(2)>.1?E=-.01:E=-.001):(p+.01).toFixed(2)>.7?E=.1:(p-.01).toFixed(2)>.1?E=.01:E=.001,K=p+E,_e.changeHistogramScale(E,"TH2"),Ge.changeHistogramScale(E,"TH1"),K})}const V=[{fun:fe(),name:"Bin Info"},{fun:de(),name:"Scale Z axis"},{fun:Te(),name:"Change Data"},{fun:ke(),name:"Change Theme"},{fun:Re(),name:"Change Range"},{fun:H(),name:"Change Scene"},{fun:null,name:"Tool with a longer name"}];function fe(){if(w==="desktop")return h.jsx(v.Fragment,{children:h.jsx("table",{style:{width:"100%"},children:h.jsxs("tbody",{children:[h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"value:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:x.absoluteContent})]}),h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"x:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:x.xPos})]}),h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"y:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:x.yPos})]}),h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"z:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:x.zPos})]})]})})})}function de(){let S=.01,p=2;return(A-.01).toFixed(2)>.1&&(S=.1,p=1),h.jsx(v.Fragment,{children:h.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[h.jsx(Xi,{onClick:()=>{(A+.01).toFixed(2)>.1&&(S=.1,p=1),b(A+S),_e.changeHistogramScale(S,"TH2"),Ge.changeHistogramScale(S,"TH1")},children:"+"}),h.jsx("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:A.toFixed(p)}),h.jsx(Xi,{onClick:()=>{(A-.01).toFixed(2)>=.01&&(b(A-S),_e.changeHistogramScale(-S,"TH2"),Ge.changeHistogramScale(-S,"TH1"))},children:"-"})]})})}function Te(){return h.jsx("div",{style:{display:"flex",flexDirection:"column"},children:g.map(S=>S===i?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>n(S),children:S},S):h.jsx("a",{onClick:()=>n(S),children:S},S))})}function ke(){return h.jsx("div",{style:{display:"flex",flexDirection:"column"},children:R.map(S=>S===o?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>a(S),children:S},S):h.jsx("a",{onClick:()=>a(S),children:S},S))})}function Re(){return h.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"7.5rem"},children:Y.map(S=>S===l?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>u(S),children:S},S):h.jsx("a",{onClick:()=>u(S),children:S},S))})}function H(){return h.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"16.5rem"},children:G.map(S=>S===d?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>c(S),children:S},S):h.jsx("a",{onClick:()=>c(S),children:S},S))})}document.getElementById("desktop--tablet--container")&&z(document.getElementById("desktop--tablet--container"));function z(S){let p=0,K=0,E=0,le=0;document.getElementById(S.id+"--header")?document.getElementById(S.id+"--header").onmousedown=ee:S.onmousedown=ee;function ee(ne){ne.preventDefault(),E=ne.clientX,le=ne.clientY,document.onmouseup=O,document.onmousemove=ie}function ie(ne){ne.preventDefault(),p=E-ne.clientX,K=le-ne.clientY,E=ne.clientX,le=ne.clientY,S.style.top=S.offsetTop-K+"px",S.style.left=S.offsetLeft-p+"px"}function O(){document.onmouseup=null,document.onmousemove=null}}const M=S=>{t(S)};return w==="desktop"?h.jsx(Zo,{tools:V,activeToolLocal:e,ref:r,changeActiveToolLocalHandler:M}):h.jsx(v.Fragment,{children:Q()})}const kt=()=>ei,Ko=window.AFRAME,qo=()=>{let r;const{projPanelIds:t}=v.useContext(pt).data,[i,n]=v.useState(0),[o,a]=v.useState(null),[l,u]=v.useState(Ko.utils.device.checkHeadsetConnected()?"oculus":"keyboard"),[d,c]=v.useState(!1),[x,k]=v.useState(!1),[A,b]=v.useState(!0),w=P=>{P.device?(l!==P.device&&u(P.device),c(!d)):P==="shift"?_():P==="show"&&k(!x)},y=P=>{P.changeTabletState&&b(!1)},_=()=>{let P=i+90;P>=360&&(P=0),n(P)},C=P=>t[P]?t[P]:`panel_${P}`,m=()=>h.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${i} 0; dur: 1000; easing: linear;`,material:"color: white",children:[h.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[h.jsx("a-text",{color:"black",width:50,value:l==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),h.jsx("a-text",{color:"black",width:50,value:l==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),h.jsx("a-text",{color:"black",width:50,value:l==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),h.jsx("a-box",{id:C(1),scale:"80 50 2",animation__position:"property: position; from: 0 0 -60; to: 0 -1 -42; delay: 0; dur: 800; easing: linear;",material:"transparent:true"}),h.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 -60; to: 0 0 -42.5; delay: 0; dur: 800; easing: linear;",material:"color: white;"}),h.jsx("a-box",{id:C(2),scale:"80 50 2",animation__position:"property: position; from: 60 0 0; to: 42 -1 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent: true"}),h.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: 60 0 0; to: 42.5 0 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"}),h.jsx("a-box",{id:C(3),scale:"80 50 2",animation__position:"property: position; from: 0 0 60; to: 0 -1 42; delay: 400; dur: 800; easing: linear;",material:"transparent: true"}),h.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 60; to: 0 0 42.5; delay: 400; dur: 800; easing: linear;",material:"color: white;"}),h.jsx("a-box",{id:C(4),scale:"80 50 2",animation__position:"property: position; from: -60 0 0; to: -42 -1 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent: true"}),h.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: -60 0 0; to: -42.5 0 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"})]}),T=()=>l==="keyboard"?h.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${i} 0; dur: 1000; easing: linear;`,material:"color: white",children:[h.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[h.jsx("a-text",{color:"black",width:"50",value:x?"Press C to show help panels":"Press C to show projection panels",position:"-20 2.8 1"}),h.jsx("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),h.jsx("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 60; to: -30 0 30; delay: 0; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard.png"}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 -60; to: -30 0 -30; delay: 200; dur: 800; easing: linear;",rotation:"0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard1.png"}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 -60; to: 30 0 -30; delay: 400; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard2.png"}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 60; to: 30 0 30; delay: 600; dur: 800; easing: linear;",rotation:" 0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard3.png"})]}):h.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${i} 0; dur: 1000; easing: linear;`,children:[h.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[h.jsx("a-text",{color:"black",width:"50",value:x?"Press Button X to show help panels":"Press Button X to show projection panels",position:"-20 2.8 1"}),h.jsx("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),h.jsx("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 60; to: -32 0 32; delay: 0; dur: 800; easing: linear;",rotation:"-10 -45 0",src:"./assets/ndmvr/oculusControls/oculus.png"}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 -60; to: -32 0 -32; delay: 200; dur: 800; easing: linear;",rotation:"10 45 0",src:"./assets/ndmvr/oculusControls/oculus2.png"}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 -60; to: 32 0 -32; delay: 400; dur: 800; easing: linear;",rotation:"10 -45 0",src:"./assets/ndmvr/oculusControls/oculus1.png"}),h.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 60; to: 32 0 32; delay: 600; dur: 800; easing: linear;",rotation:"-10 45 0",src:"./assets/ndmvr/oculusControls/oculus3.png"})]}),g=()=>{const P=document.getElementById(C(0));P&&P.setAttribute("material","opacity",0)},X=()=>{const P=document.getElementById(C(0));P&&P.setAttribute("material","opacity",1)};v.useEffect(()=>(r=ye.subscribe(y),()=>{r.unsubscribe()}),[]),v.useEffect(()=>(r=Et.getCameraSubject().subscribe(w),()=>r.unsubscribe()),[d,x,i]),v.useEffect(()=>{const P=document.getElementById("camera");d?(a({x:P.object3D.position.x,y:P.object3D.position.y,z:P.object3D.position.z}),P.object3D.position.y=P.object3D.position.y+30,g()):(P.object3D.position.y=1.6,o!==null&&(P.object3D.position.x=o.x,P.object3D.position.z=o.z,P.object3D.position.y=o.y),X())},[d,l]);const R=()=>h.jsxs(v.Fragment,{children:[h.jsx("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
261
- lineOpacity: 0.5;
262
- far: 20;`}),h.jsx("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,"oculus-thumbstick-movement-controller":"",children:h.jsx(Ui,{})}),h.jsx("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]});return h.jsxs("a-entity",{id:"cameraWrapper",children:[d&&!x&&T(),d&&x&&m(),l==="oculus"&&R()]})};class ti{constructor(){F(this,Ne,void 0);F(this,Er,void 0);F(this,qe,[]);F(this,Tr,e=>s(this,qe).filter(t=>t.id!==e.id));ze(this,"containThisBin",e=>s(this,qe).filter(i=>i.id===e.id).length!==0);ze(this,"storeBinToLocalStorage",e=>{this.containThisBin(e)||(s(this,qe).push(e),s(this,Ne).setItem("selectedBins",JSON.stringify(s(this,qe))))});ze(this,"deleteBinFromLocalStorage",e=>{this.containThisBin(e)&&(B(this,qe,s(this,Tr).call(this,e)),s(this,Ne).setItem("selectedBins",JSON.stringify(s(this,qe))))});ze(this,"getBinsFromLocalStorage",()=>{const e=JSON.parse(s(this,Ne).getItem("selectedBins"));return e===null?[]:e});B(this,Ne,window.localStorage),B(this,Er,document.getElementById("cameraWrapper")),B(this,qe,this.getBinsFromLocalStorage())}storeCurrentBinToLocalStorage(e){s(this,Ne).setItem("currentBin",JSON.stringify(e))}getCurrentBinFromLocalStorage(){const e=JSON.parse(s(this,Ne).getItem("currentBin"));return e===void 0||e===""?null:e}loadProperty(e){return JSON.parse(s(this,Ne).getItem(e))}storeProperty(e,t){s(this,Ne).setItem(e,JSON.stringify(t))}initHistogramData(e){e._typename.includes("TH3")?this.storeTH3HistogramLimits(e):e._typename.includes("TH2")&&this.storeTH2HistogramLimits(e)}storeTH2Offsets(e,t,i){let n=this.loadProperty("TH2"),o;n===null?(n={},o={name:"TH2",xOffset:1,yOffset:1,range:8}):o={name:"TH2",xOffset:e,yOffset:t,range:i},n.section=o,this.storeProperty("TH2",n)}storeTH3Offsets(e,t,i,n){let o=this.loadProperty("TH3"),a;o===null?(o={},a={name:"TH3",xOffset:1,yOffset:1,zOffset:1,range:4}):a={name:"TH3",xOffset:e,yOffset:t,zOffset:i,range:n},o.section=a,this.storeProperty("TH3",o)}storeOffsets(e){e.name.includes("TH3")||e.name.includes("th3")?this.storeTH3Offsets(e.xOffset,e.yOffset,e.zOffset,e.range):(e.name.includes("TH2")||e.name.includes("th2"))&&this.storeTH2Offsets(e.xOffset,e.yOffset,e.range)}storeFilePath(e){s(this,Ne).setItem("rootFile",e)}loadFilePath(){const e=s(this,Ne).getItem("rootFile");return e??"defaultHistogram"}loadTH2Offsets(){const e=this.loadProperty("TH2");return e!==null?e.section:null}loadTH3Offsets(){const e=this.loadProperty("TH3");return e!==null?e.section:null}loadOffsets(e){if(e.includes("TH3")||e.includes("th3"))return this.loadTH3Offsets();if(e.includes("TH2")||e.includes("th2"))return this.loadTH2Offsets()}}Ne=new WeakMap,Er=new WeakMap,qe=new WeakMap,Tr=new WeakMap;const Zi=new ti;class Jo{constructor(){F(this,At,void 0);B(this,At,new ft)}saveSelectedBinToLocalStorage(){s(this,At).next(!0)}deleteBinFromLocalStorage(){s(this,At).next(!1)}getKeyboardEvent(){return s(this,At).asObservable()}}At=new WeakMap;const vr=new Jo;class Qo{constructor(){F(this,Ht,void 0);B(this,Ht,new ft)}showBinProjection(e){s(this,Ht).next(e)}getServiceEvent(){return s(this,Ht).asObservable()}}Ht=new WeakMap;const Gi=new Qo;class es{constructor(){F(this,Pt,void 0);B(this,Pt,new ft)}sendDataOfTheSelectedBin(e){s(this,Pt).next(e)}emmitCommand(e){s(this,Pt).next({command:e})}getBinDistributor(){return s(this,Pt).asObservable()}}Pt=new WeakMap;const nr=new es;function ri(r,e,t){r.face.normal.x!==0?(e.setAttribute("material","color",e.userData.axisZ),nr.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Z",id:e.userData.histogramName})):r.face.normal.y!==0?(e.setAttribute("material","color",e.userData.axisY),nr.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Y",id:e.userData.histogramName})):(e.setAttribute("material","color",e.userData.axisX),nr.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"X",id:e.userData.histogramName})),e.setAttribute("material","opacity","0.75")}he.registerComponent("mouseevent",{init:function(){let r;const e=this.el;let t=0;e.addEventListener("mouseenter",function(n){const o=n.detail.intersection;r=vr.getKeyboardEvent().subscribe(a=>{a?(this.userData.markedColor=this.userData.selectColor,this.setAttribute("material","opacity","0.70"),Gi.showBinProjection(this.userData)):(Zi.deleteBinFromLocalStorage(this.userData),this.userData.markedColor=this.userData.color,this.setAttribute("material","opacity","0.50"))}),ri(o,this,"HOVER")}),e.addEventListener("mouseleave",function(){r.unsubscribe(),this.setAttribute("material","color",this.userData.markedColor),this.setAttribute("material","opacity","0.50"),t=0}),e.addEventListener("click",function(n){if(t=t+1,setTimeout(()=>{t=0},600),t===2){t=0,this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1");const a=n.detail.intersection;a&&ri(a,this,"DB_CLICK")}else if(t===1){this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1"),Gi.showBinProjection(this.userData),ye.next({binData:this.userData});const a=n.detail.intersection;a&&ri(a,this,"CLICK")}let o=document.getElementById("th2-banner");if(o===null&&(o=document.getElementById("th3-banner")),o!==null){const a=o.childNodes;if(this.userData.typeName==="TH3"&&a.length===5){const l=`[${this.userData.zTitle}] [${this.userData.zMin},${this.userData.zMax}] ${this.userData.binName!==""?this.userData.binName+`
285
+ `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),X.map(k=>f.jsx("a-text",{value:k,color:k===d?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*X.indexOf(k)+" 0","wrap-count":k===d?"360":"450"},k))]});case 6:const w=15,m=Math.ceil(ee.length/w),re=[];for(let k=0;k<m;k++){const fe=k*w,ne=fe+w,ae=ee.slice(fe,ne),j=f.jsx("a-entity",{position:`${k*.3} 0 0`,children:ae.map(le=>f.jsx("a-text",{value:le,color:le===u?"white":"#A6ACAF",rotation:"0 0 0",position:`0.1 ${-.025*ae.indexOf(le)} 0`,"wrap-count":le===u?"360":"450"},le))},`column-${k}`);re.push(j)}return f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:"Change scene:",rotation:"0 0 0",position:"0.1 +0.035 0","wrap-count":"450"}),re]});default:return f.jsx("a-text",{value:`This tool does not have
286
+ an interface for Oculus Tablet`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})}};function K(w){S(m=>{let re,k=0;return w<0?(m-.01).toFixed(2)>=.01&&((m-.01).toFixed(2)>.7?k=-.1:(m-.01).toFixed(2)>.1?k=-.01:k=-.001):(m+.01).toFixed(2)>.7?k=.1:(m-.01).toFixed(2)>.1?k=.01:k=.001,re=m+k,$e.changeHistogramScale(k,"TH2"),nt.changeHistogramScale(k,"TH1"),re})}const q=[{fun:ye(),name:"Bin Info"},{fun:me(),name:"Scale Z axis"},{fun:Se(),name:"Change Data"},{fun:Ae(),name:"Change Theme"},{fun:Ie(),name:"Change Range"},{fun:R(),name:"Change Scene"},{fun:null,name:"Tool with a longer name"}];function ye(){if(r!=="oculus")return f.jsx(v.Fragment,{children:f.jsx("table",{style:{width:"100%"},children:f.jsxs("tbody",{children:[f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"value:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.absoluteContent})]}),f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"x:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.xPos})]}),f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"y:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.yPos})]}),f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"z:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.zPos})]})]})})})}function me(){let w=.01,m=2;return(A-.01).toFixed(2)>.1&&(w=.1,m=1),f.jsx(v.Fragment,{children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[f.jsx(wi,{onClick:()=>{(A+.01).toFixed(2)>.1&&(w=.1,m=1),S(A+w),$e.changeHistogramScale(w,"TH2"),nt.changeHistogramScale(w,"TH1")},children:"+"}),f.jsx("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:A.toFixed(m)}),f.jsx(wi,{onClick:()=>{(A-.01).toFixed(2)>=.01&&(S(A-w),$e.changeHistogramScale(-w,"TH2"),nt.changeHistogramScale(-w,"TH1"))},children:"-"})]})})}function Se(){return f.jsx("div",{style:{display:"flex",flexDirection:"column"},children:b.map(w=>w===i?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>o(w),children:w},w):f.jsx("a",{onClick:()=>o(w),children:w},w))})}function Ae(){return f.jsx("div",{style:{display:"flex",flexDirection:"column"},children:O.map(w=>w===a?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>c(w),children:w},w):f.jsx("a",{onClick:()=>c(w),children:w},w))})}function Ie(){return f.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"7.5rem"},children:X.map(w=>w===d?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>h(w),children:w},w):f.jsx("a",{onClick:()=>h(w),children:w},w))})}function R(){return f.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"16.5rem"},children:ee.map(w=>w===u?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>g(w),children:w},w):f.jsx("a",{onClick:()=>g(w),children:w},w))})}document.getElementById("desktop--tablet--container")&&H(document.getElementById("desktop--tablet--container"));function H(w){let m=0,re=0,k=0,fe=0;document.getElementById(w.id+"--header")?document.getElementById(w.id+"--header").onmousedown=ne:w.onmousedown=ne;function ne(le){le.preventDefault(),k=le.clientX,fe=le.clientY,document.onmouseup=j,document.onmousemove=ae}function ae(le){le.preventDefault(),m=k-le.clientX,re=fe-le.clientY,k=le.clientX,fe=le.clientY,w.style.top=w.offsetTop-re+"px",w.style.left=w.offsetLeft-m+"px"}function j(){document.onmouseup=null,document.onmousemove=null}}const Y=w=>{n(w)};return r!=="oculus"?f.jsx(xs,{tools:q,activeToolLocal:t,ref:e,changeActiveToolLocalHandler:Y}):f.jsx(v.Fragment,{children:L()})}const jt=()=>vn;function xn(r,e,t){r.face.normal.x!==0?(e.setAttribute("material","color",e.userData.axisZ),ur.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Z",id:e.userData.histogramName})):r.face.normal.y!==0?(e.setAttribute("material","color",e.userData.axisY),ur.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Y",id:e.userData.histogramName})):(e.setAttribute("material","color",e.userData.axisX),ur.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"X",id:e.userData.histogramName})),e.setAttribute("material","opacity","0.75")}be.registerComponent("mouseevent",{init:function(){let r;const e=this.el;let t=0;e.addEventListener("mouseenter",function(i){const o=i.detail.intersection;r=Or.getKeyboardEvent().subscribe(a=>{a?(this.userData.markedColor=this.userData.selectColor,this.setAttribute("material","opacity","0.70"),Kn.showBinProjection(this.userData)):(Ln.deleteBinFromLocalStorage(this.userData),this.userData.markedColor=this.userData.color,this.setAttribute("material","opacity","0.50"))}),xn(o,this,"HOVER")}),e.addEventListener("mouseleave",function(){r.unsubscribe(),this.setAttribute("material","color",this.userData.markedColor),this.setAttribute("material","opacity","0.50"),t=0}),e.addEventListener("click",function(i){if(t=t+1,setTimeout(()=>{t=0},600),t===2){t=0,this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1");const a=i.detail.intersection;a&&xn(a,this,"DB_CLICK")}else if(t===1){this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1"),Kn.showBinProjection(this.userData),xe.next({binData:this.userData});const a=i.detail.intersection;a&&xn(a,this,"CLICK")}let o=document.getElementById("th2-banner");if(o===null&&(o=document.getElementById("th3-banner")),o!==null){const a=o.childNodes;if(this.userData.typeName==="TH3"&&a.length===5){const c=`[${this.userData.zTitle}] [${this.userData.zMin},${this.userData.zMax}] ${this.userData.binName!==""?this.userData.binName+`
263
287
  `:`
264
- `}`,u=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
288
+ `}`,d=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
265
289
  `:`
266
- `}`,d=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
290
+ `}`,h=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
267
291
  `:`
268
- `}`,c=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
269
- `;a[0].setAttribute("text",`value: ${c}; color: ${this.userData.color}; align: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${u}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${d}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`),a[3].setAttribute("text",`value: ${l}; color: ${this.userData.axisZ}; align: center; width: 30; height: auto;`)}else{const l=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
270
- `,u=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
292
+ `}`,u=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
293
+ `;a[0].setAttribute("text",`value: ${u}; color: ${this.userData.color}; align: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${d}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${h}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`),a[3].setAttribute("text",`value: ${c}; color: ${this.userData.axisZ}; align: center; width: 30; height: auto;`)}else{const c=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
294
+ `,d=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
271
295
  `:`
272
- `}`,d=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
296
+ `}`,h=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
273
297
  `:`
274
- `}`;a[0].setAttribute("text",`value: ${l}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${u}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${d}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const r=this.el;r.setAttribute("material","color",r.userData.markedColor),r.setAttribute("material","opacity","0.75")}}),he.registerComponent("binth",{schema:{id:{type:"string"},histogramName:{type:"string"},typeName:{type:"string"},content:{default:0},absoluteContent:{default:0},binName:{default:""},xTitle:{type:"string"},yTitle:{type:"string"},zTitle:{type:"string"},xMin:{type:"number"},yMin:{type:"number"},zMin:{type:"number"},xMax:{type:"number"},yMax:{type:"number"},zMax:{type:"number"},xPos:{type:"number"},yPos:{type:"number"},zPos:{type:"number"},xCenter:{type:"number"},yCenter:{type:"number"},zCenter:{type:"number"},xWidth:{type:"number"},yWidth:{type:"number"},zWidth:{type:"number"},color:{type:"string"},axisX:{type:"string"},axisY:{type:"string"},axisZ:{type:"string"},selectColor:{type:"string"},markedColor:{type:"string"}},init:function(){const r=this.el;r.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}},update:function(){const r=this.el;r.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}}});class or{constructor(){F(this,Ce,void 0);ze(this,"verticalMoveCamera",(e,t)=>{if(s(this,Ce)===null&&B(this,Ce,document.getElementById("cameraRig")),s(this,Ce)!==null){const i=new THREE.Vector3,n=s(this,Ce).object3D.position.clone();e?(i.copy(n).add(new THREE.Vector3(0,+t,0)),s(this,Ce).object3D.position.lerp(i,.5)):s(this,Ce).object3D.position.y>3&&(i.copy(n).add(new THREE.Vector3(0,-t,0)),s(this,Ce).object3D.position.lerp(i,.5))}});ze(this,"horizontalMoveCamera",(e,t,i)=>{s(this,Ce)===null&&B(this,Ce,document.getElementById("cameraRig")),s(this,Ce)!==null&&(t?s(this,Ce).object3D.position[e]+=i:s(this,Ce).object3D.position[e]-=i)});ze(this,"horizontalDiagonalMoveCamera",(e,t,i,n)=>{if(s(this,Ce)===null&&B(this,Ce,document.getElementById("cameraRig")),s(this,Ce)!==null){const o=new THREE.Vector3;o[e]=Math.cos(Math.PI/4),o[t]=Math.sin(Math.PI/4),o.normalize(),i?s(this,Ce).object3D.position.addScaledVector(o,n):s(this,Ce).object3D.position.addScaledVector(o,-n)}});F(this,We,(e,t,i)=>{if(s(this,Ce)!==null&&e!==null){const n=e.object3D.position.x+1*e.object3D.position.x,o=e.object3D.position.z+1*e.object3D.position.z,a=t;s(this,Ce).setAttribute("animation",`property: position; to: ${n+1} ${a} ${o+1}; dur: 100;`),s(this,Ce).setAttribute("animation__1",`property: rotation; to: ${s(this,Ce).object3D.rotation.x} ${i} ${s(this,Ce).object3D.rotation.z}; dur: 100;`)}});ze(this,"setCameraPosition",e=>{if(s(this,Ce)!==null){let t=s(this,Ce).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const i=e.xOffset+e.xOffset,n=e.yOffset+e.yOffset;setTimeout(()=>{s(this,Ce).setAttribute("animation",`property: position; to: ${i-3} ${t} ${n-3}; dur: 40;`)},1800)}});ze(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&s(this,We).call(this,e,0,180)});ze(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&s(this,We).call(this,e,0,0)});ze(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&s(this,We).call(this,e,0,90)});ze(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&s(this,We).call(this,e,0,270)});ze(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&s(this,We).call(this,e,10,180)});ze(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&s(this,We).call(this,e,10,0)});ze(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&s(this,We).call(this,e,10,90)});ze(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&s(this,We).call(this,e,10,270)});B(this,Ce,document.getElementById("cameraRig"))}}Ce=new WeakMap,We=new WeakMap;const st={};let ii=new or,ni,gt,Sr=!1;ye.next({changeTabletState:Sr});const oi=(r,e)=>{let t=.2;r.name==="scale"?t=.01:r.name==="rotation"&&(t=2),e.key==="ArrowDown"?r.xValue=r.xValue+t:e.key==="ArrowUp"?r.xValue=r.xValue-t:e.key==="="?r.yValue=r.yValue+t:e.key==="-"?r.yValue=r.yValue-t:e.key==="ArrowRight"?r.zValue=r.zValue+t:e.key==="ArrowLeft"&&(r.zValue=r.zValue-t),ni.setAttribute(r.name,`${r.xValue} ${r.yValue} ${r.zValue}`)},ts=r=>{r.key==="k"||r.key==="K"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),je.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):r.key==="i"||r.key==="I"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),je.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):r.key==="u"||r.key==="U"?je.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):r.key==="o"||r.key==="O"?je.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):r.key==="j"||r.key==="j"?(Ge.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),je.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(r.key==="l"||r.key==="L")&&(Ge.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),je.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},rs=r=>{r.key==="k"||r.key==="K"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),je.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):r.key==="i"||r.key==="I"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),je.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):r.key==="u"||r.key==="U"?je.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):r.key==="o"||r.key==="O"?je.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):r.key==="l"||r.key==="L"?(_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),je.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)):(r.key==="j"||r.key==="J")&&(_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),je.changeHistogramSectionByOffset("xOffset","TH3",fal,!1))},wr=r=>{st[r.key]=!0,(st.Z||st.z)&&oi(gt[0],r),(st.X||st.x)&&oi(gt[1],r),(st.C||st.c)&&oi(gt[2],r),st.Shift&&rs(r),ts(r),(r.key==="e"||r.key==="E")&&ii.verticalMoveCamera(!0,.3),(r.key==="q"||r.key==="Q")&&ii.verticalMoveCamera(!1,.3),r.key==="1"&&ye.next(0),r.key==="2"&&ye.next(1),r.key==="3"&&ye.next(2),r.key==="4"&&ye.next(3),r.key==="5"&&ye.next(4),r.key==="6"&&ye.next(5),r.key==="7"&&ye.next(6),r.key==="8"&&ye.next(7),r.key==="9"&&ye.next(8),r.key==="0"&&ye.next(9),r.key==="Enter"&&nr.emmitCommand("REFRESH"),(r.key==="t"||r.key==="T")&&(Sr=!Sr,Sr?ye.next({changeTabletState:"flex"}):ye.next({changeTabletState:"none"})),r.key==="r"||r.key,(r.key==="m"||r.key==="M")&&_e.changeHistogramFunction("feet","TH2"),(r.key==="n"||r.key==="N")&&_e.changeHistogramFunction("default","TH2"),(r.key==="c"||r.key==="C")&&Et.setUserState(),(r.key==="v"||r.key==="V")&&Et.setVisibilityOfBanners("keyboard"),(r.key==="x"||r.key==="X")&&Et.shiftBanners()},Cr=r=>{delete st[r.key]},Ki=(r,e)=>{ni=e,gt=[r.position,r.scale,r.rotation];for(let t=0;t<3;t++)ni.setAttribute(gt[t].name,`${gt[t].xValue} ${gt[t].yValue} ${gt[t].zValue}`)},qi=()=>{ii=new or};he.registerComponent("histogram-control",{schema:{position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const r=this.el;Ki(this.schema,r),document.querySelector("a-scene").addEventListener("mouseover",function(){document.addEventListener("keydown",wr),document.addEventListener("keyup",Cr)}),document.querySelector("a-scene").addEventListener("mouseout",function(){document.removeEventListener("keydown",wr),document.removeEventListener("keyup",Cr)})},update:function(){qi()}}),he.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const r=this.el;this.value=this.data.value,r.setAttribute("text","value",this.data.value)},update:function(){const r=this.el;this.value!==this.data.value&&(setTimeout(()=>{r.setAttribute("text","value",this.data.value)},this.data.delay),this.value=this.data.value)}});const Ie={def:{colorPalette:["#4b0066","#8300b3","#bb00ff","#cf4dff","#e499ff","#ffffcc","#ffff99","#ffff66","#ffff33","#fcba03"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4b0066",secondary:"#FF3700"},font:{primary:"black",secondary:"black"}},fire:{colorPalette:["#5b0000","#7b2100","#a23b00","#c84900","#df5900","#f18800","#f1a000","#ffae00","#ffcd19","#ffe159"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#5b0000",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},nebula:{colorPalette:["#13004b","#320065","#4e0085","#6100a5","#7000b8","#9800c6","#ab00c6","#b900d2","#d700da","#ff6efc"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#13004b",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},rainforest:{colorPalette:["#005b01","#007b23","#00a23d","#00c84c","#00df5c","#00f18b","#00ffb1","#19ffd0","#a6fffe","#56fffe"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#005b01",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},nature:{colorPalette:["#4a691a","#5e8425","#79a834","#91c640","#9ed64b","#a8dc59","#b0e166","#bfeb7c","#d7fba2","#deffad"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4a691a",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},water:{colorPalette:["#00545a","#00717a","#0097a2","#00bac8","#00cede","#00dff0","#00edff","#45f2ff","#7ef6ff","#bdfaff"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#00545a",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},sunflower:{colorPalette:["#1e3600","#2e4d00","#507001","#91a004","#b4bb06","#d2d309","#eeed0f","#ffff28","#ffff85","#ffffc2"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#1e3600",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},blood:{colorPalette:["#470101","#6e0101","#800b0b","#940c0c","#a30000","#bd0909","#e01f1f","#d43b3b","#db5e5e","#f78888"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#470101",secondary:"#f6ff00"},font:{primary:"black",secondary:"black"}},magma:{colorPalette:["#dbff1d","#d5e814","#d5d007","#cc9b00","#b87600","#9c4a00","#812f00","#661900","#661420","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#2b0000",secondary:"#ae2000"},font:{primary:"black",secondary:"black"}},jupiter:{colorPalette:["#00340f","#00344f","#006e3a","#00976a","#26efd0","#9c4a00","#9c4a00","#812f00","#661900","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#00340f",secondary:"#e3ff5b"},font:{primary:"black",secondary:"black"}},magic:{colorPalette:["#342000","#6e5e00","#888500","#919700","#8dbe00","#caef26","#cf6e85","#b300b8","#6b0090","#3b0066"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#342000",secondary:"#c85bff"},font:{primary:"black",secondary:"black"}}};class Ji{constructor(e){Ie[e]?(this.xAxis=Ie[e].axis.x,this.yAxis=Ie[e].axis.y,this.zAxis=Ie[e].axis.z,this.palette=Ie[e].colorPalette,this.primaryAccent=Ie[e].accent.primary,this.secondaryAccent=Ie[e].accent.secondary,this.primaryFont=Ie[e].font.primary,this.secondaryFont=Ie[e].font.secondary):(this.xAxis=Ie.def.axis.x,this.yAxis=Ie.def.axis.y,this.zAxis=Ie.def.axis.z,this.palette=Ie.def.colorPalette,this.primaryAccent=Ie.def.accent.primary,this.secondaryAccent=Ie.def.accent.secondary,this.primaryFont=Ie.def.font.primary,this.secondaryFont=Ie.def.font.secondary)}getAxisColor(e){return e==="x"||e==="X"?this.xAxis:e==="y"||e==="Y"?this.yAxis:e==="z"||e==="Z"?this.zAxis:null}getPrimaryAccentColor(){return this.primaryAccent}getSecondaryAccentColor(){return this.secondaryAccent}getPrimaryFontColor(){return this.primaryFont}getSecondaryFontColor(){return this.secondaryFont}getBinColor(e){let i=this.palette[0];if(e>=1)return this.palette[9];const n=.12;let o=n;for(let a=0;a<=9;a++){if(e<=o){i=this.palette[a];break}o+=n}return i}}class is{constructor(e,t,i,n,o,a,l,u){F(this,Lt);F(this,Ee,"");F(this,cr,[]);F(this,L,null);F(this,Je,"");F(this,Z,null);F(this,ae,1);F(this,me,1);F(this,N,1);F(this,Ye,0);F(this,Le,0);F(this,Qe,0);F(this,lt,1);F(this,xt,1);F(this,ur,1);F(this,ge,8);F(this,Fe,{xInitial:0,yInitial:0,zInitial:0});F(this,et,void 0);F(this,tt,void 0);F(this,bt,1);F(this,rt,1);F(this,_t,0);F(this,Mt,2);F(this,re,{xOffset:0,yOffset:0,zOffset:0});F(this,vt,[]);ze(this,"getXOffset",()=>s(this,ae));ze(this,"getYOffset",()=>s(this,me));ze(this,"getZOffset",()=>s(this,N));ze(this,"getContentScale",()=>s(this,rt));ze(this,"getRange",()=>s(this,ge));F(this,ct,(e,t)=>{let i=e>t-s(this,ge)?t-s(this,ge):e;return i<1&&(i=1),i});F(this,Rt,e=>s(this,cr).filter(i=>i.id===e).length!==0);F(this,Ue,(e,t,i,n,o,a,l,u,d,c,x,k,A)=>({key:e+s(this,Ee),axis:t,geometry:{primitive:"plane",width:d,height:c},text:{color:A,width:4,height:"auto"},labelHandler:{value:x,delay:500},rotation:{x:a,y:l,z:u},material:{color:k},animation:{fromX:i-s(this,re).xOffset,fromY:n+s(this,re).zOffset,fromZ:o+s(this,re).yOffset,toX:i,toY:n,toZ:o}}));F(this,kr,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,i,n,o,a,l,u,d,c,x,k,A;const b="";let w,y=0;const _=s(this,ae)+s(this,ge)>s(this,Ye)?s(this,Ye):s(this,ae)+s(this,ge),C=s(this,me)+s(this,ge)>s(this,Le)?s(this,Le):s(this,me)+s(this,ge),m=s(this,N)+s(this,ge)>s(this,Qe)?s(this,Qe):s(this,N)+s(this,ge),T=s(this,L).fXaxis.fTitle,g=s(this,L).fYaxis.fTitle,X=s(this,L).fZaxis.fTitle,R=s(this,L).fXaxis.fLabels?s(this,L).fXaxis.fLabels.arr:[],P=s(this,L).fYaxis.fLabels?s(this,L).fYaxis.fLabels.arr:[],Y=s(this,L).fZaxis.fLabels?s(this,L).fZaxis.fLabels.arr:[],se=[];for(let W=s(this,N);W<=m;W++)for(let Q=s(this,me);Q<=C;Q++)for(let U=s(this,ae);U<=_;U++){t=s(this,L).fXaxis.GetBinCenter(U),i=s(this,L).fXaxis.GetBinLowEdge(U),n=t+(t-i),o=n-i,a=s(this,L).fYaxis.GetBinCenter(Q),l=s(this,L).fYaxis.GetBinLowEdge(Q),u=a+(a-l),d=u-l,c=s(this,L).fZaxis.GetBinCenter(W),x=s(this,L).fZaxis.GetBinLowEdge(W),k=c+(c-x),A=k-x;const V=s(this,It).call(this,s(this,L).getBinContent(U,Q,W));if(V<=s(this,_t))continue;w=s(this,tt)?s(this,Xt).call(this,s(this,tt).call(this,{histogram:s(this,L),histogramId:s(this,Ee),x:U,y:Q,z:W})):V;let fe=w;w<.15&&(fe=.15);let de=s(this,et)?s(this,et).call(this,{histogram:s(this,L),histogramId:s(this,Ee),x:U,y:Q,z:W,content:w}):null;de=de||s(this,Z).getBinColor(w);const Te=s(this,Ee)+i+"th3"+n+"th3"+x+"th3"+k+"th3"+l+"th3"+u;let ke;s(this,Rt).call(this,Te)?ke=s(this,Z).getSecondaryAccentColor():ke=de;const Re=`id: ${Te};
275
- histogramName: ${s(this,Ee)};
298
+ `}`;a[0].setAttribute("text",`value: ${c}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${d}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${h}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const r=this.el;r.setAttribute("material","color",r.userData.markedColor),r.setAttribute("material","opacity","0.75")}}),be.registerComponent("binth",{schema:{id:{type:"string"},histogramName:{type:"string"},typeName:{type:"string"},content:{default:0},absoluteContent:{default:0},binName:{default:""},xTitle:{type:"string"},yTitle:{type:"string"},zTitle:{type:"string"},xMin:{type:"number"},yMin:{type:"number"},zMin:{type:"number"},xMax:{type:"number"},yMax:{type:"number"},zMax:{type:"number"},xPos:{type:"number"},yPos:{type:"number"},zPos:{type:"number"},xCenter:{type:"number"},yCenter:{type:"number"},zCenter:{type:"number"},xWidth:{type:"number"},yWidth:{type:"number"},zWidth:{type:"number"},color:{type:"string"},axisX:{type:"string"},axisY:{type:"string"},axisZ:{type:"string"},selectColor:{type:"string"},markedColor:{type:"string"}},init:function(){const r=this.el;r.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}},update:function(){const r=this.el;r.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}}});class Wt{constructor(){Z(this,Pe,void 0);Re(this,"verticalMoveCamera",(e,t)=>{if(s(this,Pe)===null&&U(this,Pe,document.getElementById("cameraRig")),s(this,Pe)!==null){const n=new THREE.Vector3,i=s(this,Pe).object3D.position.clone();e?(n.copy(i).add(new THREE.Vector3(0,+t,0)),s(this,Pe).object3D.position.lerp(n,.5)):s(this,Pe).object3D.position.y>3&&(n.copy(i).add(new THREE.Vector3(0,-t,0)),s(this,Pe).object3D.position.lerp(n,.5))}});Re(this,"horizontalMoveCamera",(e,t,n)=>{s(this,Pe)===null&&U(this,Pe,document.getElementById("cameraRig")),s(this,Pe)!==null&&(t?s(this,Pe).object3D.position[e]+=n:s(this,Pe).object3D.position[e]-=n)});Re(this,"horizontalDiagonalMoveCamera",(e,t,n,i)=>{if(s(this,Pe)===null&&U(this,Pe,document.getElementById("cameraRig")),s(this,Pe)!==null){const o=new THREE.Vector3;o[e]=Math.cos(Math.PI/4),o[t]=Math.sin(Math.PI/4),o.normalize(),n?s(this,Pe).object3D.position.addScaledVector(o,i):s(this,Pe).object3D.position.addScaledVector(o,-i)}});Z(this,et,(e,t,n)=>{if(s(this,Pe)!==null&&e!==null){const i=e.object3D.position.x+1*e.object3D.position.x,o=e.object3D.position.z+1*e.object3D.position.z,a=t;s(this,Pe).setAttribute("animation",`property: position; to: ${i+1} ${a} ${o+1}; dur: 100;`),s(this,Pe).setAttribute("animation__1",`property: rotation; to: ${s(this,Pe).object3D.rotation.x} ${n} ${s(this,Pe).object3D.rotation.z}; dur: 100;`)}});Re(this,"setCameraPosition",e=>{if(s(this,Pe)!==null){let t=s(this,Pe).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const n=e.xOffset+e.xOffset,i=e.yOffset+e.yOffset;setTimeout(()=>{s(this,Pe).setAttribute("animation",`property: position; to: ${n-3} ${t} ${i-3}; dur: 40;`)},1800)}});Re(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&s(this,et).call(this,e,0,180)});Re(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&s(this,et).call(this,e,0,0)});Re(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&s(this,et).call(this,e,0,90)});Re(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&s(this,et).call(this,e,0,270)});Re(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&s(this,et).call(this,e,10,180)});Re(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&s(this,et).call(this,e,10,0)});Re(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&s(this,et).call(this,e,10,90)});Re(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&s(this,et).call(this,e,10,270)});U(this,Pe,document.getElementById("cameraRig"))}getCurrentPosRot(){const e=document.getElementById("camera"),t=document.getElementById("cameraRig");return{position:{x:e.object3D.position.x+t.object3D.position.x,y:e.object3D.position.y+t.object3D.position.y,z:e.object3D.position.z+t.object3D.position.z},rotation:{x:e.object3D.rotation.x+t.object3D.rotation.x,y:e.object3D.rotation.y+t.object3D.rotation.y,z:e.object3D.rotation.z+t.object3D.rotation.z}}}calculateDefaultPosRot(e,t){if(Ei(e)){const i=t.data.histogram.fXaxis.fNbins>t.states.range?t.states.range:t.data.histogram.fXaxis.fNbins,o=t.data.histogram.fYaxis.fNbins>t.states.range?t.states.range:t.data.histogram.fYaxis.fNbins;return{position:{x:((i*1-.5)*(-2*1)-1*3/4)/2,y:8+o/2,z:-4},rotation:{x:0,y:0,z:0}}}if(e)return e}parsePosition(e){var t;if(!(!e||((t=e.position)==null?void 0:t.x)===void 0))return e.position=e.position.x+" "+e.position.y+" "+e.position.z,e}setCameraRotation(e){const t=document.getElementById("camera");t.components["look-controls"].pitchObject.rotation.set(-.9,0,0),t.components["look-controls"].yawObject.rotation.set(0,3.14159265,0),e!=null&&e.x&&t.components["look-controls"].pitchObject.rotation.set(e.x,0,0),e!=null&&e.y&&t.components["look-controls"].yawObject.rotation.set(0,e.y,0)}}Pe=new WeakMap,et=new WeakMap;class ks{constructor(){Z(this,wt,void 0);U(this,wt,new gt)}setVisibilityOfBanners(e){s(this,wt).next({device:e})}shiftBanners(){s(this,wt).next("shift")}setUserState(){s(this,wt).next("show")}getCameraSubject(){return s(this,wt).asObservable()}}wt=new WeakMap;const Dt=new ks,ut={};let Sn=new Wt,wn,xt,Ir=!1;xe.next({changeTabletState:Ir});const Cn=(r,e)=>{let t=.2;r.name==="scale"?t=.01:r.name==="rotation"&&(t=2),e.key==="ArrowDown"?r.xValue=r.xValue+t:e.key==="ArrowUp"?r.xValue=r.xValue-t:e.key==="="?r.yValue=r.yValue+t:e.key==="-"?r.yValue=r.yValue-t:e.key==="ArrowRight"?r.zValue=r.zValue+t:e.key==="ArrowLeft"&&(r.zValue=r.zValue-t),wn.setAttribute(r.name,`${r.xValue} ${r.yValue} ${r.zValue}`)},_s=r=>{r.key==="k"||r.key==="K"?($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):r.key==="i"||r.key==="I"?($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):r.key==="u"||r.key==="U"?He.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):r.key==="o"||r.key==="O"?He.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):r.key==="j"||r.key==="j"?(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(r.key==="l"||r.key==="L")&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},As=r=>{r.key==="k"||r.key==="K"?($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):r.key==="i"||r.key==="I"?($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):r.key==="u"||r.key==="U"?He.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):r.key==="o"||r.key==="O"?He.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):r.key==="l"||r.key==="L"?($e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)):(r.key==="j"||r.key==="J")&&($e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("xOffset","TH3",fal,!1))},Br=r=>{ut[r.key]=!0,(ut.Z||ut.z)&&Cn(xt[0],r),(ut.X||ut.x)&&Cn(xt[1],r),(ut.C||ut.c)&&Cn(xt[2],r),ut.Shift&&As(r),_s(r),(r.key==="e"||r.key==="E")&&Sn.verticalMoveCamera(!0,.3),(r.key==="q"||r.key==="Q")&&Sn.verticalMoveCamera(!1,.3),r.key==="1"&&xe.next(0),r.key==="2"&&xe.next(1),r.key==="3"&&xe.next(2),r.key==="4"&&xe.next(3),r.key==="5"&&xe.next(4),r.key==="6"&&xe.next(5),r.key==="7"&&xe.next(6),r.key==="8"&&xe.next(7),r.key==="9"&&xe.next(8),r.key==="0"&&xe.next(9),r.key==="Enter"&&ur.emmitCommand("REFRESH"),(r.key==="t"||r.key==="T")&&(Ir=!Ir,Ir?xe.next({changeTabletState:"flex"}):xe.next({changeTabletState:"none"})),r.key==="r"||r.key,(r.key==="m"||r.key==="M")&&$e.changeHistogramFunction("feet","TH2"),(r.key==="n"||r.key==="N")&&$e.changeHistogramFunction("default","TH2"),(r.key==="c"||r.key==="C")&&Dt.setUserState(),(r.key==="v"||r.key==="V")&&Dt.setVisibilityOfBanners("keyboard"),(r.key==="x"||r.key==="X")&&Dt.shiftBanners()},Yr=r=>{delete ut[r.key]},Pi=(r,e)=>{wn=e,xt=[r.position,r.scale,r.rotation];for(let t=0;t<3;t++)wn.setAttribute(xt[t].name,`${xt[t].xValue} ${xt[t].yValue} ${xt[t].zValue}`)},Oi=()=>{Sn=new Wt};be.registerComponent("histogram-control",{schema:{position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const r=this.el;Pi(this.schema,r),document.querySelector("a-scene").addEventListener("mouseover",function(){document.addEventListener("keydown",Br),document.addEventListener("keyup",Yr)}),document.querySelector("a-scene").addEventListener("mouseout",function(){document.removeEventListener("keydown",Br),document.removeEventListener("keyup",Yr)})},update:function(){Oi()}}),be.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const r=this.el;this.value=this.data.value,r.setAttribute("text","value",this.data.value)},update:function(){const r=this.el;this.value!==this.data.value&&(setTimeout(()=>{r.setAttribute("text","value",this.data.value)},this.data.delay),this.value=this.data.value)}});const Ne={def:{colorPalette:["#4b0066","#8300b3","#bb00ff","#cf4dff","#e499ff","#ffffcc","#ffff99","#ffff66","#ffff33","#fcba03"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4b0066",secondary:"#FF3700"},font:{primary:"black",secondary:"black"}},fire:{colorPalette:["#5b0000","#7b2100","#a23b00","#c84900","#df5900","#f18800","#f1a000","#ffae00","#ffcd19","#ffe159"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#5b0000",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},nebula:{colorPalette:["#13004b","#320065","#4e0085","#6100a5","#7000b8","#9800c6","#ab00c6","#b900d2","#d700da","#ff6efc"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#13004b",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},rainforest:{colorPalette:["#005b01","#007b23","#00a23d","#00c84c","#00df5c","#00f18b","#00ffb1","#19ffd0","#a6fffe","#56fffe"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#005b01",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},nature:{colorPalette:["#4a691a","#5e8425","#79a834","#91c640","#9ed64b","#a8dc59","#b0e166","#bfeb7c","#d7fba2","#deffad"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4a691a",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},water:{colorPalette:["#00545a","#00717a","#0097a2","#00bac8","#00cede","#00dff0","#00edff","#45f2ff","#7ef6ff","#bdfaff"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#00545a",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},sunflower:{colorPalette:["#1e3600","#2e4d00","#507001","#91a004","#b4bb06","#d2d309","#eeed0f","#ffff28","#ffff85","#ffffc2"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#1e3600",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},blood:{colorPalette:["#470101","#6e0101","#800b0b","#940c0c","#a30000","#bd0909","#e01f1f","#d43b3b","#db5e5e","#f78888"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#470101",secondary:"#f6ff00"},font:{primary:"black",secondary:"black"}},magma:{colorPalette:["#dbff1d","#d5e814","#d5d007","#cc9b00","#b87600","#9c4a00","#812f00","#661900","#661420","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#2b0000",secondary:"#ae2000"},font:{primary:"black",secondary:"black"}},jupiter:{colorPalette:["#00340f","#00344f","#006e3a","#00976a","#26efd0","#9c4a00","#9c4a00","#812f00","#661900","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#00340f",secondary:"#e3ff5b"},font:{primary:"black",secondary:"black"}},magic:{colorPalette:["#342000","#6e5e00","#888500","#919700","#8dbe00","#caef26","#cf6e85","#b300b8","#6b0090","#3b0066"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#342000",secondary:"#c85bff"},font:{primary:"black",secondary:"black"}}};class ji{constructor(e){Ne[e]?(this.xAxis=Ne[e].axis.x,this.yAxis=Ne[e].axis.y,this.zAxis=Ne[e].axis.z,this.palette=Ne[e].colorPalette,this.primaryAccent=Ne[e].accent.primary,this.secondaryAccent=Ne[e].accent.secondary,this.primaryFont=Ne[e].font.primary,this.secondaryFont=Ne[e].font.secondary):(this.xAxis=Ne.def.axis.x,this.yAxis=Ne.def.axis.y,this.zAxis=Ne.def.axis.z,this.palette=Ne.def.colorPalette,this.primaryAccent=Ne.def.accent.primary,this.secondaryAccent=Ne.def.accent.secondary,this.primaryFont=Ne.def.font.primary,this.secondaryFont=Ne.def.font.secondary)}getAxisColor(e){return e==="x"||e==="X"?this.xAxis:e==="y"||e==="Y"?this.yAxis:e==="z"||e==="Z"?this.zAxis:null}getPrimaryAccentColor(){return this.primaryAccent}getSecondaryAccentColor(){return this.secondaryAccent}getPrimaryFontColor(){return this.primaryFont}getSecondaryFontColor(){return this.secondaryFont}getBinColor(e){let n=this.palette[0];if(e>=1)return this.palette[9];const i=.12;let o=i;for(let a=0;a<=9;a++){if(e<=o){n=this.palette[a];break}o+=i}return n}}class Ps{constructor(e,t,n,i,o,a,c,d){Z(this,tr);Z(this,Oe,"");Z(this,gr,[]);Z(this,te,null);Z(this,ot,"");Z(this,oe,null);Z(this,ge,1);Z(this,ve,1);Z(this,J,1);Z(this,Xe,0);Z(this,Ze,0);Z(this,st,0);Z(this,ft,1);Z(this,Ct,1);Z(this,yr,1);Z(this,je,8);Z(this,We,{xInitial:0,yInitial:0,zInitial:0});Z(this,at,void 0);Z(this,lt,void 0);Z(this,Et,1);Z(this,ht,1);Z(this,Ht,0);Z(this,Zt,2);Z(this,Mt,4);Z(this,ue,{xOffset:0,yOffset:0,zOffset:0});Z(this,Tt,[]);Re(this,"getXOffset",()=>s(this,ge));Re(this,"getYOffset",()=>s(this,ve));Re(this,"getZOffset",()=>s(this,J));Re(this,"getContentScale",()=>s(this,ht));Re(this,"getRange",()=>s(this,je));Z(this,pt,(e,t)=>{let n=e>t-s(this,je)?t-s(this,je):e;return n<1&&(n=1),n});Z(this,Gt,e=>s(this,gr).filter(n=>n.id===e).length!==0);Z(this,tt,(e,t,n,i,o,a,c,d,h,u,g,E,P)=>({key:e+s(this,Oe),axis:t,geometry:{primitive:"plane",width:h,height:u},text:{color:P,width:4,height:"auto"},labelHandler:{value:g,delay:500},rotation:{x:a,y:c,z:d},material:{color:E},animation:{fromX:n-s(this,ue).xOffset,fromY:i+s(this,ue).zOffset,fromZ:o+s(this,ue).yOffset,toX:n,toY:i,toZ:o}}));Z(this,Lr,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,n,i,o,a,c,d,h,u,g,E,P;const A="";let S,y=0;const _=s(this,ge)+s(this,je)>s(this,Xe)?s(this,Xe):s(this,ge)+s(this,je),C=s(this,ve)+s(this,je)>s(this,Ze)?s(this,Ze):s(this,ve)+s(this,je),$=s(this,J)+s(this,je)>s(this,st)?s(this,st):s(this,J)+s(this,je),D=s(this,te).fXaxis.fTitle,b=s(this,te).fYaxis.fTitle,G=s(this,te).fZaxis.fTitle,O=s(this,te).fXaxis.fLabels?s(this,te).fXaxis.fLabels.arr:[],I=s(this,te).fYaxis.fLabels?s(this,te).fYaxis.fLabels.arr:[],X=s(this,te).fZaxis.fLabels?s(this,te).fZaxis.fLabels.arr:[],T=[];for(let N=s(this,J);N<=$;N++)for(let L=s(this,ve);L<=C;L++)for(let K=s(this,ge);K<=_;K++){t=s(this,te).fXaxis.GetBinCenter(K),n=s(this,te).fXaxis.GetBinLowEdge(K),i=t+(t-n),o=i-n,a=s(this,te).fYaxis.GetBinCenter(L),c=s(this,te).fYaxis.GetBinLowEdge(L),d=a+(a-c),h=d-c,u=s(this,te).fZaxis.GetBinCenter(N),g=s(this,te).fZaxis.GetBinLowEdge(N),E=u+(u-g),P=E-g;const q=s(this,Kt).call(this,s(this,te).getBinContent(K,L,N));if(q<=s(this,Ht))continue;S=s(this,lt)?s(this,nr).call(this,s(this,lt).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:K,y:L,z:N})):q;let ye=S;S<.15&&(ye=.15);let me=s(this,at)?s(this,at).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:K,y:L,z:N,content:S}):null;me=me||s(this,oe).getBinColor(S);const Se=s(this,Oe)+n+"th3"+i+"th3"+g+"th3"+E+"th3"+c+"th3"+d;let Ae;s(this,Gt).call(this,Se)?Ae=s(this,oe).getSecondaryAccentColor():Ae=me;const Ie=`id: ${Se};
299
+ histogramName: ${s(this,Oe)};
276
300
  typeName: 'TH3';
277
- content: ${w};
278
- color: ${de};
279
- yTitle: ${g};
280
- xTitle: ${T};
281
- zTitle: ${X};
282
- absoluteContent: ${V};
283
- binName: ${b};
284
- xMin: ${i};
285
- yMin: ${l};
286
- zMin: ${x};
287
- xMax: ${n};
288
- yMax: ${u};
289
- zMax: ${k};
290
- xPos: ${U};
291
- yPos: ${Q};
292
- zPos: ${W};
301
+ content: ${S};
302
+ color: ${me};
303
+ yTitle: ${b};
304
+ xTitle: ${D};
305
+ zTitle: ${G};
306
+ absoluteContent: ${q};
307
+ binName: ${A};
308
+ xMin: ${n};
309
+ yMin: ${c};
310
+ zMin: ${g};
311
+ xMax: ${i};
312
+ yMax: ${d};
313
+ zMax: ${E};
314
+ xPos: ${K};
315
+ yPos: ${L};
316
+ zPos: ${N};
293
317
  xCenter: ${t};
294
318
  yCenter: ${a};
295
- zCenter: ${c};
319
+ zCenter: ${u};
296
320
  xWidth: ${o};
297
- yWidth: ${d};
298
- zWidth: ${A};
299
- markedColor: ${ke};
300
- selectColor: ${s(this,Z).getSecondaryAccentColor()};
301
- axisX: ${s(this,Z).getAxisColor("x")};
302
- axisY: ${s(this,Z).getAxisColor("y")};
303
- axisZ: ${s(this,Z).getAxisColor("z")}`,H=fe*.8,z=-(U-1),M=W-1,S=Q-1;e.bins[y]={id:Te,color:de,binData:Re,content:V,animation:{fromWidth:s(this,St).call(this,Te),fromHeight:s(this,St).call(this,Te),fromDepth:s(this,St).call(this,Te),toWidth:H,toHeight:H,toDepth:H},animation2:{fromX:z,fromY:M,fromZ:S,toX:z,toY:M,toZ:S},animation3:{fromColor:s(this,Vt).call(this,Te),toColor:ke}},se[y]={key:Te,scale:H,color:ke},y++}B(this,vt,se);const G=[],I=[];return y=s(this,Ft).call(this,e,G,I,C,_,P,g,0),y=s(this,Nt).call(this,e,G,I,_,C,R,T,y),y=s(this,Yt).call(this,e,G,I,_,C,m,Y,X,y),Dr(this,Lt,$r).call(this,e,G,I,_,C,y),e.labels=[...G,...I],e});F(this,Ar,()=>{const e={type:"TH2",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,i,n,o,a,l,u,d,c,x;const k="";let A=0;const b=s(this,ae)+s(this,ge)>s(this,L).fXaxis.fNbins?s(this,L).fXaxis.fNbins:s(this,ae)+s(this,ge),w=s(this,me)+s(this,ge)>s(this,L).fYaxis.fNbins?s(this,L).fYaxis.fNbins:s(this,me)+s(this,ge),y=s(this,L).fXaxis.fTitle!==""?s(this,L).fXaxis.fTitle:"x",_=s(this,L).fYaxis.fTitle!==""?s(this,L).fYaxis.fTitle:"y",C=s(this,L).fXaxis.fLabels?s(this,L).fXaxis.fLabels.arr:[],m=s(this,L).fYaxis.fLabels?s(this,L).fYaxis.fLabels.arr:[],T=[];for(let R=s(this,me);R<=w;R++)for(let P=s(this,ae);P<=b;P++){i=s(this,L).fXaxis.GetBinCenter(P),n=s(this,L).fXaxis.GetBinLowEdge(P),o=i+(i-n),a=o-n,l=s(this,L).fYaxis.GetBinCenter(R),u=s(this,L).fYaxis.GetBinLowEdge(R),d=l+(l-u),c=d-u;const Y=s(this,It).call(this,s(this,L).getBinContent(P,R));if(Y<=s(this,_t))continue;x=s(this,tt)?s(this,Xt).call(this,s(this,tt).call(this,{histogram:s(this,L),histogramId:s(this,Ee),x:P,y:R})):Y,t=x*s(this,ge)*s(this,rt)/16;let se=s(this,et)?s(this,et).call(this,{histogram:s(this,L),histogramId:s(this,Ee),x:P,y:R,content:x}):null;se=se||s(this,Z).getBinColor(x);const G=s(this,Ee)+n+"th2"+o+"th2"+u+"th2"+d;let I;s(this,Rt).call(this,G)?I=s(this,Z).getSecondaryAccentColor():I=se;const W=`id: ${G};
304
- histogramName: ${s(this,Ee)};
321
+ yWidth: ${h};
322
+ zWidth: ${P};
323
+ markedColor: ${Ae};
324
+ selectColor: ${s(this,oe).getSecondaryAccentColor()};
325
+ axisX: ${s(this,oe).getAxisColor("x")};
326
+ axisY: ${s(this,oe).getAxisColor("y")};
327
+ axisZ: ${s(this,oe).getAxisColor("z")}`,R=ye*.8,H=-(K-1),Y=N-1,w=L-1;e.bins[y]={id:Se,color:me,binData:Ie,content:q,animation:{fromWidth:s(this,kt).call(this,Se),fromHeight:s(this,kt).call(this,Se),fromDepth:s(this,kt).call(this,Se),toWidth:R,toHeight:R,toDepth:R},animation2:{fromX:H,fromY:Y,fromZ:w,toX:H,toY:Y,toZ:w},animation3:{fromColor:s(this,rr).call(this,Se),toColor:Ae}},T[y]={key:Se,scale:R,color:Ae},y++}U(this,Tt,T);const ee=[],F=[];return y=s(this,Qt).call(this,e,ee,F,C,_,I,b,0),y=s(this,er).call(this,e,ee,F,_,C,O,D,y),y=s(this,Jt).call(this,e,ee,F,_,C,$,X,G,y),Kr(this,tr,qr).call(this,e,ee,F,_,C,y),e.labels=[...ee,...F],e});Z(this,Vr,()=>{const e={type:"TH2",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,n,i,o,a,c,d,h,u,g;const E="";let P=0;const A=s(this,ge)+s(this,je)>s(this,te).fXaxis.fNbins?s(this,te).fXaxis.fNbins:s(this,ge)+s(this,je),S=s(this,ve)+s(this,je)>s(this,te).fYaxis.fNbins?s(this,te).fYaxis.fNbins:s(this,ve)+s(this,je),y=s(this,te).fXaxis.fTitle!==""?s(this,te).fXaxis.fTitle:"x",_=s(this,te).fYaxis.fTitle!==""?s(this,te).fYaxis.fTitle:"y",C=s(this,te).fXaxis.fLabels?s(this,te).fXaxis.fLabels.arr:[],$=s(this,te).fYaxis.fLabels?s(this,te).fYaxis.fLabels.arr:[],D=[];for(let O=s(this,ve);O<=S;O++)for(let I=s(this,ge);I<=A;I++){n=s(this,te).fXaxis.GetBinCenter(I),i=s(this,te).fXaxis.GetBinLowEdge(I),o=n+(n-i),a=o-i,c=s(this,te).fYaxis.GetBinCenter(O),d=s(this,te).fYaxis.GetBinLowEdge(O),h=c+(c-d),u=h-d;const X=s(this,Kt).call(this,s(this,te).getBinContent(I,O));if(X<=s(this,Ht))continue;g=s(this,lt)?s(this,nr).call(this,s(this,lt).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:I,y:O})):X,t=g*s(this,ht)/(s(this,Mt)*2);let T=s(this,at)?s(this,at).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:I,y:O,content:g}):null;T=T||s(this,oe).getBinColor(g);const ee=s(this,Oe)+i+"th2"+o+"th2"+d+"th2"+h;let F;s(this,Gt).call(this,ee)?F=s(this,oe).getSecondaryAccentColor():F=T;const N=`id: ${ee};
328
+ histogramName: ${s(this,Oe)};
305
329
  typeName: 'TH2';
306
- content: ${x};
307
- color: ${se};
330
+ content: ${g};
331
+ color: ${T};
308
332
  yTitle: ${_};
309
333
  xTitle: ${y};
310
334
  zTitle: 'none';
311
- absoluteContent: ${Y};
312
- binName: ${k};
313
- xMin: ${n};
314
- yMin: ${u};
335
+ absoluteContent: ${X};
336
+ binName: ${E};
337
+ xMin: ${i};
338
+ yMin: ${d};
315
339
  zMin: 0;
316
340
  xMax: ${o};
317
- yMax: ${d};
341
+ yMax: ${h};
318
342
  zMax: 0;
319
- xPos: ${P};
320
- yPos: ${R};
343
+ xPos: ${I};
344
+ yPos: ${O};
321
345
  zPos: 0;
322
- xCenter: ${i};
323
- yCenter: ${l};
346
+ xCenter: ${n};
347
+ yCenter: ${c};
324
348
  yCenter: 0;
325
349
  xWidth: ${a};
326
- yWidth: ${c};
350
+ yWidth: ${u};
327
351
  zWidth: 0;
328
- markedColor: ${I};
329
- selectColor: ${s(this,Z).getSecondaryAccentColor()};
330
- axisX: ${s(this,Z).getAxisColor("x")};
331
- axisY: ${s(this,Z).getAxisColor("y")};
332
- axisZ: ${s(this,Z).getAxisColor("z")}`,Q=a/s(this,lt)/s(this,Mt),U=c/s(this,xt)/s(this,Mt),V=-(P-1),fe=R-1;e.bins[A]={id:G,color:se,binData:W,content:Y,animation:{fromWidth:Q,fromHeight:s(this,St).call(this,G),fromDepth:U,toWidth:Q,toHeight:x*s(this,ge)*s(this,rt)/8,toDepth:U},animation2:{fromX:V,fromY:t,fromZ:fe,toX:V,toY:t,toZ:fe},animation3:{fromColor:s(this,Vt).call(this,G),toColor:I}},T[A]={key:G,scale:x,color:I},A++}B(this,vt,T);const g=[],X=[];return A=s(this,Ft).call(this,e,g,X,w,b,m,_,0),A=s(this,Nt).call(this,e,g,X,b,w,C,y,A),A=s(this,Yt).call(this,e,g,X,b,w,void 0,void 0,void 0,A),Dr(this,Lt,$r).call(this,e,g,X,b,w,A),e.labels=[...g,...X],e});F(this,Pr,()=>{const e={type:"TH1",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,i,n,o,a,l;const u="";let d=0;const c=s(this,ae)+s(this,ge)>s(this,L).fXaxis.fNbins?s(this,L).fXaxis.fNbins:s(this,ae)+s(this,ge),x=1,k=s(this,L).fXaxis.fTitle!==""?s(this,L).fXaxis.fTitle:"x",A=s(this,L).fXaxis.fLabels?s(this,L).fXaxis.fLabels.arr:[],b=[];for(let _=s(this,ae);_<=c;_++){i=s(this,L).fXaxis.GetBinCenter(_),n=s(this,L).fXaxis.GetBinLowEdge(_),o=i+(i-n),a=o-n;const C=s(this,It).call(this,s(this,L).getBinContent(_));if(C<=s(this,_t))continue;l=s(this,tt)?s(this,Xt).call(this,s(this,tt).call(this,{histogram:s(this,L),histogramId:s(this,Ee),x:_})):C,t=l*s(this,ge)*s(this,rt)/16;let m=s(this,et)?s(this,et).call(this,{histogram:s(this,L),histogramId:s(this,Ee),x:_,content:l}):null;m=m||s(this,Z).getBinColor(l);const T=s(this,Ee)+n+"th1"+o;let g;s(this,Rt).call(this,T)?g=s(this,Z).getSecondaryAccentColor():g=m,console.log(_,n,o,i);const X=`id: ${T};
333
- histogramName: ${s(this,Ee)};
352
+ markedColor: ${F};
353
+ selectColor: ${s(this,oe).getSecondaryAccentColor()};
354
+ axisX: ${s(this,oe).getAxisColor("x")};
355
+ axisY: ${s(this,oe).getAxisColor("y")};
356
+ axisZ: ${s(this,oe).getAxisColor("z")}`,L=a/s(this,ft)/s(this,Zt),K=u/s(this,Ct)/s(this,Zt),q=-(I-1),ye=O-1;e.bins[P]={id:ee,color:T,binData:N,content:X,animation:{fromWidth:L,fromHeight:s(this,kt).call(this,ee),fromDepth:K,toWidth:L,toHeight:g*s(this,ht)/s(this,Mt),toDepth:K},animation2:{fromX:q,fromY:t,fromZ:ye,toX:q,toY:t,toZ:ye},animation3:{fromColor:s(this,rr).call(this,ee),toColor:F}},D[P]={key:ee,scale:g,color:F},P++}U(this,Tt,D);const b=[],G=[];return P=s(this,Qt).call(this,e,b,G,S,A,$,_,0),P=s(this,er).call(this,e,b,G,A,S,C,y,P),P=s(this,Jt).call(this,e,b,G,A,S,void 0,void 0,void 0,P),Kr(this,tr,qr).call(this,e,b,G,A,S,P),e.labels=[...b,...G],e});Z(this,Xr,()=>{const e={type:"TH1",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,n,i,o,a,c;const d="";let h=0;const u=s(this,ge)+s(this,je)>s(this,te).fXaxis.fNbins?s(this,te).fXaxis.fNbins:s(this,ge)+s(this,je),g=1,E=s(this,te).fXaxis.fTitle!==""?s(this,te).fXaxis.fTitle:"x",P=s(this,te).fXaxis.fLabels?s(this,te).fXaxis.fLabels.arr:[],A=[];for(let _=s(this,ge);_<=u;_++){n=s(this,te).fXaxis.GetBinCenter(_),i=s(this,te).fXaxis.GetBinLowEdge(_),o=n+(n-i),a=o-i;const C=s(this,Kt).call(this,s(this,te).getBinContent(_));if(C<=s(this,Ht))continue;c=s(this,lt)?s(this,nr).call(this,s(this,lt).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:_})):C,t=c*s(this,ht)/(s(this,Mt)*2);let $=s(this,at)?s(this,at).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:_,content:c}):null;$=$||s(this,oe).getBinColor(c);const D=s(this,Oe)+i+"th1"+o;let b;s(this,Gt).call(this,D)?b=s(this,oe).getSecondaryAccentColor():b=$,console.log(_,i,o,n);const G=`id: ${D};
357
+ histogramName: ${s(this,Oe)};
334
358
  typeName: 'TH1';
335
- content: ${l};
336
- xTitle: ${k};
359
+ content: ${c};
360
+ xTitle: ${E};
337
361
  zTitle: 'none';
338
362
  absoluteContent: ${C};
339
- binName: ${u};
340
- xMin: ${n};
363
+ binName: ${d};
364
+ xMin: ${i};
341
365
  zMin: 0;
342
366
  xMax: ${o};
343
367
  zMax: 0;
344
368
  xPos: ${_};
345
369
  zPos: 0;
346
- xCenter: ${i};
370
+ xCenter: ${n};
347
371
  yCenter: 0;
348
372
  xWidth: ${a};
349
373
  zWidth: 0;
350
- markedColor: ${g};
351
- selectColor: ${s(this,Z).getSecondaryAccentColor()};
352
- axisX: ${s(this,Z).getAxisColor("x")};
353
- axisY: ${s(this,Z).getAxisColor("y")};
354
- axisZ: ${s(this,Z).getAxisColor("z")}`,R=a/s(this,lt)/s(this,Mt),P=-(_-1),Y=0;e.bins[d]={id:T,color:m,binData:X,content:C,animation:{fromWidth:R,fromHeight:s(this,St).call(this,T),fromDepth:R,toWidth:R,toHeight:l*s(this,ge)*s(this,rt)/8,toDepth:R},animation2:{fromX:P+s(this,re).xOffset,fromY:t,fromZ:Y,toX:P,toY:t,toZ:Y},animation3:{fromColor:s(this,Vt).call(this,T),toColor:g}},b[d]={key:T,scale:l,color:g},d++}B(this,vt,b);const w=[],y=[];return d=s(this,Ft).call(this,e,w,y,x,c,void 0,void 0,0),d=s(this,Nt).call(this,e,w,y,c,x,A,k,d),d=s(this,Yt).call(this,e,w,y,c,x,void 0,void 0,void 0,d),Dr(this,Lt,$r).call(this,e,w,y,c,x,d),e.labels=[...w,...y],e});F(this,It,e=>e<=0?0:(s(this,bt)>1&&(e=Math.round((e/s(this,bt)+Number.EPSILON)*100)/100),e));F(this,Bt,(e,t,i,n,o)=>{if(B(this,re,{xOffset:0,yOffset:0,zOffset:0}),i){if(o?(t[n]+=1,s(this,re)[n]=-1):(t[n]+=t.range,s(this,re)[n]=-t.range),e[n]<=t.range)return t[n]=1,s(this,re)[n]=0,t;if(t[n]>e[n]-t.range)return t[n]=e[n]-t.range,s(this,re)[n]=0,t}else if(o?(t[n]-=1,s(this,re)[n]=1):(t[n]-=t.range,s(this,re)[n]=t.range),t[n]<1)return t[n]=1,s(this,re)[n]=0,t;return t});F(this,Yt,(e,t,i,n,o,a,l,u,d)=>(t[d]=s(this,Ue).call(this,9e4+d,"z",-(n+.5),s(this,N)-1,o+.5,270,360,0,2,2,`${l?l[s(this,N)-1]?l[s(this,N)-1].fString:Math.round((s(this,Fe).zInitial+s(this,N)-1+Number.EPSILON)*100)/100:"0"}`,s(this,Z).getAxisColor("y"),s(this,Z).getSecondaryFontColor()),i[d]=s(this,Ue).call(this,91e3+d,"z",-(n+.5),s(this,N)-1,s(this,me)-2.5,270,180,0,2,2,`${l?l[s(this,N)-1]?l[s(this,N)-1].fString:Math.round((s(this,Fe).zInitial+s(this,N)-1+Number.EPSILON)*100)/100:"0"}`,s(this,Z).getAxisColor("y"),s(this,Z).getSecondaryFontColor()),d++,t[d]=s(this,Ue).call(this,92e3+d,"z",-(s(this,ae)-2.5),s(this,N)-1,o+.5,270,180,0,2,2,`${l?l[s(this,N)-1]?l[s(this,N)-1].fString:Math.round((s(this,Fe).zInitial+s(this,N)-1+Number.EPSILON)*100)/100:"0"}`,s(this,Z).getAxisColor("y"),s(this,Z).getSecondaryFontColor()),i[d]=s(this,Ue).call(this,93e3+d,"z",-(s(this,ae)-2.5),s(this,N)-1,s(this,me)-2.5,270,180,0,2,2,`${l?l[s(this,N)-1]?l[s(this,N)-1].fString:Math.round((s(this,Fe).zInitial+s(this,N)-1+Number.EPSILON)*100)/100:"0"}`,s(this,Z).getAxisColor("y"),s(this,Z).getSecondaryFontColor()),d++,u&&(e.axisLabels[4]={id:"upLabel1",key:95004+s(this,Ee),text:{value:u,color:s(this,Z).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:s(this,ae)-1.5+s(this,re).xOffset,fromY:a-1+s(this,re).zOffset,fromZ:s(this,me)-2+s(this,re).yOffset,toX:s(this,ae)-1.5,toY:a-1,toZ:s(this,me)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+s(this,Ee),text:{value:u,color:s(this,Z).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:n-.5+s(this,re).xOffset,fromY:a-1+s(this,re).zOffset,fromZ:o+s(this,re).yOffset,toX:n-.5,toY:a-1,toZ:o}},e.axisLabels[6]={id:"upLabel3",key:105006+s(this,Ee),text:{value:u,color:s(this,Z).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:s(this,ae)-2+s(this,re).xOffset,fromY:a-1+s(this,re).zOffset,fromZ:o-.5+s(this,re).yOffset,toX:s(this,ae)-2,toY:a-1,toZ:o-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+s(this,Ee),text:{value:u,color:s(this,Z).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:n-.5+s(this,re).xOffset,fromY:a-1+s(this,re).zOffset,fromZ:s(this,me)-1.5+s(this,re).yOffset,toX:n-.5,toY:a-1,toZ:s(this,me)-1.5}}),d));F(this,Ft,(e,t,i,n,o,a,l,u)=>{for(let d=s(this,me);d<=n;d++)t[u]=s(this,Ue).call(this,1500+u,"y",-(s(this,ae)-2.5),s(this,N)?s(this,N)-1:0,d-1,270,180,0,2,1,`${a?a[d-1]?a[d-1].fString:Math.round((s(this,Fe).yInitial+(d-1)*s(this,xt)+Number.EPSILON)*100)/100:""}`,s(this,Z).getAxisColor("z"),s(this,Z).getSecondaryFontColor()),i[u]=s(this,Ue).call(this,3e3+u,"y",-(o+.5),s(this,N)?s(this,N)-1:0,d-1,270,360,0,2,1,`${a?a[d-1]?a[d-1].fString:Math.round((s(this,Fe).yInitial+(d-1)*s(this,xt)+Number.EPSILON)*100)/100:""}`,s(this,Z).getAxisColor("z"),s(this,Z).getSecondaryFontColor()),u++;return e.axisLabels[0]={id:"leftLabel",key:4500+s(this,Ee),text:{value:l||"",color:s(this,Z).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:-(s(this,ae)-4+s(this,re).xOffset),fromY:(s(this,N)?s(this,N)-1:0)+s(this,re).zOffset,fromZ:s(this,me)+.5+s(this,re).yOffset,toX:-(s(this,ae)-4),toY:s(this,N)?s(this,N)-1:0,toZ:s(this,me)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+s(this,Ee),text:{value:l||"",color:s(this,Z).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:-(o+2+s(this,re).xOffset),fromY:(s(this,N)?s(this,N)-1:0)+s(this,re).zOffset,fromZ:n-2.5+s(this,re).yOffset,toX:-(o+2),toY:s(this,N)?s(this,N)-1:0,toZ:n-2.5}},u});F(this,Nt,(e,t,i,n,o,a,l,u)=>{for(let d=s(this,ae);d<=n;d++)t[u]=s(this,Ue).call(this,7500+u,"x",-(d-1),s(this,N)?s(this,N)-1:0,s(this,me)-2.5,270,180,0,1,2,`${a[d-1]?a[d-1].fString:Math.round((s(this,Fe).xInitial+(d-1)*s(this,lt)+Number.EPSILON)*100)/100}`,s(this,Z).getAxisColor("x"),s(this,Z).getSecondaryFontColor()),i[u]=s(this,Ue).call(this,9e3+u,"x",-(d-1),s(this,N)?s(this,N)-1:0,o+.5,270,180,0,1,2,`${a[d-1]?a[d-1].fString:Math.round((s(this,Fe).xInitial+(d-1)*s(this,lt)+Number.EPSILON)*100)/100}`,s(this,Z).getAxisColor("x"),s(this,Z).getSecondaryFontColor()),u++;return e.axisLabels[2]={id:"downLabel",key:10502+s(this,Ee),text:{value:l,color:s(this,Z).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:-(s(this,ae)+s(this,re).xOffset),fromY:(s(this,N)?s(this,N)-1:0)+s(this,re).zOffset,fromZ:s(this,me)-4+s(this,re).yOffset,toX:-s(this,ae),toY:s(this,N)?s(this,N)-1:0,toZ:s(this,me)-4}},e.axisLabels[3]={id:"upLabel",key:12003+s(this,Ee),text:{value:l,color:s(this,Z).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:-(n-2.5-s(this,re).xOffset),fromY:(s(this,N)?s(this,N)-1:0)+s(this,re).zOffset,fromZ:o+2+s(this,re).yOffset,toX:-(n-2.5),toY:s(this,N)?s(this,N)-1:0,toZ:o+2}},u});F(this,_r,(e,t,i)=>{const n={xOffset:s(this,Ye),yOffset:s(this,Le),zOffset:s(this,Qe)},o={name:"TH3",xOffset:s(this,ae),yOffset:s(this,me),zOffset:s(this,N),range:s(this,ge)},a=s(this,Bt).call(this,n,o,t,e,i);return B(this,ae,a.xOffset),B(this,me,a.yOffset),B(this,N,a.zOffset),a});F(this,Or,(e,t,i)=>{const n={xOffset:s(this,Ye),yOffset:s(this,Le)},o={name:"TH2",xOffset:s(this,ae),yOffset:s(this,me),range:s(this,ge)},a=s(this,Bt).call(this,n,o,t,e,i);return B(this,ae,a.xOffset),B(this,me,a.yOffset),a});F(this,jr,(e,t,i)=>{const n={xOffset:s(this,Ye)},o={name:"TH1",xOffset:s(this,ae),range:s(this,ge)},a=s(this,Bt).call(this,n,o,t,e,i);return B(this,ae,a.xOffset),a});F(this,St,e=>{const t=s(this,vt).filter(i=>i.key===e);return t[0]&&t[0].scale?t[0].scale:0});F(this,Vt,e=>{const t=s(this,vt).filter(i=>i.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});F(this,Xt,e=>e>s(this,bt)?s(this,bt):e<0?0:e);this.initializeFactory(e,t,i,n,o,a,l,u)}initializeFactory(e,t,i,n,o,a,l,u){this.setUniqueName(e),this.setTheme(o),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(i),this.setRange(n),this.setSelectedBin(a),this.setViewFunction(l),this.setProgressFunction(u)}updateContentScale(e){s(this,rt)+e>=0&&B(this,rt,s(this,rt)+e)}updateMinDisplayedContent(e){e>=0&&B(this,_t,e)}setUniqueName(e){B(this,Ee,e)}setHistogramContentMaximum(e){B(this,bt,e>0?e:1)}setSelectedBin(e){B(this,cr,e||[])}setViewFunction(e){B(this,et,e)}setProgressFunction(e){B(this,tt,e)}setSection(e){e&&(e.xOffset&&B(this,ae,s(this,ct).call(this,e==null?void 0:e.xOffset,s(this,Ye))),e.yOffset&&!histogram._typename.includes("TH1")&&B(this,me,s(this,ct).call(this,e==null?void 0:e.yOffset,s(this,Le))),e.zOffset&&histogram._typename.includes("TH3")&&B(this,N,s(this,ct).call(this,e==null?void 0:e.zOffset,s(this,Qe))))}setHistogram(e){var t,i,n,o,a,l,u,d,c,x,k,A,b,w,y,_;B(this,L,e),B(this,Je,e==null?void 0:e._typename),B(this,ae,1),B(this,me,1),B(this,N,1),B(this,Ye,0),B(this,Le,0),B(this,Qe,0),B(this,lt,1),B(this,xt,1),B(this,ur,1),B(this,Ye,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),B(this,lt,(((i=e==null?void 0:e.fXaxis)==null?void 0:i.fXmax)-((n=e==null?void 0:e.fXaxis)==null?void 0:n.fXmin))/((o=e==null?void 0:e.fXaxis)==null?void 0:o.fNbins)),s(this,Fe).xInitial=(a=e==null?void 0:e.fXaxis)==null?void 0:a.fXmin,B(this,ae,s(this,ct).call(this,s(this,ae),s(this,Ye))),(l=e==null?void 0:e._typename)!=null&&l.includes("TH1")||(B(this,Le,(u=e==null?void 0:e.fYaxis)==null?void 0:u.fNbins),B(this,xt,(((d=e==null?void 0:e.fYaxis)==null?void 0:d.fXmax)-((c=e==null?void 0:e.fYaxis)==null?void 0:c.fXmin))/((x=e==null?void 0:e.fYaxis)==null?void 0:x.fNbins)),s(this,Fe).yInitial=(k=e==null?void 0:e.fYaxis)==null?void 0:k.fXmin,B(this,me,s(this,ct).call(this,s(this,me),s(this,Le)))),(A=e==null?void 0:e._typename)!=null&&A.includes("TH3")&&(B(this,Qe,(b=e==null?void 0:e.fZaxis)==null?void 0:b.fNbins),B(this,ur,((w=e==null?void 0:e.fZaxis)==null?void 0:w.fXmax)/((y=e==null?void 0:e.fZaxis)==null?void 0:y.fNbins)),s(this,Fe).zInitial=(_=e==null?void 0:e.fZaxis)==null?void 0:_.fXmin,B(this,N,s(this,ct).call(this,s(this,N),s(this,Qe)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&B(this,ge,4),B(this,ge,e))}setTheme(e){B(this,Z,new Ji(e))}getElements(){let e={};return s(this,Je).includes("TH2")?e=s(this,Ar).call(this):s(this,Je).includes("TH3")?e=s(this,kr).call(this):s(this,Je).includes("TH1")&&(e=s(this,Pr).call(this)),e}updateSection(e,t,i){if(s(this,Je).includes("TH3"))return s(this,_r).call(this,e,t,i);if(s(this,Je).includes("TH2"))return s(this,Or).call(this,e,t,i);if(s(this,Je).includes("TH1"))return s(this,jr).call(this,e,t,i)}}Ee=new WeakMap,cr=new WeakMap,L=new WeakMap,Je=new WeakMap,Z=new WeakMap,ae=new WeakMap,me=new WeakMap,N=new WeakMap,Ye=new WeakMap,Le=new WeakMap,Qe=new WeakMap,lt=new WeakMap,xt=new WeakMap,ur=new WeakMap,ge=new WeakMap,Fe=new WeakMap,et=new WeakMap,tt=new WeakMap,bt=new WeakMap,rt=new WeakMap,_t=new WeakMap,Mt=new WeakMap,re=new WeakMap,vt=new WeakMap,ct=new WeakMap,Rt=new WeakMap,Ue=new WeakMap,kr=new WeakMap,Ar=new WeakMap,Pr=new WeakMap,It=new WeakMap,Bt=new WeakMap,Yt=new WeakMap,Ft=new WeakMap,Nt=new WeakMap,Lt=new WeakSet,$r=function(e,t,i,n,o,a,l,u){u++;const d=135,c=-(n+5.5),x=(s(this,N)?s(this,N)+7:7)+s(this,re).zOffset,k=s(this,me)+s(this,ge)/2+10;e.titles[0]={key:195e3+s(this,Ee),text:{value:s(this,L).fTitle,color:s(this,Z).getPrimaryFontColor()},rotation:{x:0,y:d,z:0},position:{x:c,y:x+9,z:k},innerText:{value:"Press V to show projections or controls",color:s(this,Z).getPrimaryFontColor()}},u++;const A=s(this,ge)>s(this,Ye)?s(this,Ye)+1:s(this,ge),b=s(this,ge)>s(this,Le)?s(this,Le)+1:s(this,ge);e.ground={key:22500+u+s(this,Ee),scale:{width:A+8,height:.2,depth:b+8},animation:{fromX:s(this,ae)+A*.5-1+s(this,re).xOffset,fromY:-.5,fromZ:s(this,me)+b*.5-.5+s(this,re).yOffset,toX:s(this,ae)+A*.5-1,toY:-.5,toZ:s(this,me)+b*.5-.5}},u++,e.banners[1]={key:24e4+u+s(this,Ee),geometry:{width:.1,height:15,depth:22},position:{x:c,y:x,z:k},rotation:{x:0,y:-d,z:0},material:{color:"#ffffff",transparent:!0}}},_r=new WeakMap,Or=new WeakMap,jr=new WeakMap,St=new WeakMap,Vt=new WeakMap,Xt=new WeakMap;const ns=()=>{let r;const e=v.useContext(pt),{selectedView:t,onViewChange:i,onProgress:n,section:o,range:a,theme:l,selectedBins:u}=e.states,d=e.experimental,c=e.schema,{id:x,histogram:k,projPanelIds:A}=e.data,[b]=v.useState(new is(x,k,o||null,a,l||"def",u,i,n)),[w,y]=v.useState(b.getElements()),[_]=v.useState(1),C=m=>{k._typename.includes(m.name)&&(m.axis?(b.updateSection(m.axis,m.increment,m.defaultRange),y(b.getElements())):m.scale?(b.updateContentScale(m.scale),y(b.getElements())):m.minValue&&(b.updateMinDisplayedContent(m.minValue),y(b.getElements())))};return v.useEffect(()=>{b.setUniqueName(x),y(b.getElements())},[x]),v.useEffect(()=>{b.setHistogram(k),y(b.getElements())},[k]),v.useEffect(()=>{b.setSection(o),y(b.getElements())},[o]),v.useEffect(()=>{d?b.setRange(c.histogram.properties.range.value):b.setRange(a),y(b.getElements())},[a,c.histogram.properties.range.value]),v.useEffect(()=>{d?b.setTheme(c.histogram.properties.theme.value):b.setTheme(l),y(b.getElements())},[l,c.histogram.properties.theme.value]),v.useEffect(()=>{b.setSelectedBin(u),y(b.getElements())},[u]),v.useEffect(()=>{b.setViewFunction(i),y(b.getElements())},[i]),v.useEffect(()=>{b.setViewFunction(i),y(b.getElements())},[t]),v.useEffect(()=>{b.setProgressFunction(n),y(b.getElements())},[n]),v.useEffect(()=>{if(k._typename.includes("TH2")?r=_e.getChangedSection().subscribe(C):k._typename.includes("TH3")?r=je.getChangedSection().subscribe(C):k._typename.includes("TH1")&&(r=Ge.getChangedSection().subscribe(C)),r)return()=>r.unsubscribe()},[w]),w!=null&&w.bins?h.jsxs("a-entity",{"histogram-control":!0,children:[w.bins.map(m=>h.jsx("a-box",{id:m.id,class:"clickable",material:`color: ${m.color}; transparent: true`,binth:m.binData,mouseevent:!0,geometry:`width:${m.animation.toWidth}; height:${m.animation.toHeight}; depth:${m.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${m.animation2.fromX} ${m.animation2.fromY} ${m.animation2.fromZ}; to: ${m.animation2.toX} ${m.animation2.toY} ${m.animation2.toZ}; dur: 800;`,animation__3:`property: material.color; from: ${m.animation3.fromColor}; to: ${m.animation3.toColor}; dur: 200;`,children:h.jsx("a-text",{value:m.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${m.color}; opacity: 0.50; transparent: true`,rotation:"270 180 0",animation:"property: text.opacity; from: -2; to: 2; dur: 1500;",animation__1:"property: material.opacity; from: -0.4; to: 0.8; dur: 1500;","wrap-count":"50",position:`0 ${.001+(_===1?-1:1)*m.animation.toHeight/2} 0`})},m.id)),w.labels.map(m=>h.jsx("a-entity",{geometry:`primitive: ${m.geometry.primitive}; width:${m.geometry.width}; height:${m.geometry.height};`,text:`color: ${m.text.color}; width: ${m.text.width}; height: ${m.text.height}; align:center; xOffset:${m.axis==="x"?-(m.text.width/12):0};baseline:top;`,"label-handler":`value: ${m.labelHandler.value}; delay:${m.labelHandler.delay};`,rotation:`${m.rotation.x} ${m.rotation.y} ${m.rotation.z}`,material:`color: ${m.material.color}; transparent: true`,animation:"property: text.width; from: 0; to: 4; dur: 1000;",animation__1:"property: material.opacity; from: 0; to: 0.8; dur: 1500;",animation__2:`property: position; from: ${m.animation.fromX} ${m.animation.fromY} ${m.animation.fromZ}; to: ${m.animation.toX} ${m.animation.toY} ${m.animation.toZ}; dur: 1005;`},m.key)),w.titles.map(m=>h.jsxs("a-entity",{rotation:`${m.rotation.x} ${m.rotation.y} ${m.rotation.z}`,position:`${m.position.x} ${m.position.y} ${m.position.z}`,material:"transparent: true",children:[h.jsx("a-text",{value:m.text.value,position:"0 0.5 0",width:"20",height:"auto",align:"center",color:m.text.color}),h.jsx("a-text",{value:m.innerText.value,position:"0 -0.5 0",width:"15",height:"auto",align:"center",color:m.innerText.color}),h.jsx("a-entity",{text:`value: ${m.innerText.value}; color: ${m.innerText.color}; width: 15; height:auto; align:center;`,position:"0 -0.5 0",material:"transparent: true"}),h.jsx("a-entity",{geometry:"primitive: plane; width:15; height:2;",position:"0 0 -0.1",material:"opacity: 0.9; color: white; transparent: true"})]},m.key)),w.axisLabels.map(m=>h.jsx("a-entity",{id:m.id,text:`value: ${m.text.value}; color: "${m.text.color}"; width: 10; height:auto; align:center;`,rotation:`${m.rotation.x} ${m.rotation.y} ${m.rotation.z}`,animation:`property: position; from: ${m.animation.fromX} ${m.animation.fromY} ${m.animation.fromZ}; to: ${m.animation.toX} ${m.animation.toY} ${m.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},m.key)),w.ground&&h.jsx("a-box",{width:w.ground.scale.width,material:"color: #fafafa",height:w.ground.scale.height,depth:w.ground.scale.depth,animation:`property: position; from: ${w.ground.animation.fromX} ${w.ground.animation.fromY} ${w.ground.animation.fromZ};
374
+ markedColor: ${b};
375
+ selectColor: ${s(this,oe).getSecondaryAccentColor()};
376
+ axisX: ${s(this,oe).getAxisColor("x")};
377
+ axisY: ${s(this,oe).getAxisColor("y")};
378
+ axisZ: ${s(this,oe).getAxisColor("z")}`,O=a/s(this,ft)/s(this,Zt),I=-(_-1),X=0;e.bins[h]={id:D,color:$,binData:G,content:C,animation:{fromWidth:O,fromHeight:s(this,kt).call(this,D),fromDepth:O,toWidth:O,toHeight:c*s(this,ht)/s(this,Mt),toDepth:O},animation2:{fromX:I+s(this,ue).xOffset,fromY:t,fromZ:X,toX:I,toY:t,toZ:X},animation3:{fromColor:s(this,rr).call(this,D),toColor:b}},A[h]={key:D,scale:c,color:b},h++}U(this,Tt,A);const S=[],y=[];return h=s(this,Qt).call(this,e,S,y,g,u,void 0,void 0,0),h=s(this,er).call(this,e,S,y,u,g,P,E,h),h=s(this,Jt).call(this,e,S,y,u,g,void 0,void 0,void 0,h),Kr(this,tr,qr).call(this,e,S,y,u,g,h),e.labels=[...S,...y],e});Z(this,Kt,e=>e<=0?0:(s(this,Et)>1&&(e=Math.round((e/s(this,Et)+Number.EPSILON)*100)/100),e));Z(this,qt,(e,t,n,i,o)=>{if(U(this,ue,{xOffset:0,yOffset:0,zOffset:0}),n){if(o?(t[i]+=1,s(this,ue)[i]=-1):(t[i]+=t.range,s(this,ue)[i]=-t.range),e[i]<=t.range)return t[i]=1,s(this,ue)[i]=0,t;if(t[i]>e[i]-t.range)return t[i]=e[i]-t.range,s(this,ue)[i]=0,t}else if(o?(t[i]-=1,s(this,ue)[i]=1):(t[i]-=t.range,s(this,ue)[i]=t.range),t[i]<1)return t[i]=1,s(this,ue)[i]=0,t;return t});Z(this,Jt,(e,t,n,i,o,a,c,d,h)=>(t[h]=s(this,tt).call(this,9e4+h,"z",-(i+.5),s(this,J)-1,o+.5,270,360,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),n[h]=s(this,tt).call(this,91e3+h,"z",-(i+.5),s(this,J)-1,s(this,ve)-2.5,270,180,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),h++,t[h]=s(this,tt).call(this,92e3+h,"z",-(s(this,ge)-2.5),s(this,J)-1,o+.5,270,180,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),n[h]=s(this,tt).call(this,93e3+h,"z",-(s(this,ge)-2.5),s(this,J)-1,s(this,ve)-2.5,270,180,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),h++,d&&(e.axisLabels[4]={id:"upLabel1",key:95004+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:s(this,ge)-1.5+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:s(this,ve)-2+s(this,ue).yOffset,toX:s(this,ge)-1.5,toY:a-1,toZ:s(this,ve)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:i-.5+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:o+s(this,ue).yOffset,toX:i-.5,toY:a-1,toZ:o}},e.axisLabels[6]={id:"upLabel3",key:105006+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:s(this,ge)-2+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:o-.5+s(this,ue).yOffset,toX:s(this,ge)-2,toY:a-1,toZ:o-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:i-.5+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:s(this,ve)-1.5+s(this,ue).yOffset,toX:i-.5,toY:a-1,toZ:s(this,ve)-1.5}}),h));Z(this,Qt,(e,t,n,i,o,a,c,d)=>{for(let h=s(this,ve);h<=i;h++)t[d]=s(this,tt).call(this,1500+d,"y",-(s(this,ge)-2.5),s(this,J)?s(this,J)-1:0,h-1,270,180,0,2,1,`${a?a[h-1]?a[h-1].fString:Math.round((s(this,We).yInitial+(h-1)*s(this,Ct)+Number.EPSILON)*100)/100:""}`,s(this,oe).getAxisColor("z"),s(this,oe).getSecondaryFontColor()),n[d]=s(this,tt).call(this,3e3+d,"y",-(o+.5),s(this,J)?s(this,J)-1:0,h-1,270,360,0,2,1,`${a?a[h-1]?a[h-1].fString:Math.round((s(this,We).yInitial+(h-1)*s(this,Ct)+Number.EPSILON)*100)/100:""}`,s(this,oe).getAxisColor("z"),s(this,oe).getSecondaryFontColor()),d++;return e.axisLabels[0]={id:"leftLabel",key:4500+s(this,Oe),text:{value:c||"",color:s(this,oe).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:-(s(this,ge)-4+s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:s(this,ve)+.5+s(this,ue).yOffset,toX:-(s(this,ge)-4),toY:s(this,J)?s(this,J)-1:0,toZ:s(this,ve)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+s(this,Oe),text:{value:c||"",color:s(this,oe).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:-(o+2+s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:i-2.5+s(this,ue).yOffset,toX:-(o+2),toY:s(this,J)?s(this,J)-1:0,toZ:i-2.5}},d});Z(this,er,(e,t,n,i,o,a,c,d)=>{for(let h=s(this,ge);h<=i;h++)t[d]=s(this,tt).call(this,7500+d,"x",-(h-1),s(this,J)?s(this,J)-1:0,s(this,ve)-2.5,270,180,0,1,2,`${a[h-1]?a[h-1].fString:Math.round((s(this,We).xInitial+(h-1)*s(this,ft)+Number.EPSILON)*100)/100}`,s(this,oe).getAxisColor("x"),s(this,oe).getSecondaryFontColor()),n[d]=s(this,tt).call(this,9e3+d,"x",-(h-1),s(this,J)?s(this,J)-1:0,o+.5,270,180,0,1,2,`${a[h-1]?a[h-1].fString:Math.round((s(this,We).xInitial+(h-1)*s(this,ft)+Number.EPSILON)*100)/100}`,s(this,oe).getAxisColor("x"),s(this,oe).getSecondaryFontColor()),d++;return e.axisLabels[2]={id:"downLabel",key:10502+s(this,Oe),text:{value:c,color:s(this,oe).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:-(s(this,ge)+s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:s(this,ve)-4+s(this,ue).yOffset,toX:-s(this,ge),toY:s(this,J)?s(this,J)-1:0,toZ:s(this,ve)-4}},e.axisLabels[3]={id:"upLabel",key:12003+s(this,Oe),text:{value:c,color:s(this,oe).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:-(i-2.5-s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:o+2+s(this,ue).yOffset,toX:-(i-2.5),toY:s(this,J)?s(this,J)-1:0,toZ:o+2}},d});Z(this,Wr,(e,t,n)=>{const i={xOffset:s(this,Xe),yOffset:s(this,Ze),zOffset:s(this,st)},o={name:"TH3",xOffset:s(this,ge),yOffset:s(this,ve),zOffset:s(this,J),range:s(this,je)},a=s(this,qt).call(this,i,o,t,e,n);return U(this,ge,a.xOffset),U(this,ve,a.yOffset),U(this,J,a.zOffset),a});Z(this,Ur,(e,t,n)=>{const i={xOffset:s(this,Xe),yOffset:s(this,Ze)},o={name:"TH2",xOffset:s(this,ge),yOffset:s(this,ve),range:s(this,je)},a=s(this,qt).call(this,i,o,t,e,n);return U(this,ge,a.xOffset),U(this,ve,a.yOffset),a});Z(this,Zr,(e,t,n)=>{const i={xOffset:s(this,Xe)},o={name:"TH1",xOffset:s(this,ge),range:s(this,je)},a=s(this,qt).call(this,i,o,t,e,n);return U(this,ge,a.xOffset),a});Z(this,kt,e=>{const t=s(this,Tt).filter(n=>n.key===e);return t[0]&&t[0].scale?t[0].scale:0});Z(this,rr,e=>{const t=s(this,Tt).filter(n=>n.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});Z(this,nr,e=>e>s(this,Et)?s(this,Et):e<0?0:e);this.initializeFactory(e,t,n,i,o,a,c,d)}initializeFactory(e,t,n,i,o,a,c,d){this.setUniqueName(e),this.setTheme(o),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(n),this.setRange(i),this.setSelectedBin(a),this.setViewFunction(c),this.setProgressFunction(d)}updateContentScale(e){U(this,ht,e)}updateMinDisplayedContent(e){e>=0&&U(this,Ht,e)}setUniqueName(e){U(this,Oe,e)}setHistogramContentMaximum(e){U(this,Et,e>0?e:1)}setSelectedBin(e){U(this,gr,e||[])}setViewFunction(e){U(this,at,e)}setProgressFunction(e){U(this,lt,e)}setSection(e){e&&(e.xOffset&&U(this,ge,s(this,pt).call(this,e==null?void 0:e.xOffset,s(this,Xe))),e.yOffset&&!histogram._typename.includes("TH1")&&U(this,ve,s(this,pt).call(this,e==null?void 0:e.yOffset,s(this,Ze))),e.zOffset&&histogram._typename.includes("TH3")&&U(this,J,s(this,pt).call(this,e==null?void 0:e.zOffset,s(this,st))))}setHistogram(e){var t,n,i,o,a,c,d,h,u,g,E,P,A,S,y,_;U(this,te,e),U(this,ot,e==null?void 0:e._typename),U(this,ge,1),U(this,ve,1),U(this,J,1),U(this,Xe,0),U(this,Ze,0),U(this,st,0),U(this,ft,1),U(this,Ct,1),U(this,yr,1),U(this,Xe,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),U(this,ft,(((n=e==null?void 0:e.fXaxis)==null?void 0:n.fXmax)-((i=e==null?void 0:e.fXaxis)==null?void 0:i.fXmin))/((o=e==null?void 0:e.fXaxis)==null?void 0:o.fNbins)),s(this,We).xInitial=(a=e==null?void 0:e.fXaxis)==null?void 0:a.fXmin,U(this,ge,s(this,pt).call(this,s(this,ge),s(this,Xe))),(c=e==null?void 0:e._typename)!=null&&c.includes("TH1")||(U(this,Ze,(d=e==null?void 0:e.fYaxis)==null?void 0:d.fNbins),U(this,Ct,(((h=e==null?void 0:e.fYaxis)==null?void 0:h.fXmax)-((u=e==null?void 0:e.fYaxis)==null?void 0:u.fXmin))/((g=e==null?void 0:e.fYaxis)==null?void 0:g.fNbins)),s(this,We).yInitial=(E=e==null?void 0:e.fYaxis)==null?void 0:E.fXmin,U(this,ve,s(this,pt).call(this,s(this,ve),s(this,Ze)))),(P=e==null?void 0:e._typename)!=null&&P.includes("TH3")&&(U(this,st,(A=e==null?void 0:e.fZaxis)==null?void 0:A.fNbins),U(this,yr,((S=e==null?void 0:e.fZaxis)==null?void 0:S.fXmax)/((y=e==null?void 0:e.fZaxis)==null?void 0:y.fNbins)),s(this,We).zInitial=(_=e==null?void 0:e.fZaxis)==null?void 0:_.fXmin,U(this,J,s(this,pt).call(this,s(this,J),s(this,st)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&U(this,je,4),U(this,je,e))}setTheme(e){U(this,oe,new ji(e))}getElements(){let e={};return s(this,ot).includes("TH2")?e=s(this,Vr).call(this):s(this,ot).includes("TH3")?e=s(this,Lr).call(this):s(this,ot).includes("TH1")&&(e=s(this,Xr).call(this)),e}updateSection(e,t,n){if(s(this,ot).includes("TH3"))return s(this,Wr).call(this,e,t,n);if(s(this,ot).includes("TH2"))return s(this,Ur).call(this,e,t,n);if(s(this,ot).includes("TH1"))return s(this,Zr).call(this,e,t,n)}}Oe=new WeakMap,gr=new WeakMap,te=new WeakMap,ot=new WeakMap,oe=new WeakMap,ge=new WeakMap,ve=new WeakMap,J=new WeakMap,Xe=new WeakMap,Ze=new WeakMap,st=new WeakMap,ft=new WeakMap,Ct=new WeakMap,yr=new WeakMap,je=new WeakMap,We=new WeakMap,at=new WeakMap,lt=new WeakMap,Et=new WeakMap,ht=new WeakMap,Ht=new WeakMap,Zt=new WeakMap,Mt=new WeakMap,ue=new WeakMap,Tt=new WeakMap,pt=new WeakMap,Gt=new WeakMap,tt=new WeakMap,Lr=new WeakMap,Vr=new WeakMap,Xr=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,er=new WeakMap,tr=new WeakSet,qr=function(e,t,n,i,o,a,c,d){d++;const h=135,u=-(i+5.5),g=(s(this,J)?s(this,J)+7:7)+s(this,ue).zOffset,E=s(this,ve)+s(this,je)/2+10;e.titles[0]={key:195e3+s(this,Oe),text:{value:s(this,te).fTitle,color:s(this,oe).getPrimaryFontColor()},rotation:{x:0,y:h,z:0},position:{x:u,y:g+9,z:E},innerText:{value:"Press V to show projections or controls",color:s(this,oe).getPrimaryFontColor()}},d++;const P=s(this,je)>s(this,Xe)?s(this,Xe)+1:s(this,je),A=s(this,je)>s(this,Ze)?s(this,Ze)+1:s(this,je);e.ground={key:22500+d+s(this,Oe),scale:{width:P+8,height:.2,depth:A+8},animation:{fromX:s(this,ge)+P*.5-1+s(this,ue).xOffset,fromY:-.5,fromZ:s(this,ve)+A*.5-.5+s(this,ue).yOffset,toX:s(this,ge)+P*.5-1,toY:-.5,toZ:s(this,ve)+A*.5-.5}},d++,e.banners[1]={key:24e4+d+s(this,Oe),geometry:{width:.1,height:15,depth:22},position:{x:u,y:g,z:E},rotation:{x:0,y:-h,z:0},material:{color:"#ffffff",transparent:!0}}},Wr=new WeakMap,Ur=new WeakMap,Zr=new WeakMap,kt=new WeakMap,rr=new WeakMap,nr=new WeakMap;const Os=()=>{var D,b,G,O,I,X;let r;const e=v.useContext(yt),{selectedView:t,onViewChange:n,onProgress:i,section:o,selectedBins:a}=e.states;e.experimental;const[c]=vt("ndmvrSchema"),d=(b=(D=c==null?void 0:c.histogram)==null?void 0:D.properties.range)==null?void 0:b.value,h=(O=(G=c==null?void 0:c.histogram)==null?void 0:G.properties.theme)==null?void 0:O.value,u=(X=(I=c==null?void 0:c.histogram)==null?void 0:I.properties.scale)==null?void 0:X.value,{id:g,histogram:E,projPanelIds:P}=e.data,S=v.useRef(new Ps(g,E,o||null,a,n,i)).current,[y,_]=v.useState(S.getElements()),[C]=v.useState(1),$=T=>{E._typename.includes(T.name)&&(T.axis?S.updateSection(T.axis,T.increment,T.defaultRange):T.minValue&&S.updateMinDisplayedContent(T.minValue)),T.change,_(S.getElements())};return v.useEffect(()=>{S.setUniqueName(g),_(S.getElements())},[g]),v.useEffect(()=>{S.updateContentScale(u),_(S.getElements())},[u]),v.useEffect(()=>{S.setHistogram(E),_(S.getElements())},[E]),v.useEffect(()=>{S.setSection(o),_(S.getElements())},[o]),v.useEffect(()=>{S.setRange(d),_(S.getElements())},[d]),v.useEffect(()=>{S.setTheme(h),_(S.getElements())},[h]),v.useEffect(()=>{S.setSelectedBin(a),_(S.getElements())},[a]),v.useEffect(()=>{S.setViewFunction(n),_(S.getElements())},[n]),v.useEffect(()=>{S.setViewFunction(n),_(S.getElements())},[t]),v.useEffect(()=>{S.setProgressFunction(i),_(S.getElements())},[i]),v.useEffect(()=>{if(E._typename.includes("TH2")?r=$e.getChangedSection().subscribe($):E._typename.includes("TH3")?r=He.getChangedSection().subscribe($):E._typename.includes("TH1")&&(r=nt.getChangedSection().subscribe($)),r)return()=>r.unsubscribe()},[y,u]),y!=null&&y.bins?f.jsxs("a-entity",{"histogram-control":!0,children:[y.bins.map(T=>f.jsx("a-box",{id:T.id,class:"clickable",material:`color: ${T.color}; transparent: true`,binth:T.binData,mouseevent:!0,geometry:`width:${T.animation.toWidth}; height:${T.animation.toHeight}; depth:${T.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${T.animation2.fromX} ${T.animation2.fromY} ${T.animation2.fromZ}; to: ${T.animation2.toX} ${T.animation2.toY} ${T.animation2.toZ}; dur: 800;`,children:f.jsx("a-text",{value:T.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${T.color}; opacity: 0.50; transparent: true`,rotation:"270 180 0",animation:"property: text.opacity; from: -2; to: 2; dur: 1500;",animation__1:"property: material.opacity; from: -0.4; to: 0.8; dur: 1500;","wrap-count":"50",position:`0 ${.001+(C===1?-1:1)*T.animation.toHeight/2} 0`})},T.id)),y.labels.map(T=>f.jsx("a-entity",{geometry:`primitive: ${T.geometry.primitive}; width:${T.geometry.width}; height:${T.geometry.height};`,text:`color: ${T.text.color}; width: ${T.text.width}; height: ${T.text.height}; align:center; xOffset:${T.axis==="x"?-(T.text.width/12):0};baseline:top;`,"label-handler":`value: ${T.labelHandler.value}; delay:${T.labelHandler.delay};`,rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,material:`color: ${T.material.color}; transparent: true`,animation:"property: text.width; from: 0; to: 4; dur: 1000;",animation__1:"property: material.opacity; from: 0; to: 0.8; dur: 1500;",animation__2:`property: position; from: ${T.animation.fromX} ${T.animation.fromY} ${T.animation.fromZ}; to: ${T.animation.toX} ${T.animation.toY} ${T.animation.toZ}; dur: 1005;`},T.key)),y.titles.map(T=>f.jsxs("a-entity",{rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,position:`${T.position.x} ${T.position.y} ${T.position.z}`,material:"transparent: true",children:[f.jsx("a-text",{value:T.text.value,position:"0 0.5 0",width:"20",height:"auto",align:"center",color:T.text.color}),f.jsx("a-text",{value:T.innerText.value,position:"0 -0.5 0",width:"15",height:"auto",align:"center",color:T.innerText.color}),f.jsx("a-entity",{text:`value: ${T.innerText.value}; color: ${T.innerText.color}; width: 15; height:auto; align:center;`,position:"0 -0.5 0",material:"transparent: true"}),f.jsx("a-entity",{geometry:"primitive: plane; width:15; height:2;",position:"0 0 -0.1",material:"opacity: 0.9; color: white; transparent: true"})]},T.key)),y.axisLabels.map(T=>f.jsx("a-entity",{id:T.id,text:`value: ${T.text.value}; color: "${T.text.color}"; width: 10; height:auto; align:center;`,rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,animation:`property: position; from: ${T.animation.fromX} ${T.animation.fromY} ${T.animation.fromZ}; to: ${T.animation.toX} ${T.animation.toY} ${T.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},T.key)),y.ground&&f.jsx("a-box",{width:y.ground.scale.width,material:"color: #fafafa",height:y.ground.scale.height,depth:y.ground.scale.depth,animation:`property: position; from: ${y.ground.animation.fromX} ${y.ground.animation.fromY} ${y.ground.animation.fromZ};
355
379
  to:
356
- ${w.ground.animation.toX} ${w.ground.animation.toY} ${w.ground.animation.toZ}; dur: 1000;`},w.ground.key),w.banners.map(m=>h.jsx("a-box",{id:A[0]?A[0]:"panel_0",geometry:`width:${m.geometry.width}; height:${m.geometry.height}; depth:${m.geometry.depth};`,position:`${m.position.x} ${m.position.y} ${m.position.z}`,rotation:`${m.rotation.x} ${m.rotation.y} ${m.rotation.z}`,material:`color: ${m.material.color}; transparent: ${m.material.transparent}`},A[0]?A[0]:"panel_0"))]}):h.jsx("a-box",{animation__1:"property: rotation; to: 0 180 360; dur: 10000; easing: linear; loop: true",animation__2:"property: scale; from: 1 1 1; to: 10 10 10; dur: 15000; timeout: 15000; loop: true; easing: linear; dir: alternate",animation__color:"property: material.color; from: #003682; to: #7d0002; dur: 80000: easing: linear: loop: true; dir: alternate",position:"0 1.5 -2"})};(function(r){function e(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return r[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var t={};return e.m=r,e.c=t,e.p="",e(0)})([function(r,e){if(typeof he>"u")throw new Error("Component attempted to register before AFRAME was available.");he.registerComponent("environment",{schema:{active:{default:!1},preset:{default:"default",oneOf:["none","ndmvr","govorun","labs","labs2","default","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow","bow","winter"]},seed:{type:"int",default:1,min:0,max:1e3},skyType:{default:"color",oneOf:["none","color","gradient","atmosphere"]},background:{type:"string"},skyColor:{type:"color"},horizonColor:{type:"color"},lighting:{default:"distant",oneOf:["none","distant","point"]},shadow:{default:!1},shadowSize:{default:10},lightPosition:{type:"vec3",default:{x:0,y:1,z:-.2}},fog:{type:"float",default:0,min:0,max:1},flatShading:{default:!1},playArea:{type:"float",default:1,min:.5,max:10},ground:{default:"hills",oneOf:["none","flat","hills","canyon","spikes","noise"]},groundYScale:{type:"float",default:3,min:0,max:50},groundTexture:{default:"none",oneOf:["none","checkerboard","squares","walkernoise"]},groundColor:{type:"color",default:"#553e35"},groundColor2:{type:"color",default:"#694439"},dressing:{default:"none",oneOf:["none","cubes","pyramids","cylinders","hexagons","stones","trees","mushrooms","towers","apparatus","arches","torii"]},dressingAmount:{type:"int",default:10,min:0,max:1e3},dressingColor:{type:"color",default:"#795449"},dressingScale:{type:"float",default:5,min:0,max:100},dressingVariance:{type:"vec3",default:{x:1,y:1,z:1}},dressingUniformScale:{default:!0},dressingOnPlayArea:{type:"float",default:0,min:0,max:1},grid:{default:"none",oneOf:["none","1x1","2x2","crosses","dots","xlines","ylines"]},gridColor:{type:"color",default:"#ccc"}},multiple:!1,presets:{none:{},default:{active:!0,seed:1,skyType:"atmosphere",skyColor:"#88c",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:1,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},labs:{active:!0,seed:1,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"point",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3,groundTexture:"none",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!0},labs2:{active:!0,seed:1,skyType:"gradient",skyColor:"#88c",horizonColor:"#ddd",lighting:"point",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},ndmvr:{active:!0,seed:1,skyType:"atmosphere",skyColor:"skyblue",horizonColor:"silver",lighting:"point",lightPosition:{x:-.11,y:3,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"none",groundColor:"#aaa",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:1},govorun:{active:!0,seed:1,background:"./assets/ndmvr/backgrounds/govorun.jpg",lighting:"point",lightPosition:{x:-.11,y:1,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"none",groundColor:"#797268",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:!1},cern:{active:!0,seed:1,background:"./assets/ndmvr/backgrounds/background1.jpg",lighting:"point",lightPosition:{x:-.11,y:1,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"checkerboard",groundColor:"none",groundColor2:"none",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:!1},contact:{active:!0,seed:14,skyType:"gradient",skyColor:"#478d54",horizonColor:"#b696cb",lighting:"distant",lightPosition:{x:0,y:2.01,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:2.91,groundTexture:"none",groundColor:"#2e455f",groundColor2:"#694439",dressing:"none",dressingAmount:10,dressingColor:"#657067",dressingScale:20,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#478d54",shadow:!1},egypt:{active:!0,seed:60,skyType:"gradient",skyColor:"#1b7660",horizonColor:"#e4b676",lighting:"distant",lightPosition:{x:0,y:1.65,z:.3},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#664735",groundColor2:"#6c4b39",dressing:"pyramids",dressingAmount:5,dressingColor:"#7c5c45",dressingScale:5,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},checkerboard:{active:!0,seed:5,skyType:"gradient",skyColor:"#0d0d0d",horizonColor:"#404040",lighting:"distant",lightPosition:{x:0,y:1,z:.2},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:4.81,groundTexture:"checkerboard",groundColor:"#615C32",groundColor2:"#11111",dressing:"cubes",dressingAmount:22,dressingColor:"#9f9f9f",dressingScale:1.51,dressingVariance:{x:5,y:20,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},forest:{active:!0,seed:8,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},winter:{active:!0,seed:8,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#fcfcfc",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!0},bow:{active:!0,seed:4,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:38,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},goaland:{active:!0,seed:17,skyType:"gradient",skyColor:"#14645f",horizonColor:"#a3dab8",lighting:"point",lightPosition:{x:.1,y:4,z:.56},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:.81,groundTexture:"none",groundColor:"#752944",groundColor2:"#db4453",dressing:"none",dressingAmount:2,dressingColor:"#a9313d",dressingScale:5,dressingVariance:{x:5,y:10,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#239893",shadow:!1},yavapai:{active:!0,seed:11,skyType:"gradient",skyColor:"#239849",horizonColor:"#cfe0af",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#C66344",groundColor2:"#c96b4b",dressing:"stones",dressingAmount:5,dressingColor:"#C66344",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},goldmine:{active:!0,seed:53,skyType:"gradient",skyColor:"#1e1c1a",horizonColor:"#8c7964",lighting:"point",lightPosition:{x:-.09,y:3,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:50,groundTexture:"none",groundColor:"#353535",groundColor2:"#454545",dressing:"none",dressingAmount:300,dressingColor:"#fe921b",dressingScale:.5,dressingVariance:{x:2,y:8,z:2},dressingUniformScale:!0,dressingOnPlayArea:.03,grid:"none",gridColor:"#ccc",shadow:!1},threetowers:{active:!0,seed:5,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.8,ground:"spikes",groundYScale:3,groundTexture:"walkernoise",groundColor:"#273a49",groundColor2:"#2b464f",dressing:"towers",dressingAmount:8,dressingColor:"#5f6d94",dressingScale:80,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#239893",shadow:!1},poison:{active:!0,seed:92,skyType:"gradient",skyColor:"#1ea84a",horizonColor:"#177132",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:3.6,groundTexture:"none",groundColor:"#000000",groundColor2:"#912235",dressing:"hexagons",dressingAmount:20,dressingColor:"#c7415b",dressingScale:20,dressingVariance:{x:20,y:200,z:20},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"crosses",gridColor:"#1ea84a",shadow:!1},arches:{active:!0,seed:89,skyType:"atmosphere",skyColor:"#8cbdc8",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:.45,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:10,groundTexture:"walkernoise",groundColor:"#a87d6f",groundColor2:"#795449",dressing:"arches",dressingAmount:7,dressingColor:"#795449",dressingScale:20,dressingVariance:{x:20,y:40,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},tron:{active:!0,seed:14,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:.12,y:.62,z:.1},fog:.1,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:3.1,groundTexture:"none",groundColor:"#061123",groundColor2:"#694439",dressing:"none",dressingAmount:5,dressingColor:"#fb000e",dressingScale:15,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#fb000e",shadow:!0},japan:{active:!0,seed:14,skyType:"gradient",skyColor:"#7e5db5",horizonColor:"#b4adda",lighting:"distant",lightPosition:{x:1.33,y:1,z:.24},fog:.9,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#7e5db5",groundColor2:"#cabdf5",dressing:"torii",dressingAmount:6,dressingColor:"#bc5e7c",dressingScale:15,dressingVariance:{x:0,y:0,z:15},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},dream:{active:!0,seed:5,skyType:"gradient",skyColor:"#87faf4",horizonColor:"#b34093",lighting:"distant",lightPosition:{x:-.72,y:.53,z:.97},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:20,groundTexture:"checkerboard",groundColor:"#b34093",groundColor2:"#c050a2",dressing:"mushrooms",dressingAmount:2,dressingColor:"#3cf7ed",dressingScale:.2,dressingVariance:{x:.2,y:.2,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},volcano:{active:!0,seed:5,skyType:"gradient",skyColor:"#4a070f",horizonColor:"#f62300",lighting:"point",lightPosition:{x:.5,y:2.25,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:7.6,groundTexture:"walkernoise",groundColor:"#fb0803",groundColor2:"#510000",dressing:"arches",dressingAmount:20,dressingColor:"#fe921b",dressingScale:.1,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"none",gridColor:"#fa0e00",shadow:!1},starry:{active:!0,seed:1,skyType:"atmosphere",skyColor:"AEA09F",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:0,y:1,z:.06},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#553e35",groundColor2:"#694439",dressing:"none",dressingAmount:100,dressingColor:"#795449",dressingScale:5,dressingVariance:{x:1,y:1,z:1},dressingUniformScale:!0,grid:"1x1",dressingOnPlayArea:0,gridColor:"#39d2f2",shadow:!1},osiris:{active:!0,seed:46,skyType:"atmosphere",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:0,y:.2,z:.46},fog:0,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#9e7b47",groundColor2:"#9e7b47",dressing:"pyramids",dressingAmount:3,dressingColor:"#9e7b47",dressingScale:5,dressingVariance:{x:30,y:30,z:30},dressingUniformScale:!0,grid:"dots",dressingOnPlayArea:0,gridColor:"#daa452",shadow:!1},moon:{active:!0,seed:11,skyType:"gradient",skyColor:"skyblue",horizonColor:"#fcfcfc",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!0,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#D1D1D1",groundColor2:"#987d2e",dressing:"stones",dressingAmount:100,dressingColor:"#494949",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#c5a543",shadow:!1},snow:{active:!0,seed:4,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.4,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:2,dressingColor:"#fcfcfc",dressingScale:1.3,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#39d2f2",shadow:!0}},init:function(){this.environmentData={},this.STAGE_SIZE=200,this.assets={arches:[{type:"mesh",vertices:[409,268,4,351,228,36,336,236,-57,-152,391,69,-135,358,88,-119,330,43,-20,358,-35,-153,357,-47,37,413,-26,-20,411,-14,-302,148,154,-339,121,-126,-389,200,-88,-477,193,-76,-314,346,-19,-314,306,-30,-250,296,-73,-267,237,-82,-212,303,-68,-245,200,-67,-223,304,108,-329,299,107,-289,350,76,-320,342,69,119,373,-39,38,370,8,113,367,52,492,202,-31,462,83,-104,447,71,-80,426,112,25,482,189,-7,222,372,6,121,402,41,87,382,67,221,346,55,559,93,-13,528,47,39,505,21,-111,528,54,-101,616,31,-53,442,256,-15,300,338,19,257,308,-79,408,256,-74,312,352,-26,384,297,-31,437,257,-47,-29,415,53,-232,377,59,-139,335,77,-132,344,2,-18,377,-37,-171,387,-28,-254,384,18,-651,-27,27,-435,-28,179,-345,149,165,-272,-28,23,-215,146,-2,-279,-29,-59,-211,145,-55,-337,-28,-128,-413,247,0,-293,363,24,-214,254,-36,-164,290,33,-284,150,94,-218,362,105,75,369,29,518,147,-63,447,190,-70,445,56,-105,391,185,-60,431,49,-33,459,83,26,470,162,42,130,390,53,167,341,-30,125,394,-45,239,368,-17,91,414,10,450,18,2,449,-27,-9,436,-28,-58,496,-27,-110,582,-28,-140,647,-27,-56,325,325,-45,-307,297,-56,-647,-28,-45,-188,310,-54,-264,197,113,-367,175,139,8,387,82,426,45,-55,114,359,-28,500,27,44,461,-29,13,-512,-27,-151,-152,376,-38,-490,-28,148,12,370,-28,442,160,42,465,194,32,381,183,-33,649,-27,-34,444,16,29,616,-28,25,417,267,-66,-132,352,-34,-322,-27,130,-271,86,-115,-635,-28,-121,-291,203,-99,176,405,-10,561,52,-93,371,305,9,311,237,-22,377,200,-81,-129,406,46,-154,371,99,-82,361,71,-21,354,26,-91,363,-27,-165,413,-12,-414,215,110,-238,127,26,-408,-28,-128,-674,-28,-94,-446,232,-39,-311,226,-90,-255,210,-61,-235,192,-11,-217,218,58,-269,299,124,-386,276,78,-399,281,42,15,373,58,16,393,75,549,107,-46,481,188,-68,409,120,-41,541,81,12,230,368,41,194,350,-50,224,361,-50,604,-28,-10,602,-27,35,486,56,-121,502,69,-120,457,-27,-110,226,317,-40,-584,-28,-124,439,-26,-30,467,-26,39,547,-27,-146,21,368,14,466,229,-29,578,-27,44,609,-27,-96,291,356,-15,290,306,34,255,321,28,231,311,-5,-251,386,50,-183,307,87,-152,307,24,-264,373,-12,-392,-27,190,-333,-28,84,-281,-27,54,-270,-28,-23,-308,-28,-101,-687,-27,-59,39,418,39,413,163,25,404,206,-90,54,400,-31,121,352,8,-454,41,148,-426,9,182,-564,115,3,-427,27,-107,-548,118,-32,-556,122,-53,-517,91,-101,-475,54,140,-461,52,-134,-558,119,-71,-434,286,59,-687,-31,52,-595,146,22,-670,-28,164,-537,166,122,-575,-28,217,-566,159,65,-470,152,136,-712,-29,102,-639,-29,211,-532,-30,181,-442,-30,-100],faces:[76,104,162,1,176,103,103,76,1,2,119,73,73,105,2,2,118,152,45,161,46,46,109,45,3,120,49,49,68,3,3,121,139,139,48,3,4,122,94,94,121,4,6,123,124,9,175,81,10,169,111,10,67,92,88,43,146,11,131,114,11,128,183,13,130,15,90,184,174,90,182,184,130,184,63,14,130,63,15,130,14,16,131,12,15,168,53,18,91,17,131,16,17,65,133,132,65,132,91,67,134,166,166,92,67,20,135,92,20,166,4,4,121,20,22,135,68,25,102,96,25,157,102,69,138,157,69,157,25,39,150,71,71,141,39,28,150,149,149,72,28,142,176,105,36,140,27,27,143,36,32,115,81,32,144,161,161,80,32,77,35,144,34,26,77,78,179,96,145,152,78,178,79,145,80,146,79,147,140,36,143,108,36,143,37,148,74,95,154,154,83,74,72,149,151,151,95,72,38,150,156,40,147,106,70,140,40,40,116,70,42,162,0,35,163,162,43,145,146,46,117,41,47,158,27,48,139,175,122,138,94,157,138,123,52,178,102,52,102,6,52,124,7,7,100,52,53,125,8,57,93,181,56,169,181,59,127,58,60,173,61,62,128,11,11,112,62,65,91,167,65,167,66,126,93,21,22,68,49,72,95,29,142,29,74,74,82,142,75,107,97,75,97,103,76,97,37,104,143,31,78,152,164,78,164,179,79,178,8,97,155,159,107,98,155,83,98,82,154,95,84,39,116,86,86,156,39,87,160,116,24,145,96,162,104,0,105,118,2,43,177,119,44,177,43,91,51,167,44,88,109,46,161,117,3,68,121,3,48,120,4,166,50,50,122,4,5,123,122,123,138,122,110,124,51,170,10,111,110,91,7,7,124,110,8,125,9,9,81,8,186,12,188,92,135,10,11,114,112,64,63,137,13,15,89,89,53,100,64,168,14,14,168,15,89,100,16,16,12,89,100,18,16,17,91,132,112,19,61,18,7,91,19,17,132,133,127,59,133,59,61,136,21,22,134,127,133,20,92,166,121,135,20,158,31,27,21,135,22,23,137,136,24,102,178,178,145,24,25,179,69,26,94,138,27,140,70,27,70,141,150,177,71,28,177,150,29,142,73,73,119,29,142,82,30,30,176,142,107,75,82,31,143,27,33,81,175,31,41,104,115,79,8,32,33,144,80,115,32,33,175,139,35,162,42,77,139,34,163,26,179,163,179,164,78,96,145,177,29,119,108,143,148,148,37,159,97,159,37,74,83,82,38,149,150,156,150,39,40,106,87,87,116,40,140,147,40,161,144,42,42,117,161,41,0,104,41,117,0,0,117,42,164,118,163,1,163,118,118,176,1,118,105,176,152,118,164,43,152,145,43,119,2,71,109,141,47,41,158,44,71,177,45,109,88,45,88,146,46,47,109,141,47,27,167,50,166,49,120,165,139,121,94,5,122,50,123,51,124,157,6,102,157,123,6,100,8,178,5,167,51,6,124,52,100,178,52,53,168,125,125,165,120,54,125,168,9,48,175,120,9,125,93,10,135,181,101,56,57,169,10,59,172,61,67,170,171,67,171,127,58,127,171,129,186,113,60,61,172,61,173,112,62,112,173,174,189,129,165,64,23,64,137,23,165,22,49,64,54,168,17,114,131,17,112,114,66,133,65,19,132,133,19,133,61,134,133,66,166,134,66,166,66,167,93,135,21,68,135,121,23,136,22,94,34,139,25,96,179,26,138,69,69,179,26,30,103,176,116,141,70,39,141,116,73,142,105,143,76,37,26,35,77,103,97,76,77,144,33,33,139,77,38,151,149,80,161,45,80,45,146,81,115,8,107,155,97,82,98,107,95,151,84,38,156,85,86,116,160,96,102,24,72,29,28,29,95,74,75,30,82,108,147,36,88,44,43,91,110,51,170,67,10,11,183,131,64,14,63,89,15,53,100,7,18,112,17,19,127,134,67,136,126,21,158,41,31,33,32,81,115,80,79,177,28,29,43,2,152,71,44,109,47,46,41,141,109,47,167,5,50,123,5,51,100,53,8,125,54,165,9,120,48,93,57,10,59,58,172,174,185,189,165,54,64,165,23,22,94,26,34,30,75,103,143,104,76,26,163,35,38,85,151,192,182,191,183,128,201,12,13,89,181,169,57,186,153,113,188,183,99,184,182,63,185,13,189,180,181,93,186,99,153,189,186,129,185,184,130,186,13,12,187,93,126,193,199,194,194,196,193,200,187,195,187,197,195,187,126,197,197,190,194,190,136,137,190,196,194,63,182,192,63,192,196,192,198,196,191,182,55,193,196,198,194,199,197,195,197,199,136,197,126,190,137,63,190,63,196,197,136,190,192,191,198,201,99,183,90,55,182,181,180,101,185,130,13,186,188,99,186,189,13,187,180,93,200,101,187,183,188,131,184,185,174,180,187,101,16,18,17,12,131,188,35,42,144,163,1,162,76,162,1,79,146,145]}],stones:[{type:"mesh",vertices:[-376,189,42,230,223,-310,353,162,-62,414,-23,-67,256,90,-475,24,85,-526,-418,-16,57,-432,66,-40,-199,151,-376,-155,49,467,-91,289,201,293,197,91,81,-17,-480,42,108,431,-359,-17,-250,383,-19,-243,194,-15,270,-272,180,293,-86,212,262,234,54,297,395,97,-302,-123,-21,-444,-416,-19,-123,-323,-18,267,-100,-16,429,-300,96,-361,163,-19,409,118,201,-431,-241,-18,391,-130,274,-309,306,-19,-399,-221,96,404],faces:[31,18,17,0,17,18,3,20,2,18,11,10,29,27,8,27,29,1,0,18,10,10,29,0,16,19,26,11,2,1,20,30,4,20,3,15,30,12,4,4,12,5,5,27,4,4,27,20,21,25,5,7,8,25,22,7,14,7,25,14,23,28,31,0,7,17,24,26,9,31,28,9,8,27,5,2,20,1,13,19,18,10,11,1,19,13,26,3,11,19,19,16,3,11,3,2,11,18,19,20,15,30,29,10,1,25,21,14,8,5,25,5,12,21,6,7,22,7,6,23,8,0,29,8,7,0,23,31,7,13,31,9,18,31,13,9,28,24,26,13,9,27,1,20,7,31,17]},{type:"mesh",vertices:[-217,34,-153,198,90,20,212,85,169,-131,93,171,197,113,30,173,121,164,315,29,-16,219,24,189,282,50,-102,232,38,-181,-195,-9,-166,-156,30,-207,-51,-9,-231,-180,91,-173,-19,73,-204,-280,23,96,-242,100,107,3,158,-82,109,88,221,275,-10,-40,236,-10,-135,-178,49,184,-1,-10,-243,265,-11,109,-12,-9,237,-36,46,251,-233,86,-81,93,77,-171,-163,133,69,18,16,263,296,44,93,131,-12,-226,-89,-10,-201,-273,-10,-51,-240,-9,110,190,-12,192,-253,-11,-92,42,43,-258,-115,-11,238,168,99,-88,-285,-10,24,71,124,-158,298,-10,10,116,150,-24,-282,44,39],faces:[44,16,26,13,26,16,0,26,13,27,14,41,4,5,1,7,30,2,28,5,43,41,39,27,17,43,41,43,4,39,13,28,17,17,41,13,28,43,17,24,29,38,29,35,7,18,25,29,5,18,2,18,5,3,30,42,6,30,35,23,19,20,8,8,20,9,9,39,8,1,30,8,31,37,9,11,14,37,14,27,37,32,11,12,11,37,12,11,0,13,33,40,44,44,26,33,33,0,36,34,38,15,44,40,15,21,3,16,27,39,9,2,30,1,21,25,3,16,3,28,28,3,5,4,43,5,41,43,39,13,16,28,25,21,38,38,29,25,7,18,29,29,24,35,18,7,2,18,3,25,30,23,42,30,7,35,8,30,6,6,19,8,6,42,19,8,39,1,37,31,22,27,9,37,9,20,31,10,11,32,11,10,0,12,37,22,14,13,41,14,11,13,33,26,0,36,0,10,21,44,15,16,44,21,15,40,34,38,21,15,4,1,39,5,2,1]},{type:"mesh",vertices:[-101,102,57,99,35,102,40,72,80,59,14,-168,-186,22,45,-176,25,-30,66,-7,146,153,-7,53,-110,47,-96,-90,-8,-146,150,-7,-12,-200,-7,8,-173,-7,-55,55,46,-60,125,-7,110,136,30,-10,-149,58,68,-15,82,-71,98,-7,-86,-34,-6,-194,-33,-7,171,-36,65,137,38,-8,-192,-103,-9,147,-12,62,-152],faces:[2,17,0,17,8,0,17,24,8,19,24,22,5,11,4,2,13,17,17,13,24,21,23,20,1,2,21,7,15,1,7,10,15,5,9,12,15,18,13,0,5,16,0,8,5,1,15,2,10,18,15,3,13,18,24,3,22,11,23,4,4,16,5,16,4,23,24,13,3,15,13,2,6,1,21,6,21,20,6,14,1,2,0,21,1,14,7,3,18,22,8,24,19,8,19,9,12,11,5,5,8,9,16,23,21,16,21,0]},{type:"mesh",vertices:[86,55,-18,58,38,73,97,-12,79,135,7,10,-93,-11,-72,-133,5,33,13,68,-32,94,-11,-57,-90,52,53,-24,-11,-106,-13,-10,104,-75,49,-69,-12,18,114,49,-12,-96,-46,-11,-85,-119,-11,-26,48,5,-111,-58,-11,105,-117,-12,52,-5,35,-93,123,-11,7],faces:[5,8,11,2,3,1,8,1,6,11,8,6,6,19,11,10,12,17,20,7,3,3,7,16,16,0,3,16,9,19,14,4,9,15,18,5,5,11,15,18,17,5,19,0,16,1,3,0,0,6,1,19,6,0,12,8,17,2,1,12,12,10,2,1,8,12,3,2,20,16,13,9,16,7,13,19,4,11,15,11,4,17,8,5,9,4,19]}],torii:[{type:"mesh",mirror:!0,flatShading:!0,vertices:[692,966,-52,661,834,-52,692,966,52,661,834,52,0,894,-52,0,776,-52,0,894,52,0,776,52,518,935,52,345,913,52,170,899,52,162,779,52,328,790,52,494,808,52,170,899,-52,345,913,-52,518,935,-52,494,808,-52,328,790,-52,162,779,-52,0,618,16,0,697,16,0,618,-16,0,697,-16,586,618,16,586,697,16,586,618,-16,586,697,-16,331,-29,-75,331,766,-52,369,-29,-65,357,766,-45,396,-29,-37,377,766,-26,406,-29,0,384,766,0,396,-29,37,377,766,26,369,-29,65,357,766,45,331,-29,75,331,766,52,294,-29,65,305,766,45,267,-29,37,286,766,26,257,-29,0,279,766,0,267,-29,-37,286,766,-26,294,-29,-65,305,766,-45,0,777,85,0,681,33,333,762,-75,333,806,-75,371,762,-65,371,806,-65,398,762,-37,398,806,-37,408,762,0,408,806,0,398,762,37,398,806,37,371,762,65,371,806,65,333,762,75,333,806,75,296,762,65,296,806,65,268,762,37,268,806,37,258,762,0,258,806,0,268,762,-37,268,806,-37,296,762,-65,296,806,-65,0,681,-33,0,777,-85,52,681,33,52,777,85,52,681,-33,52,777,-85],faces:[4,10,14,1,13,17,11,6,7,0,3,1,16,1,17,4,19,5,14,18,19,15,17,18,3,8,13,13,9,12,12,10,11,19,7,5,19,12,11,18,13,12,16,2,0,15,8,16,14,9,15,23,26,22,27,24,26,25,20,24,26,20,22,23,25,27,29,30,28,31,32,30,33,34,32,35,36,34,37,38,36,39,40,38,41,42,40,43,44,42,45,46,44,47,48,46,49,50,48,51,28,50,55,56,54,57,58,56,59,60,58,61,62,60,63,64,62,79,81,83,65,66,64,82,53,78,67,68,66,81,53,80,69,70,68,83,80,82,71,72,70,79,82,78,73,74,72,75,63,59,75,76,74,77,54,76,60,68,76,4,6,10,1,3,13,11,10,6,0,2,3,16,0,1,4,14,19,14,15,18,15,16,17,3,2,8,13,8,9,12,9,10,19,11,7,19,18,12,18,17,13,16,8,2,15,9,8,14,10,9,23,27,26,27,25,24,25,21,20,26,24,20,23,21,25,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,29,28,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,79,52,81,65,67,66,82,80,53,67,69,68,81,52,53,69,71,70,83,81,80,71,73,72,79,83,82,73,75,74,59,57,55,55,77,75,75,73,71,71,69,75,67,65,63,63,61,59,59,55,75,75,69,67,67,63,75,75,77,76,77,55,54,76,54,56,56,58,76,60,62,68,64,66,68,68,70,72,72,74,68,76,58,60,62,64,68,68,74,76]}],hexagons:[{type:"extrude",vertices:[-.198,-.302,.197,-.3,.372,0,.199,.298,-.202,.298,-.368,0]}],towers:[{type:"extrude",vertices:[-.054,-.178,-.007,-.182,.069,-.027,.189,.079,.178,.124,-.007,.097,-.145,.182,-.178,.144,-.079,-.021]},{type:"lathe",segments:4,vertices:[.004,.02,.012,.092,.042,.166,.067,.55,.101,.594,.105,.838,.193,.934,.18,.994]},{type:"lathe",segments:5,vertices:[.069,.216,.067,.562,.126,.562,.128,.774,.191,.774,.193,.986]}],trees:[{type:"lathe",noise:.015,segments:6,vertices:[1e-6,.826,.054,.832,.105,.854,.136,.9,.136,.958,.118,.994]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.01,.069,.022,.13,.068,.178,.18,.189,.32,.191,.59,.193,.75,.138,.79,.018,.808,.018,.996]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.436,.126,.46,.201,.57,.219,.72,.154,.846,.028,.884,.034,.996]}],apparatus:[{type:"lathe",segments:10,vertices:[1e-6,.23,.042,.23,.069,.36,.038,.362,.038,.372,.06,.372,.073,.572,.024,.572,.024,.67,.069,.67,.075,.722,.097,.724,.105,.852,.083,.902,.065,.902,.065,.924,.128,.924,.146,.996]},{type:"lathe",segments:16,vertices:[1e-6,.232,.229,.182,.486,.07,.356,.182,.213,.242,.154,.242,.144,.262,.178,.262,.126,.314,.04,.328,.038,.374,.058,.374,.071,.408,.026,.406,.03,.42,.091,.418,.034,.496,.01,.498,.03,.506,.014,.998]}],mushrooms:[{type:"lathe",noise:.02,segments:14,vertices:[1e-6,.006,.13,.018,.341,.084,.437,.144,.492,.234,.484,.246,.276,.232,.107,.284,.046,.346,.062,.852,.097,.956,.166,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.562,.091,.572,.172,.61,.223,.666,.256,.74,.258,.806,.246,.824,.062,.826,.065,.948,.097,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.768,.099,.772,.219,.802,.306,.844,.352,.886,.352,.908,.118,.904,.107,.93,.115,.966,.14,.996]}]};for(var i in this.assets)for(var n=0;n<this.assets[i].length;n++){var o=this.assets[i][n];if(o.type=="mesh")for(var a=0,l=o.vertices.length;a<l;a++)o.vertices[a]/=1e3}this.userFog=this.el.sceneEl.getAttribute("fog"),this.sky=document.createElement("a-sky"),this.sky.setAttribute("radius",this.STAGE_SIZE),this.sky.setAttribute("theta-length",110),this.sky.classList.add("environment"),this.stars=null,this.groundMaterial=null,this.ground=document.createElement("a-entity"),this.ground.setAttribute("rotation","-90 0 0"),this.ground.classList.add("environmentGround"),this.ground.classList.add("environment"),this.groundCanvas=null,this.groundTexture=null,this.groundMaterial=null,this.groundGeometry=null,this.dressing=document.createElement("a-entity"),this.dressing.classList.add("environmentDressing"),this.dressing.classList.add("environment"),this.gridCanvas=null,this.gridTexture=null,this.hemilight=document.createElement("a-entity"),this.hemilight.classList.add("environment"),this.hemilight.setAttribute("position","0 50 0"),this.hemilight.setAttribute("light",{type:"hemisphere",color:"#CEE4F0",intensity:.4}),this.sunlight=document.createElement("a-entity"),this.sunlight.classList.add("environment"),this.sunlight.setAttribute("position",this.data.lightPosition),this.sunlight.setAttribute("light",{intensity:.6}),this.el.appendChild(this.hemilight),this.el.appendChild(this.sunlight),this.el.appendChild(this.ground),this.el.appendChild(this.dressing),this.el.appendChild(this.sky)},getFogColor:function(i,n){var o;if(i=="color"||i=="none")o=new THREE.Color(this.environmentData.skyColor);else if(i=="gradient")o=new THREE.Color(this.environmentData.horizonColor);else if(i=="atmosphere"){var a=[1,.5,.22,.1,.05,0],l=["#C0CDCF","#81ADC5","#525e62","#2a2d2d","#141616","#000"];if(n<=0)return"#000";n=Math.min(1,n);for(var u=0;u<a.length;u++)if(n>a[u]){var d=new THREE.Color(l[u-1]),c=new THREE.Color(l[u]),x=(n-a[u])/(a[u-1]-a[u]);c.lerp(d,x),o=c;break}}return o.multiplyScalar(.9),o.lerp(new THREE.Color(this.data.groundColor),.3),"#"+o.getHexString()},update:function(i){var n;this.data.preset?(n=he.utils.clone(this.environmentData),this.environmentData={},Object.assign(this.environmentData,this.data),Object.assign(this.environmentData,this.presets[this.data.preset]),Object.assign(this.environmentData,this.el.components.environment.attrValue)):(n=i,this.environmentData=this.data);var o=this.environmentData.background;o!=null&&this.sky.setAttribute("src",o);var a=this.environmentData.skyType,l=new THREE.Vector3(this.environmentData.lightPosition.x,this.environmentData.lightPosition.y,this.environmentData.lightPosition.z);if(l.normalize(),this.sunlight){if(this.sunlight.setAttribute("position",this.environmentData.lightPosition),a!="atmosphere"){var u=new THREE.Color(this.environmentData.skyColor);u.r=(u.r+1)/2,u.g=(u.g+1)/2,u.b=(u.b+1)/2,this.hemilight.setAttribute("light",{color:"#"+u.getHexString()}),this.sunlight.setAttribute("light",{intensity:.6}),this.hemilight.setAttribute("light",{intensity:.6})}else this.sunlight.setAttribute("light",{intensity:.1+.5*l.y}),this.hemilight.setAttribute("light",{intensity:.1+.5*l.y});this.sunlight.setAttribute("light",{castShadow:this.environmentData.shadow,shadowCameraLeft:-this.environmentData.shadowSize,shadowCameraBottom:-this.environmentData.shadowSize,shadowCameraRight:this.environmentData.shadowSize,shadowCameraTop:this.environmentData.shadowSize})}if(a!==n.skyType||this.environmentData.skyColor!=n.skyColor||this.environmentData.horizonColor!=n.horizonColor){var d={};d.shader={none:"flat",color:"flat",gradient:"gradientshader",atmosphere:"skyshader"}[a],this.stars&&this.stars.setAttribute("visible",a=="atmosphere"),a=="color"?(d.color=this.environmentData.skyColor,d.fog=!1):a=="gradient"&&(d.topColor=this.environmentData.skyColor,d.bottomColor=this.environmentData.horizonColor),this.sky.setAttribute("material",d)}a=="atmosphere"&&(this.sky.setAttribute("material",{sunPosition:l}),this.setStars(2e3*(1-Math.max(0,8*(l.y+.08))))),this.environmentData.fog>0?this.el.sceneEl.setAttribute("fog",{color:this.getFogColor(a,l.y),far:(1.01-this.environmentData.fog)*this.STAGE_SIZE*2}):this.el.sceneEl.removeAttribute("fog"),this.sunlight.setAttribute("light",{type:this.environmentData.lighting=="point"?"point":"directional"}),this.sunlight.setAttribute("visible",this.environmentData.lighting!=="none"),this.hemilight.setAttribute("visible",this.environmentData.lighting!=="none");var c=!this.groundGeometry||this.environmentData.seed!=n.seed||this.environmentData.ground!=n.ground||this.environmentData.playArea!=n.playArea||this.environmentData.flatShading!=n.flatShading;(c||this.environmentData.groundColor!=n.groundColor||this.environmentData.groundColor2!=n.groundColor2||this.environmentData.groundYScale!=n.groundYScale||this.environmentData.groundTexture!=n.groundTexture||this.environmentData.gridColor!=n.gridColor||this.environmentData.grid!=n.grid)&&(this.updateGround(c),this.hemilight&&this.hemilight.setAttribute("light",{groundColor:this.environmentData.groundColor})),this.environmentData.seed==n.seed&&this.environmentData.dressingOnPlayArea==n.dressingOnPlayArea&&this.environmentData.dressing==n.dressing&&this.environmentData.flatShading==n.flatShading&&this.environmentData.dressingAmount==n.dressingAmount&&this.environmentData.dressingScale==n.dressingScale&&this.environmentData.dressingColor==n.dressingColor&&this.environmentData.dressingVariance.x==n.dressingVariance.x&&this.environmentData.dressingVariance.y==n.dressingVariance.y&&this.environmentData.dressingVariance.z==n.dressingVariance.z&&this.environmentData.dressingUniformScale==n.dressingUniformScale||this.updateDressing(),this.sky.setAttribute("visible",a!=="none"),this.el.setAttribute("visible",this.environmentData.active),this.environmentData.active||(this.userFog?this.el.sceneEl.setAttribute("fog",this.userFog):this.el.sceneEl.removeAttribute("fog")),this.dumpParametersDiff()},logPreset:function(){var i="{";for(var n in this.schema)if(n!="preset"){i+=n+": ";var o=this.schema[n].type;i+=o=="vec3"?"{ x: "+this.environmentData[n].x+", y: "+this.environmentData[n].y+", z: "+this.environmentData[n].z+"}":o=="string"||o=="color"?'"'+this.environmentData[n]+'"':this.environmentData[n],i+=", "}i+="}",console.log(i)},dumpParametersDiff:function(){function i(x){return Math.floor(1e3*x)/1e3}var n=[],o=this.data.preset!="none"&&this.presets[this.data.preset];o&&n.push("preset: "+this.data.preset);for(var a in this.schema)if(!(a=="preset"||o&&o[a]===void 0)){var l=o?o[a]:this.schema[a].default,u=this.environmentData[a],d=this.schema[a].type;if(d=="vec3"){var c=l;typeof l=="string"&&(l=l.split(" "),c={x:l[0],y:l[1],z:l[2]}),i(c.x)==i(u.x)&&i(c.y)==i(u.y)&&i(c.z)==i(u.z)||n.push(a+": "+i(u.x)+" "+i(u.y)+" "+i(u.z))}else l!=u&&(this.schema[a].type=="number"&&(u=i(u)),n.push(a+": "+u))}},random:function(i){return parseFloat("0."+Math.sin(9999*this.environmentData.seed*i).toString().substr(7))},updateGround:function(i){var n=64;if(i){var o=this.environmentData.ground!="none";if(this.ground.setAttribute("visible",o),!o)return;this.groundGeometry||(this.groundGeometry=new THREE.PlaneGeometry(this.STAGE_SIZE+2,this.STAGE_SIZE+2,n-1,n-1));for(var a=new t(this.environmentData.seed),l=this.groundGeometry.attributes.position.array,u=l.length,d=10,c=d/n,x=0,k=0,A=2;A<u;A+=3)if(this.environmentData.ground!="flat"){var b;switch(this.environmentData.ground){case"hills":b=Math.max(0,a.noise(x,k,0));break;case"canyon":b=.2+.8*a.noise(x,k,0),b=Math.min(1,10*Math.pow(b,2));break;case"spikes":b=this.random(A)<.02?this.random(A+1):0;break;case"noise":b=this.random(A)<.35?this.random(A+1):0}b+=.1*this.random(A+2);var w=2*x/d-1,y=2*k/d-1,_=this.environmentData.playArea;w=Math.max(0,Math.min(1,(Math.abs(w)-(_-.9))*(1/_))),y=Math.max(0,Math.min(1,(Math.abs(y)-(_-.9))*(1/_))),b*=w>y?w:y,b<.01&&(b=0),l[A]=b,x+=c,x>=10&&(x=0,k+=c)}else l[A]=0;this.groundGeometry.computeVertexNormals(),this.groundGeometry.attributes.position.needsUpdate=!0,this.groundGeometry.attributes.normal.needsUpdate=!0}this.ground.setAttribute("scale",{z:this.environmentData.groundYScale});var C=2048,m=20,T=this.STAGE_SIZE/m;this.groundCanvas&&this.groundCanvas.width==C||(this.gridCanvas=document.createElement("canvas"),this.gridCanvas.width=C,this.gridCanvas.height=C,this.gridTexture=new THREE.Texture(this.gridCanvas),this.gridTexture.wrapS=THREE.RepeatWrapping,this.gridTexture.wrapT=THREE.RepeatWrapping,this.gridTexture.repeat.set(T,T),this.groundCanvas=document.createElement("canvas"),this.groundCanvas.width=C,this.groundCanvas.height=C,this.groundTexture=new THREE.Texture(this.groundCanvas),this.groundTexture.wrapS=THREE.RepeatWrapping,this.groundTexture.wrapT=THREE.RepeatWrapping,this.groundTexture.repeat.set(T,T),this.groundMaterialProps={map:this.groundTexture,emissive:new THREE.Color(16777215),emissiveMap:this.gridTexture},new THREE.Material().hasOwnProperty("shading")?this.groundMaterialProps.shading=this.environmentData.flatShading?THREE.FlatShading:THREE.SmoothShading:this.groundMaterialProps.flatShading=this.environmentData.flatShading,this.groundMaterial=new THREE.MeshLambertMaterial(this.groundMaterialProps));var g=this.groundCanvas.getContext("2d"),X=this.gridCanvas.getContext("2d");if(this.drawTexture(g,C,m),X.fillStyle="#000000",X.fillRect(0,0,C,C),this.drawGrid(X,C,m),this.groundTexture.needsUpdate=!0,this.gridTexture.needsUpdate=!0,i){var R=new THREE.Mesh(this.groundGeometry,this.groundMaterial);this.ground.setObject3D("mesh",R)}else this.ground.getObject3D("mesh").material=this.groundMaterial;this.ground.setAttribute("shadow",{cast:!1,receive:this.environmentData.shadow})},drawGrid:function(i,n,o){if(this.environmentData.grid!="none"){var a,l,u,d=Math.floor(o/2),c=n/(o/2);switch(i.fillStyle=this.environmentData.gridColor,this.environmentData.grid){case"1x1":case"2x2":for(this.environmentData.grid=="1x1"&&(d*=2,c=n/o),a=0;a<d;a++)u=Math.floor(a*c),i.fillRect(0,u,n,1),i.fillRect(u,0,1,n);break;case"crosses":var x=Math.floor(c/20);for(a=0;a<d+1;a++)for(u=Math.floor(a*c),l=0;l<d+1;l++){var k=Math.floor(-x+l*c);i.fillRect(k,u,2*x,1),i.fillRect(u,k,1,2*x)}break;case"dots":for(a=0;a<d+1;a++)for(l=0;l<d+1;l++)i.beginPath(),i.arc(Math.floor(l*c),Math.floor(a*c),4,0,2*Math.PI),i.fill();break;case"xlines":for(a=0;a<d;a++)i.fillRect(Math.floor(a*c),0,1,n);break;case"ylines":for(a=0;a<d;a++)i.fillRect(0,Math.floor(a*c),n,1)}}},drawTexture:function(i,n,o){i.fillStyle=this.environmentData.groundColor,i.fillRect(0,0,n,n);var a,l,u,d,c,x,k;if(this.environmentData.groundTexture!="none")switch(this.environmentData.groundTexture){case"checkerboard":i.fillStyle=this.environmentData.groundColor2;var A=Math.floor(o/2),b=n/(o/2);for(a=0;a<A+1;a+=2)for(var w=0;w<A+1;w++)i.fillRect(Math.floor((a+w%2)*b),Math.floor(w*b),Math.floor(b),Math.floor(b));break;case"squares":var y=16,_=n/y;for(u=new THREE.Color(this.environmentData.groundColor),d=new THREE.Color(this.environmentData.groundColor2),a=0;a<y*y;a++)l=this.random(a+3)>.5?u.clone():d.clone(),l.addScalar(.1*this.random(a+3)-.05),i.fillStyle="#"+l.getHexString(),i.fillRect(a%y*_,Math.floor(a/y)*_,_,_);break;case"noise":x=i.getImageData(0,0,n,n),c=x.data,u=new THREE.Color(this.environmentData.groundColor),d=new THREE.Color(this.environmentData.groundColor2);var C=new THREE.Color(d.r-u.r,d.g-u.g,d.b-u.b),m=new t;for(a=0,w=0,k=c.length;a<k;a+=4,w++){var T=m.noise(w%n/n*3,w/n/n*3,0);c[a+0]=Math.floor(255*(u.r+C.r*T)),c[a+1]=Math.floor(255*(u.g+C.g*T)),c[a+2]=Math.floor(255*(u.b+C.b*T))}i.putImageData(x,0,0);break;case"walkernoise":var g=Math.floor(n/2),X=document.createElement("canvas");X.width=g,X.height=g;var R=X.getContext("2d");R.fillStyle=this.environmentData.groundColor,R.fillRect(0,0,g,g),x=R.getImageData(0,0,g,g),c=x.data,u=new THREE.Color(this.environmentData.groundColor),d=new THREE.Color(this.environmentData.groundColor2);var P=[],Y=1e3;for(a=0;a<Y;a++)l=u.clone().lerp(d,Math.random()),P.push({x:Math.random()*g,y:Math.random()*g,r:Math.floor(255*l.r),g:Math.floor(255*l.g),b:Math.floor(255*l.b)});for(var se=5e3,G=0;G<se;G++)for(a=0;a<Y;a++){var I=P[a],W=4*Math.floor(I.y*g+I.x);c[W+0]=I.r,c[W+1]=I.g,c[W+2]=I.b,I.x+=Math.floor(3*Math.random())-1,I.y+=Math.floor(3*Math.random())-1,I.x>=g&&(I.x=I.x-g),I.y>=g&&(I.y=I.y-g),I.x<0&&(I.x=g+I.x),I.y<0&&(I.y=g+I.y)}R.putImageData(x,0,0),i.drawImage(X,0,0,n,n)}},getAssetGeometry:function(i){function n(_,C){for(var m=(new THREE.Vector3,_.attributes.position.array),T=m.length,g=0;g<T;g+=3)m[g]=(d.random(g)-.5)*C,m[g+1]=(d.random(g+T)-.5)*C,m[g+2]=(d.random(g+2*T)-.5)*C;_.attributes.position.needsUpdate=!0}if(!i)return null;for(var o,a,l,u=[],d=this,c=0;c<i.length;c++)if(i[c].type=="lathe"){var x=-99999,k=[];for(l=i[c].vertices,o=0;o<l.length;o+=2)k.push(new THREE.Vector2(l[o],l[o+1])),l[o+1]>x&&(x=l[o+1]);a=new THREE.LatheGeometry(k,i[c].segments||8),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI,0,0))),a.applyMatrix4(new THREE.Matrix4().makeTranslation(0,x,0)),a=a.toNonIndexed(),u.push(a)}else if(i[c].type=="extrude"){var A=new THREE.Shape;for(l=i[c].vertices,o=0;o<l.length;o+=2)o==0?A.moveTo(l[o],l[o+1]):A.lineTo(l[o],l[o+1]);a=new THREE.ExtrudeGeometry(A,{amount:1,bevelEnabled:!1}),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI/2,0,0))),i[c].noise&&n(a,i[c].noise),u.push(a)}else if(i[c].type=="mesh"){a=new THREE.BufferGeometry,l=i[c].vertices;var b=i[c].faces,w=new Float32Array(l);if(a.setIndex(b),a.setAttribute("position",new THREE.BufferAttribute(w,3)),i[c].mirror){var y=a.clone();y.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,Math.PI,0))),a=THREE.BufferGeometryUtils.mergeBufferGeometries([a,y])}i[c].noise&&n(a,i[c].noise),a=a.toNonIndexed(),a.computeVertexNormals(),u.push(a)}return u},updateDressing:function(){var i=new THREE.Object3D,n=[];if(this.dressing.setAttribute("visible",this.environmentData.dressing!="none"),this.environmentData.dressing!="none"){var o;switch(this.environmentData.dressing){case"cubes":o=[new THREE.BoxGeometry(1,1,1)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"pyramids":o=[new THREE.ConeGeometry(1,1,4,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"cylinders":o=[new THREE.CylinderGeometry(.5,.5,1,8,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;default:if(o=this.getAssetGeometry(this.assets[this.environmentData.dressing]),!o)return}for(var a=0,l=88343;a<this.environmentData.dressingAmount;a++,l++){var u,d=(o[Math.floor(this.random(33+a)*o.length)].clone,o[Math.floor(this.random(33+a)*o.length)].clone()),c=this.environmentData.dressingScale,x=new THREE.Vector3(this.environmentData.dressingVariance.x,this.environmentData.dressingVariance.y,this.environmentData.dressingVariance.z),k=this.random(l)<this.environmentData.dressingOnPlayArea;u=k?15*this.random(l+1):10+Math.max(x.x,x.z)+10*this.random(l+1)+this.random(l+2)*this.STAGE_SIZE/3;var A=this.random(l+3)*Math.PI*2,b=new THREE.Matrix4,w=this.random(l+4),y=this.environmentData.dressingUniformScale;b.compose(new THREE.Vector3(Math.cos(A)*u,0,Math.sin(A)*u),new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,1,0),(this.random(l+5)-.5)*x.length()*Math.PI*2),new THREE.Vector3(c+(y?w:this.random(l+6))*x.x,c+(y?w:this.random(l+7))*x.y,c+(y?w:this.random(l+8))*x.z)),d.applyMatrix4(b),n.push(d)}var _=THREE.BufferGeometryUtils.mergeBufferGeometries(n);_.attributes.position.needsUpdate=!0;var C=new THREE.MeshLambertMaterial({color:new THREE.Color(this.environmentData.dressingColor)}),m=new THREE.Mesh(_,C);i.add(m),this.dressing.setObject3D("mesh",i)}},createStars:function(){for(var i=2e3,n=new THREE.BufferGeometry,o=new Float32Array(3*i),a=this.STAGE_SIZE-1,l=new THREE.Vector3,u=0;u<o.length;u+=3)l.set(this.random(u+23)-.5,this.random(u+24),this.random(u+25)-.5),l.normalize(),l.multiplyScalar(a),o[u]=l.x,o[u+1]=l.y,o[u+2]=l.z;n.setAttribute("position",new THREE.BufferAttribute(o,3)),n.setDrawRange(0,0);var d=new THREE.PointsMaterial({size:.01,color:13421772,fog:!1});this.stars.setObject3D("mesh",new THREE.Points(n,d))},setStars:function(i){this.stars||(this.stars=document.createElement("a-entity"),this.stars.id="stars",this.createStars(),this.el.appendChild(this.stars)),i=Math.floor(Math.min(2e3,Math.max(0,i))),this.stars.getObject3D("mesh").geometry.setDrawRange(0,i)}}),he.registerShader("skyshader",{schema:{luminance:{type:"number",default:1,min:0,max:2,is:"uniform"},turbidity:{type:"number",default:2,min:0,max:20,is:"uniform"},reileigh:{type:"number",default:1,min:0,max:4,is:"uniform"},mieCoefficient:{type:"number",default:.005,min:0,max:.1,is:"uniform"},mieDirectionalG:{type:"number",default:.8,min:0,max:1,is:"uniform"},sunPosition:{type:"vec3",default:{x:0,y:0,z:-1},is:"uniform"},color:{type:"color",default:"#fff"}},vertexShader:["varying vec3 vWorldPosition;","void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vWorldPosition = worldPosition.xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join(`
380
+ ${y.ground.animation.toX} ${y.ground.animation.toY} ${y.ground.animation.toZ}; dur: 1000;`},y.ground.key),y.banners.map(T=>f.jsx("a-box",{id:P[0]?P[0]:"panel_0",geometry:`width:${T.geometry.width}; height:${T.geometry.height}; depth:${T.geometry.depth};`,position:`${T.position.x} ${T.position.y} ${T.position.z}`,rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,material:`color: ${T.material.color}; transparent: ${T.material.transparent}`},P[0]?P[0]:"panel_0"))]}):f.jsx("a-box",{animation__1:"property: rotation; to: 0 180 360; dur: 10000; easing: linear; loop: true",animation__2:"property: scale; from: 1 1 1; to: 10 10 10; dur: 15000; timeout: 15000; loop: true; easing: linear; dir: alternate",animation__color:"property: material.color; from: #003682; to: #7d0002; dur: 80000: easing: linear: loop: true; dir: alternate",position:"0 1.5 -2"})};(function(r){function e(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return r[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var t={};return e.m=r,e.c=t,e.p="",e(0)})([function(r,e){if(typeof be>"u")throw new Error("Component attempted to register before AFRAME was available.");be.registerComponent("environment",{schema:{active:{default:!1},preset:{default:"default",oneOf:["none","ndmvr","govorun","labs","labs2","default","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow","bow","winter"]},seed:{type:"int",default:1,min:0,max:1e3},skyType:{default:"color",oneOf:["none","color","gradient","atmosphere"]},background:{type:"string"},skyColor:{type:"color"},horizonColor:{type:"color"},lighting:{default:"distant",oneOf:["none","distant","point"]},shadow:{default:!1},shadowSize:{default:10},lightPosition:{type:"vec3",default:{x:0,y:1,z:-.2}},fog:{type:"float",default:0,min:0,max:1},flatShading:{default:!1},playArea:{type:"float",default:1,min:.5,max:10},ground:{default:"hills",oneOf:["none","flat","hills","canyon","spikes","noise"]},groundYScale:{type:"float",default:3,min:0,max:50},groundTexture:{default:"none",oneOf:["none","checkerboard","squares","walkernoise"]},groundColor:{type:"color",default:"#553e35"},groundColor2:{type:"color",default:"#694439"},dressing:{default:"none",oneOf:["none","cubes","pyramids","cylinders","hexagons","stones","trees","mushrooms","towers","apparatus","arches","torii"]},dressingAmount:{type:"int",default:10,min:0,max:1e3},dressingColor:{type:"color",default:"#795449"},dressingScale:{type:"float",default:5,min:0,max:100},dressingVariance:{type:"vec3",default:{x:1,y:1,z:1}},dressingUniformScale:{default:!0},dressingOnPlayArea:{type:"float",default:0,min:0,max:1},grid:{default:"none",oneOf:["none","1x1","2x2","crosses","dots","xlines","ylines"]},gridColor:{type:"color",default:"#ccc"}},multiple:!1,presets:{none:{},default:{active:!0,seed:1,skyType:"atmosphere",skyColor:"#88c",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:1,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},labs:{active:!0,seed:1,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"point",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3,groundTexture:"none",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!0},labs2:{active:!0,seed:1,skyType:"gradient",skyColor:"#88c",horizonColor:"#ddd",lighting:"point",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},ndmvr:{active:!0,seed:1,skyType:"atmosphere",skyColor:"skyblue",horizonColor:"silver",lighting:"point",lightPosition:{x:-.11,y:3,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"none",groundColor:"#aaa",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:1},govorun:{active:!0,seed:1,background:"./assets/ndmvr/backgrounds/govorun.jpg",lighting:"point",lightPosition:{x:-.11,y:1,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"none",groundColor:"#797268",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:!1},cern:{active:!0,seed:1,background:"./assets/ndmvr/backgrounds/background1.jpg",lighting:"point",lightPosition:{x:-.11,y:1,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"checkerboard",groundColor:"none",groundColor2:"none",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:!1},contact:{active:!0,seed:14,skyType:"gradient",skyColor:"#478d54",horizonColor:"#b696cb",lighting:"distant",lightPosition:{x:0,y:2.01,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:2.91,groundTexture:"none",groundColor:"#2e455f",groundColor2:"#694439",dressing:"none",dressingAmount:10,dressingColor:"#657067",dressingScale:20,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#478d54",shadow:!1},egypt:{active:!0,seed:60,skyType:"gradient",skyColor:"#1b7660",horizonColor:"#e4b676",lighting:"distant",lightPosition:{x:0,y:1.65,z:.3},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#664735",groundColor2:"#6c4b39",dressing:"pyramids",dressingAmount:5,dressingColor:"#7c5c45",dressingScale:5,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},checkerboard:{active:!0,seed:5,skyType:"gradient",skyColor:"#0d0d0d",horizonColor:"#404040",lighting:"distant",lightPosition:{x:0,y:1,z:.2},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:4.81,groundTexture:"checkerboard",groundColor:"#615C32",groundColor2:"#11111",dressing:"cubes",dressingAmount:22,dressingColor:"#9f9f9f",dressingScale:1.51,dressingVariance:{x:5,y:20,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},forest:{active:!0,seed:8,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},winter:{active:!0,seed:8,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#fcfcfc",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!0},bow:{active:!0,seed:4,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:38,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},goaland:{active:!0,seed:17,skyType:"gradient",skyColor:"#14645f",horizonColor:"#a3dab8",lighting:"point",lightPosition:{x:.1,y:4,z:.56},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:.81,groundTexture:"none",groundColor:"#752944",groundColor2:"#db4453",dressing:"none",dressingAmount:2,dressingColor:"#a9313d",dressingScale:5,dressingVariance:{x:5,y:10,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#239893",shadow:!1},yavapai:{active:!0,seed:11,skyType:"gradient",skyColor:"#239849",horizonColor:"#cfe0af",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#C66344",groundColor2:"#c96b4b",dressing:"stones",dressingAmount:5,dressingColor:"#C66344",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},goldmine:{active:!0,seed:53,skyType:"gradient",skyColor:"#1e1c1a",horizonColor:"#8c7964",lighting:"point",lightPosition:{x:-.09,y:3,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:50,groundTexture:"none",groundColor:"#353535",groundColor2:"#454545",dressing:"none",dressingAmount:300,dressingColor:"#fe921b",dressingScale:.5,dressingVariance:{x:2,y:8,z:2},dressingUniformScale:!0,dressingOnPlayArea:.03,grid:"none",gridColor:"#ccc",shadow:!1},threetowers:{active:!0,seed:5,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.8,ground:"spikes",groundYScale:3,groundTexture:"walkernoise",groundColor:"#273a49",groundColor2:"#2b464f",dressing:"towers",dressingAmount:8,dressingColor:"#5f6d94",dressingScale:80,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#239893",shadow:!1},poison:{active:!0,seed:92,skyType:"gradient",skyColor:"#1ea84a",horizonColor:"#177132",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:3.6,groundTexture:"none",groundColor:"#000000",groundColor2:"#912235",dressing:"hexagons",dressingAmount:20,dressingColor:"#c7415b",dressingScale:20,dressingVariance:{x:20,y:200,z:20},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"crosses",gridColor:"#1ea84a",shadow:!1},arches:{active:!0,seed:89,skyType:"atmosphere",skyColor:"#8cbdc8",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:.45,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:10,groundTexture:"walkernoise",groundColor:"#a87d6f",groundColor2:"#795449",dressing:"arches",dressingAmount:7,dressingColor:"#795449",dressingScale:20,dressingVariance:{x:20,y:40,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},tron:{active:!0,seed:14,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:.12,y:.62,z:.1},fog:.1,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:3.1,groundTexture:"none",groundColor:"#061123",groundColor2:"#694439",dressing:"none",dressingAmount:5,dressingColor:"#fb000e",dressingScale:15,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#fb000e",shadow:!0},japan:{active:!0,seed:14,skyType:"gradient",skyColor:"#7e5db5",horizonColor:"#b4adda",lighting:"distant",lightPosition:{x:1.33,y:1,z:.24},fog:.9,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#7e5db5",groundColor2:"#cabdf5",dressing:"torii",dressingAmount:6,dressingColor:"#bc5e7c",dressingScale:15,dressingVariance:{x:0,y:0,z:15},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},dream:{active:!0,seed:5,skyType:"gradient",skyColor:"#87faf4",horizonColor:"#b34093",lighting:"distant",lightPosition:{x:-.72,y:.53,z:.97},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:20,groundTexture:"checkerboard",groundColor:"#b34093",groundColor2:"#c050a2",dressing:"mushrooms",dressingAmount:2,dressingColor:"#3cf7ed",dressingScale:.2,dressingVariance:{x:.2,y:.2,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},volcano:{active:!0,seed:5,skyType:"gradient",skyColor:"#4a070f",horizonColor:"#f62300",lighting:"point",lightPosition:{x:.5,y:2.25,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:7.6,groundTexture:"walkernoise",groundColor:"#fb0803",groundColor2:"#510000",dressing:"arches",dressingAmount:20,dressingColor:"#fe921b",dressingScale:.1,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"none",gridColor:"#fa0e00",shadow:!1},starry:{active:!0,seed:1,skyType:"atmosphere",skyColor:"AEA09F",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:0,y:1,z:.06},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#553e35",groundColor2:"#694439",dressing:"none",dressingAmount:100,dressingColor:"#795449",dressingScale:5,dressingVariance:{x:1,y:1,z:1},dressingUniformScale:!0,grid:"1x1",dressingOnPlayArea:0,gridColor:"#39d2f2",shadow:!1},osiris:{active:!0,seed:46,skyType:"atmosphere",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:0,y:.2,z:.46},fog:0,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#9e7b47",groundColor2:"#9e7b47",dressing:"pyramids",dressingAmount:3,dressingColor:"#9e7b47",dressingScale:5,dressingVariance:{x:30,y:30,z:30},dressingUniformScale:!0,grid:"dots",dressingOnPlayArea:0,gridColor:"#daa452",shadow:!1},moon:{active:!0,seed:11,skyType:"gradient",skyColor:"skyblue",horizonColor:"#fcfcfc",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!0,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#D1D1D1",groundColor2:"#987d2e",dressing:"stones",dressingAmount:100,dressingColor:"#494949",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#c5a543",shadow:!1},snow:{active:!0,seed:4,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.4,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:2,dressingColor:"#fcfcfc",dressingScale:1.3,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#39d2f2",shadow:!0}},init:function(){this.environmentData={},this.STAGE_SIZE=200,this.assets={arches:[{type:"mesh",vertices:[409,268,4,351,228,36,336,236,-57,-152,391,69,-135,358,88,-119,330,43,-20,358,-35,-153,357,-47,37,413,-26,-20,411,-14,-302,148,154,-339,121,-126,-389,200,-88,-477,193,-76,-314,346,-19,-314,306,-30,-250,296,-73,-267,237,-82,-212,303,-68,-245,200,-67,-223,304,108,-329,299,107,-289,350,76,-320,342,69,119,373,-39,38,370,8,113,367,52,492,202,-31,462,83,-104,447,71,-80,426,112,25,482,189,-7,222,372,6,121,402,41,87,382,67,221,346,55,559,93,-13,528,47,39,505,21,-111,528,54,-101,616,31,-53,442,256,-15,300,338,19,257,308,-79,408,256,-74,312,352,-26,384,297,-31,437,257,-47,-29,415,53,-232,377,59,-139,335,77,-132,344,2,-18,377,-37,-171,387,-28,-254,384,18,-651,-27,27,-435,-28,179,-345,149,165,-272,-28,23,-215,146,-2,-279,-29,-59,-211,145,-55,-337,-28,-128,-413,247,0,-293,363,24,-214,254,-36,-164,290,33,-284,150,94,-218,362,105,75,369,29,518,147,-63,447,190,-70,445,56,-105,391,185,-60,431,49,-33,459,83,26,470,162,42,130,390,53,167,341,-30,125,394,-45,239,368,-17,91,414,10,450,18,2,449,-27,-9,436,-28,-58,496,-27,-110,582,-28,-140,647,-27,-56,325,325,-45,-307,297,-56,-647,-28,-45,-188,310,-54,-264,197,113,-367,175,139,8,387,82,426,45,-55,114,359,-28,500,27,44,461,-29,13,-512,-27,-151,-152,376,-38,-490,-28,148,12,370,-28,442,160,42,465,194,32,381,183,-33,649,-27,-34,444,16,29,616,-28,25,417,267,-66,-132,352,-34,-322,-27,130,-271,86,-115,-635,-28,-121,-291,203,-99,176,405,-10,561,52,-93,371,305,9,311,237,-22,377,200,-81,-129,406,46,-154,371,99,-82,361,71,-21,354,26,-91,363,-27,-165,413,-12,-414,215,110,-238,127,26,-408,-28,-128,-674,-28,-94,-446,232,-39,-311,226,-90,-255,210,-61,-235,192,-11,-217,218,58,-269,299,124,-386,276,78,-399,281,42,15,373,58,16,393,75,549,107,-46,481,188,-68,409,120,-41,541,81,12,230,368,41,194,350,-50,224,361,-50,604,-28,-10,602,-27,35,486,56,-121,502,69,-120,457,-27,-110,226,317,-40,-584,-28,-124,439,-26,-30,467,-26,39,547,-27,-146,21,368,14,466,229,-29,578,-27,44,609,-27,-96,291,356,-15,290,306,34,255,321,28,231,311,-5,-251,386,50,-183,307,87,-152,307,24,-264,373,-12,-392,-27,190,-333,-28,84,-281,-27,54,-270,-28,-23,-308,-28,-101,-687,-27,-59,39,418,39,413,163,25,404,206,-90,54,400,-31,121,352,8,-454,41,148,-426,9,182,-564,115,3,-427,27,-107,-548,118,-32,-556,122,-53,-517,91,-101,-475,54,140,-461,52,-134,-558,119,-71,-434,286,59,-687,-31,52,-595,146,22,-670,-28,164,-537,166,122,-575,-28,217,-566,159,65,-470,152,136,-712,-29,102,-639,-29,211,-532,-30,181,-442,-30,-100],faces:[76,104,162,1,176,103,103,76,1,2,119,73,73,105,2,2,118,152,45,161,46,46,109,45,3,120,49,49,68,3,3,121,139,139,48,3,4,122,94,94,121,4,6,123,124,9,175,81,10,169,111,10,67,92,88,43,146,11,131,114,11,128,183,13,130,15,90,184,174,90,182,184,130,184,63,14,130,63,15,130,14,16,131,12,15,168,53,18,91,17,131,16,17,65,133,132,65,132,91,67,134,166,166,92,67,20,135,92,20,166,4,4,121,20,22,135,68,25,102,96,25,157,102,69,138,157,69,157,25,39,150,71,71,141,39,28,150,149,149,72,28,142,176,105,36,140,27,27,143,36,32,115,81,32,144,161,161,80,32,77,35,144,34,26,77,78,179,96,145,152,78,178,79,145,80,146,79,147,140,36,143,108,36,143,37,148,74,95,154,154,83,74,72,149,151,151,95,72,38,150,156,40,147,106,70,140,40,40,116,70,42,162,0,35,163,162,43,145,146,46,117,41,47,158,27,48,139,175,122,138,94,157,138,123,52,178,102,52,102,6,52,124,7,7,100,52,53,125,8,57,93,181,56,169,181,59,127,58,60,173,61,62,128,11,11,112,62,65,91,167,65,167,66,126,93,21,22,68,49,72,95,29,142,29,74,74,82,142,75,107,97,75,97,103,76,97,37,104,143,31,78,152,164,78,164,179,79,178,8,97,155,159,107,98,155,83,98,82,154,95,84,39,116,86,86,156,39,87,160,116,24,145,96,162,104,0,105,118,2,43,177,119,44,177,43,91,51,167,44,88,109,46,161,117,3,68,121,3,48,120,4,166,50,50,122,4,5,123,122,123,138,122,110,124,51,170,10,111,110,91,7,7,124,110,8,125,9,9,81,8,186,12,188,92,135,10,11,114,112,64,63,137,13,15,89,89,53,100,64,168,14,14,168,15,89,100,16,16,12,89,100,18,16,17,91,132,112,19,61,18,7,91,19,17,132,133,127,59,133,59,61,136,21,22,134,127,133,20,92,166,121,135,20,158,31,27,21,135,22,23,137,136,24,102,178,178,145,24,25,179,69,26,94,138,27,140,70,27,70,141,150,177,71,28,177,150,29,142,73,73,119,29,142,82,30,30,176,142,107,75,82,31,143,27,33,81,175,31,41,104,115,79,8,32,33,144,80,115,32,33,175,139,35,162,42,77,139,34,163,26,179,163,179,164,78,96,145,177,29,119,108,143,148,148,37,159,97,159,37,74,83,82,38,149,150,156,150,39,40,106,87,87,116,40,140,147,40,161,144,42,42,117,161,41,0,104,41,117,0,0,117,42,164,118,163,1,163,118,118,176,1,118,105,176,152,118,164,43,152,145,43,119,2,71,109,141,47,41,158,44,71,177,45,109,88,45,88,146,46,47,109,141,47,27,167,50,166,49,120,165,139,121,94,5,122,50,123,51,124,157,6,102,157,123,6,100,8,178,5,167,51,6,124,52,100,178,52,53,168,125,125,165,120,54,125,168,9,48,175,120,9,125,93,10,135,181,101,56,57,169,10,59,172,61,67,170,171,67,171,127,58,127,171,129,186,113,60,61,172,61,173,112,62,112,173,174,189,129,165,64,23,64,137,23,165,22,49,64,54,168,17,114,131,17,112,114,66,133,65,19,132,133,19,133,61,134,133,66,166,134,66,166,66,167,93,135,21,68,135,121,23,136,22,94,34,139,25,96,179,26,138,69,69,179,26,30,103,176,116,141,70,39,141,116,73,142,105,143,76,37,26,35,77,103,97,76,77,144,33,33,139,77,38,151,149,80,161,45,80,45,146,81,115,8,107,155,97,82,98,107,95,151,84,38,156,85,86,116,160,96,102,24,72,29,28,29,95,74,75,30,82,108,147,36,88,44,43,91,110,51,170,67,10,11,183,131,64,14,63,89,15,53,100,7,18,112,17,19,127,134,67,136,126,21,158,41,31,33,32,81,115,80,79,177,28,29,43,2,152,71,44,109,47,46,41,141,109,47,167,5,50,123,5,51,100,53,8,125,54,165,9,120,48,93,57,10,59,58,172,174,185,189,165,54,64,165,23,22,94,26,34,30,75,103,143,104,76,26,163,35,38,85,151,192,182,191,183,128,201,12,13,89,181,169,57,186,153,113,188,183,99,184,182,63,185,13,189,180,181,93,186,99,153,189,186,129,185,184,130,186,13,12,187,93,126,193,199,194,194,196,193,200,187,195,187,197,195,187,126,197,197,190,194,190,136,137,190,196,194,63,182,192,63,192,196,192,198,196,191,182,55,193,196,198,194,199,197,195,197,199,136,197,126,190,137,63,190,63,196,197,136,190,192,191,198,201,99,183,90,55,182,181,180,101,185,130,13,186,188,99,186,189,13,187,180,93,200,101,187,183,188,131,184,185,174,180,187,101,16,18,17,12,131,188,35,42,144,163,1,162,76,162,1,79,146,145]}],stones:[{type:"mesh",vertices:[-376,189,42,230,223,-310,353,162,-62,414,-23,-67,256,90,-475,24,85,-526,-418,-16,57,-432,66,-40,-199,151,-376,-155,49,467,-91,289,201,293,197,91,81,-17,-480,42,108,431,-359,-17,-250,383,-19,-243,194,-15,270,-272,180,293,-86,212,262,234,54,297,395,97,-302,-123,-21,-444,-416,-19,-123,-323,-18,267,-100,-16,429,-300,96,-361,163,-19,409,118,201,-431,-241,-18,391,-130,274,-309,306,-19,-399,-221,96,404],faces:[31,18,17,0,17,18,3,20,2,18,11,10,29,27,8,27,29,1,0,18,10,10,29,0,16,19,26,11,2,1,20,30,4,20,3,15,30,12,4,4,12,5,5,27,4,4,27,20,21,25,5,7,8,25,22,7,14,7,25,14,23,28,31,0,7,17,24,26,9,31,28,9,8,27,5,2,20,1,13,19,18,10,11,1,19,13,26,3,11,19,19,16,3,11,3,2,11,18,19,20,15,30,29,10,1,25,21,14,8,5,25,5,12,21,6,7,22,7,6,23,8,0,29,8,7,0,23,31,7,13,31,9,18,31,13,9,28,24,26,13,9,27,1,20,7,31,17]},{type:"mesh",vertices:[-217,34,-153,198,90,20,212,85,169,-131,93,171,197,113,30,173,121,164,315,29,-16,219,24,189,282,50,-102,232,38,-181,-195,-9,-166,-156,30,-207,-51,-9,-231,-180,91,-173,-19,73,-204,-280,23,96,-242,100,107,3,158,-82,109,88,221,275,-10,-40,236,-10,-135,-178,49,184,-1,-10,-243,265,-11,109,-12,-9,237,-36,46,251,-233,86,-81,93,77,-171,-163,133,69,18,16,263,296,44,93,131,-12,-226,-89,-10,-201,-273,-10,-51,-240,-9,110,190,-12,192,-253,-11,-92,42,43,-258,-115,-11,238,168,99,-88,-285,-10,24,71,124,-158,298,-10,10,116,150,-24,-282,44,39],faces:[44,16,26,13,26,16,0,26,13,27,14,41,4,5,1,7,30,2,28,5,43,41,39,27,17,43,41,43,4,39,13,28,17,17,41,13,28,43,17,24,29,38,29,35,7,18,25,29,5,18,2,18,5,3,30,42,6,30,35,23,19,20,8,8,20,9,9,39,8,1,30,8,31,37,9,11,14,37,14,27,37,32,11,12,11,37,12,11,0,13,33,40,44,44,26,33,33,0,36,34,38,15,44,40,15,21,3,16,27,39,9,2,30,1,21,25,3,16,3,28,28,3,5,4,43,5,41,43,39,13,16,28,25,21,38,38,29,25,7,18,29,29,24,35,18,7,2,18,3,25,30,23,42,30,7,35,8,30,6,6,19,8,6,42,19,8,39,1,37,31,22,27,9,37,9,20,31,10,11,32,11,10,0,12,37,22,14,13,41,14,11,13,33,26,0,36,0,10,21,44,15,16,44,21,15,40,34,38,21,15,4,1,39,5,2,1]},{type:"mesh",vertices:[-101,102,57,99,35,102,40,72,80,59,14,-168,-186,22,45,-176,25,-30,66,-7,146,153,-7,53,-110,47,-96,-90,-8,-146,150,-7,-12,-200,-7,8,-173,-7,-55,55,46,-60,125,-7,110,136,30,-10,-149,58,68,-15,82,-71,98,-7,-86,-34,-6,-194,-33,-7,171,-36,65,137,38,-8,-192,-103,-9,147,-12,62,-152],faces:[2,17,0,17,8,0,17,24,8,19,24,22,5,11,4,2,13,17,17,13,24,21,23,20,1,2,21,7,15,1,7,10,15,5,9,12,15,18,13,0,5,16,0,8,5,1,15,2,10,18,15,3,13,18,24,3,22,11,23,4,4,16,5,16,4,23,24,13,3,15,13,2,6,1,21,6,21,20,6,14,1,2,0,21,1,14,7,3,18,22,8,24,19,8,19,9,12,11,5,5,8,9,16,23,21,16,21,0]},{type:"mesh",vertices:[86,55,-18,58,38,73,97,-12,79,135,7,10,-93,-11,-72,-133,5,33,13,68,-32,94,-11,-57,-90,52,53,-24,-11,-106,-13,-10,104,-75,49,-69,-12,18,114,49,-12,-96,-46,-11,-85,-119,-11,-26,48,5,-111,-58,-11,105,-117,-12,52,-5,35,-93,123,-11,7],faces:[5,8,11,2,3,1,8,1,6,11,8,6,6,19,11,10,12,17,20,7,3,3,7,16,16,0,3,16,9,19,14,4,9,15,18,5,5,11,15,18,17,5,19,0,16,1,3,0,0,6,1,19,6,0,12,8,17,2,1,12,12,10,2,1,8,12,3,2,20,16,13,9,16,7,13,19,4,11,15,11,4,17,8,5,9,4,19]}],torii:[{type:"mesh",mirror:!0,flatShading:!0,vertices:[692,966,-52,661,834,-52,692,966,52,661,834,52,0,894,-52,0,776,-52,0,894,52,0,776,52,518,935,52,345,913,52,170,899,52,162,779,52,328,790,52,494,808,52,170,899,-52,345,913,-52,518,935,-52,494,808,-52,328,790,-52,162,779,-52,0,618,16,0,697,16,0,618,-16,0,697,-16,586,618,16,586,697,16,586,618,-16,586,697,-16,331,-29,-75,331,766,-52,369,-29,-65,357,766,-45,396,-29,-37,377,766,-26,406,-29,0,384,766,0,396,-29,37,377,766,26,369,-29,65,357,766,45,331,-29,75,331,766,52,294,-29,65,305,766,45,267,-29,37,286,766,26,257,-29,0,279,766,0,267,-29,-37,286,766,-26,294,-29,-65,305,766,-45,0,777,85,0,681,33,333,762,-75,333,806,-75,371,762,-65,371,806,-65,398,762,-37,398,806,-37,408,762,0,408,806,0,398,762,37,398,806,37,371,762,65,371,806,65,333,762,75,333,806,75,296,762,65,296,806,65,268,762,37,268,806,37,258,762,0,258,806,0,268,762,-37,268,806,-37,296,762,-65,296,806,-65,0,681,-33,0,777,-85,52,681,33,52,777,85,52,681,-33,52,777,-85],faces:[4,10,14,1,13,17,11,6,7,0,3,1,16,1,17,4,19,5,14,18,19,15,17,18,3,8,13,13,9,12,12,10,11,19,7,5,19,12,11,18,13,12,16,2,0,15,8,16,14,9,15,23,26,22,27,24,26,25,20,24,26,20,22,23,25,27,29,30,28,31,32,30,33,34,32,35,36,34,37,38,36,39,40,38,41,42,40,43,44,42,45,46,44,47,48,46,49,50,48,51,28,50,55,56,54,57,58,56,59,60,58,61,62,60,63,64,62,79,81,83,65,66,64,82,53,78,67,68,66,81,53,80,69,70,68,83,80,82,71,72,70,79,82,78,73,74,72,75,63,59,75,76,74,77,54,76,60,68,76,4,6,10,1,3,13,11,10,6,0,2,3,16,0,1,4,14,19,14,15,18,15,16,17,3,2,8,13,8,9,12,9,10,19,11,7,19,18,12,18,17,13,16,8,2,15,9,8,14,10,9,23,27,26,27,25,24,25,21,20,26,24,20,23,21,25,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,29,28,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,79,52,81,65,67,66,82,80,53,67,69,68,81,52,53,69,71,70,83,81,80,71,73,72,79,83,82,73,75,74,59,57,55,55,77,75,75,73,71,71,69,75,67,65,63,63,61,59,59,55,75,75,69,67,67,63,75,75,77,76,77,55,54,76,54,56,56,58,76,60,62,68,64,66,68,68,70,72,72,74,68,76,58,60,62,64,68,68,74,76]}],hexagons:[{type:"extrude",vertices:[-.198,-.302,.197,-.3,.372,0,.199,.298,-.202,.298,-.368,0]}],towers:[{type:"extrude",vertices:[-.054,-.178,-.007,-.182,.069,-.027,.189,.079,.178,.124,-.007,.097,-.145,.182,-.178,.144,-.079,-.021]},{type:"lathe",segments:4,vertices:[.004,.02,.012,.092,.042,.166,.067,.55,.101,.594,.105,.838,.193,.934,.18,.994]},{type:"lathe",segments:5,vertices:[.069,.216,.067,.562,.126,.562,.128,.774,.191,.774,.193,.986]}],trees:[{type:"lathe",noise:.015,segments:6,vertices:[1e-6,.826,.054,.832,.105,.854,.136,.9,.136,.958,.118,.994]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.01,.069,.022,.13,.068,.178,.18,.189,.32,.191,.59,.193,.75,.138,.79,.018,.808,.018,.996]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.436,.126,.46,.201,.57,.219,.72,.154,.846,.028,.884,.034,.996]}],apparatus:[{type:"lathe",segments:10,vertices:[1e-6,.23,.042,.23,.069,.36,.038,.362,.038,.372,.06,.372,.073,.572,.024,.572,.024,.67,.069,.67,.075,.722,.097,.724,.105,.852,.083,.902,.065,.902,.065,.924,.128,.924,.146,.996]},{type:"lathe",segments:16,vertices:[1e-6,.232,.229,.182,.486,.07,.356,.182,.213,.242,.154,.242,.144,.262,.178,.262,.126,.314,.04,.328,.038,.374,.058,.374,.071,.408,.026,.406,.03,.42,.091,.418,.034,.496,.01,.498,.03,.506,.014,.998]}],mushrooms:[{type:"lathe",noise:.02,segments:14,vertices:[1e-6,.006,.13,.018,.341,.084,.437,.144,.492,.234,.484,.246,.276,.232,.107,.284,.046,.346,.062,.852,.097,.956,.166,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.562,.091,.572,.172,.61,.223,.666,.256,.74,.258,.806,.246,.824,.062,.826,.065,.948,.097,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.768,.099,.772,.219,.802,.306,.844,.352,.886,.352,.908,.118,.904,.107,.93,.115,.966,.14,.996]}]};for(var n in this.assets)for(var i=0;i<this.assets[n].length;i++){var o=this.assets[n][i];if(o.type=="mesh")for(var a=0,c=o.vertices.length;a<c;a++)o.vertices[a]/=1e3}this.userFog=this.el.sceneEl.getAttribute("fog"),this.sky=document.createElement("a-sky"),this.sky.setAttribute("radius",this.STAGE_SIZE),this.sky.setAttribute("theta-length",110),this.sky.classList.add("environment"),this.stars=null,this.groundMaterial=null,this.ground=document.createElement("a-entity"),this.ground.setAttribute("rotation","-90 0 0"),this.ground.classList.add("environmentGround"),this.ground.classList.add("environment"),this.groundCanvas=null,this.groundTexture=null,this.groundMaterial=null,this.groundGeometry=null,this.dressing=document.createElement("a-entity"),this.dressing.classList.add("environmentDressing"),this.dressing.classList.add("environment"),this.gridCanvas=null,this.gridTexture=null,this.hemilight=document.createElement("a-entity"),this.hemilight.classList.add("environment"),this.hemilight.setAttribute("position","0 50 0"),this.hemilight.setAttribute("light",{type:"hemisphere",color:"#CEE4F0",intensity:.4}),this.sunlight=document.createElement("a-entity"),this.sunlight.classList.add("environment"),this.sunlight.setAttribute("position",this.data.lightPosition),this.sunlight.setAttribute("light",{intensity:.6}),this.el.appendChild(this.hemilight),this.el.appendChild(this.sunlight),this.el.appendChild(this.ground),this.el.appendChild(this.dressing),this.el.appendChild(this.sky)},getFogColor:function(n,i){var o;if(n=="color"||n=="none")o=new THREE.Color(this.environmentData.skyColor);else if(n=="gradient")o=new THREE.Color(this.environmentData.horizonColor);else if(n=="atmosphere"){var a=[1,.5,.22,.1,.05,0],c=["#C0CDCF","#81ADC5","#525e62","#2a2d2d","#141616","#000"];if(i<=0)return"#000";i=Math.min(1,i);for(var d=0;d<a.length;d++)if(i>a[d]){var h=new THREE.Color(c[d-1]),u=new THREE.Color(c[d]),g=(i-a[d])/(a[d-1]-a[d]);u.lerp(h,g),o=u;break}}return o.multiplyScalar(.9),o.lerp(new THREE.Color(this.data.groundColor),.3),"#"+o.getHexString()},update:function(n){var i;this.data.preset?(i=be.utils.clone(this.environmentData),this.environmentData={},Object.assign(this.environmentData,this.data),Object.assign(this.environmentData,this.presets[this.data.preset]),Object.assign(this.environmentData,this.el.components.environment.attrValue)):(i=n,this.environmentData=this.data);var o=this.environmentData.background;o!=null&&this.sky.setAttribute("src",o);var a=this.environmentData.skyType,c=new THREE.Vector3(this.environmentData.lightPosition.x,this.environmentData.lightPosition.y,this.environmentData.lightPosition.z);if(c.normalize(),this.sunlight){if(this.sunlight.setAttribute("position",this.environmentData.lightPosition),a!="atmosphere"){var d=new THREE.Color(this.environmentData.skyColor);d.r=(d.r+1)/2,d.g=(d.g+1)/2,d.b=(d.b+1)/2,this.hemilight.setAttribute("light",{color:"#"+d.getHexString()}),this.sunlight.setAttribute("light",{intensity:.6}),this.hemilight.setAttribute("light",{intensity:.6})}else this.sunlight.setAttribute("light",{intensity:.1+.5*c.y}),this.hemilight.setAttribute("light",{intensity:.1+.5*c.y});this.sunlight.setAttribute("light",{castShadow:this.environmentData.shadow,shadowCameraLeft:-this.environmentData.shadowSize,shadowCameraBottom:-this.environmentData.shadowSize,shadowCameraRight:this.environmentData.shadowSize,shadowCameraTop:this.environmentData.shadowSize})}if(a!==i.skyType||this.environmentData.skyColor!=i.skyColor||this.environmentData.horizonColor!=i.horizonColor){var h={};h.shader={none:"flat",color:"flat",gradient:"gradientshader",atmosphere:"skyshader"}[a],this.stars&&this.stars.setAttribute("visible",a=="atmosphere"),a=="color"?(h.color=this.environmentData.skyColor,h.fog=!1):a=="gradient"&&(h.topColor=this.environmentData.skyColor,h.bottomColor=this.environmentData.horizonColor),this.sky.setAttribute("material",h)}a=="atmosphere"&&(this.sky.setAttribute("material",{sunPosition:c}),this.setStars(2e3*(1-Math.max(0,8*(c.y+.08))))),this.environmentData.fog>0?this.el.sceneEl.setAttribute("fog",{color:this.getFogColor(a,c.y),far:(1.01-this.environmentData.fog)*this.STAGE_SIZE*2}):this.el.sceneEl.removeAttribute("fog"),this.sunlight.setAttribute("light",{type:this.environmentData.lighting=="point"?"point":"directional"}),this.sunlight.setAttribute("visible",this.environmentData.lighting!=="none"),this.hemilight.setAttribute("visible",this.environmentData.lighting!=="none");var u=!this.groundGeometry||this.environmentData.seed!=i.seed||this.environmentData.ground!=i.ground||this.environmentData.playArea!=i.playArea||this.environmentData.flatShading!=i.flatShading;(u||this.environmentData.groundColor!=i.groundColor||this.environmentData.groundColor2!=i.groundColor2||this.environmentData.groundYScale!=i.groundYScale||this.environmentData.groundTexture!=i.groundTexture||this.environmentData.gridColor!=i.gridColor||this.environmentData.grid!=i.grid)&&(this.updateGround(u),this.hemilight&&this.hemilight.setAttribute("light",{groundColor:this.environmentData.groundColor})),this.environmentData.seed==i.seed&&this.environmentData.dressingOnPlayArea==i.dressingOnPlayArea&&this.environmentData.dressing==i.dressing&&this.environmentData.flatShading==i.flatShading&&this.environmentData.dressingAmount==i.dressingAmount&&this.environmentData.dressingScale==i.dressingScale&&this.environmentData.dressingColor==i.dressingColor&&this.environmentData.dressingVariance.x==i.dressingVariance.x&&this.environmentData.dressingVariance.y==i.dressingVariance.y&&this.environmentData.dressingVariance.z==i.dressingVariance.z&&this.environmentData.dressingUniformScale==i.dressingUniformScale||this.updateDressing(),this.sky.setAttribute("visible",a!=="none"),this.el.setAttribute("visible",this.environmentData.active),this.environmentData.active||(this.userFog?this.el.sceneEl.setAttribute("fog",this.userFog):this.el.sceneEl.removeAttribute("fog")),this.dumpParametersDiff()},logPreset:function(){var n="{";for(var i in this.schema)if(i!="preset"){n+=i+": ";var o=this.schema[i].type;n+=o=="vec3"?"{ x: "+this.environmentData[i].x+", y: "+this.environmentData[i].y+", z: "+this.environmentData[i].z+"}":o=="string"||o=="color"?'"'+this.environmentData[i]+'"':this.environmentData[i],n+=", "}n+="}",console.log(n)},dumpParametersDiff:function(){function n(g){return Math.floor(1e3*g)/1e3}var i=[],o=this.data.preset!="none"&&this.presets[this.data.preset];o&&i.push("preset: "+this.data.preset);for(var a in this.schema)if(!(a=="preset"||o&&o[a]===void 0)){var c=o?o[a]:this.schema[a].default,d=this.environmentData[a],h=this.schema[a].type;if(h=="vec3"){var u=c;typeof c=="string"&&(c=c.split(" "),u={x:c[0],y:c[1],z:c[2]}),n(u.x)==n(d.x)&&n(u.y)==n(d.y)&&n(u.z)==n(d.z)||i.push(a+": "+n(d.x)+" "+n(d.y)+" "+n(d.z))}else c!=d&&(this.schema[a].type=="number"&&(d=n(d)),i.push(a+": "+d))}},random:function(n){return parseFloat("0."+Math.sin(9999*this.environmentData.seed*n).toString().substr(7))},updateGround:function(n){var i=64;if(n){var o=this.environmentData.ground!="none";if(this.ground.setAttribute("visible",o),!o)return;this.groundGeometry||(this.groundGeometry=new THREE.PlaneGeometry(this.STAGE_SIZE+2,this.STAGE_SIZE+2,i-1,i-1));for(var a=new t(this.environmentData.seed),c=this.groundGeometry.attributes.position.array,d=c.length,h=10,u=h/i,g=0,E=0,P=2;P<d;P+=3)if(this.environmentData.ground!="flat"){var A;switch(this.environmentData.ground){case"hills":A=Math.max(0,a.noise(g,E,0));break;case"canyon":A=.2+.8*a.noise(g,E,0),A=Math.min(1,10*Math.pow(A,2));break;case"spikes":A=this.random(P)<.02?this.random(P+1):0;break;case"noise":A=this.random(P)<.35?this.random(P+1):0}A+=.1*this.random(P+2);var S=2*g/h-1,y=2*E/h-1,_=this.environmentData.playArea;S=Math.max(0,Math.min(1,(Math.abs(S)-(_-.9))*(1/_))),y=Math.max(0,Math.min(1,(Math.abs(y)-(_-.9))*(1/_))),A*=S>y?S:y,A<.01&&(A=0),c[P]=A,g+=u,g>=10&&(g=0,E+=u)}else c[P]=0;this.groundGeometry.computeVertexNormals(),this.groundGeometry.attributes.position.needsUpdate=!0,this.groundGeometry.attributes.normal.needsUpdate=!0}this.ground.setAttribute("scale",{z:this.environmentData.groundYScale});var C=2048,$=20,D=this.STAGE_SIZE/$;this.groundCanvas&&this.groundCanvas.width==C||(this.gridCanvas=document.createElement("canvas"),this.gridCanvas.width=C,this.gridCanvas.height=C,this.gridTexture=new THREE.Texture(this.gridCanvas),this.gridTexture.wrapS=THREE.RepeatWrapping,this.gridTexture.wrapT=THREE.RepeatWrapping,this.gridTexture.repeat.set(D,D),this.groundCanvas=document.createElement("canvas"),this.groundCanvas.width=C,this.groundCanvas.height=C,this.groundTexture=new THREE.Texture(this.groundCanvas),this.groundTexture.wrapS=THREE.RepeatWrapping,this.groundTexture.wrapT=THREE.RepeatWrapping,this.groundTexture.repeat.set(D,D),this.groundMaterialProps={map:this.groundTexture,emissive:new THREE.Color(16777215),emissiveMap:this.gridTexture},new THREE.Material().hasOwnProperty("shading")?this.groundMaterialProps.shading=this.environmentData.flatShading?THREE.FlatShading:THREE.SmoothShading:this.groundMaterialProps.flatShading=this.environmentData.flatShading,this.groundMaterial=new THREE.MeshLambertMaterial(this.groundMaterialProps));var b=this.groundCanvas.getContext("2d"),G=this.gridCanvas.getContext("2d");if(this.drawTexture(b,C,$),G.fillStyle="#000000",G.fillRect(0,0,C,C),this.drawGrid(G,C,$),this.groundTexture.needsUpdate=!0,this.gridTexture.needsUpdate=!0,n){var O=new THREE.Mesh(this.groundGeometry,this.groundMaterial);this.ground.setObject3D("mesh",O)}else this.ground.getObject3D("mesh").material=this.groundMaterial;this.ground.setAttribute("shadow",{cast:!1,receive:this.environmentData.shadow})},drawGrid:function(n,i,o){if(this.environmentData.grid!="none"){var a,c,d,h=Math.floor(o/2),u=i/(o/2);switch(n.fillStyle=this.environmentData.gridColor,this.environmentData.grid){case"1x1":case"2x2":for(this.environmentData.grid=="1x1"&&(h*=2,u=i/o),a=0;a<h;a++)d=Math.floor(a*u),n.fillRect(0,d,i,1),n.fillRect(d,0,1,i);break;case"crosses":var g=Math.floor(u/20);for(a=0;a<h+1;a++)for(d=Math.floor(a*u),c=0;c<h+1;c++){var E=Math.floor(-g+c*u);n.fillRect(E,d,2*g,1),n.fillRect(d,E,1,2*g)}break;case"dots":for(a=0;a<h+1;a++)for(c=0;c<h+1;c++)n.beginPath(),n.arc(Math.floor(c*u),Math.floor(a*u),4,0,2*Math.PI),n.fill();break;case"xlines":for(a=0;a<h;a++)n.fillRect(Math.floor(a*u),0,1,i);break;case"ylines":for(a=0;a<h;a++)n.fillRect(0,Math.floor(a*u),i,1)}}},drawTexture:function(n,i,o){n.fillStyle=this.environmentData.groundColor,n.fillRect(0,0,i,i);var a,c,d,h,u,g,E;if(this.environmentData.groundTexture!="none")switch(this.environmentData.groundTexture){case"checkerboard":n.fillStyle=this.environmentData.groundColor2;var P=Math.floor(o/2),A=i/(o/2);for(a=0;a<P+1;a+=2)for(var S=0;S<P+1;S++)n.fillRect(Math.floor((a+S%2)*A),Math.floor(S*A),Math.floor(A),Math.floor(A));break;case"squares":var y=16,_=i/y;for(d=new THREE.Color(this.environmentData.groundColor),h=new THREE.Color(this.environmentData.groundColor2),a=0;a<y*y;a++)c=this.random(a+3)>.5?d.clone():h.clone(),c.addScalar(.1*this.random(a+3)-.05),n.fillStyle="#"+c.getHexString(),n.fillRect(a%y*_,Math.floor(a/y)*_,_,_);break;case"noise":g=n.getImageData(0,0,i,i),u=g.data,d=new THREE.Color(this.environmentData.groundColor),h=new THREE.Color(this.environmentData.groundColor2);var C=new THREE.Color(h.r-d.r,h.g-d.g,h.b-d.b),$=new t;for(a=0,S=0,E=u.length;a<E;a+=4,S++){var D=$.noise(S%i/i*3,S/i/i*3,0);u[a+0]=Math.floor(255*(d.r+C.r*D)),u[a+1]=Math.floor(255*(d.g+C.g*D)),u[a+2]=Math.floor(255*(d.b+C.b*D))}n.putImageData(g,0,0);break;case"walkernoise":var b=Math.floor(i/2),G=document.createElement("canvas");G.width=b,G.height=b;var O=G.getContext("2d");O.fillStyle=this.environmentData.groundColor,O.fillRect(0,0,b,b),g=O.getImageData(0,0,b,b),u=g.data,d=new THREE.Color(this.environmentData.groundColor),h=new THREE.Color(this.environmentData.groundColor2);var I=[],X=1e3;for(a=0;a<X;a++)c=d.clone().lerp(h,Math.random()),I.push({x:Math.random()*b,y:Math.random()*b,r:Math.floor(255*c.r),g:Math.floor(255*c.g),b:Math.floor(255*c.b)});for(var T=5e3,ee=0;ee<T;ee++)for(a=0;a<X;a++){var F=I[a],N=4*Math.floor(F.y*b+F.x);u[N+0]=F.r,u[N+1]=F.g,u[N+2]=F.b,F.x+=Math.floor(3*Math.random())-1,F.y+=Math.floor(3*Math.random())-1,F.x>=b&&(F.x=F.x-b),F.y>=b&&(F.y=F.y-b),F.x<0&&(F.x=b+F.x),F.y<0&&(F.y=b+F.y)}O.putImageData(g,0,0),n.drawImage(G,0,0,i,i)}},getAssetGeometry:function(n){function i(_,C){for(var $=(new THREE.Vector3,_.attributes.position.array),D=$.length,b=0;b<D;b+=3)$[b]=(h.random(b)-.5)*C,$[b+1]=(h.random(b+D)-.5)*C,$[b+2]=(h.random(b+2*D)-.5)*C;_.attributes.position.needsUpdate=!0}if(!n)return null;for(var o,a,c,d=[],h=this,u=0;u<n.length;u++)if(n[u].type=="lathe"){var g=-99999,E=[];for(c=n[u].vertices,o=0;o<c.length;o+=2)E.push(new THREE.Vector2(c[o],c[o+1])),c[o+1]>g&&(g=c[o+1]);a=new THREE.LatheGeometry(E,n[u].segments||8),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI,0,0))),a.applyMatrix4(new THREE.Matrix4().makeTranslation(0,g,0)),a=a.toNonIndexed(),d.push(a)}else if(n[u].type=="extrude"){var P=new THREE.Shape;for(c=n[u].vertices,o=0;o<c.length;o+=2)o==0?P.moveTo(c[o],c[o+1]):P.lineTo(c[o],c[o+1]);a=new THREE.ExtrudeGeometry(P,{amount:1,bevelEnabled:!1}),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI/2,0,0))),n[u].noise&&i(a,n[u].noise),d.push(a)}else if(n[u].type=="mesh"){a=new THREE.BufferGeometry,c=n[u].vertices;var A=n[u].faces,S=new Float32Array(c);if(a.setIndex(A),a.setAttribute("position",new THREE.BufferAttribute(S,3)),n[u].mirror){var y=a.clone();y.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,Math.PI,0))),a=THREE.BufferGeometryUtils.mergeBufferGeometries([a,y])}n[u].noise&&i(a,n[u].noise),a=a.toNonIndexed(),a.computeVertexNormals(),d.push(a)}return d},updateDressing:function(){var n=new THREE.Object3D,i=[];if(this.dressing.setAttribute("visible",this.environmentData.dressing!="none"),this.environmentData.dressing!="none"){var o;switch(this.environmentData.dressing){case"cubes":o=[new THREE.BoxGeometry(1,1,1)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"pyramids":o=[new THREE.ConeGeometry(1,1,4,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"cylinders":o=[new THREE.CylinderGeometry(.5,.5,1,8,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;default:if(o=this.getAssetGeometry(this.assets[this.environmentData.dressing]),!o)return}for(var a=0,c=88343;a<this.environmentData.dressingAmount;a++,c++){var d,h=(o[Math.floor(this.random(33+a)*o.length)].clone,o[Math.floor(this.random(33+a)*o.length)].clone()),u=this.environmentData.dressingScale,g=new THREE.Vector3(this.environmentData.dressingVariance.x,this.environmentData.dressingVariance.y,this.environmentData.dressingVariance.z),E=this.random(c)<this.environmentData.dressingOnPlayArea;d=E?15*this.random(c+1):10+Math.max(g.x,g.z)+10*this.random(c+1)+this.random(c+2)*this.STAGE_SIZE/3;var P=this.random(c+3)*Math.PI*2,A=new THREE.Matrix4,S=this.random(c+4),y=this.environmentData.dressingUniformScale;A.compose(new THREE.Vector3(Math.cos(P)*d,0,Math.sin(P)*d),new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,1,0),(this.random(c+5)-.5)*g.length()*Math.PI*2),new THREE.Vector3(u+(y?S:this.random(c+6))*g.x,u+(y?S:this.random(c+7))*g.y,u+(y?S:this.random(c+8))*g.z)),h.applyMatrix4(A),i.push(h)}var _=THREE.BufferGeometryUtils.mergeBufferGeometries(i);_.attributes.position.needsUpdate=!0;var C=new THREE.MeshLambertMaterial({color:new THREE.Color(this.environmentData.dressingColor)}),$=new THREE.Mesh(_,C);n.add($),this.dressing.setObject3D("mesh",n)}},createStars:function(){for(var n=2e3,i=new THREE.BufferGeometry,o=new Float32Array(3*n),a=this.STAGE_SIZE-1,c=new THREE.Vector3,d=0;d<o.length;d+=3)c.set(this.random(d+23)-.5,this.random(d+24),this.random(d+25)-.5),c.normalize(),c.multiplyScalar(a),o[d]=c.x,o[d+1]=c.y,o[d+2]=c.z;i.setAttribute("position",new THREE.BufferAttribute(o,3)),i.setDrawRange(0,0);var h=new THREE.PointsMaterial({size:.01,color:13421772,fog:!1});this.stars.setObject3D("mesh",new THREE.Points(i,h))},setStars:function(n){this.stars||(this.stars=document.createElement("a-entity"),this.stars.id="stars",this.createStars(),this.el.appendChild(this.stars)),n=Math.floor(Math.min(2e3,Math.max(0,n))),this.stars.getObject3D("mesh").geometry.setDrawRange(0,n)}}),be.registerShader("skyshader",{schema:{luminance:{type:"number",default:1,min:0,max:2,is:"uniform"},turbidity:{type:"number",default:2,min:0,max:20,is:"uniform"},reileigh:{type:"number",default:1,min:0,max:4,is:"uniform"},mieCoefficient:{type:"number",default:.005,min:0,max:.1,is:"uniform"},mieDirectionalG:{type:"number",default:.8,min:0,max:1,is:"uniform"},sunPosition:{type:"vec3",default:{x:0,y:0,z:-1},is:"uniform"},color:{type:"color",default:"#fff"}},vertexShader:["varying vec3 vWorldPosition;","void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vWorldPosition = worldPosition.xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join(`
357
381
  `),fragmentShader:["uniform sampler2D skySampler;","uniform vec3 sunPosition;","varying vec3 vWorldPosition;","vec3 cameraPos = vec3(0., 0., 0.);","uniform float luminance;","uniform float turbidity;","uniform float reileigh;","uniform float mieCoefficient;","uniform float mieDirectionalG;","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float pn = 0.035;","const vec3 lambda = vec3(680E-9, 550E-9, 450E-9);","const vec3 K = vec3(0.686, 0.678, 0.666);","const float v = 4.0;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3(0.0, 1.0, 0.0);","const float EE = 1000.0;","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float cutoffAngle = pi/1.95;","const float steepness = 1.5;","vec3 totalRayleigh(vec3 lambda)","{","return (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn));","}","vec3 simplifiedRayleigh()","{","return 0.0005 / vec3(94, 40, 18);","}","float rayleighPhase(float cosTheta)","{ ","return (3.0 / (16.0*pi)) * (1.0 + pow(cosTheta, 2.0));","}","vec3 totalMie(vec3 lambda, vec3 K, float T)","{","float c = (0.2 * T ) * 10E-18;","return 0.434 * c * pi * pow((2.0 * pi) / lambda, vec3(v - 2.0)) * K;","}","float hgPhase(float cosTheta, float g)","{","return (1.0 / (4.0*pi)) * ((1.0 - pow(g, 2.0)) / pow(1.0 - 2.0*g*cosTheta + pow(g, 2.0), 1.5));","}","float sunIntensity(float zenithAngleCos)","{","return EE * max(0.0, 1.0 - exp(-((cutoffAngle - acos(zenithAngleCos))/steepness)));","}","// Filmic ToneMapping http://filmicgames.com/archives/75","float A = 0.15;","float B = 0.50;","float C = 0.10;","float D = 0.20;","float E = 0.02;","float F = 0.30;","float W = 1000.0;","vec3 Uncharted2Tonemap(vec3 x)","{","return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;","}","void main() ","{","float sunfade = 1.0-clamp(1.0-exp((sunPosition.y/450000.0)),0.0,1.0);","float reileighCoefficient = reileigh - (1.0* (1.0-sunfade));","vec3 sunDirection = normalize(sunPosition);","float sunE = sunIntensity(dot(sunDirection, up));","vec3 betaR = simplifiedRayleigh() * reileighCoefficient;","vec3 betaM = totalMie(lambda, K, turbidity) * mieCoefficient;","float zenithAngle = acos(max(0.0, dot(up, normalize(vWorldPosition - cameraPos))));","float sR = rayleighZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","float sM = mieZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","vec3 Fex = exp(-(betaR * sR + betaM * sM));","float cosTheta = dot(normalize(vWorldPosition - cameraPos), sunDirection);","float rPhase = rayleighPhase(cosTheta*0.5+0.5);","vec3 betaRTheta = betaR * rPhase;","float mPhase = hgPhase(cosTheta, mieDirectionalG);","vec3 betaMTheta = betaM * mPhase;","vec3 Lin = pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * (1.0 - Fex),vec3(1.5));","Lin *= mix(vec3(1.0),pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * Fex,vec3(1.0/2.0)),clamp(pow(1.0-dot(up, sunDirection),5.0),0.0,1.0));","vec3 direction = normalize(vWorldPosition - cameraPos);","float theta = acos(direction.y); // elevation --> y-axis, [-pi/2, pi/2]","float phi = atan(direction.z, direction.x); // azimuth --> x-axis [-pi/2, pi/2]","vec2 uv = vec2(phi, theta) / vec2(2.0*pi, pi) + vec2(0.5, 0.0);","vec3 L0 = vec3(0.1) * Fex;","float sundisk = smoothstep(sunAngularDiameterCos,sunAngularDiameterCos+0.00002,cosTheta);","L0 += (sunE * 19000.0 * Fex)*sundisk;","vec3 whiteScale = 1.0/Uncharted2Tonemap(vec3(W));","vec3 texColor = (Lin+L0); ","texColor *= 0.04 ;","texColor += vec3(0.0,0.001,0.0025)*0.3;","float g_fMaxLuminance = 1.0;","float fLumScaled = 0.1 / luminance; ","float fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (g_fMaxLuminance * g_fMaxLuminance)))) / (1.0 + fLumScaled); ","float ExposureBias = fLumCompressed;","vec3 curr = Uncharted2Tonemap((log2(2.0/pow(luminance,4.0)))*texColor);","vec3 color = curr*whiteScale;","vec3 retColor = pow(color,vec3(1.0/(1.2+(1.2*sunfade))));","gl_FragColor.rgb = retColor;","gl_FragColor.a = 1.0;","}"].join(`
358
- `)}),he.registerShader("gradientshader",{schema:{topColor:{type:"color",default:"1 0 0",is:"uniform"},bottomColor:{type:"color",default:"0 0 1",is:"uniform"}},vertexShader:["varying vec3 vWorldPosition;","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0 );","}"].join(`
382
+ `)}),be.registerShader("gradientshader",{schema:{topColor:{type:"color",default:"1 0 0",is:"uniform"},bottomColor:{type:"color",default:"0 0 1",is:"uniform"}},vertexShader:["varying vec3 vWorldPosition;","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0 );","}"].join(`
359
383
  `),fragmentShader:["uniform vec3 bottomColor;","uniform vec3 topColor;","uniform float offset;","varying vec3 vWorldPosition;","void main() {"," float h = normalize( vWorldPosition ).y;"," gl_FragColor = vec4( mix( bottomColor, topColor, max( pow( max(h, 0.0 ), 0.8 ), 0.0 ) ), 1.0 );","}"].join(`
360
- `)});var t=function(i){var n;this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.p=[];var o;for(o=0;o<256;o++)n=parseFloat("0."+Math.sin(9999*i*o).toString().substr(7)),this.p[o]=Math.floor(256*n);for(this.perm=[],o=0;o<512;o++)this.perm[o]=this.p[255&o]};t.prototype.dot=function(i,n,o,a){return i[0]*n+i[1]*o+i[2]*a},t.prototype.mix=function(i,n,o){return(1-o)*i+o*n},t.prototype.fade=function(i){return i*i*i*(i*(6*i-15)+10)},t.prototype.noise=function(i,n,o){var a=Math.floor(i),l=Math.floor(n),u=Math.floor(o);i-=a,n-=l,o-=u,a&=255,l&=255,u&=255;var d=this.perm[a+this.perm[l+this.perm[u]]]%12,c=this.perm[a+this.perm[l+this.perm[u+1]]]%12,x=this.perm[a+this.perm[l+1+this.perm[u]]]%12,k=this.perm[a+this.perm[l+1+this.perm[u+1]]]%12,A=this.perm[a+1+this.perm[l+this.perm[u]]]%12,b=this.perm[a+1+this.perm[l+this.perm[u+1]]]%12,w=this.perm[a+1+this.perm[l+1+this.perm[u]]]%12,y=this.perm[a+1+this.perm[l+1+this.perm[u+1]]]%12,_=this.dot(this.grad3[d],i,n,o),C=this.dot(this.grad3[A],i-1,n,o),m=this.dot(this.grad3[x],i,n-1,o),T=this.dot(this.grad3[w],i-1,n-1,o),g=this.dot(this.grad3[c],i,n,o-1),X=this.dot(this.grad3[b],i-1,n,o-1),R=this.dot(this.grad3[k],i,n-1,o-1),P=this.dot(this.grad3[y],i-1,n-1,o-1),Y=this.fade(i),se=this.fade(n),G=this.fade(o),I=this.mix(_,C,Y),W=this.mix(g,X,Y),Q=this.mix(m,T,Y),U=this.mix(R,P,Y),V=this.mix(I,Q,se),fe=this.mix(W,U,se),de=this.mix(V,fe,G);return de}}]);function os(r){const e=(r==null?void 0:r.scene)||"labs";return h.jsx(v.Fragment,{children:h.jsx("a-entity",{environment:`preset: ${e};`})})}const Qi={histogram:{description:"test2 description",properties:{theme:{type:"select",options:["def","fire","nebula","rainforest","nature","water","sunflower","blood","magma","jupiter","magic"],description:"second input"},range:{type:"select",options:[4,5,6,7,8,9,10,11,12,13,14,20,30,40,50,100]},scale:{name:"scale",type:"todo",step:1,description:"input"}}},scene:{description:"test2 description",properties:{scene:{name:"scene",type:"select",options:["ndmvr","govorun","cern","default","labs","labs2","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow","bow","winter"],description:"second input"}}}},en=window.AFRAME,ss=()=>{let r;const[e,t]=v.useState(!0),[i,n]=v.useState(en.utils.device.checkHeadsetConnected()?"oculus":"keyboard"),o=a=>{a.changeTabletState&&t(!1)};return v.useEffect(()=>(r=ye.subscribe(o),()=>{r.unsubscribe()}),[]),h.jsxs("a-entity",{children:[e&&i==="keyboard"&&h.jsx("a-entity",{text:"value: Press T to open NDMVR Tablet;color:black;",position:"0.2 0.8 -1"}),!en.utils.device.checkHeadsetConnected()&&h.jsx("a-entity",{cursor:"fuse: false; fuseTimeout: 2000;",raycaster:"objects: .clickable; showLine: false; far: 100;",animation__click:"property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1.4 1.4 1.4; dur: 150",animation__mouseenter:"property: scale; startEvents: mouseenter; from: 1 1 1; to: 1.4 1.4 1.4; dur: 180",animation__mouseleave:"property: scale; startEvents: mouseleave; from: 1.4 1.4 1.4; to: 1 1 1; dur: 180",line:"color: orange; opacity: 0.5",far:"100",position:"0 0 -1",geometry:"primitive: ring; radiusInner: 0.02; radiusOuter: 0.03",material:"color: white; shader: flat"})]})},as=({cameraTransformation:r=null,savePosition:e=null})=>{const[t,i]=v.useState(us(cs(r)));return v.useEffect(()=>{var o,a,l,u;const n=document.getElementById("camera");(o=n.components["look-controls"])==null||o.pitchObject.rotation.set(-.9,0,0),(a=n.components["look-controls"])==null||a.yawObject.rotation.set(0,3.14159265,0),t.rotation.x&&((l=n.components["look-controls"])==null||l.pitchObject.rotation.set(t.rotation.x,0,0)),t.rotation.y&&((u=n.components["look-controls"])==null||u.yawObject.rotation.set(0,t.rotation.y,0))},[]),v.useLayoutEffect(()=>()=>{e&&e(ls())},[]),h.jsx("a-entity",{id:"cameraRig",position:t.position,children:h.jsx("a-camera",{id:"camera","look-control":!0,"wasd-controls-enabled":"acceleration:=50",children:h.jsx(ss,{})})})};function ls(){const r=document.getElementById("camera"),e=document.getElementById("cameraRig");return{position:{x:r.object3D.position.x+e.object3D.position.x,y:r.object3D.position.y+e.object3D.position.y,z:r.object3D.position.z+e.object3D.position.z},rotation:{x:r.object3D.rotation.x+e.object3D.rotation.x,y:r.object3D.rotation.y+e.object3D.rotation.y,z:r.object3D.rotation.z+e.object3D.rotation.z}}}function cs(r){if(console.log("dojde"),r&&r.position.x)return r;const e=pt._currentValue,t=1;return{position:{x:((e.data.histogram.fXaxis.fNbins-1)*t*(-2*t)-t*3/4)/2,y:5+e.data.histogram.fYaxis.fNbins,z:-4},rotation:{x:0,y:0,z:0}}}function us(r){return r.position=r.position.x+" "+r.position.y+" "+r.position.z,r}const sr=v.createContext(null),ar=(r="",e="zmq2ws")=>{const[t,i]=v.useState({}),n=v.useContext(sr)[e];return v.useLayoutEffect(()=>{if(n===null)return;const o=n.subscribeIn(i,r);return()=>o.unsubscribe()},[n]),t};v.createContext(null);const ds=({position:r,rotation:e,id:t,color:i,masterId:n})=>{v.useEffect(()=>{const a=document.getElementById(t),l=new Ct.Quaternion().fromArray(e),u=new Ct.Euler().setFromQuaternion(l,"YXZ"),d={x:Ct.MathUtils.radToDeg(u.x),y:Ct.MathUtils.radToDeg(u.y),z:-Ct.MathUtils.radToDeg(u.z)};a.setAttribute("rotation",d)},[e]);const o=()=>h.jsxs("a-entity",{position:"0 0.25 0",children:[h.jsx("a-cone",{color:"gold","radius-bottom":"0.5","radius-top":"0.1",height:"0.8",position:"0 0.4 0"}),h.jsx("a-sphere",{color:i,radius:"0.05",position:"0 0.4 -0.3"}),h.jsx("a-sphere",{color:i,radius:"0.05",position:"0 0.6 -0.2"})]});return h.jsxs("a-entity",{position:r,id:t,children:[h.jsx("a-sphere",{radius:"0.5",color:"#F8DF87",children:n===t?o():h.jsx(h.Fragment,{})}),h.jsx("a-entity",{position:"0.2 0.15 -0.45",children:h.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:h.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),h.jsx("a-entity",{position:"-0.2 0.15 -0.45",children:h.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:h.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),h.jsx("a-cylinder",{height:"0.05",radius:"0.05",color:"#FF6B6B",position:"0 -0.25 -0.4",rotation:"0 90 90"}),h.jsx("a-sphere",{radius:"0.1",color:"#FF6B6B",position:"0 -0.1 -0.5"}),h.jsx("a-cylinder",{height:"0.8",radius:"0.3",color:i,position:"0 -0.6 0"}),h.jsxs("a-entity",{position:"-0.4 -0.4 0",children:[h.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),h.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),h.jsxs("a-entity",{position:"0.4 -0.4 0",children:[h.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),h.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),h.jsxs("a-entity",{position:"-0.15 -1 0",children:[h.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:i,position:"0 -0.4 0"}),h.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]}),h.jsxs("a-entity",{position:"0.15 -1 0",children:[h.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:i,position:"0 -0.4 0"}),h.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]})]})},hs=109,fs=({wssb:r="shared"})=>{const e=v.useContext(sr)[r],{histogram:t}=v.useContext(pt).data,i=n=>{switch(n.keyCode){case hs:e.send({type:"assign_master",payload:{}}),e.send({type:"histogram",payload:JSON.stringify(wt.toJSON(t))})}};return v.useEffect(()=>(window.addEventListener("keypress",i),()=>{window.removeEventListener("keypress",i)}),[]),h.jsx(h.Fragment,{})},ps=105,ms=106,gs=107,ys=108,xs=117,bs=111,tn=new Map([[ps,"X_UP"],[gs,"X_DOWN"],[ys,"Y_UP"],[ms,"Y_DOWN"],[xs,"Z_UP"],[bs,"Z_DOWN"]]),rn=r=>{switch(r){case"X_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"I"}));break;case"X_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"K"}));break;case"Y_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"L"}));break;case"Y_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"J"}));break;case"Z_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"U"}));break;case"Z_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"O"}));break}},vs=({wssb:r="shared"})=>{const e=v.useContext(sr)[r],t=ar("axisScalingLatest",r),i=ar("axisScaling",r),n=o=>{if(!tn.has(o.keyCode))return;let a=tn.get(o.keyCode);e.send({type:"axis_scaling_latest",payload:{axis:a}})};return v.useEffect(()=>{i.payload!==void 0&&Object.keys(i.payload.axisMap).forEach(o=>{for(let a=0;a<i.payload.axisMap[o];a++)rn(o)})},[i.payload]),v.useEffect(()=>{t.payload!==void 0&&rn(t.payload.latestAxis)},[t.payload]),v.useEffect(()=>(window.addEventListener("keypress",n),()=>{window.removeEventListener("keypress",n)}),[]),h.jsx("div",{})},Ss=({wssb:r="shared"})=>{const[e,t]=v.useState(0),i=v.useContext(sr)[r];return v.useEffect(()=>{const n=document.getElementById("camera"),o=new Ct.Vector3,a=new Ct.Quaternion;n.object3D.getWorldPosition(o);const l=setInterval(()=>{n.object3D.getWorldPosition(o),n.object3D.getWorldQuaternion(a),i.send({type:"move",payload:{position:o.toArray(),rotation:a.toArray()}}),t(u=>u+1)},100);return()=>clearInterval(l)},[e]),h.jsxs("a-entity",{children:[h.jsx(fs,{}),h.jsx(vs,{})]})},ws=({wssb:r="shared"})=>{v.useContext(sr)[r];const e=ar("move",r),t=ar("ws",r),i=ar("master",r),[n,o]=v.useState([]),[a,l]=v.useState(null),[u,d]=v.useState("");return v.useEffect(()=>{e.payload!==void 0&&(e.payload.clients.length>0?o(e.payload.clients):o([]))},[e.payload]),v.useEffect(()=>{t.payload!==void 0&&d(t.payload.id)},[t.payload]),v.useEffect(()=>{i.payload!==void 0&&l(i.payload.master)},[i.payload]),h.jsxs("a-entity",{children:[h.jsx(Ss,{}),n.filter(c=>c.id!==u).map((c,x)=>{const k=c.position,A=c.rotation,b=k.join(" ");return h.jsx(ds,{id:c.id,position:b,rotation:A,masterId:a,color:c.color},x+c.id)})]})},Cs=({startPosition:r})=>{const e=v.useContext(pt),t=2;let i=1;const n="color: white;",o="1.0",a=r||{x:0,y:0,z:0};let[l,u]=v.useState(d());return v.useEffect(()=>{u(d)},[e]),h.jsxs("a-entity",{children:[h.jsx("a-box",{position:`${a.x+l.xCenter} ${a.z} ${a.y-l.yStart}`,width:`${l.xWidth*t}`,height:"0.1",depth:"0.25",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xStart} ${a.z} ${a.y-l.yCenter}`,width:`${l.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xCenter} ${a.z} ${a.y-l.yCenter+l.yWidth}`,width:`${l.xWidth*t}`,height:"0.1",depth:"0.25",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xCenter-l.xWidth} ${a.z} ${a.y-l.yCenter}`,width:`${l.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:n,opacity:o}),e.data.histogram._typename.includes("TH3")&&h.jsxs("a-entity",{children:[h.jsx("a-box",{position:`${a.x+l.xCenter} ${a.z-l.zStart+l.zWidth*2} ${a.y-l.yStart}`,width:`${l.xWidth*t}`,height:"0.1",depth:"0.25",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xStart} ${a.z-l.zStart+l.zWidth*2} ${a.y-l.yCenter}`,width:`${l.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xCenter} ${a.z-l.zStart+l.zWidth*2} ${a.y-l.yCenter+l.yWidth}`,width:`${l.xWidth*t}`,height:"0.1",depth:"0.25",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xCenter-l.xWidth} ${a.z-l.zStart+l.zWidth*2} ${a.y-l.yCenter}`,width:`${l.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xStart} ${a.z-l.zCenter} ${a.y-l.yStart}`,width:`${l.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xStart} ${a.z-l.zCenter} ${a.y-l.yStart+l.yWidth*2}`,width:`${l.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xStart-l.xWidth*2} ${a.z-l.zCenter} ${a.y-l.yStart+l.yWidth*2}`,width:`${l.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:n,opacity:o}),h.jsx("a-box",{position:`${a.x+l.xStart-l.xWidth*2} ${a.z-l.zCenter} ${a.y-l.yStart}`,width:`${l.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:n,opacity:o})]})]});function d(){const c=i*3/4,x=(e.data.histogram.fXaxis.fNbins-1)*i*(-2*i)-i*3/4,k=(c-x)/2,A=c-k,b=i*3/4,w=(e.data.histogram.fYaxis.fNbins-1)*i*(-2*i)-i*3/4,y=(b-w)/2,_=b-y,C=0,m=(e.data.histogram.fZaxis.fNbins-1)*i*(-2*i)-i*3/4,T=(C-m)/2,g=C-T;return{xStart:c,xWidth:k,xCenter:A,yStart:b,yWidth:y,yCenter:_,zStart:C,zWidth:T,zCenter:g}}},Es=r=>{const{screenWidth:e,screenHeight:t,controller:i}=v.useContext(lr),n=()=>h.jsx("a-plane",{color:"white",class:"clickable",interaction:!0,width:`${e}`,height:`${t}`,position:"0.2 0 -0.1",rotation:"-70 0 0",children:r.children}),o=()=>h.jsx("div",{id:"desktop--newtablet--container",style:{border:"4px solid gray",borderRadius:"8px",position:"absolute",zIndex:1e3,bottom:20,right:20,overflow:"hidden",display:"flex",flexDirection:"row",width:"30vw",height:"40vh",resize:"both",backgroundColor:"lightgray"},children:r.children});return h.jsx(h.Fragment,{children:i==="keyboard"?o():n()})};function Ts(r){let e=0,t=0,i=0,n=0,o=document.getElementById(r.id+"--header");document.getElementById(r.id+"--header")?o.onmousedown=a:r.onmousedown=a;function a(d){d.preventDefault(),i=d.clientX,n=d.clientY,o.style.cursor="grabbing",document.onmouseup=u,document.onmousemove=l}function l(d){d.preventDefault(),e=i-d.clientX,t=n-d.clientY,i=d.clientX,n=d.clientY,r.style.top=r.offsetTop-t+"px",r.style.left=r.offsetLeft-e+"px"}function u(){document.onmouseup=null,document.onmousemove=null,o.style.cursor="grab"}}const nn=r=>{const{screenWidth:e,screenHeight:t,controller:i,sideBarWidth:n}=v.useContext(lr);v.useEffect(()=>{document.getElementById("desktop--newtablet--container")&&Ts(document.getElementById("desktop--newtablet--container"))},[]);const o=()=>h.jsx("a-plane",{color:"white",width:n,height:t,position:-e/2+n/2+" 0 0.002",rotation:"0 0 0",children:r.children}),a=()=>h.jsx("div",{id:"desktop--newtablet--container--header",style:{height:"100%",overflowY:"auto",cursor:"grab",width:"20%",border:"2px outset ňfdsa",backgroundColor:"white",borderRadius:"4px"},children:r.children});return h.jsx(h.Fragment,{children:i==="keyboard"?a():o()})},ks=Ke.div`
384
+ `)});var t=function(n){var i;this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.p=[];var o;for(o=0;o<256;o++)i=parseFloat("0."+Math.sin(9999*n*o).toString().substr(7)),this.p[o]=Math.floor(256*i);for(this.perm=[],o=0;o<512;o++)this.perm[o]=this.p[255&o]};t.prototype.dot=function(n,i,o,a){return n[0]*i+n[1]*o+n[2]*a},t.prototype.mix=function(n,i,o){return(1-o)*n+o*i},t.prototype.fade=function(n){return n*n*n*(n*(6*n-15)+10)},t.prototype.noise=function(n,i,o){var a=Math.floor(n),c=Math.floor(i),d=Math.floor(o);n-=a,i-=c,o-=d,a&=255,c&=255,d&=255;var h=this.perm[a+this.perm[c+this.perm[d]]]%12,u=this.perm[a+this.perm[c+this.perm[d+1]]]%12,g=this.perm[a+this.perm[c+1+this.perm[d]]]%12,E=this.perm[a+this.perm[c+1+this.perm[d+1]]]%12,P=this.perm[a+1+this.perm[c+this.perm[d]]]%12,A=this.perm[a+1+this.perm[c+this.perm[d+1]]]%12,S=this.perm[a+1+this.perm[c+1+this.perm[d]]]%12,y=this.perm[a+1+this.perm[c+1+this.perm[d+1]]]%12,_=this.dot(this.grad3[h],n,i,o),C=this.dot(this.grad3[P],n-1,i,o),$=this.dot(this.grad3[g],n,i-1,o),D=this.dot(this.grad3[S],n-1,i-1,o),b=this.dot(this.grad3[u],n,i,o-1),G=this.dot(this.grad3[A],n-1,i,o-1),O=this.dot(this.grad3[E],n,i-1,o-1),I=this.dot(this.grad3[y],n-1,i-1,o-1),X=this.fade(n),T=this.fade(i),ee=this.fade(o),F=this.mix(_,C,X),N=this.mix(b,G,X),L=this.mix($,D,X),K=this.mix(O,I,X),q=this.mix(F,L,T),ye=this.mix(N,K,T),me=this.mix(q,ye,ee);return me}}]);function js(r){const e=(r==null?void 0:r.scene)||"labs";return f.jsx(v.Fragment,{children:f.jsx("a-entity",{environment:`preset: ${e};`})})}const Di={histogram:{description:"test2 description",properties:{theme:{type:"select",value:"def",options:["def","fire","nebula","rainforest","nature","water","sunflower","blood","magma","jupiter","magic"],description:"second input"},range:{type:"select",value:4,options:[4,5,6,7,8,9,10,11,12,13,14,20,30,40,50,100]},scale:{name:"scale",type:"number",value:1,step:1,description:"input"}}},scene:{description:"test2 description",properties:{scene:{name:"scene",value:"ndmvr",type:"select",options:["ndmvr","govorun","cern","default","labs","labs2","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow","bow","winter"],description:"second input"}}}},Ds=()=>{let r;const[e,t]=v.useState(!0),[n]=vt("ndmvrInputDevice"),i=o=>{o.changeTabletState&&t(!1)};return v.useEffect(()=>(r=xe.subscribe(i),()=>{r.unsubscribe()}),[]),f.jsxs("a-entity",{children:[n==="keyboard"&&f.jsx("a-entity",{text:"value: Press T to open NDMVR Tablet;color:black;",position:"0.2 0.8 -1"}),n!=="oculus"&&f.jsx("a-entity",{cursor:"fuse: false; fuseTimeout: 2000;",raycaster:"objects: .clickable; showLine: false; far: 100;",animation__click:"property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1.4 1.4 1.4; dur: 150",animation__mouseenter:"property: scale; startEvents: mouseenter; from: 1 1 1; to: 1.4 1.4 1.4; dur: 180",animation__mouseleave:"property: scale; startEvents: mouseleave; from: 1.4 1.4 1.4; to: 1 1 1; dur: 180",line:"color: orange; opacity: 0.5",far:"100",position:"0 0 -1",geometry:"primitive: ring; radiusInner: 0.02; radiusOuter: 0.03",material:"color: white; shader: flat"})]})},$s=()=>{let r;const{projPanelIds:t}=v.useContext(yt).data,[n,i]=v.useState(0),[o,a]=v.useState(null),[c,d]=vt("ndmvrInputDevice"),[h,u]=v.useState(!1),[g,E]=v.useState(!1),[P,A]=v.useState(!0),S=O=>{O.device?(c!==O.device&&d.setData(O.device),u(!h)):O==="shift"?_():O==="show"&&E(!g)},y=O=>{O.changeTabletState&&A(!1)},_=()=>{let O=n+90;O>=360&&(O=0),i(O)},C=O=>t[O]?t[O]:`panel_${O}`,$=()=>f.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${n} 0; dur: 1000; easing: linear;`,material:"color: white",children:[f.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[f.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),f.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),f.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),f.jsx("a-box",{id:C(1),scale:"80 50 2",animation__position:"property: position; from: 0 0 -60; to: 0 -1 -42; delay: 0; dur: 800; easing: linear;",material:"transparent:true"}),f.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 -60; to: 0 0 -42.5; delay: 0; dur: 800; easing: linear;",material:"color: white;"}),f.jsx("a-box",{id:C(2),scale:"80 50 2",animation__position:"property: position; from: 60 0 0; to: 42 -1 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent: true"}),f.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: 60 0 0; to: 42.5 0 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"}),f.jsx("a-box",{id:C(3),scale:"80 50 2",animation__position:"property: position; from: 0 0 60; to: 0 -1 42; delay: 400; dur: 800; easing: linear;",material:"transparent: true"}),f.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 60; to: 0 0 42.5; delay: 400; dur: 800; easing: linear;",material:"color: white;"}),f.jsx("a-box",{id:C(4),scale:"80 50 2",animation__position:"property: position; from: -60 0 0; to: -42 -1 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent: true"}),f.jsx("a-box",{scale:"80 52 2",animation__position:"property: position; from: -60 0 0; to: -42.5 0 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"})]}),D=()=>c==="keyboard"?f.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${n} 0; dur: 1000; easing: linear;`,material:"color: white",children:[f.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[f.jsx("a-text",{color:"black",width:"50",value:g?"Press C to show help panels":"Press C to show projection panels",position:"-20 2.8 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 60; to: -30 0 30; delay: 0; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard.png"}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 -60; to: -30 0 -30; delay: 200; dur: 800; easing: linear;",rotation:"0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard1.png"}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 -60; to: 30 0 -30; delay: 400; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard2.png"}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 60; to: 30 0 30; delay: 600; dur: 800; easing: linear;",rotation:" 0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard3.png"})]}):f.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${n} 0; dur: 1000; easing: linear;`,children:[f.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[f.jsx("a-text",{color:"black",width:"50",value:g?"Press Button X to show help panels":"Press Button X to show projection panels",position:"-20 2.8 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 60; to: -32 0 32; delay: 0; dur: 800; easing: linear;",rotation:"-10 -45 0",src:"./assets/ndmvr/oculusControls/oculus.png"}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 -60; to: -32 0 -32; delay: 200; dur: 800; easing: linear;",rotation:"10 45 0",src:"./assets/ndmvr/oculusControls/oculus2.png"}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 -60; to: 32 0 -32; delay: 400; dur: 800; easing: linear;",rotation:"10 -45 0",src:"./assets/ndmvr/oculusControls/oculus1.png"}),f.jsx("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 60; to: 32 0 32; delay: 600; dur: 800; easing: linear;",rotation:"-10 45 0",src:"./assets/ndmvr/oculusControls/oculus3.png"})]}),b=()=>{const O=document.getElementById(C(0));O&&O.setAttribute("material","opacity",0)},G=()=>{const O=document.getElementById(C(0));O&&O.setAttribute("material","opacity",1)};return v.useEffect(()=>(r=xe.subscribe(y),()=>{r.unsubscribe()}),[]),v.useEffect(()=>(r=Dt.getCameraSubject().subscribe(S),()=>r.unsubscribe()),[h,g,n]),v.useEffect(()=>{const O=document.getElementById("camera");h?(a({x:O.object3D.position.x,y:O.object3D.position.y,z:O.object3D.position.z}),O.object3D.position.y=O.object3D.position.y+30,b()):(O.object3D.position.y=1.6,o!==null&&(O.object3D.position.x=o.x,O.object3D.position.z=o.z,O.object3D.position.y=o.y),G())},[h,c]),f.jsxs("a-entity",{children:[h&&!g&&D(),h&&g&&$()]})},zs=r=>{const{screenWidth:e,screenHeight:t,controller:n}=v.useContext(St),i=()=>f.jsx("a-plane",{color:"white",width:`${e}`,height:`${t}`,position:"0.2 0 -0.1",rotation:"-70 0 0",children:r.children}),o=()=>f.jsx("div",{id:"desktop--newtablet--container",style:{border:"4px solid gray",borderRadius:"8px",position:"absolute",zIndex:1e3,bottom:20,right:20,overflow:"hidden",display:"flex",flexDirection:"row",width:"30vw",height:"40vh",resize:"both",backgroundColor:"lightgray"},children:r.children});return f.jsx(f.Fragment,{children:n==="keyboard"?o():i()})};function Hs(r){let e=0,t=0,n=0,i=0,o=document.getElementById(r.id+"--header");document.getElementById(r.id+"--header")?o.onmousedown=a:r.onmousedown=a;function a(h){h.preventDefault(),n=h.clientX,i=h.clientY,o.style.cursor="grabbing",document.onmouseup=d,document.onmousemove=c}function c(h){h.preventDefault(),e=n-h.clientX,t=i-h.clientY,n=h.clientX,i=h.clientY,r.style.top=r.offsetTop-t+"px",r.style.left=r.offsetLeft-e+"px"}function d(){document.onmouseup=null,document.onmousemove=null,o.style.cursor="grab"}}const $i=r=>{const{screenWidth:e,screenHeight:t,controller:n,sideBarWidth:i}=v.useContext(St);v.useEffect(()=>{document.getElementById("desktop--newtablet--container")&&Hs(document.getElementById("desktop--newtablet--container"))},[]);const o=()=>f.jsx("a-plane",{color:"#fff8a7",width:i-.004,height:t-.004,position:-e/2+i/2+i*(r.offset||0)+" 0 0.002",rotation:"0 0 0",children:r.children}),a=()=>f.jsx("div",{id:"desktop--newtablet--container--header",style:{height:"100%",overflowY:"auto",cursor:"grab",width:"20%",border:"2px outset ňfdsa",backgroundColor:"white",borderRadius:"4px"},children:r.children});return f.jsx(f.Fragment,{children:n==="keyboard"?a():o()})},Ms=Qe.div`
361
385
  background: yellow;
362
386
  cursor: pointer;
363
387
  border: 2px outset;
@@ -365,7 +389,7 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
365
389
  &:hover {
366
390
  background: #e0a0b3;
367
391
  }
368
- `,on=r=>{const e=v.useContext(lr),t=()=>{r.onClick(r.label)},i=()=>h.jsx("a-plane",{color:"blue",height:r.height,width:e.sideBarWidth,position:"0 "+r.verPosition+" 0.002",rotation:"0 0 0",children:h.jsx("a-text",{height:r.height,width:e.sideBarWidth,value:r.label})}),n=()=>h.jsx(ks,{style:{backgroundColor:r.checked?"orange":"yellow"},onClick:()=>t(),children:r.label});return h.jsx(h.Fragment,{children:e.controller==="keyboard"?n():i()})},As=Ke.div`
392
+ `,zi=r=>{const e=v.useContext(St),t=()=>{r.onClick(r.label)},n=()=>f.jsx("a-plane",{interaction:!0,class:"clickable",color:"blue",onClick:()=>t(),height:r.height,width:e.sideBarWidth-.005,position:"0.001 "+r.verPosition+" 0.002",rotation:"0 0 0",children:f.jsx("a-text",{position:"-0.030 0 0",scale:"2.2 2.2 2.2",height:r.height,width:e.sideBarWidth,value:r.label})}),i=()=>f.jsx(Ms,{style:{backgroundColor:r.checked?"orange":"yellow"},onClick:()=>t(),children:r.label});return f.jsx(f.Fragment,{children:e.controller==="keyboard"?i():n()})},Rs=Qe.div`
369
393
  background: #dadaa3;
370
394
  cursor: pointer;
371
395
  border: 2px outset;
@@ -375,23 +399,32 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
375
399
  &:active {
376
400
  border: 2px inset;
377
401
  }
378
- `,Ps=r=>{const e=v.useContext(lr),t=()=>h.jsx("a-plane",{color:"white",width:"0.1",height:"0.1",position:"0 0 0",rotation:"0 0 0"}),i=()=>h.jsx("div",{style:{overflowY:"auto",border:"2px inset"},children:r.options&&r.options.map((n,o)=>h.jsx(As,{onClick:()=>{r.onSelect(n)},children:n},o))});return h.jsx(h.Fragment,{children:e.controller==="keyboard"?i():t()})},sn=(r,e,t)=>{switch(r){case"select":return h.jsx(Ps,{...e,onSelect:t});case"number":return h.jsx(Number,{...e,onSelect:t});default:return h.jsx("div",{children:r+" => No such component"})}},lr=v.createContext({screenWidth:.32,screenHeight:.25,sideBarWidth:.1,keyboard:!1}),_s=r=>{let e=null;const[t,i]=v.useState(!1),[n,o]=v.useState(null),[a,l]=v.useState(null),u=v.useContext(pt),{schema:d}=u,c=k=>{u.setSchema(A=>({...A,[n]:{...A[n],properties:{...A[n].properties,[a]:{...A[n].properties[a],value:k}}}}))},x=k=>{r.controller==="keyboard"?i(k.changeTabletState==="flex"):i(!0)};return v.useEffect(()=>(e=ye.subscribe(x),()=>e.unsubscribe()),[]),h.jsx(lr.Provider,{value:{screenWidth:.32,screenHeight:.25,sideBarWidth:.1,controller:r.controller||"keyboard"},children:t&&h.jsxs(Es,{children:[h.jsx(nn,{children:d&&Object.keys(d).map((k,A)=>h.jsx(on,{label:k,height:.02,checked:k===n,verPosition:.1,onClick:b=>{o(b),Object.keys(d[b].properties).length>0&&l(Object.keys(d[b].properties)[0])}},A))}),n&&h.jsx(nn,{children:Object.keys(d[n].properties).map((k,A)=>h.jsx(on,{label:k,height:.02,checked:k===a,verPosition:.1,onClick:b=>{l(b)}},A))}),n&&a&&(r.componentProvider?r.componentProvider(d[n].properties[a].type,r.keyboard,d[n].properties[a],c,sn):sn(d[n].properties[a].type,d[n].properties[a],c))]})})},Os=({data:r,states:e=null,stores:t=null,config:i=Qi,customComponentProvider:n,experimental:o,selectedBins:a=[],onClick:l=w=>{console.log("click isn't defined!")},onDbClick:u=w=>{console.log("DbClick isn't be defined!")},onHover:d=w=>{console.log("Hover isn't be defined!")},onView:c=null,onProgress:x=null,onExeCommand:k=w=>{console.log("exeCommand isn't be defined!")},style:A={zIndex:"1",width:"100%",minHeight:"calc(90vh)"},useShared:b=!1})=>{let w;const{cameraTransformation:y,cameraSavePosition:_}=r,[C,m]=v.useState(i);return v.useEffect(()=>{if(w=nr.getBinDistributor().subscribe(T=>{var g,X,R;if((T==null?void 0:T.id)===r.id){const P={intersectionAxis:T.intersect,obj:r.histogram,id:r.id,binId:T.data.id};switch((g=T.data)!=null&&g.zPos?(P.binz=T.data.zPos,P.biny=T.data.yPos,P.binx=T.data.xPos,P.bin=r.histogram.getBin(T.data.xPos,T.data.yPos,T.data.zPos),P.con=r.histogram.getBinContent(T.data.xPos,T.data.yPos,T.data.zPos)):(X=T.data)!=null&&X.yPos?(P.biny=T.data.yPos,P.binx=T.data.xPos,P.bin=r.histogram.getBin(T.data.xPos,T.data.yPos),P.con=r.histogram.getBinContent(T.data.xPos,T.data.yPos)):(R=T.data)!=null&&R.xPos&&(P.binx=T.data.xPos,P.bin=r.histogram.getBin(T.data.xPos),P.con=r.histogram.getBinContent(T.data.xPos)),T.event){case"CLICK":l(P);break;case"HOVER":d(P);break;case"DB_CLICK":u(P);break}}else k(T.command)}),w)return()=>w.unsubscribe()},[r,e,l,u,d,k]),h.jsx(v.Fragment,{children:h.jsxs(pt.Provider,{value:{data:{id:r.id,histogram:r.histogram,projectionNames:r==null?void 0:r.projectionsNames,projPanelIds:r==null?void 0:r.projPanelIds},experimental:!!o,stores:{source:t==null?void 0:t.sourceStore,theme:t==null?void 0:t.themeStore,range:t==null?void 0:t.rangeStore,views:t==null?void 0:t.viewStore,scene:t==null?void 0:t.sceneStore},schema:C,setSchema:m,states:{theme:e==null?void 0:e.theme,range:e==null?void 0:e.range,scene:e==null?void 0:e.scene,section:e==null?void 0:e.section,onViewChange:c,onProgress:x,selectedBins:a,selectedView:e==null?void 0:e.selectedView}},children:[h.jsxs("a-scene",{embedded:!0,style:A,children:[h.jsx(os,{scene:o?C.scene.properties.scene.value:e==null?void 0:e.scene}),b&&h.jsx(ws,{}),h.jsx(qo,{}),h.jsx(as,{cameraTransformation:y,savePosition:_}),h.jsx(ns,{}),h.jsx(Cs,{})]}),!window.AFRAME.utils.device.checkHeadsetConnected()&&h.jsx(h.Fragment,{children:o?h.jsx(_s,{controller:"keyboard",componentProvider:n}):h.jsx(Ui,{})})]})})};class js{constructor(e){ze(this,"model",null);this.model=e}updateElement(e,t,i,n){if(this.model[i].elements[e])i==="titles"?this.createTitle(this.model[i].elements[e],this.model[i].attributes[e]):this.createElement(this.model[i].elements[e],this.model[i].attributes[e],n);else{let o;i==="titles"?o=this.createTitle(void 0,this.model[i].attributes[e]):o=this.createElement(void 0,this.model[i].attributes[e],n),this.model[i].elements[e]=o,t.appendChild(o)}}deleteUnnecessaryElements(e,t){const i=e;if(t.length===1){for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),e++;this.model[t[0]].elements.length=i,this.model[t[0]].attributes.length=i}else{for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),this.model[t[1]].elements[e].remove(),e++;this.model[t[0]].elements.length=i,this.model[t[0]].attributes.length=i,this.model[t[1]].elements.length=i,this.model[t[1]].attributes.length=i}}createElement(e,t,i){let n=e;if(n==null){const o=this.checkEntityType(i);n=document.createElement(o)}for(const o in t)n.setAttribute(o,t[o]);return n}createBannerElement(e,t,i){let n=e;return n==null&&(n=document.createElement("a-entity"),this.createBannerLines(t,i).map(a=>n.append(a))),n.setAttribute("position",i.position),n.setAttribute("id",i.id),n}createBannerLines(e,t){const i=[];for(let o=e-1;o>-1;o--){t.line.position.y=2*o;const a=document.createElement("a-entity");a.setAttribute("rotation",t.line.rotation),a.setAttribute("position",t.line.position),a.setAttribute("text",t.line.text),i.push(a)}const n=document.createElement("a-entity");return n.setAttribute("geometry",t.background.geometry),n.setAttribute("position",t.background.position),n.setAttribute("material",t.background.material),i.push(n),i}createTitle(e,t){let i=e;if(i==null){i=document.createElement("a-entity");const n=this.createElement(void 0,t.background);i.appendChild(n)}return delete t.background,this.createElement(i,t)}checkEntityType(e){return e==="a-box"||e==="a-sphere"||e==="a-text"||e==="a-circle"||e==="a-text"?e:"a-entity"}}class zs{bannerTemplate(e,t,i){const n={x:e.positionX,y:e.positionY,z:e.positionZ},o=e.id,a=this.bannerBackgroundTemplate(i),l=this.lineTemplate(t);return{position:n,id:o,background:a,line:l}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.scaleX,y:e.scaleY,z:e.scaleZ},n={color:e.color,opacity:.75},o=e.class,a=e.data,l=e.id;return{position:t,scale:i,material:n,id:l,class:o,binth2:a,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.rotationX,y:e.rotationY,z:e.rotationZ},n={primitive:"plane",width:4,height:1},o={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},l=e.id;return{position:t,rotation:i,geometry:n,text:o,material:a,id:l}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.rotationX,y:e.rotationY,z:e.rotationZ},n={primitive:"plane",width:e.width,height:e.height},o={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:i,geometry:n,text:o,material:a}}titleTemplate(e,t){const i={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},l=this.titleTextTemplate(t);return{position:i,rotation:n,material:o,text:a,background:l}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},i={x:e.positionX,y:e.positionY,z:e.positionZ},n={color:e.color,opacity:.6};return{position:i,geometry:t,material:n}}lineTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.rotationX,y:e.rotationY,z:e.rotationZ};return{position:t,rotation:i,text:{value:"",width:14,height:"auto",align:"center"}}}bannerBackgroundTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},i={primitive:"box",width:e.width,height:e.height,depth:e.depth},n={color:e.color};return{position:t,geometry:i,material:n}}}let an=[];function Ds(r){return an.filter(t=>t.id===r).length!==0}function si(r,e,t,i,n,o,a){an=Zi.getBinsFromLocalStorage();const l=new zs,u=new js(e),d=new Ji(a),c={},x=r;let k,A,b,w,y,_,C,m,T,g;const X="";let R,P=0;const Y=i+o>t.fXaxis.fXmax?t.fXaxis.fXmax:i+o,se=n+o>t.fYaxis.fXmax?t.fYaxis.fXmax:n+o,G=t.fXaxis.fTitle,I=t.fYaxis.fTitle,W=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],Q=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let V=n;V<=se;V++)for(let fe=i;fe<=Y;fe++)if(A=t.fXaxis.GetBinCenter(fe),b=t.fXaxis.GetBinLowEdge(fe),w=A+(A-b),y=w-b,_=t.fYaxis.GetBinCenter(V),C=t.fYaxis.GetBinLowEdge(V),m=_+(_-C),T=m-C,R=t.getBinContent(fe,V),g=$s(R,t.fMaximum),k=g/2,g>0){const de=d.getBinColor(g),Te=b+"th2"+w+"th2"+C+"th2"+m;let ke;Ds(Te)?ke=d.getSecondaryAccentColor():ke=de;const Re=`id: ${Te};
379
- content: ${g};
380
- color: ${de};
381
- yTitle: ${I};
382
- xTitle: ${G};
383
- absoluteContent: ${R};
384
- binName: ${X};
385
- xMin: ${b};
402
+ `,Is=r=>{const e=v.useContext(St),t=()=>f.jsx("a-plane",{color:"#b58484",width:e.componentAreaWidth-.002,height:e.screenHeight-.002,position:"0 0 0.001",rotation:"0 0 0",children:r.options.map((i,o)=>f.jsx("a-plane",{onClick:()=>r.onSelect(i),interaction:!0,color:"black",class:"clickable",width:"0.065",height:"0.014",position:`${Math.floor(o/15)*.08-.097} ${.105-o%15*.015} 0.002`,rotation:"0 0 0",children:f.jsx("a-text",{position:"-0.03 0 0",scale:"2.2 2.2 2.2",height:"0.05",width:"0.1",value:i})},o))}),n=()=>f.jsx("div",{style:{overflowY:"auto",border:"2px inset"},children:r.options&&r.options.map((i,o)=>f.jsx(Rs,{onClick:()=>{r.onSelect(i)},children:i},o))});return f.jsx(f.Fragment,{children:e.controller==="keyboard"?n():t()})},Hi=Qe.div`
403
+ padding: 10px;
404
+ border: 2px solid gray;
405
+ border-radius: 6px;
406
+ &:hover {
407
+ background-color: lightblue;
408
+ }
409
+ `,Bs=r=>{const e=v.useContext(St),t=()=>{r.onSelect(r.value+r.step||1)},n=()=>{r.onSelect(r.value-r.step||1)},i=()=>f.jsxs("a-plane",{color:"white",width:"0.1",height:"0.1",position:"0 0 0.002",rotation:"0 0 0",children:[f.jsx("a-plane",{width:"0.03",color:"black",interaction:!0,class:"clickable",onClick:()=>n(),height:"0.03",position:"-0.05 0 0.001",children:f.jsx("a-text",{width:"0.03",color:"white",scale:"10 10 10",align:"center",height:"0.03","z-offset":"0.001",value:"<"})}),f.jsx("a-text",{height:"0.1",width:"0.1",align:"center",scale:"10 10 10","z-offset":"0.001",value:r.value}),f.jsx("a-plane",{width:"0.03",color:"black",height:"0.03",interaction:!0,onClick:()=>t(),class:"clickable",position:"0.05 0 0.001",children:f.jsx("a-text",{width:"0.03",color:"white",scale:"10 10 10",height:"0.03",align:"center","z-offset":"0.001",value:">"})})]}),o=()=>f.jsx("div",{style:{display:"flex",width:"300px",height:"100%",justifyContent:"center",alignItems:"center"},children:f.jsxs("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"white",borderRadius:"6px",boxShadow:"inset 0px 0px 2px 2px black"},children:[f.jsx(Hi,{onClick:()=>n(),children:"<"}),f.jsx("p",{style:{padding:"10px"},children:r.value}),f.jsx(Hi,{onClick:()=>t(),children:">"})]})});return f.jsx(f.Fragment,{children:e.controller==="keyboard"?o():i()})},Mi=(r,e,t)=>{switch(r){case"select":return f.jsx(Is,{...e,onSelect:t});case"number":return f.jsx(Bs,{...e,onSelect:t});default:return f.jsx("div",{children:r+" => No such component"})}},Ys=r=>{const e=v.useContext(St),t=()=>f.jsx("a-plane",{color:"gray",width:e.componentAreaWidth,height:e.screenHeight-.002,position:"0.08 0 0.001",rotation:"0 0 0",children:r.children}),n=()=>f.jsx("div",{children:r.children});return f.jsx(f.Fragment,{children:e.controller=="keyboard"?n():t()})},St=v.createContext({screenWidth:.44,screenHeight:.25,componentAreaWidth:.28,sideBarWidth:.08,controller:"keyboard"}),Ri=r=>{const[e,t]=v.useState(r.controller!=="keyboard"),[n,i]=v.useState("histogram"),[o,a]=v.useState("scale"),[c,d]=vt("ndmvrSchema"),h=g=>{d.setData({...c,[n]:{...c[n],properties:{...c[n].properties,[o]:{...c[n].properties[o],value:g}}}})},u=g=>{r.controller==="keyboard"&&t(g.changeTabletState==="flex")};return v.useEffect(()=>{let g=xe.subscribe(u);return()=>g.unsubscribe()},[]),f.jsx(St.Provider,{value:{screenWidth:.44,screenHeight:.25,componentAreaWidth:.28,sideBarWidth:.08,controller:r.controller||"keyboard"},children:e&&c&&f.jsxs(zs,{children:[f.jsx($i,{children:c&&Object.keys(c).map((g,E)=>f.jsx(zi,{i:E+"1",label:g,height:.02,checked:g===n,verPosition:.11-E*.022,onClick:P=>{i(P),Object.keys(c[P].properties).length>0&&a(Object.keys(c[P].properties)[0])}},E))}),n&&f.jsx($i,{offset:1,children:Object.keys(c[n].properties).map((g,E)=>f.jsx(zi,{i:E,label:g,height:.02,checked:g===o,verPosition:.11-E*.022,onClick:P=>{a(P)}},E))}),n&&o&&f.jsx(Ys,{children:r.componentProvider?r.componentProvider(c[n].properties[o].type,r.keyboard,c[n].properties[o],h,Mi):Mi(c[n].properties[o].type,c[n].properties[o],h)})]})})},Ns=()=>{const[r]=vt("ndmvrInputDevice"),{experimental:e}=v.useContext(yt),t=()=>f.jsxs(v.Fragment,{children:[f.jsx("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
410
+ lineOpacity: 0.5;
411
+ far: 20;`}),f.jsx("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,"oculus-thumbstick-movement-controller":"",children:e?f.jsx(Ri,{controller:"vr"}):f.jsx(Ai,{})}),f.jsx("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]});return f.jsx("a-entity",{children:r==="oculus"&&t()})},Fs=()=>{const r=new Wt,[e,t]=Cs("ndmvrCameraPosRot"),[n]=v.useState(yt._currentValue),[i,o]=v.useState(null);return v.useEffect(()=>{o(r.parsePosition(r.calculateDefaultPosRot(e,n)));const a=()=>{const c=document.getElementById("camera");c&&c.components["look-controls"]?r.setCameraRotation(e==null?void 0:e.rotation):setTimeout(a,100)};a()},[e]),v.useLayoutEffect(()=>()=>{t.setData(r.getCurrentPosRot())},[]),f.jsxs("a-entity",{id:"cameraRig",position:i==null?void 0:i.position,children:[f.jsx($s,{}),f.jsx("a-camera",{id:"camera","look-control":!0,"wasd-controls-enabled":"acceleration:=50",children:f.jsx(Ds,{})}),f.jsx(Ns,{})]})},Ls=({position:r,rotation:e,id:t,color:n,masterId:i})=>{v.useEffect(()=>{const a=document.getElementById(t),c=new Pt.Quaternion().fromArray(e),d=new Pt.Euler().setFromQuaternion(c,"YXZ"),h={x:Pt.MathUtils.radToDeg(d.x),y:Pt.MathUtils.radToDeg(d.y),z:-Pt.MathUtils.radToDeg(d.z)};a.setAttribute("rotation",h)},[e]);const o=()=>f.jsxs("a-entity",{position:"0 0.25 0",children:[f.jsx("a-cone",{color:"gold","radius-bottom":"0.5","radius-top":"0.1",height:"0.8",position:"0 0.4 0"}),f.jsx("a-sphere",{color:n,radius:"0.05",position:"0 0.4 -0.3"}),f.jsx("a-sphere",{color:n,radius:"0.05",position:"0 0.6 -0.2"})]});return f.jsxs("a-entity",{position:r,id:t,children:[f.jsx("a-sphere",{radius:"0.5",color:"#F8DF87",children:i===t?o():f.jsx(f.Fragment,{})}),f.jsx("a-entity",{position:"0.2 0.15 -0.45",children:f.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:f.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),f.jsx("a-entity",{position:"-0.2 0.15 -0.45",children:f.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:f.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),f.jsx("a-cylinder",{height:"0.05",radius:"0.05",color:"#FF6B6B",position:"0 -0.25 -0.4",rotation:"0 90 90"}),f.jsx("a-sphere",{radius:"0.1",color:"#FF6B6B",position:"0 -0.1 -0.5"}),f.jsx("a-cylinder",{height:"0.8",radius:"0.3",color:n,position:"0 -0.6 0"}),f.jsxs("a-entity",{position:"-0.4 -0.4 0",children:[f.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),f.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),f.jsxs("a-entity",{position:"0.4 -0.4 0",children:[f.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),f.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),f.jsxs("a-entity",{position:"-0.15 -1 0",children:[f.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:n,position:"0 -0.4 0"}),f.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]}),f.jsxs("a-entity",{position:"0.15 -1 0",children:[f.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:n,position:"0 -0.4 0"}),f.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]})]})},Vs=109,Xs=({wssb:r="shared"})=>{const e=v.useContext(hr)[r],{histogram:t}=v.useContext(yt).data,n=i=>{switch(i.keyCode){case Vs:e.send({type:"assign_master",payload:{}}),e.send({type:"histogram",payload:JSON.stringify(At.toJSON(t))})}};return v.useEffect(()=>(window.addEventListener("keypress",n),()=>{window.removeEventListener("keypress",n)}),[]),f.jsx(f.Fragment,{})},Ws=105,Us=106,Zs=107,Gs=108,Ks=117,qs=111,Ii=new Map([[Ws,"X_UP"],[Zs,"X_DOWN"],[Gs,"Y_UP"],[Us,"Y_DOWN"],[Ks,"Z_UP"],[qs,"Z_DOWN"]]),Bi=r=>{switch(r){case"X_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"I"}));break;case"X_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"K"}));break;case"Y_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"L"}));break;case"Y_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"J"}));break;case"Z_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"U"}));break;case"Z_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"O"}));break}},Js=({wssb:r="shared"})=>{const e=v.useContext(hr)[r],t=pr("axisScalingLatest",r),n=pr("axisScaling",r),i=o=>{if(!Ii.has(o.keyCode))return;let a=Ii.get(o.keyCode);e.send({type:"axis_scaling_latest",payload:{axis:a}})};return v.useEffect(()=>{n.payload!==void 0&&Object.keys(n.payload.axisMap).forEach(o=>{for(let a=0;a<n.payload.axisMap[o];a++)Bi(o)})},[n.payload]),v.useEffect(()=>{t.payload!==void 0&&Bi(t.payload.latestAxis)},[t.payload]),v.useEffect(()=>(window.addEventListener("keypress",i),()=>{window.removeEventListener("keypress",i)}),[]),f.jsx("div",{})},Qs=({wssb:r="shared"})=>{const[e,t]=v.useState(0),n=v.useContext(hr)[r];return v.useEffect(()=>{const i=document.getElementById("camera"),o=new Pt.Vector3,a=new Pt.Quaternion;i.object3D.getWorldPosition(o);const c=setInterval(()=>{i.object3D.getWorldPosition(o),i.object3D.getWorldQuaternion(a),n.send({type:"move",payload:{position:o.toArray(),rotation:a.toArray()}}),t(d=>d+1)},100);return()=>clearInterval(c)},[e]),f.jsxs("a-entity",{children:[f.jsx(Xs,{}),f.jsx(Js,{})]})},ea=({wssb:r="shared"})=>{v.useContext(hr)[r];const e=pr("move",r),t=pr("ws",r),n=pr("master",r),[i,o]=v.useState([]),[a,c]=v.useState(null),[d,h]=v.useState("");return v.useEffect(()=>{e.payload!==void 0&&(e.payload.clients.length>0?o(e.payload.clients):o([]))},[e.payload]),v.useEffect(()=>{t.payload!==void 0&&h(t.payload.id)},[t.payload]),v.useEffect(()=>{n.payload!==void 0&&c(n.payload.master)},[n.payload]),f.jsxs("a-entity",{children:[f.jsx(Qs,{}),i.filter(u=>u.id!==d).map((u,g)=>{const E=u.position,P=u.rotation,A=E.join(" ");return f.jsx(Ls,{id:u.id,position:A,rotation:P,masterId:a,color:u.color},g+u.id)})]})},ta=({startPosition:r})=>{const e=v.useContext(yt),t=2;let n=1;const i="color: white;",o="1.0",a=r||{x:0,y:0,z:0};let[c,d]=v.useState(h());return v.useEffect(()=>{d(h)},[e]),f.jsxs("a-entity",{children:[f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z} ${a.y-c.yStart}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z} ${a.y-c.yCenter+c.yWidth}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter-c.xWidth} ${a.z} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),e.data.histogram._typename.includes("TH3")&&f.jsxs("a-entity",{children:[f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yStart}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yCenter+c.yWidth}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter-c.xWidth} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z-c.zCenter} ${a.y-c.yStart}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z-c.zCenter} ${a.y-c.yStart+c.yWidth*2}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart-c.xWidth*2} ${a.z-c.zCenter} ${a.y-c.yStart+c.yWidth*2}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart-c.xWidth*2} ${a.z-c.zCenter} ${a.y-c.yStart}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o})]})]});function h(){const u=n*3/4,g=(e.data.histogram.fXaxis.fNbins-1)*n*(-2*n)-n*3/4,E=(u-g)/2,P=u-E,A=n*3/4,S=(e.data.histogram.fYaxis.fNbins-1)*n*(-2*n)-n*3/4,y=(A-S)/2,_=A-y,C=0,$=(e.data.histogram.fZaxis.fNbins-1)*n*(-2*n)-n*3/4,D=(C-$)/2,b=C-D;return{xStart:u,xWidth:E,xCenter:P,yStart:A,yWidth:y,yCenter:_,zStart:C,zWidth:D,zCenter:b}}},ra=({data:r,states:e=null,stores:t=null,config:n=Di,customComponentProvider:i,experimental:o,selectedBins:a=[],onClick:c=S=>{console.log("click isn't defined!")},onDbClick:d=S=>{console.log("DbClick isn't be defined!")},onHover:h=S=>{console.log("Hover isn't be defined!")},onView:u=null,onProgress:g=null,onExeCommand:E=S=>{console.log("exeCommand isn't be defined!")},style:P={zIndex:"1",width:"100%",minHeight:"calc(90vh)"},useShared:A=!1})=>{var b,G;let S;const[y]=vt("ndmvrInputDevice"),[_,C]=vt("ndmvrSchema"),[$,D]=v.useState(!1);return v.useEffect(()=>{_==null&&C.setData(n),console.log(r)},[n]),v.useEffect(()=>{D(!!y)},[y]),v.useEffect(()=>{if(S=ur.getBinDistributor().subscribe(O=>{var I,X,T;if((O==null?void 0:O.id)===r.id){const{zPos:ee,yPos:F,xPos:N}=O.data,L={intersectionAxis:O.intersect,obj:r.histogram,id:r.id,binId:O.data.id};switch((I=O.data)!=null&&I.zPos?(L.binz=ee,L.biny=F,L.binx=N,L.bin=r.histogram.getBin(N,F,ee),L.con=r.histogram.getBinContent(N,F,ee)):(X=O.data)!=null&&X.yPos?(L.biny=F,L.binx=N,L.bin=r.histogram.getBin(N,F),L.con=r.histogram.getBinContent(N,F)):(T=O.data)!=null&&T.xPos&&(L.binx=N,L.bin=r.histogram.getBin(N),L.con=r.histogram.getBinContent(N)),O.event){case"CLICK":c(L);break;case"HOVER":h(L);break;case"DB_CLICK":d(L);break}}else E(O.command)}),S)return()=>S.unsubscribe()},[r,e,c,d,h,E]),f.jsx(v.Fragment,{children:f.jsxs(yt.Provider,{value:{data:{id:r.id,histogram:r.histogram,projectionNames:r==null?void 0:r.projectionsNames,projPanelIds:r==null?void 0:r.projPanelIds},experimental:!!o,stores:{source:t==null?void 0:t.sourceStore},states:{onViewChange:u,onProgress:g,selectedBins:a,selectedView:e==null?void 0:e.selectedView}},children:[f.jsxs("a-scene",{embedded:!0,"vr-mode-detector":!0,style:P,children:[f.jsx(js,{scene:o?(G=(b=_==null?void 0:_.scene)==null?void 0:b.properties.scene)==null?void 0:G.value:e==null?void 0:e.scene}),A&&f.jsx(ea,{}),f.jsx(Fs,{}),f.jsx(Os,{}),f.jsx(ta,{})]}),y!=="oculus"&&f.jsx(f.Fragment,{children:o?f.jsx(Ri,{controller:"keyboard",componentProvider:i}):f.jsx(Ai,{})})]})})};class na{constructor(e){Re(this,"model",null);this.model=e}updateElement(e,t,n,i){if(this.model[n].elements[e])n==="titles"?this.createTitle(this.model[n].elements[e],this.model[n].attributes[e]):this.createElement(this.model[n].elements[e],this.model[n].attributes[e],i);else{let o;n==="titles"?o=this.createTitle(void 0,this.model[n].attributes[e]):o=this.createElement(void 0,this.model[n].attributes[e],i),this.model[n].elements[e]=o,t.appendChild(o)}}deleteUnnecessaryElements(e,t){const n=e;if(t.length===1){for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),e++;this.model[t[0]].elements.length=n,this.model[t[0]].attributes.length=n}else{for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),this.model[t[1]].elements[e].remove(),e++;this.model[t[0]].elements.length=n,this.model[t[0]].attributes.length=n,this.model[t[1]].elements.length=n,this.model[t[1]].attributes.length=n}}createElement(e,t,n){let i=e;if(i==null){const o=this.checkEntityType(n);i=document.createElement(o)}for(const o in t)i.setAttribute(o,t[o]);return i}createBannerElement(e,t,n){let i=e;return i==null&&(i=document.createElement("a-entity"),this.createBannerLines(t,n).map(a=>i.append(a))),i.setAttribute("position",n.position),i.setAttribute("id",n.id),i}createBannerLines(e,t){const n=[];for(let o=e-1;o>-1;o--){t.line.position.y=2*o;const a=document.createElement("a-entity");a.setAttribute("rotation",t.line.rotation),a.setAttribute("position",t.line.position),a.setAttribute("text",t.line.text),n.push(a)}const i=document.createElement("a-entity");return i.setAttribute("geometry",t.background.geometry),i.setAttribute("position",t.background.position),i.setAttribute("material",t.background.material),n.push(i),n}createTitle(e,t){let n=e;if(n==null){n=document.createElement("a-entity");const i=this.createElement(void 0,t.background);n.appendChild(i)}return delete t.background,this.createElement(n,t)}checkEntityType(e){return e==="a-box"||e==="a-sphere"||e==="a-text"||e==="a-circle"||e==="a-text"?e:"a-entity"}}class ia{bannerTemplate(e,t,n){const i={x:e.positionX,y:e.positionY,z:e.positionZ},o=e.id,a=this.bannerBackgroundTemplate(n),c=this.lineTemplate(t);return{position:i,id:o,background:a,line:c}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.scaleX,y:e.scaleY,z:e.scaleZ},i={color:e.color,opacity:.75},o=e.class,a=e.data,c=e.id;return{position:t,scale:n,material:i,id:c,class:o,binth2:a,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},i={primitive:"plane",width:4,height:1},o={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},c=e.id;return{position:t,rotation:n,geometry:i,text:o,material:a,id:c}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},i={primitive:"plane",width:e.width,height:e.height},o={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:n,geometry:i,text:o,material:a}}titleTemplate(e,t){const n={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},c=this.titleTextTemplate(t);return{position:n,rotation:i,material:o,text:a,background:c}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},n={x:e.positionX,y:e.positionY,z:e.positionZ},i={color:e.color,opacity:.6};return{position:n,geometry:t,material:i}}lineTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ};return{position:t,rotation:n,text:{value:"",width:14,height:"auto",align:"center"}}}bannerBackgroundTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={primitive:"box",width:e.width,height:e.height,depth:e.depth},i={color:e.color};return{position:t,geometry:n,material:i}}}let Yi=[];function oa(r){return Yi.filter(t=>t.id===r).length!==0}function En(r,e,t,n,i,o,a){Yi=Ln.getBinsFromLocalStorage();const c=new ia,d=new na(e),h=new ji(a),u={},g=r;let E,P,A,S,y,_,C,$,D,b;const G="";let O,I=0;const X=n+o>t.fXaxis.fXmax?t.fXaxis.fXmax:n+o,T=i+o>t.fYaxis.fXmax?t.fYaxis.fXmax:i+o,ee=t.fXaxis.fTitle,F=t.fYaxis.fTitle,N=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],L=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let q=i;q<=T;q++)for(let ye=n;ye<=X;ye++)if(P=t.fXaxis.GetBinCenter(ye),A=t.fXaxis.GetBinLowEdge(ye),S=P+(P-A),y=S-A,_=t.fYaxis.GetBinCenter(q),C=t.fYaxis.GetBinLowEdge(q),$=_+(_-C),D=$-C,O=t.getBinContent(ye,q),b=sa(O,t.fMaximum),E=b/2,b>0){const me=h.getBinColor(b),Se=A+"th2"+S+"th2"+C+"th2"+$;let Ae;oa(Se)?Ae=h.getSecondaryAccentColor():Ae=me;const Ie=`id: ${Se};
412
+ content: ${b};
413
+ color: ${me};
414
+ yTitle: ${F};
415
+ xTitle: ${ee};
416
+ absoluteContent: ${O};
417
+ binName: ${G};
418
+ xMin: ${A};
386
419
  yMin: ${C};
387
- xMax: ${w};
388
- yMax: ${m};
389
- xCenter: ${A};
420
+ xMax: ${S};
421
+ yMax: ${$};
422
+ xCenter: ${P};
390
423
  yCenter: ${_};
391
424
  xWidth: ${y};
392
- yWidth: ${T};
393
- markedColor: ${ke};
394
- selectColor: ${d.getSecondaryAccentColor()};
395
- axisX: ${d.getAxisColor("x")};
396
- axisY: ${d.getAxisColor("y")};
397
- axisZ: ${d.getAxisColor("z")}`;c.id=Te,c.positionX=b,c.positionY=k,c.positionZ=C,c.scaleX=y/2,c.scaleY=g,c.scaleZ=T/2,c.color=ke,c.class="clickable",c.data=Re,e.bins.attributes[P]=l.binTemplate(c),u.updateElement(P,x,"bins","a-box"),P++}u.deleteUnnecessaryElements(P,["bins"]),c.id=1500+P,c.positionX=Y+.5,c.positionY=0,c.positionZ=se+.5,c.rotationX=270,c.rotationY=360,c.rotationZ=0,c.width=2,c.height=2,c.value="0",c.color=d.getAxisColor("y"),e.normalXAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,x,"normalXAxis","a-entity"),c.positionZ=n-2.5,c.rotationX=270,c.rotationY=180,e.reversedYAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,x,"reversedYAxis","a-entity"),c.positionX=i-2.5,c.positionZ=se+.5,e.normalYAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,x,"normalYAxis","a-entity"),c.positionZ=n-2.5,c.rotationY=180,e.reversedXAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,x,"reversedXAxis","a-entity"),P=1;for(let V=n;V<=se;V++)c.id=1500+P,c.positionX=i-2.5,c.positionY=0,c.positionZ=V-1,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=2,c.height=1,c.value=`${Q[V-1]?Q[V-1].fString:V-1}`,c.color=d.getAxisColor("z"),e.normalYAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,x,"normalYAxis","a-entity"),c.id=4500+P,c.positionX=Y+.5,c.rotationY=360,c.value=`${Q[V-1]?Q[V-1].fString:V-1}`,e.reversedYAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,x,"reversedYAxis","a-entity"),P++;u.deleteUnnecessaryElements(P,["normalYAxis","reversedYAxis"]),P=1;for(let V=i;V<=Y;V++)c.id=1500+P,c.positionX=V-1,c.positionY=0,c.positionZ=n-2.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=2,c.height=1,c.value=`${W[V-1]?W[V-1].fString:V-1}`,c.color=d.getAxisColor("x"),e.normalXAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,x,"normalXAxis","a-entity"),c.id=4500+P,c.positionZ=se+.5,c.rotationX=270,c.rotationY=90,c.value=`${W[V-1]?W[V-1].fString:V-1}`,e.reversedXAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,x,"reversedXAxis","a-entity"),P++;u.deleteUnnecessaryElements(P,["normalXAxis","reversedXAxis"]),c.positionX=i,c.positionY=0,c.positionZ=n-4,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=4,c.height=1,c.value=G,c.id="downLabel",e.labels.attributes[0]=l.labelTemplate(c),u.updateElement(0,x,"labels","a-entity"),c.positionX=Y-2.5,c.positionZ=se+2,c.rotationY=0,c.id="upLabel",e.labels.attributes[1]=l.labelTemplate(c),u.updateElement(1,x,"labels","a-entity"),c.positionX=i-4,c.positionY=0,c.positionZ=n+.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=4,c.height=1,c.value=I,c.color=d.getAxisColor("z"),c.id="leftLabel",e.labels.attributes[2]=l.labelTemplate(c),u.updateElement(2,x,"labels","a-entity"),c.positionX=Y+2,c.positionZ=se-2.5,c.rotationX=270,c.rotationY=90,c.id="rightLabel",e.labels.attributes[3]=l.labelTemplate(c),u.updateElement(3,x,"labels","a-entity"),c.positionX=i-90,c.positionY=-6.5,c.positionZ=n+90,c.rotationX=0,c.rotationY=123,c.rotationZ=0,c.title=t.fTitle,c.color=d.getPrimaryFontColor();const U={};U.positionX=0,U.positionY=0,U.positionZ=-1,U.width=170,U.height=30,U.color="white",e.titles.attributes[0]=l.titleTemplate(c,U),u.updateElement(0,x,"titles","a-entity"),c.positionX=i+120,c.positionZ=n-70,c.rotationY=330,c.title=t.fName,e.titles.attributes[1]=l.titleTemplate(c,U),u.updateElement(1,x,"titles","a-entity")}const $s=(r,e)=>r<=0?0:(e>1&&(r=Math.round((r/e+Number.EPSILON)*100)/100),r);class Hs{constructor(e){F(this,zr,void 0);B(this,zr,e)}createTH2DemoHistogram(e,t,i,n){const o=wt.createHistogram("TH2I",e,t);let a=i;for(let l=1;l<=20;l++)for(let u=1;u<=20;u++){const d=o.getBin(u,l);let c=0;c=a,o.setBinContent(d,c),a+=n}return o.fXaxis.fTitle="x Axis",o.fYaxis.fTitle="y Axis",o.fName="You don't have a valid file path",o.fTitle="This is a TH2 histogram demo",o.fMaximum=a,o}createTH3DemoHistogram(e,t,i,n,o){const a=wt.createHistogram("TH3I",e,t,i);let l=n;for(let u=1;u<=20;u++)for(let d=1;d<=20;d++)for(let c=1;c<=20;c++){const x=a.getBin(c,d,u);let k=0;k=l,a.setBinContent(x,k),l+=o}return a.fXaxis.fTitle="x Axis",a.fYaxis.fTitle="y Axis",a.fZaxis.fTitle="z Axis",a.fName="You don't have a valid file path",a.fTitle="This is a TH3 histogram demo",a.fMaximum=l,a}}zr=new WeakMap;const Ms=he.registerComponent("th2-histogram",{schema:{section:{type:"string"},filename:{type:"string"},theme:{type:"string",default:"def"},position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const r=this.el;Ki(this.schema,r),document.addEventListener("keydown",wr),document.addEventListener("keyup",Cr),this.demoHistogramService=new Hs,this.localStorageService=new ti,this.cameraService=new or,this.render=!1,this.histogram=null,this.model={bins:{elements:[],attributes:[]},labels:{elements:[],attributes:[]},titles:{elements:[],attributes:[]},banners:{elements:[],attributes:[]},normalXAxis:{elements:[],attributes:[]},reversedXAxis:{elements:[],attributes:[]},normalYAxis:{elements:[],attributes:[]},reversedYAxis:{elements:[],attributes:[]}},this.section=null;const e=i=>{console.log(i),this.section.xOffset=i.xOffset,this.section.yOffset=i.yOffset,this.range=i.range,this.cameraService.setCameraPosition(i),si(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0},t=i=>{this.localStorageService.storeTH2Offsets(i.xOffset,i.yOffset,i.range),e(i)};this.subscription=_e.getChangedSection().subscribe(t)},update:function(){qi(),this.section=JSON.parse(this.data.section),wt.openFile(this.data.filename).then(r=>r.readObject("hUsersVsProjects")).then(r=>{this.localStorageService.initHistogramData(r),this.histogram=r,si(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0}).then(()=>console.log("drawing completed")).catch(r=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),si(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(r)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",wr),document.removeEventListener("keyup",Cr)}}),Rs=he.registerComponent("banner-control",{schema:{position:{name:"position",xValue:-1.28,yValue:.3,zValue:-1},scale:{name:"scale",xValue:.5,yValue:.7,zValue:.1},rotation:{name:"rotation",xValue:0,yValue:20,zValue:0}},init:function(){}});new or;const Is=r=>{r.detail.y>.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),je.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),r.detail.y<-.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),je.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),r.detail.x<-.95&&(Ge.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),je.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),r.detail.x>.95&&(Ge.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),je.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},Bs=r=>{r.detail.y>.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),je.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),r.detail.y<-.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),je.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),r.detail.x<-.95&&(Ge.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),je.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),r.detail.x>.95&&(Ge.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),je.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},Ys=r=>{r.detail.y>.1&&ye.next({scale:-.1}),r.detail.y<-.1&&ye.next({scale:.1})},Fs=r=>{r.detail.y>.1?ye.next({source:"next"}):r.detail.y<-.1&&ye.next({source:"prev"})},Ns=r=>{r.detail.y>.1?ye.next({theme:"next"}):r.detail.y<-.1&&ye.next({theme:"prev"})},Ls=r=>{r.detail.y>.1?ye.next({range:"next"}):r.detail.y<-.1&&ye.next({range:"prev"})},Vs=r=>{r.detail.y>.1?ye.next({scene:"next"}):r.detail.y<-.1&&ye.next({scene:"prev"})},ln=r=>{r==="Y"?ye.next({tool:"next"}):ye.next({tool:"prev"})},cn=r=>{je.changeHistogramSectionByOffset("zOffset","TH3",!0,r)},un=r=>{je.changeHistogramSectionByOffset("zOffset","TH3",!1,r)},dn=()=>{new or},Xs=r=>{Is(r)},Ws=r=>{Bs(r)},Us=()=>{vr.saveSelectedBinToLocalStorage(),kt()===0&&ye.next({binData:vr})},Zs=()=>{vr.deleteBinFromLocalStorage()},Gs=()=>{_e.changeHistogramFunction("feet","TH2")},Ks=()=>{_e.changeHistogramFunction("default","TH2")},qs=()=>{Et.setVisibilityOfBanners("oculus")},Js=()=>{Et.setUserState()},Qs=()=>{Et.shiftBanners()},ea=r=>{r.forEach(e=>{})},ta=he.registerComponent("left-controller-logging",{init:function(){let r=!1,e=!0,t=!1;const i=this.el;i.addEventListener("gripdown",()=>{r=!0}),i.addEventListener("gripup",()=>{r=!1}),i.addEventListener("thumbstickdown",()=>{}),i.addEventListener("thumbstickmoved",n=>{if(r&&kt()===2)Ys(n);else if(r&&kt()===3){if(e){e=!1,Fs(n);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&kt()===4){if(e){e=!1,Ns(n);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&kt()===5){if(e){e=!1,Ls(n);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&kt()===6&&e){e=!1,Vs(n);const o=setTimeout(()=>{e=!0},600);return()=>clearTimeout(o)}}),i.addEventListener("ybuttondown",()=>{r?t||(t=!0,ln("Y")):qs()}),i.addEventListener("xbuttondown",()=>{r?t||(t=!0,ln("X")):Js()}),i.addEventListener("ybuttonup",()=>{t=!1}),i.addEventListener("xbuttonup",()=>{t=!1})},update:function(){dn()}}),ra=he.registerComponent("right-controller-logging",{init:function(){let r=!1;const e=this.el;e.addEventListener("gripdown",()=>{r=!0}),e.addEventListener("gripup",()=>{r=!1}),e.addEventListener("thumbstickmoved",t=>{r?Xs(t):Ws(t)}),e.addEventListener("bbuttondown",()=>{cn(!r)}),e.addEventListener("abuttondown",()=>{un(!r)}),e.addEventListener("thumbstickdown",()=>{r?Gs():Ks()}),e.addEventListener("triggerdown",()=>{r?(Us(),ea()):(Zs(),Qs())})},update:function(){dn()}});class ia{constructor(){F(this,Wt,void 0);B(this,Wt,new ft)}sendSourceSubject(e){s(this,Wt).next(e)}getSourceSettingSubject(){return s(this,Wt).asObservable()}}Wt=new WeakMap;const na=new ia,oa=he.registerComponent("oculus-thumbstick-movement-controller",{schema:{acceleration:{type:"number",default:40},fly:{type:"boolean",default:!1},horizontalAxis:{type:"string",enum:["x","y","z"],default:"x"},verticalAxis:{type:"string",enum:["x","y","z"],default:"z"},enabled:{type:"boolean",default:!0},adEnabled:{type:"boolean",default:!0},adInverted:{type:"boolean",default:!1},wsEnabled:{type:"boolean",default:!0},wsInverted:{type:"boolean",default:!1}},required:["acceleration","fly","horizontalAxis","verticalAxis","enabled","adEnabled","adInverted","wsEnabled","wsInverted"],init:function(){this.velocity=new THREE.Vector3(0,0,0),this.tsData=new THREE.Vector2(0,0),this.moveEasing=1.1,this.thumbstickMoved=this.thumbstickMoved.bind(this);const r=this.el;let e=!1,t=!1;r.addEventListener("gripdown",()=>{e=!0}),r.addEventListener("gripup",()=>{e=!1});let i=0;const n=500;r.addEventListener("triggerdown",()=>{const o=performance.now();if(o-i<=n){let l=function(){let d=this.sceneElement.getAttribute("position"),c={x:d.x,y:d.y-1,z:d.z};this.sceneElement.setAttribute("position",c),c.y<=a&&clearInterval(u)},a=2,u=setInterval(l.bind(this),20)}else t=!0;i=o}),r.addEventListener("triggerup",()=>{i=performance.now(),t=!1}),r.addEventListener("thumbstickmoved",o=>{e&&kt()>1?this.tsData.set(0,0):(t?this.data.fly=!0:this.data.fly=!1,this.thumbstickMoved(o))})},update:function(){this.sceneElement=document.getElementById("cameraWrapper")},tick:function(r,e){var t=this.data,i=this.velocity;!i[t.horizontalAxis]&&!i[t.verticalAxis]&&!this.tsData.length()||(e=e/1e3,this.updateVelocity(e),!(!i[t.horizontalAxis]&&!i[t.verticalAxis])&&this.sceneElement.object3D.position.add(this.getMovementVector(e)))},updateVelocity:function(r){var e,t,i,n=this.data,o=this.velocity,a,l;const u=1e-5;if(t=n.horizontalAxis,i=n.verticalAxis,r>.2){o[t]=0,o[i]=0;return}var d=Math.pow(1/this.moveEasing,r*60);o[t]!==0&&(o[t]=o[t]*d),o[i]!==0&&(o[i]=o[i]*d),Math.abs(o[t])<u&&(o[t]=0),Math.abs(o[i])<u&&(o[i]=0),n.enabled&&(e=n.acceleration,n.adEnabled&&this.tsData.x&&(l=n.adInverted?-1:1,o[t]+=l*e*this.tsData.x*r),n.wsEnabled&&(a=n.wsInverted?-1:1,o[i]+=a*e*this.tsData.y*r))},getMovementVector:function(){var r=new THREE.Vector3(0,0,0),e=new THREE.Euler(0,0,0,"YXZ"),t=4;return function(i){var n=this.el.sceneEl.camera.el.object3D.rotation,o=this.velocity,a;return r.copy(o),r.multiplyScalar(i),n&&(a=this.data.fly?n.x:0,e.set(a,n.y-t,0),r.applyEuler(e)),r}}(),thumbstickMoved:function(r){this.tsData.set(r.detail.x,r.detail.y)},remove:function(){this.el.removeEventListener("thumbstickmoved",this.thumbstickMoved)}}),sa=new ti;oe.Banner=Rs,oe.HistogramTH2=Ms,oe.LeftController=ta,oe.NdmVrScene=Os,oe.RightController=ra,oe.ThumbsticController=oa,oe.defaultScheme=Qi,oe.ndmVrStorage=sa,oe.sourceSettingSubject=na,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});
425
+ yWidth: ${D};
426
+ markedColor: ${Ae};
427
+ selectColor: ${h.getSecondaryAccentColor()};
428
+ axisX: ${h.getAxisColor("x")};
429
+ axisY: ${h.getAxisColor("y")};
430
+ axisZ: ${h.getAxisColor("z")}`;u.id=Se,u.positionX=A,u.positionY=E,u.positionZ=C,u.scaleX=y/2,u.scaleY=b,u.scaleZ=D/2,u.color=Ae,u.class="clickable",u.data=Ie,e.bins.attributes[I]=c.binTemplate(u),d.updateElement(I,g,"bins","a-box"),I++}d.deleteUnnecessaryElements(I,["bins"]),u.id=1500+I,u.positionX=X+.5,u.positionY=0,u.positionZ=T+.5,u.rotationX=270,u.rotationY=360,u.rotationZ=0,u.width=2,u.height=2,u.value="0",u.color=h.getAxisColor("y"),e.normalXAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"normalXAxis","a-entity"),u.positionZ=i-2.5,u.rotationX=270,u.rotationY=180,e.reversedYAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"reversedYAxis","a-entity"),u.positionX=n-2.5,u.positionZ=T+.5,e.normalYAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"normalYAxis","a-entity"),u.positionZ=i-2.5,u.rotationY=180,e.reversedXAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"reversedXAxis","a-entity"),I=1;for(let q=i;q<=T;q++)u.id=1500+I,u.positionX=n-2.5,u.positionY=0,u.positionZ=q-1,u.rotationX=270,u.rotationY=180,u.rotationZ=0,u.width=2,u.height=1,u.value=`${L[q-1]?L[q-1].fString:q-1}`,u.color=h.getAxisColor("z"),e.normalYAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"normalYAxis","a-entity"),u.id=4500+I,u.positionX=X+.5,u.rotationY=360,u.value=`${L[q-1]?L[q-1].fString:q-1}`,e.reversedYAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"reversedYAxis","a-entity"),I++;d.deleteUnnecessaryElements(I,["normalYAxis","reversedYAxis"]),I=1;for(let q=n;q<=X;q++)u.id=1500+I,u.positionX=q-1,u.positionY=0,u.positionZ=i-2.5,u.rotationX=270,u.rotationY=270,u.rotationZ=0,u.width=2,u.height=1,u.value=`${N[q-1]?N[q-1].fString:q-1}`,u.color=h.getAxisColor("x"),e.normalXAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"normalXAxis","a-entity"),u.id=4500+I,u.positionZ=T+.5,u.rotationX=270,u.rotationY=90,u.value=`${N[q-1]?N[q-1].fString:q-1}`,e.reversedXAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"reversedXAxis","a-entity"),I++;d.deleteUnnecessaryElements(I,["normalXAxis","reversedXAxis"]),u.positionX=n,u.positionY=0,u.positionZ=i-4,u.rotationX=270,u.rotationY=180,u.rotationZ=0,u.width=4,u.height=1,u.value=ee,u.id="downLabel",e.labels.attributes[0]=c.labelTemplate(u),d.updateElement(0,g,"labels","a-entity"),u.positionX=X-2.5,u.positionZ=T+2,u.rotationY=0,u.id="upLabel",e.labels.attributes[1]=c.labelTemplate(u),d.updateElement(1,g,"labels","a-entity"),u.positionX=n-4,u.positionY=0,u.positionZ=i+.5,u.rotationX=270,u.rotationY=270,u.rotationZ=0,u.width=4,u.height=1,u.value=F,u.color=h.getAxisColor("z"),u.id="leftLabel",e.labels.attributes[2]=c.labelTemplate(u),d.updateElement(2,g,"labels","a-entity"),u.positionX=X+2,u.positionZ=T-2.5,u.rotationX=270,u.rotationY=90,u.id="rightLabel",e.labels.attributes[3]=c.labelTemplate(u),d.updateElement(3,g,"labels","a-entity"),u.positionX=n-90,u.positionY=-6.5,u.positionZ=i+90,u.rotationX=0,u.rotationY=123,u.rotationZ=0,u.title=t.fTitle,u.color=h.getPrimaryFontColor();const K={};K.positionX=0,K.positionY=0,K.positionZ=-1,K.width=170,K.height=30,K.color="white",e.titles.attributes[0]=c.titleTemplate(u,K),d.updateElement(0,g,"titles","a-entity"),u.positionX=n+120,u.positionZ=i-70,u.rotationY=330,u.title=t.fName,e.titles.attributes[1]=c.titleTemplate(u,K),d.updateElement(1,g,"titles","a-entity")}const sa=(r,e)=>r<=0?0:(e>1&&(r=Math.round((r/e+Number.EPSILON)*100)/100),r);class aa{constructor(e){Z(this,Gr,void 0);U(this,Gr,e)}createTH2DemoHistogram(e,t,n,i){const o=At.createHistogram("TH2I",e,t);let a=n;for(let c=1;c<=20;c++)for(let d=1;d<=20;d++){const h=o.getBin(d,c);let u=0;u=a,o.setBinContent(h,u),a+=i}return o.fXaxis.fTitle="x Axis",o.fYaxis.fTitle="y Axis",o.fName="You don't have a valid file path",o.fTitle="This is a TH2 histogram demo",o.fMaximum=a,o}createTH3DemoHistogram(e,t,n,i,o){const a=At.createHistogram("TH3I",e,t,n);let c=i;for(let d=1;d<=20;d++)for(let h=1;h<=20;h++)for(let u=1;u<=20;u++){const g=a.getBin(u,h,d);let E=0;E=c,a.setBinContent(g,E),c+=o}return a.fXaxis.fTitle="x Axis",a.fYaxis.fTitle="y Axis",a.fZaxis.fTitle="z Axis",a.fName="You don't have a valid file path",a.fTitle="This is a TH3 histogram demo",a.fMaximum=c,a}}Gr=new WeakMap;const la=be.registerComponent("th2-histogram",{schema:{section:{type:"string"},filename:{type:"string"},theme:{type:"string",default:"def"},position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const r=this.el;Pi(this.schema,r),document.addEventListener("keydown",Br),document.addEventListener("keyup",Yr),this.demoHistogramService=new aa,this.localStorageService=new Qr,this.cameraService=new Wt,this.render=!1,this.histogram=null,this.model={bins:{elements:[],attributes:[]},labels:{elements:[],attributes:[]},titles:{elements:[],attributes:[]},banners:{elements:[],attributes:[]},normalXAxis:{elements:[],attributes:[]},reversedXAxis:{elements:[],attributes:[]},normalYAxis:{elements:[],attributes:[]},reversedYAxis:{elements:[],attributes:[]}},this.section=null;const e=n=>{console.log(n),this.section.xOffset=n.xOffset,this.section.yOffset=n.yOffset,this.range=n.range,this.cameraService.setCameraPosition(n),En(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0},t=n=>{this.localStorageService.storeTH2Offsets(n.xOffset,n.yOffset,n.range),e(n)};this.subscription=$e.getChangedSection().subscribe(t)},update:function(){Oi(),this.section=JSON.parse(this.data.section),At.openFile(this.data.filename).then(r=>r.readObject("hUsersVsProjects")).then(r=>{this.localStorageService.initHistogramData(r),this.histogram=r,En(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0}).then(()=>console.log("drawing completed")).catch(r=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),En(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(r)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",Br),document.removeEventListener("keyup",Yr)}}),ca=be.registerComponent("banner-control",{schema:{position:{name:"position",xValue:-1.28,yValue:.3,zValue:-1},scale:{name:"scale",xValue:.5,yValue:.7,zValue:.1},rotation:{name:"rotation",xValue:0,yValue:20,zValue:0}},init:function(){}});new Wt;const ua=r=>{r.detail.y>.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),r.detail.y<-.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),r.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),$e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),r.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),$e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},da=r=>{r.detail.y>.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),r.detail.y<-.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),r.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),r.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},fa=r=>{r.detail.y>.1&&xe.next({scale:-.1}),r.detail.y<-.1&&xe.next({scale:.1})},ha=r=>{r.detail.y>.1?xe.next({source:"next"}):r.detail.y<-.1&&xe.next({source:"prev"})},pa=r=>{r.detail.y>.1?xe.next({theme:"next"}):r.detail.y<-.1&&xe.next({theme:"prev"})},ma=r=>{r.detail.y>.1?xe.next({range:"next"}):r.detail.y<-.1&&xe.next({range:"prev"})},ga=r=>{r.detail.y>.1?xe.next({scene:"next"}):r.detail.y<-.1&&xe.next({scene:"prev"})},Ni=r=>{r==="Y"?xe.next({tool:"next"}):xe.next({tool:"prev"})},Fi=r=>{He.changeHistogramSectionByOffset("zOffset","TH3",!0,r)},Li=r=>{He.changeHistogramSectionByOffset("zOffset","TH3",!1,r)},Vi=()=>{new Wt},ya=r=>{ua(r)},ba=r=>{da(r)},va=()=>{Or.saveSelectedBinToLocalStorage(),jt()===0&&xe.next({binData:Or})},xa=()=>{Or.deleteBinFromLocalStorage()},Sa=()=>{$e.changeHistogramFunction("feet","TH2")},wa=()=>{$e.changeHistogramFunction("default","TH2")},Ca=()=>{Dt.setVisibilityOfBanners("oculus")},Ea=()=>{Dt.setUserState()},Ta=()=>{Dt.shiftBanners()},ka=r=>{r.forEach(e=>{})},_a=be.registerComponent("left-controller-logging",{init:function(){let r=!1,e=!0,t=!1;const n=this.el;n.addEventListener("gripdown",()=>{r=!0}),n.addEventListener("gripup",()=>{r=!1}),n.addEventListener("thumbstickdown",()=>{}),n.addEventListener("thumbstickmoved",i=>{if(r&&jt()===2)fa(i);else if(r&&jt()===3){if(e){e=!1,ha(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&jt()===4){if(e){e=!1,pa(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&jt()===5){if(e){e=!1,ma(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&jt()===6&&e){e=!1,ga(i);const o=setTimeout(()=>{e=!0},600);return()=>clearTimeout(o)}}),n.addEventListener("ybuttondown",()=>{r?t||(t=!0,Ni("Y")):Ca()}),n.addEventListener("xbuttondown",()=>{r?t||(t=!0,Ni("X")):Ea()}),n.addEventListener("ybuttonup",()=>{t=!1}),n.addEventListener("xbuttonup",()=>{t=!1})},update:function(){Vi()}}),Aa=be.registerComponent("right-controller-logging",{init:function(){let r=!1;const e=this.el;e.addEventListener("gripdown",()=>{r=!0}),e.addEventListener("gripup",()=>{r=!1}),e.addEventListener("thumbstickmoved",t=>{r?ya(t):ba(t)}),e.addEventListener("bbuttondown",()=>{Fi(!r)}),e.addEventListener("abuttondown",()=>{Li(!r)}),e.addEventListener("thumbstickdown",()=>{r?Sa():wa()}),e.addEventListener("triggerdown",()=>{r?(va(),ka()):(xa(),Ta())})},update:function(){Vi()}});class Pa{constructor(){Z(this,ir,void 0);U(this,ir,new gt)}sendSourceSubject(e){s(this,ir).next(e)}getSourceSettingSubject(){return s(this,ir).asObservable()}}ir=new WeakMap;const Oa=new Pa,ja=be.registerComponent("oculus-thumbstick-movement-controller",{schema:{acceleration:{type:"number",default:40},fly:{type:"boolean",default:!1},horizontalAxis:{type:"string",enum:["x","y","z"],default:"x"},verticalAxis:{type:"string",enum:["x","y","z"],default:"z"},enabled:{type:"boolean",default:!0},adEnabled:{type:"boolean",default:!0},adInverted:{type:"boolean",default:!1},wsEnabled:{type:"boolean",default:!0},wsInverted:{type:"boolean",default:!1}},required:["acceleration","fly","horizontalAxis","verticalAxis","enabled","adEnabled","adInverted","wsEnabled","wsInverted"],init:function(){this.velocity=new THREE.Vector3(0,0,0),this.tsData=new THREE.Vector2(0,0),this.moveEasing=1.1,this.thumbstickMoved=this.thumbstickMoved.bind(this);const r=this.el;let e=!1,t=!1;r.addEventListener("gripdown",()=>{e=!0}),r.addEventListener("gripup",()=>{e=!1});let n=0;const i=500;r.addEventListener("triggerdown",()=>{const o=performance.now();if(o-n<=i){let c=function(){let h=this.sceneElement.getAttribute("position"),u={x:h.x,y:h.y-1,z:h.z};this.sceneElement.setAttribute("position",u),u.y<=a&&clearInterval(d)},a=2,d=setInterval(c.bind(this),20)}else t=!0;n=o}),r.addEventListener("triggerup",()=>{n=performance.now(),t=!1}),r.addEventListener("thumbstickmoved",o=>{e&&jt()>1?this.tsData.set(0,0):(t?this.data.fly=!0:this.data.fly=!1,this.thumbstickMoved(o))})},update:function(){this.sceneElement=document.getElementById("cameraRig")},tick:function(r,e){var t=this.data,n=this.velocity;!n[t.horizontalAxis]&&!n[t.verticalAxis]&&!this.tsData.length()||(e=e/1e3,this.updateVelocity(e),!(!n[t.horizontalAxis]&&!n[t.verticalAxis])&&this.sceneElement.object3D.position.add(this.getMovementVector(e)))},updateVelocity:function(r){var e,t,n,i=this.data,o=this.velocity,a,c;const d=1e-5;if(t=i.horizontalAxis,n=i.verticalAxis,r>.2){o[t]=0,o[n]=0;return}var h=Math.pow(1/this.moveEasing,r*60);o[t]!==0&&(o[t]=o[t]*h),o[n]!==0&&(o[n]=o[n]*h),Math.abs(o[t])<d&&(o[t]=0),Math.abs(o[n])<d&&(o[n]=0),i.enabled&&(e=i.acceleration,i.adEnabled&&this.tsData.x&&(c=i.adInverted?-1:1,o[t]+=c*e*this.tsData.x*r),i.wsEnabled&&(a=i.wsInverted?-1:1,o[n]+=a*e*this.tsData.y*r))},getMovementVector:function(){var r=new THREE.Vector3(0,0,0),e=new THREE.Euler(0,0,0,"YXZ"),t=4;return function(n){var i=this.el.sceneEl.camera.el.object3D.rotation,o=this.velocity,a;return r.copy(o),r.multiplyScalar(n),i&&(a=this.data.fly?i.x:0,e.set(a,i.y-t,0),r.applyEuler(e)),r}}(),thumbstickMoved:function(r){this.tsData.set(r.detail.x,r.detail.y)},remove:function(){this.el.removeEventListener("thumbstickmoved",this.thumbstickMoved)}}),Da=new Qr;de.Banner=ca,de.HistogramTH2=la,de.LeftController=_a,de.NdmVrScene=ra,de.RightController=Aa,de.TabletContext=St,de.ThumbsticController=ja,de.defaultScheme=Di,de.ndmVrStorage=Da,de.sourceSettingSubject=Oa,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})});