@ndmspc/ndmvr 0.20220401.1 → 0.20230117.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.
- package/dist/ndmvr.es.js +6256 -0
- package/dist/ndmvr.umd.js +305 -0
- package/package.json +32 -57
- package/dist/index.js +0 -4582
- package/dist/index.js.map +0 -1
- package/dist/index.modern.js +0 -4572
- package/dist/index.modern.js.map +0 -1
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
var Qs=Object.defineProperty;var ea=(J,b,xe)=>b in J?Qs(J,b,{enumerable:!0,configurable:!0,writable:!0,value:xe}):J[b]=xe;var He=(J,b,xe)=>(ea(J,typeof b!="symbol"?b+"":b,xe),xe),li=(J,b,xe)=>{if(!b.has(J))throw TypeError("Cannot "+xe)};var n=(J,b,xe)=>(li(J,b,"read from private field"),xe?xe.call(J):b.get(J)),j=(J,b,xe)=>{if(b.has(J))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(J):b.set(J,xe)},B=(J,b,xe,_t)=>(li(J,b,"write to private field"),_t?_t.call(J,xe):b.set(J,xe),xe);var Ar=(J,b,xe)=>(li(J,b,"access private method"),xe);(function(J,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("aframe"),require("jsroot"),require("three")):typeof define=="function"&&define.amd?define(["exports","react","aframe","jsroot","three"],b):(J=typeof globalThis<"u"?globalThis:J||self,b(J["React Library Vite"]={},J.React,J.AFRAME$2,J.jsroot,J.THREE))})(this,function(J,b,xe,_t,vn){var bt,at,Le,Sr,Ke,wr,Et,Rt,Ct,$e,Ue,Re,or,N,Je,F,Q,ce,I,Ye,Xe,Qe,ct,vt,sr,fe,Fe,et,Ht,tt,Tt,zt,L,xt,lt,Dt,Ge,Er,Cr,Tr,Bt,It,jt,Nt,Mt,Yt,$r,_r,kr,Or,St,Ft,Pr,Lt;"use strict";function xn(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 Rr=xn(vn);var Hr={exports:{}},Ut={};var ui;function Sn(){if(ui)return Ut;ui=1;var r=b,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(u,f,h){var c,p={},k=null,D=null;h!==void 0&&(k=""+h),f.key!==void 0&&(k=""+f.key),f.ref!==void 0&&(D=f.ref);for(c in f)i.call(f,c)&&!s.hasOwnProperty(c)&&(p[c]=f[c]);if(u&&u.defaultProps)for(c in f=u.defaultProps,f)p[c]===void 0&&(p[c]=f[c]);return{$$typeof:e,type:u,key:k,ref:D,props:p,_owner:o.current}}return Ut.Fragment=t,Ut.jsx=a,Ut.jsxs=a,Ut}var Gt={};var fi;function wn(){return fi||(fi=1,process.env.NODE_ENV!=="production"&&function(){var r=b,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),T=Symbol.iterator,d="@@iterator";function g(l){if(l===null||typeof l!="object")return null;var w=T&&l[T]||l[d];return typeof w=="function"?w:null}var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(l){{for(var w=arguments.length,P=new Array(w>1?w-1:0),V=1;V<w;V++)P[V-1]=arguments[V];z("error",l,P)}}function z(l,w,P){{var V=A.ReactDebugCurrentFrame,de=V.getStackAddendum();de!==""&&(w+="%s",P=P.concat([de]));var Ee=P.map(function(le){return String(le)});Ee.unshift("Warning: "+w),Function.prototype.apply.call(console[l],console,Ee)}}var x=!1,m=!1,ee=!1,te=!1,E=!1,G;G=Symbol.for("react.module.reference");function ue(l){return!!(typeof l=="string"||typeof l=="function"||l===i||l===s||E||l===o||l===h||l===c||te||l===D||x||m||ee||typeof l=="object"&&l!==null&&(l.$$typeof===k||l.$$typeof===p||l.$$typeof===a||l.$$typeof===u||l.$$typeof===f||l.$$typeof===G||l.getModuleId!==void 0))}function we(l,w,P){var V=l.displayName;if(V)return V;var de=w.displayName||w.name||"";return de!==""?P+"("+de+")":P}function W(l){return l.displayName||"Context"}function q(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 i:return"Fragment";case t:return"Portal";case s:return"Profiler";case o:return"StrictMode";case h:return"Suspense";case c:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case u:var w=l;return W(w)+".Consumer";case a:var P=l;return W(P._context)+".Provider";case f:return we(l,l.render,"ForwardRef");case p:var V=l.displayName||null;return V!==null?V:q(l.type)||"Memo";case k:{var de=l,Ee=de._payload,le=de._init;try{return q(le(Ee))}catch{return null}}}return null}var re=Object.assign,Z=0,Y,be,he,Ce,_e,Ne,R;function O(){}O.__reactDisabledLog=!0;function H(){{if(Z===0){Y=console.log,be=console.info,he=console.warn,Ce=console.error,_e=console.group,Ne=console.groupCollapsed,R=console.groupEnd;var l={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}Z++}}function M(){{if(Z--,Z===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:re({},l,{value:Y}),info:re({},l,{value:be}),warn:re({},l,{value:he}),error:re({},l,{value:Ce}),group:re({},l,{value:_e}),groupCollapsed:re({},l,{value:Ne}),groupEnd:re({},l,{value:R})})}Z<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=A.ReactCurrentDispatcher,ie;function _(l,w,P){{if(ie===void 0)try{throw Error()}catch(de){var V=de.stack.trim().match(/\n( *(at )?)/);ie=V&&V[1]||""}return`
|
|
2
|
+
`+ie+l}}var ve=!1,K;{var ne=typeof WeakMap=="function"?WeakMap:Map;K=new ne}function S(l,w){if(!l||ve)return"";{var P=K.get(l);if(P!==void 0)return P}var V;ve=!0;var de=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ee;Ee=y.current,y.current=null,H();try{if(w){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(ht){V=ht}Reflect.construct(l,[],le)}else{try{le.call()}catch(ht){V=ht}l.call(le.prototype)}}else{try{throw Error()}catch(ht){V=ht}l()}}catch(ht){if(ht&&V&&typeof ht.stack=="string"){for(var se=ht.stack.split(`
|
|
3
|
+
`),Me=V.stack.split(`
|
|
4
|
+
`),ze=se.length-1,Be=Me.length-1;ze>=1&&Be>=0&&se[ze]!==Me[Be];)Be--;for(;ze>=1&&Be>=0;ze--,Be--)if(se[ze]!==Me[Be]){if(ze!==1||Be!==1)do if(ze--,Be--,Be<0||se[ze]!==Me[Be]){var We=`
|
|
5
|
+
`+se[ze].replace(" at new "," at ");return l.displayName&&We.includes("<anonymous>")&&(We=We.replace("<anonymous>",l.displayName)),typeof l=="function"&&K.set(l,We),We}while(ze>=1&&Be>=0);break}}}finally{ve=!1,y.current=Ee,M(),Error.prepareStackTrace=de}var Zt=l?l.displayName||l.name:"",bn=Zt?_(Zt):"";return typeof l=="function"&&K.set(l,bn),bn}function ke(l,w,P){return S(l,!1)}function $(l){var w=l.prototype;return!!(w&&w.isReactComponent)}function U(l,w,P){if(l==null)return"";if(typeof l=="function")return S(l,$(l));if(typeof l=="string")return _(l);switch(l){case h:return _("Suspense");case c:return _("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case f:return ke(l.render);case p:return U(l.type,w,P);case k:{var V=l,de=V._payload,Ee=V._init;try{return U(Ee(de),w,P)}catch{}}}return""}var Te=Object.prototype.hasOwnProperty,oe={},De=A.ReactDebugCurrentFrame;function rt(l){if(l){var w=l._owner,P=U(l.type,l._source,w?w.type:null);De.setExtraStackFrame(P)}else De.setExtraStackFrame(null)}function Ie(l,w,P,V,de){{var Ee=Function.call.bind(Te);for(var le in l)if(Ee(l,le)){var se=void 0;try{if(typeof l[le]!="function"){var Me=Error((V||"React class")+": "+P+" type `"+le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[le]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Me.name="Invariant Violation",Me}se=l[le](w,le,V,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ze){se=ze}se&&!(se instanceof Error)&&(rt(de),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).",V||"React class",P,le,typeof se),rt(null)),se instanceof Error&&!(se.message in oe)&&(oe[se.message]=!0,rt(de),C("Failed %s type: %s",P,se.message),rt(null))}}}var Xt=Array.isArray;function ut(l){return Xt(l)}function Ve(l){{var w=typeof Symbol=="function"&&Symbol.toStringTag,P=w&&l[Symbol.toStringTag]||l.constructor.name||"Object";return P}}function X(l){try{return Oe(l),!1}catch{return!0}}function Oe(l){return""+l}function Vt(l){if(X(l))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(l)),Oe(l)}var ft=A.ReactCurrentOwner,it={key:!0,ref:!0,__self:!0,__source:!0},un,fn,oi;oi={};function js(l){if(Te.call(l,"ref")){var w=Object.getOwnPropertyDescriptor(l,"ref").get;if(w&&w.isReactWarning)return!1}return l.ref!==void 0}function Ns(l){if(Te.call(l,"key")){var w=Object.getOwnPropertyDescriptor(l,"key").get;if(w&&w.isReactWarning)return!1}return l.key!==void 0}function Ms(l,w){if(typeof l.ref=="string"&&ft.current&&w&&ft.current.stateNode!==w){var P=q(ft.current.type);oi[P]||(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',q(ft.current.type),l.ref),oi[P]=!0)}}function Ys(l,w){{var P=function(){un||(un=!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)",w))};P.isReactWarning=!0,Object.defineProperty(l,"key",{get:P,configurable:!0})}}function Fs(l,w){{var P=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)",w))};P.isReactWarning=!0,Object.defineProperty(l,"ref",{get:P,configurable:!0})}}var Ls=function(l,w,P,V,de,Ee,le){var se={$$typeof:e,type:l,key:w,ref:P,props:le,_owner:Ee};return se._store={},Object.defineProperty(se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.freeze&&(Object.freeze(se.props),Object.freeze(se)),se};function Xs(l,w,P,V,de){{var Ee,le={},se=null,Me=null;P!==void 0&&(Vt(P),se=""+P),Ns(w)&&(Vt(w.key),se=""+w.key),js(w)&&(Me=w.ref,Ms(w,de));for(Ee in w)Te.call(w,Ee)&&!it.hasOwnProperty(Ee)&&(le[Ee]=w[Ee]);if(l&&l.defaultProps){var ze=l.defaultProps;for(Ee in ze)le[Ee]===void 0&&(le[Ee]=ze[Ee])}if(se||Me){var Be=typeof l=="function"?l.displayName||l.name||"Unknown":l;se&&Ys(le,Be),Me&&Fs(le,Be)}return Ls(l,se,Me,de,V,ft.current,le)}}var si=A.ReactCurrentOwner,hn=A.ReactDebugCurrentFrame;function Wt(l){if(l){var w=l._owner,P=U(l.type,l._source,w?w.type:null);hn.setExtraStackFrame(P)}else hn.setExtraStackFrame(null)}var ai;ai=!1;function ci(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function dn(){{if(si.current){var l=q(si.current.type);if(l)return`
|
|
6
|
+
|
|
7
|
+
Check the render method of \``+l+"`."}return""}}function Vs(l){{if(l!==void 0){var w=l.fileName.replace(/^.*[\\\/]/,""),P=l.lineNumber;return`
|
|
8
|
+
|
|
9
|
+
Check your code at `+w+":"+P+"."}return""}}var pn={};function Ws(l){{var w=dn();if(!w){var P=typeof l=="string"?l:l.displayName||l.name;P&&(w=`
|
|
10
|
+
|
|
11
|
+
Check the top-level render call using <`+P+">.")}return w}}function mn(l,w){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var P=Ws(w);if(pn[P])return;pn[P]=!0;var V="";l&&l._owner&&l._owner!==si.current&&(V=" It was passed a child from "+q(l._owner.type)+"."),Wt(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.',P,V),Wt(null)}}function yn(l,w){{if(typeof l!="object")return;if(ut(l))for(var P=0;P<l.length;P++){var V=l[P];ci(V)&&mn(V,w)}else if(ci(l))l._store&&(l._store.validated=!0);else if(l){var de=g(l);if(typeof de=="function"&&de!==l.entries)for(var Ee=de.call(l),le;!(le=Ee.next()).done;)ci(le.value)&&mn(le.value,w)}}}function Zs(l){{var w=l.type;if(w==null||typeof w=="string")return;var P;if(typeof w=="function")P=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===f||w.$$typeof===p))P=w.propTypes;else return;if(P){var V=q(w);Ie(P,l.props,"prop",V,l)}else if(w.PropTypes!==void 0&&!ai){ai=!0;var de=q(w);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",de||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Us(l){{for(var w=Object.keys(l.props),P=0;P<w.length;P++){var V=w[P];if(V!=="children"&&V!=="key"){Wt(l),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Wt(null);break}}l.ref!==null&&(Wt(l),C("Invalid attribute `ref` supplied to `React.Fragment`."),Wt(null))}}function gn(l,w,P,V,de,Ee){{var le=ue(l);if(!le){var se="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(se+=" 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 Me=Vs(de);Me?se+=Me:se+=dn();var ze;l===null?ze="null":ut(l)?ze="array":l!==void 0&&l.$$typeof===e?(ze="<"+(q(l.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):ze=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",ze,se)}var Be=Xs(l,w,P,de,Ee);if(Be==null)return Be;if(le){var We=w.children;if(We!==void 0)if(V)if(ut(We)){for(var Zt=0;Zt<We.length;Zt++)yn(We[Zt],l);Object.freeze&&Object.freeze(We)}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 yn(We,l)}return l===i?Us(Be):Zs(Be),Be}}function Gs(l,w,P){return gn(l,w,P,!0)}function qs(l,w,P){return gn(l,w,P,!1)}var Ks=qs,Js=Gs;Gt.Fragment=i,Gt.jsx=Ks,Gt.jsxs=Js}()),Gt}(function(r){process.env.NODE_ENV==="production"?r.exports=Sn():r.exports=wn()})(Hr);const v=Hr.exports.jsx,ae=Hr.exports.jsxs;var zr=function(r,e){return zr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])},zr(r,e)};function kt(r,e){zr(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Dr(r){return typeof r=="function"}var hi=!1,Ze={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){if(r){var e=new Error;""+e.stack}hi=r},get useDeprecatedSynchronousErrorHandling(){return hi}};function qt(r){setTimeout(function(){throw r},0)}var ar={closed:!0,next:function(r){},error:function(r){if(Ze.useDeprecatedSynchronousErrorHandling)throw r;qt(r)},complete:function(){}},En=function(){return Array.isArray||function(r){return r&&typeof r.length=="number"}}();function Cn(r){return r!==null&&typeof r=="object"}var Tn=function(){function r(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
12
|
+
`+e.map(function(t,i){return i+1+") "+t.toString()}).join(`
|
|
13
|
+
`):"",this.name="UnsubscriptionError",this.errors=e,this}return r.prototype=Object.create(Error.prototype),r}(),cr=Tn,Kt=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,o=t._ctorUnsubscribe,s=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 u=0;u<i.length;++u){var f=i[u];f.remove(this)}if(Dr(s)){o&&(this._unsubscribe=void 0);try{s.call(this)}catch(p){e=p instanceof cr?di(p.errors):[p]}}if(En(a))for(var u=-1,h=a.length;++u<h;){var c=a[u];if(Cn(c))try{c.unsubscribe()}catch(k){e=e||[],k instanceof cr?e=e.concat(di(k.errors)):e.push(k)}}if(e)throw new cr(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 o=t._parentOrParents;if(o===null)t._parentOrParents=this;else if(o instanceof r){if(o===this)return t;t._parentOrParents=[o,this]}else if(o.indexOf(this)===-1)o.push(this);else return t;var s=this._subscriptions;return s===null?this._subscriptions=[t]:s.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 di(r){return r.reduce(function(e,t){return e.concat(t instanceof cr?t.errors:t)},[])}var lr=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Ot=function(r){kt(e,r);function e(t,i,o){var s=r.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=ar;break;case 1:if(!t){s.destination=ar;break}if(typeof t=="object"){t instanceof e?(s.syncErrorThrowable=t.syncErrorThrowable,s.destination=t,t.add(s)):(s.syncErrorThrowable=!0,s.destination=new pi(s,t));break}default:s.syncErrorThrowable=!0,s.destination=new pi(s,t,i,o);break}return s}return e.prototype[lr]=function(){return this},e.create=function(t,i,o){var s=new e(t,i,o);return s.syncErrorThrowable=!1,s},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}(Kt),pi=function(r){kt(e,r);function e(t,i,o,s){var a=r.call(this)||this;a._parentSubscriber=t;var u,f=a;return Dr(i)?u=i:i&&(u=i.next,o=i.error,s=i.complete,i!==ar&&(f=Object.create(i),Dr(f.unsubscribe)&&a.add(f.unsubscribe.bind(f)),f.unsubscribe=a.unsubscribe.bind(a))),a._context=f,a._next=u,a._error=o,a._complete=s,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,o=Ze.useDeprecatedSynchronousErrorHandling;if(this._error)!o||!i.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(i,this._error,t),this.unsubscribe());else if(i.syncErrorThrowable)o?(i.syncErrorValue=t,i.syncErrorThrown=!0):qt(t),this.unsubscribe();else{if(this.unsubscribe(),o)throw t;qt(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var i=this._parentSubscriber;if(this._complete){var o=function(){return t._complete.call(t._context)};!Ze.useDeprecatedSynchronousErrorHandling||!i.syncErrorThrowable?(this.__tryOrUnsub(o),this.unsubscribe()):(this.__tryOrSetError(i,o),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,i){try{t.call(this._context,i)}catch(o){if(this.unsubscribe(),Ze.useDeprecatedSynchronousErrorHandling)throw o;qt(o)}},e.prototype.__tryOrSetError=function(t,i,o){if(!Ze.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{i.call(this._context,o)}catch(s){return Ze.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(qt(s),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Ot);function _n(r){for(;r;){var e=r,t=e.closed,i=e.destination,o=e.isStopped;if(t||o)return!1;i&&i instanceof Ot?r=i:r=null}return!0}function kn(r,e,t){if(r){if(r instanceof Ot)return r;if(r[lr])return r[lr]()}return!r&&!e&&!t?new Ot(ar):new Ot(r,e,t)}var On=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Pn(r){return r}function An(r){return r.length===0?Pn:r.length===1?r[0]:function(t){return r.reduce(function(i,o){return o(i)},t)}}var mi=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 o=this.operator,s=kn(e,t,i);if(o?s.add(o.call(s,this.source)):s.add(this.source||Ze.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),Ze.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},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=yi(t),new t(function(o,s){var a;a=i.subscribe(function(u){try{e(u)}catch(f){s(f),a&&a.unsubscribe()}},s,o)})},r.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},r.prototype[On]=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:An(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=yi(e),new e(function(i,o){var s;t.subscribe(function(a){return s=a},function(a){return o(a)},function(){return i(s)})})},r.create=function(e){return new r(e)},r}();function yi(r){if(r||(r=Ze.Promise||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}(),Jt=$n,Rn=function(r){kt(e,r);function e(t,i){var o=r.call(this)||this;return o.subject=t,o.subscriber=i,o.closed=!1,o}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 o=i.indexOf(this.subscriber);o!==-1&&i.splice(o,1)}}},e}(Kt),Hn=function(r){kt(e,r);function e(t){var i=r.call(this,t)||this;return i.destination=t,i}return e}(Ot),dt=function(r){kt(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[lr]=function(){return new Hn(this)},e.prototype.lift=function(t){var i=new gi(this,this);return i.operator=t,i},e.prototype.next=function(t){if(this.closed)throw new Jt;if(!this.isStopped)for(var i=this.observers,o=i.length,s=i.slice(),a=0;a<o;a++)s[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new Jt;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var i=this.observers,o=i.length,s=i.slice(),a=0;a<o;a++)s[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new Jt;this.isStopped=!0;for(var t=this.observers,i=t.length,o=t.slice(),s=0;s<i;s++)o[s].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 Jt;return r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new Jt;return this.hasError?(t.error(this.thrownError),Kt.EMPTY):this.isStopped?(t.complete(),Kt.EMPTY):(this.observers.push(t),new Rn(this,t))},e.prototype.asObservable=function(){var t=new mi;return t.source=this,t},e.create=function(t,i){return new gi(t,i)},e}(mi),gi=function(r){kt(e,r);function e(t,i){var o=r.call(this)||this;return o.destination=t,o.source=i,o}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):Kt.EMPTY},e}(dt);class zn{constructor(){j(this,bt,void 0);B(this,bt,new dt)}setVisibilityOfBanners(e){n(this,bt).next({device:e})}shiftBanners(){n(this,bt).next("shift")}setUserState(){n(this,bt).next("show")}getCameraSubject(){return n(this,bt).asObservable()}}bt=new WeakMap;const pt=new zn,qe=b.createContext();class Br{constructor(){j(this,at,void 0);B(this,at,new dt)}changeHistogramSectionByOffset(e,t,i,o){n(this,at).next({name:t,axis:e,increment:i,defaultRange:o})}changeHistogramFunction(e,t){n(this,at).next({name:t,fFunction:e})}changeHistogramScale(e,t){n(this,at).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){n(this,at).next({name:t,minValue:e})}getChangedSection(){return n(this,at).asObservable()}}at=new WeakMap;const nt=new Br,Se=new Br,Pe=new Br;var ur={exports:{}},pe={};var bi;function Dn(){if(bi)return pe;bi=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),T;T=Symbol.for("react.module.reference");function d(g){if(typeof g=="object"&&g!==null){var A=g.$$typeof;switch(A){case r:switch(g=g.type,g){case t:case o:case i:case h:case c:return g;default:switch(g=g&&g.$$typeof,g){case u:case a:case f:case k:case p:case s:return g;default:return A}}case e:return A}}}return pe.ContextConsumer=a,pe.ContextProvider=s,pe.Element=r,pe.ForwardRef=f,pe.Fragment=t,pe.Lazy=k,pe.Memo=p,pe.Portal=e,pe.Profiler=o,pe.StrictMode=i,pe.Suspense=h,pe.SuspenseList=c,pe.isAsyncMode=function(){return!1},pe.isConcurrentMode=function(){return!1},pe.isContextConsumer=function(g){return d(g)===a},pe.isContextProvider=function(g){return d(g)===s},pe.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===r},pe.isForwardRef=function(g){return d(g)===f},pe.isFragment=function(g){return d(g)===t},pe.isLazy=function(g){return d(g)===k},pe.isMemo=function(g){return d(g)===p},pe.isPortal=function(g){return d(g)===e},pe.isProfiler=function(g){return d(g)===o},pe.isStrictMode=function(g){return d(g)===i},pe.isSuspense=function(g){return d(g)===h},pe.isSuspenseList=function(g){return d(g)===c},pe.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===t||g===o||g===i||g===h||g===c||g===D||typeof g=="object"&&g!==null&&(g.$$typeof===k||g.$$typeof===p||g.$$typeof===s||g.$$typeof===a||g.$$typeof===f||g.$$typeof===T||g.getModuleId!==void 0)},pe.typeOf=d,pe}var me={};var vi;function Bn(){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"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),T=!1,d=!1,g=!1,A=!1,C=!1,z;z=Symbol.for("react.module.reference");function x($){return!!(typeof $=="string"||typeof $=="function"||$===t||$===o||C||$===i||$===h||$===c||A||$===D||T||d||g||typeof $=="object"&&$!==null&&($.$$typeof===k||$.$$typeof===p||$.$$typeof===s||$.$$typeof===a||$.$$typeof===f||$.$$typeof===z||$.getModuleId!==void 0))}function m($){if(typeof $=="object"&&$!==null){var U=$.$$typeof;switch(U){case r:var Te=$.type;switch(Te){case t:case o:case i:case h:case c:return Te;default:var oe=Te&&Te.$$typeof;switch(oe){case u:case a:case f:case k:case p:case s:return oe;default:return U}}case e:return U}}}var ee=a,te=s,E=r,G=f,ue=t,we=k,W=p,q=e,re=o,Z=i,Y=h,be=c,he=!1,Ce=!1;function _e($){return he||(he=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ne($){return Ce||(Ce=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function R($){return m($)===a}function O($){return m($)===s}function H($){return typeof $=="object"&&$!==null&&$.$$typeof===r}function M($){return m($)===f}function y($){return m($)===t}function ie($){return m($)===k}function _($){return m($)===p}function ve($){return m($)===e}function K($){return m($)===o}function ne($){return m($)===i}function S($){return m($)===h}function ke($){return m($)===c}me.ContextConsumer=ee,me.ContextProvider=te,me.Element=E,me.ForwardRef=G,me.Fragment=ue,me.Lazy=we,me.Memo=W,me.Portal=q,me.Profiler=re,me.StrictMode=Z,me.Suspense=Y,me.SuspenseList=be,me.isAsyncMode=_e,me.isConcurrentMode=Ne,me.isContextConsumer=R,me.isContextProvider=O,me.isElement=H,me.isForwardRef=M,me.isFragment=y,me.isLazy=ie,me.isMemo=_,me.isPortal=ve,me.isProfiler=K,me.isStrictMode=ne,me.isSuspense=S,me.isSuspenseList=ke,me.isValidElementType=x,me.typeOf=m}()),me}(function(r){process.env.NODE_ENV==="production"?r.exports=Dn():r.exports=Bn()})(ur);function In(r){function e(R,O,H,M,y){for(var ie=0,_=0,ve=0,K=0,ne,S,ke=0,$=0,U,Te=U=ne=0,oe=0,De=0,rt=0,Ie=0,Xt=H.length,ut=Xt-1,Ve,X="",Oe="",Vt="",ft="",it;oe<Xt;){if(S=H.charCodeAt(oe),oe===ut&&_+K+ve+ie!==0&&(_!==0&&(S=_===47?10:47),K=ve=ie=0,Xt++,ut++),_+K+ve+ie===0){if(oe===ut&&(0<De&&(X=X.replace(k,"")),0<X.trim().length)){switch(S){case 32:case 9:case 59:case 13:case 10:break;default:X+=H.charAt(oe)}S=59}switch(S){case 123:for(X=X.trim(),ne=X.charCodeAt(0),U=1,Ie=++oe;oe<Xt;){switch(S=H.charCodeAt(oe)){case 123:U++;break;case 125:U--;break;case 47:switch(S=H.charCodeAt(oe+1)){case 42:case 47:e:{for(Te=oe+1;Te<ut;++Te)switch(H.charCodeAt(Te)){case 47:if(S===42&&H.charCodeAt(Te-1)===42&&oe+2!==Te){oe=Te+1;break e}break;case 10:if(S===47){oe=Te+1;break e}}oe=Te}}break;case 91:S++;case 40:S++;case 34:case 39:for(;oe++<ut&&H.charCodeAt(oe)!==S;);}if(U===0)break;oe++}switch(U=H.substring(Ie,oe),ne===0&&(ne=(X=X.replace(p,"").trim()).charCodeAt(0)),ne){case 64:switch(0<De&&(X=X.replace(k,"")),S=X.charCodeAt(1),S){case 100:case 109:case 115:case 45:De=O;break;default:De=Y}if(U=e(O,De,U,S,y+1),Ie=U.length,0<he&&(De=t(Y,X,rt),it=u(3,U,De,O,q,W,Ie,S,y,M),X=De.join(""),it!==void 0&&(Ie=(U=it.trim()).length)===0&&(S=0,U="")),0<Ie)switch(S){case 115:X=X.replace(ee,a);case 100:case 109:case 45:U=X+"{"+U+"}";break;case 107:X=X.replace(C,"$1 $2"),U=X+"{"+U+"}",U=Z===1||Z===2&&s("@"+U,3)?"@-webkit-"+U+"@"+U:"@"+U;break;default:U=X+U,M===112&&(U=(Oe+=U,""))}else U="";break;default:U=e(O,t(O,X,rt),U,M,y+1)}Vt+=U,U=rt=De=Te=ne=0,X="",S=H.charCodeAt(++oe);break;case 125:case 59:if(X=(0<De?X.replace(k,""):X).trim(),1<(Ie=X.length))switch(Te===0&&(ne=X.charCodeAt(0),ne===45||96<ne&&123>ne)&&(Ie=(X=X.replace(" ",":")).length),0<he&&(it=u(1,X,O,R,q,W,Oe.length,M,y,M))!==void 0&&(Ie=(X=it.trim()).length)===0&&(X="\0\0"),ne=X.charCodeAt(0),S=X.charCodeAt(1),ne){case 0:break;case 64:if(S===105||S===99){ft+=X+H.charAt(oe);break}default:X.charCodeAt(Ie-1)!==58&&(Oe+=o(X,ne,S,X.charCodeAt(2)))}rt=De=Te=ne=0,X="",S=H.charCodeAt(++oe)}}switch(S){case 13:case 10:_===47?_=0:1+ne===0&&M!==107&&0<X.length&&(De=1,X+="\0"),0<he*_e&&u(0,X,O,R,q,W,Oe.length,M,y,M),W=1,q++;break;case 59:case 125:if(_+K+ve+ie===0){W++;break}default:switch(W++,Ve=H.charAt(oe),S){case 9:case 32:if(K+ie+_===0)switch(ke){case 44:case 58:case 9:case 32:Ve="";break;default:S!==32&&(Ve=" ")}break;case 0:Ve="\\0";break;case 12:Ve="\\f";break;case 11:Ve="\\v";break;case 38:K+_+ie===0&&(De=rt=1,Ve="\f"+Ve);break;case 108:if(K+_+ie+re===0&&0<Te)switch(oe-Te){case 2:ke===112&&H.charCodeAt(oe-3)===58&&(re=ke);case 8:$===111&&(re=$)}break;case 58:K+_+ie===0&&(Te=oe);break;case 44:_+ve+K+ie===0&&(De=1,Ve+="\r");break;case 34:case 39:_===0&&(K=K===S?0:K===0?S:K);break;case 91:K+_+ve===0&&ie++;break;case 93:K+_+ve===0&&ie--;break;case 41:K+_+ie===0&&ve--;break;case 40:if(K+_+ie===0){if(ne===0)switch(2*ke+3*$){case 533:break;default:ne=1}ve++}break;case 64:_+ve+K+ie+Te+U===0&&(U=1);break;case 42:case 47:if(!(0<K+ie+ve))switch(_){case 0:switch(2*S+3*H.charCodeAt(oe+1)){case 235:_=47;break;case 220:Ie=oe,_=42}break;case 42:S===47&&ke===42&&Ie+2!==oe&&(H.charCodeAt(Ie+2)===33&&(Oe+=H.substring(Ie,oe+1)),Ve="",_=0)}}_===0&&(X+=Ve)}$=ke,ke=S,oe++}if(Ie=Oe.length,0<Ie){if(De=O,0<he&&(it=u(2,Oe,De,R,q,W,Ie,M,y,M),it!==void 0&&(Oe=it).length===0))return ft+Oe+Vt;if(Oe=De.join(",")+"{"+Oe+"}",Z*re!==0){switch(Z!==2||s(Oe,2)||(re=0),re){case 111:Oe=Oe.replace(x,":-moz-$1")+Oe;break;case 112:Oe=Oe.replace(z,"::-webkit-input-$1")+Oe.replace(z,"::-moz-$1")+Oe.replace(z,":-ms-input-$1")+Oe}re=0}}return ft+Oe+Vt}function t(R,O,H){var M=O.trim().split(g);O=M;var y=M.length,ie=R.length;switch(ie){case 0:case 1:var _=0;for(R=ie===0?"":R[0]+" ";_<y;++_)O[_]=i(R,O[_],H).trim();break;default:var ve=_=0;for(O=[];_<y;++_)for(var K=0;K<ie;++K)O[ve++]=i(R[K]+" ",M[_],H).trim()}return O}function i(R,O,H){var M=O.charCodeAt(0);switch(33>M&&(M=(O=O.trim()).charCodeAt(0)),M){case 38:return O.replace(A,"$1"+R.trim());case 58:return R.trim()+O.replace(A,"$1"+R.trim());default:if(0<1*H&&0<O.indexOf("\f"))return O.replace(A,(R.charCodeAt(0)===58?"":"$1")+R.trim())}return R+O}function o(R,O,H,M){var y=R+";",ie=2*O+3*H+4*M;if(ie===944){R=y.indexOf(":",9)+1;var _=y.substring(R,y.length-1).trim();return _=y.substring(0,R).trim()+_+";",Z===1||Z===2&&s(_,1)?"-webkit-"+_+_:_}if(Z===0||Z===2&&!s(y,1))return y;switch(ie){case 1015:return y.charCodeAt(10)===97?"-webkit-"+y+y:y;case 951:return y.charCodeAt(3)===116?"-webkit-"+y+y:y;case 963:return y.charCodeAt(5)===110?"-webkit-"+y+y:y;case 1009:if(y.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+y+y;case 978:return"-webkit-"+y+"-moz-"+y+y;case 1019:case 983:return"-webkit-"+y+"-moz-"+y+"-ms-"+y+y;case 883:if(y.charCodeAt(8)===45)return"-webkit-"+y+y;if(0<y.indexOf("image-set(",11))return y.replace(we,"$1-webkit-$2")+y;break;case 932:if(y.charCodeAt(4)===45)switch(y.charCodeAt(5)){case 103:return"-webkit-box-"+y.replace("-grow","")+"-webkit-"+y+"-ms-"+y.replace("grow","positive")+y;case 115:return"-webkit-"+y+"-ms-"+y.replace("shrink","negative")+y;case 98:return"-webkit-"+y+"-ms-"+y.replace("basis","preferred-size")+y}return"-webkit-"+y+"-ms-"+y+y;case 964:return"-webkit-"+y+"-ms-flex-"+y+y;case 1023:if(y.charCodeAt(8)!==99)break;return _=y.substring(y.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+_+"-webkit-"+y+"-ms-flex-pack"+_+y;case 1005:return T.test(y)?y.replace(D,":-webkit-")+y.replace(D,":-moz-")+y:y;case 1e3:switch(_=y.substring(13).trim(),O=_.indexOf("-")+1,_.charCodeAt(0)+_.charCodeAt(O)){case 226:_=y.replace(m,"tb");break;case 232:_=y.replace(m,"tb-rl");break;case 220:_=y.replace(m,"lr");break;default:return y}return"-webkit-"+y+"-ms-"+_+y;case 1017:if(y.indexOf("sticky",9)===-1)break;case 975:switch(O=(y=R).length-10,_=(y.charCodeAt(O)===33?y.substring(0,O):y).substring(R.indexOf(":",7)+1).trim(),ie=_.charCodeAt(0)+(_.charCodeAt(7)|0)){case 203:if(111>_.charCodeAt(8))break;case 115:y=y.replace(_,"-webkit-"+_)+";"+y;break;case 207:case 102:y=y.replace(_,"-webkit-"+(102<ie?"inline-":"")+"box")+";"+y.replace(_,"-webkit-"+_)+";"+y.replace(_,"-ms-"+_+"box")+";"+y}return y+";";case 938:if(y.charCodeAt(5)===45)switch(y.charCodeAt(6)){case 105:return _=y.replace("-items",""),"-webkit-"+y+"-webkit-box-"+_+"-ms-flex-"+_+y;case 115:return"-webkit-"+y+"-ms-flex-item-"+y.replace(E,"")+y;default:return"-webkit-"+y+"-ms-flex-line-pack"+y.replace("align-content","").replace(E,"")+y}break;case 973:case 989:if(y.charCodeAt(3)!==45||y.charCodeAt(4)===122)break;case 931:case 953:if(ue.test(R)===!0)return(_=R.substring(R.indexOf(":")+1)).charCodeAt(0)===115?o(R.replace("stretch","fill-available"),O,H,M).replace(":fill-available",":stretch"):y.replace(_,"-webkit-"+_)+y.replace(_,"-moz-"+_.replace("fill-",""))+y;break;case 962:if(y="-webkit-"+y+(y.charCodeAt(5)===102?"-ms-"+y:"")+y,H+M===211&&y.charCodeAt(13)===105&&0<y.indexOf("transform",10))return y.substring(0,y.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+y}return y}function s(R,O){var H=R.indexOf(O===1?":":"{"),M=R.substring(0,O!==3?H:10);return H=R.substring(H+1,R.length-1),Ce(O!==2?M:M.replace(G,"$1"),H,O)}function a(R,O){var H=o(O,O.charCodeAt(0),O.charCodeAt(1),O.charCodeAt(2));return H!==O+";"?H.replace(te," or ($1)").substring(4):"("+O+")"}function u(R,O,H,M,y,ie,_,ve,K,ne){for(var S=0,ke=O,$;S<he;++S)switch($=be[S].call(c,R,ke,H,M,y,ie,_,ve,K,ne)){case void 0:case!1:case!0:case null:break;default:ke=$}if(ke!==O)return ke}function f(R){switch(R){case void 0:case null:he=be.length=0;break;default:if(typeof R=="function")be[he++]=R;else if(typeof R=="object")for(var O=0,H=R.length;O<H;++O)f(R[O]);else _e=!!R|0}return f}function h(R){return R=R.prefix,R!==void 0&&(Ce=null,R?typeof R!="function"?Z=1:(Z=2,Ce=R):Z=0),h}function c(R,O){var H=R;if(33>H.charCodeAt(0)&&(H=H.trim()),Ne=H,H=[Ne],0<he){var M=u(-1,O,H,H,q,W,0,0,0,0);M!==void 0&&typeof M=="string"&&(O=M)}var y=e(Y,H,O,0,0);return 0<he&&(M=u(-2,y,H,H,q,W,y.length,0,0,0),M!==void 0&&(y=M)),Ne="",re=0,W=q=1,y}var p=/^\0+/g,k=/[\0\r\f]/g,D=/: */g,T=/zoo|gra/,d=/([,: ])(transform)/g,g=/,\r+?/g,A=/([\t\r\n ])*\f?&/g,C=/@(k\w+)\s*(\S*)\s*/,z=/::(place)/g,x=/:(read-only)/g,m=/[svh]\w+-[tblr]{2}/,ee=/\(\s*(.*)\s*\)/g,te=/([\s\S]*?);/g,E=/-self|flex-/g,G=/[^]*?(:[rp][el]a[\w-]+)[^]*/,ue=/stretch|:\s*\w+\-(?:conte|avail)/,we=/([^-])(image-set\()/,W=1,q=1,re=0,Z=1,Y=[],be=[],he=0,Ce=null,_e=0,Ne="";return c.use=f,c.set=h,r!==void 0&&h(r),c}var jn={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 Mn=/^((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)-.*))$/,xi=Nn(function(r){return Mn.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),Si={exports:{}},ye={};var wi;function Yn(){if(wi)return ye;wi=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,o=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,c=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,k=r?Symbol.for("react.suspense_list"):60120,D=r?Symbol.for("react.memo"):60115,T=r?Symbol.for("react.lazy"):60116,d=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,A=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function z(m){if(typeof m=="object"&&m!==null){var ee=m.$$typeof;switch(ee){case e:switch(m=m.type,m){case f:case h:case i:case s:case o:case p:return m;default:switch(m=m&&m.$$typeof,m){case u:case c:case T:case D:case a:return m;default:return ee}}case t:return ee}}}function x(m){return z(m)===h}return ye.AsyncMode=f,ye.ConcurrentMode=h,ye.ContextConsumer=u,ye.ContextProvider=a,ye.Element=e,ye.ForwardRef=c,ye.Fragment=i,ye.Lazy=T,ye.Memo=D,ye.Portal=t,ye.Profiler=s,ye.StrictMode=o,ye.Suspense=p,ye.isAsyncMode=function(m){return x(m)||z(m)===f},ye.isConcurrentMode=x,ye.isContextConsumer=function(m){return z(m)===u},ye.isContextProvider=function(m){return z(m)===a},ye.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ye.isForwardRef=function(m){return z(m)===c},ye.isFragment=function(m){return z(m)===i},ye.isLazy=function(m){return z(m)===T},ye.isMemo=function(m){return z(m)===D},ye.isPortal=function(m){return z(m)===t},ye.isProfiler=function(m){return z(m)===s},ye.isStrictMode=function(m){return z(m)===o},ye.isSuspense=function(m){return z(m)===p},ye.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===i||m===h||m===s||m===o||m===p||m===k||typeof m=="object"&&m!==null&&(m.$$typeof===T||m.$$typeof===D||m.$$typeof===a||m.$$typeof===u||m.$$typeof===c||m.$$typeof===g||m.$$typeof===A||m.$$typeof===C||m.$$typeof===d)},ye.typeOf=z,ye}var ge={};var Ei;function Fn(){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,i=r?Symbol.for("react.fragment"):60107,o=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,c=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,k=r?Symbol.for("react.suspense_list"):60120,D=r?Symbol.for("react.memo"):60115,T=r?Symbol.for("react.lazy"):60116,d=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,A=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function z(S){return typeof S=="string"||typeof S=="function"||S===i||S===h||S===s||S===o||S===p||S===k||typeof S=="object"&&S!==null&&(S.$$typeof===T||S.$$typeof===D||S.$$typeof===a||S.$$typeof===u||S.$$typeof===c||S.$$typeof===g||S.$$typeof===A||S.$$typeof===C||S.$$typeof===d)}function x(S){if(typeof S=="object"&&S!==null){var ke=S.$$typeof;switch(ke){case e:var $=S.type;switch($){case f:case h:case i:case s:case o:case p:return $;default:var U=$&&$.$$typeof;switch(U){case u:case c:case T:case D:case a:return U;default:return ke}}case t:return ke}}}var m=f,ee=h,te=u,E=a,G=e,ue=c,we=i,W=T,q=D,re=t,Z=s,Y=o,be=p,he=!1;function Ce(S){return he||(he=!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.")),_e(S)||x(S)===f}function _e(S){return x(S)===h}function Ne(S){return x(S)===u}function R(S){return x(S)===a}function O(S){return typeof S=="object"&&S!==null&&S.$$typeof===e}function H(S){return x(S)===c}function M(S){return x(S)===i}function y(S){return x(S)===T}function ie(S){return x(S)===D}function _(S){return x(S)===t}function ve(S){return x(S)===s}function K(S){return x(S)===o}function ne(S){return x(S)===p}ge.AsyncMode=m,ge.ConcurrentMode=ee,ge.ContextConsumer=te,ge.ContextProvider=E,ge.Element=G,ge.ForwardRef=ue,ge.Fragment=we,ge.Lazy=W,ge.Memo=q,ge.Portal=re,ge.Profiler=Z,ge.StrictMode=Y,ge.Suspense=be,ge.isAsyncMode=Ce,ge.isConcurrentMode=_e,ge.isContextConsumer=Ne,ge.isContextProvider=R,ge.isElement=O,ge.isForwardRef=H,ge.isFragment=M,ge.isLazy=y,ge.isMemo=ie,ge.isPortal=_,ge.isProfiler=ve,ge.isStrictMode=K,ge.isSuspense=ne,ge.isValidElementType=z,ge.typeOf=x}()),ge}(function(r){process.env.NODE_ENV==="production"?r.exports=Yn():r.exports=Fn()})(Si);var Ir=Si.exports,Ln={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Xn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ci={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},jr={};jr[Ir.ForwardRef]=Vn,jr[Ir.Memo]=Ci;function Ti(r){return Ir.isMemo(r)?Ci:jr[r.$$typeof]||Ln}var Wn=Object.defineProperty,Zn=Object.getOwnPropertyNames,_i=Object.getOwnPropertySymbols,Un=Object.getOwnPropertyDescriptor,Gn=Object.getPrototypeOf,ki=Object.prototype;function Oi(r,e,t){if(typeof e!="string"){if(ki){var i=Gn(e);i&&i!==ki&&Oi(r,i,t)}var o=Zn(e);_i&&(o=o.concat(_i(e)));for(var s=Ti(r),a=Ti(e),u=0;u<o.length;++u){var f=o[u];if(!Xn[f]&&!(t&&t[f])&&!(a&&a[f])&&!(s&&s[f])){var h=Un(e,f);try{Wn(r,f,h)}catch{}}}}return r}var qn=Oi;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 Pi=function(r,e){for(var t=[r[0]],i=0,o=e.length;i<o;i+=1)t.push(e[i],r[i+1]);return t},Nr=function(r){return r!==null&&typeof r=="object"&&(r.toString?r.toString():Object.prototype.toString.call(r))==="[object Object]"&&!ur.exports.typeOf(r)},fr=Object.freeze([]),mt=Object.freeze({});function Qt(r){return typeof r=="function"}function Mr(r){return process.env.NODE_ENV!=="production"&&typeof r=="string"&&r||r.displayName||r.name||"Component"}function Yr(r){return r&&typeof r.styledComponentId=="string"}var Pt=typeof process<"u"&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Fr=typeof window<"u"&&"HTMLElement"in window,Kn=Boolean(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&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:typeof process<"u"&&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"),Jn=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
14
|
+
|
|
15
|
+
`,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.
|
|
16
|
+
|
|
17
|
+
- Are you trying to reuse it across renders?
|
|
18
|
+
- Are you accidentally calling collectStyles twice?
|
|
19
|
+
|
|
20
|
+
`,3:`Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
21
|
+
|
|
22
|
+
`,4:`The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
23
|
+
|
|
24
|
+
- Does this error occur on the client and is your target falsy?
|
|
25
|
+
- Does this error occur on the server and is the sheet falsy?
|
|
26
|
+
|
|
27
|
+
`,5:`The clone method cannot be used on the client!
|
|
28
|
+
|
|
29
|
+
- Are you running in a client-like environment on the server?
|
|
30
|
+
- Are you trying to run SSR on the client?
|
|
31
|
+
|
|
32
|
+
`,6:`Trying to insert a new style tag, but the given Node is unmounted!
|
|
33
|
+
|
|
34
|
+
- Are you using a custom target that isn't mounted?
|
|
35
|
+
- Does your document not have a valid head element?
|
|
36
|
+
- Have you accidentally removed a style tag manually?
|
|
37
|
+
|
|
38
|
+
`,7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:`ThemeProvider: Please make your "theme" prop an object.
|
|
39
|
+
|
|
40
|
+
`,9:"Missing document `<head>`\n\n",10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
41
|
+
|
|
42
|
+
`,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
43
|
+
|
|
44
|
+
`,12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:`%s 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.
|
|
45
|
+
|
|
46
|
+
`,14:`ThemeProvider: "theme" prop is required.
|
|
47
|
+
|
|
48
|
+
`,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s.
|
|
49
|
+
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
50
|
+
as for instance in your render method then you may be running into this limitation.
|
|
51
|
+
|
|
52
|
+
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
53
|
+
Has styled-components' style tag been unmounted or altered by another script?
|
|
54
|
+
`}:{};function Qn(){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(o){r=r.replace(/%[a-z]/,o)}),r}function At(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(Qn.apply(void 0,[Jn[r]].concat(t)).trim())}var eo=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,o=0;o<t;o++)i+=this.groupSizes[o];return i},e.insertRules=function(t,i){if(t>=this.groupSizes.length){for(var o=this.groupSizes,s=o.length,a=s;t>=a;)(a<<=1)<0&&At(16,""+t);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var u=s;u<a;u++)this.groupSizes[u]=0}for(var f=this.indexOfGroup(t+1),h=0,c=i.length;h<c;h++)this.tag.insertRule(f,i[h])&&(this.groupSizes[t]++,f++)},e.clearGroup=function(t){if(t<this.length){var i=this.groupSizes[t],o=this.indexOfGroup(t),s=o+i;this.groupSizes[t]=0;for(var a=o;a<s;a++)this.tag.deleteRule(o)}},e.getGroup=function(t){var i="";if(t>=this.length||this.groupSizes[t]===0)return i;for(var o=this.groupSizes[t],s=this.indexOfGroup(t),a=s+o,u=s;u<a;u++)i+=this.tag.getRule(u)+`/*!sc*/
|
|
55
|
+
`;return i},r}(),hr=new Map,dr=new Map,er=1,pr=function(r){if(hr.has(r))return hr.get(r);for(;dr.has(er);)er++;var e=er++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&At(16,""+e),hr.set(r,e),dr.set(e,r),e},to=function(r){return dr.get(r)},ro=function(r,e){e>=er&&(er=e+1),hr.set(r,e),dr.set(e,r)},io="style["+Pt+'][data-styled-version="5.3.6"]',no=new RegExp("^"+Pt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),oo=function(r,e,t){for(var i,o=t.split(","),s=0,a=o.length;s<a;s++)(i=o[s])&&r.registerName(e,i)},so=function(r,e){for(var t=(e.textContent||"").split(`/*!sc*/
|
|
56
|
+
`),i=[],o=0,s=t.length;o<s;o++){var a=t[o].trim();if(a){var u=a.match(no);if(u){var f=0|parseInt(u[1],10),h=u[2];f!==0&&(ro(h,f),oo(r,h,u[3]),r.getTag().insertRules(f,i)),i.length=0}else i.push(a)}}},ao=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},Ai=function(r){var e=document.head,t=r||e,i=document.createElement("style"),o=function(u){for(var f=u.childNodes,h=f.length;h>=0;h--){var c=f[h];if(c&&c.nodeType===1&&c.hasAttribute(Pt))return c}}(t),s=o!==void 0?o.nextSibling:null;i.setAttribute(Pt,"active"),i.setAttribute("data-styled-version","5.3.6");var a=ao();return a&&i.setAttribute("nonce",a),t.insertBefore(i,s),i},co=function(){function r(t){var i=this.element=Ai(t);i.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var s=document.styleSheets,a=0,u=s.length;a<u;a++){var f=s[a];if(f.ownerNode===o)return f}At(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}(),lo=function(){function r(t){var i=this.element=Ai(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 o=document.createTextNode(i),s=this.nodes[t];return this.element.insertBefore(o,s||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}(),uo=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}(),$i=Fr,fo={isServer:!Fr,useCSSOMInjection:!Kn},Ri=function(){function r(t,i,o){t===void 0&&(t=mt),i===void 0&&(i={}),this.options=ot({},fo,{},t),this.gs=i,this.names=new Map(o),this.server=!!t.isServer,!this.server&&Fr&&$i&&($i=!1,function(s){for(var a=document.querySelectorAll(io),u=0,f=a.length;u<f;u++){var h=a[u];h&&h.getAttribute(Pt)!=="active"&&(so(s,h),h.parentNode&&h.parentNode.removeChild(h))}}(this))}r.registerId=function(t){return pr(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=(o=(i=this.options).isServer,s=i.useCSSOMInjection,a=i.target,t=o?new uo(a):s?new co(a):new lo(a),new eo(t)));var t,i,o,s,a},e.hasNameForId=function(t,i){return this.names.has(t)&&this.names.get(t).has(i)},e.registerName=function(t,i){if(pr(t),this.names.has(t))this.names.get(t).add(i);else{var o=new Set;o.add(i),this.names.set(t,o)}},e.insertRules=function(t,i,o){this.registerName(t,i),this.getTag().insertRules(pr(t),o)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(pr(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var i=t.getTag(),o=i.length,s="",a=0;a<o;a++){var u=to(a);if(u!==void 0){var f=t.names.get(u),h=i.getGroup(a);if(f&&h&&f.size){var c=Pt+".g"+a+'[id="'+u+'"]',p="";f!==void 0&&f.forEach(function(k){k.length>0&&(p+=k+",")}),s+=""+h+c+'{content:"'+p+`"}/*!sc*/
|
|
57
|
+
`}}}return s}(this)},r}(),ho=/(a)(d)/gi,Hi=function(r){return String.fromCharCode(r+(r>25?39:97))};function Lr(r){var e,t="";for(e=Math.abs(r);e>52;e=e/52|0)t=Hi(e%52)+t;return(Hi(e%52)+t).replace(ho,"$1-$2")}var wt=function(r,e){for(var t=e.length;t;)r=33*r^e.charCodeAt(--t);return r},zi=function(r){return wt(5381,r)};function po(r){for(var e=0;e<r.length;e+=1){var t=r[e];if(Qt(t)&&!Yr(t))return!1}return!0}var mo=zi("5.3.6"),yo=function(){function r(e,t,i){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(i===void 0||i.isStatic)&&po(e),this.componentId=t,this.baseHash=wt(mo,t),this.baseStyle=i,Ri.registerId(t)}return r.prototype.generateAndInjectStyles=function(e,t,i){var o=this.componentId,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,i)),this.isStatic&&!i.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{var a=$t(this.rules,e,t,i).join(""),u=Lr(wt(this.baseHash,a)>>>0);if(!t.hasNameForId(o,u)){var f=i(a,"."+u,void 0,o);t.insertRules(o,u,f)}s.push(u),this.staticRulesId=u}else{for(var h=this.rules.length,c=wt(this.baseHash,i.hash),p="",k=0;k<h;k++){var D=this.rules[k];if(typeof D=="string")p+=D,process.env.NODE_ENV!=="production"&&(c=wt(c,D+k));else if(D){var T=$t(D,e,t,i),d=Array.isArray(T)?T.join(""):T;c=wt(c,d+k),p+=d}}if(p){var g=Lr(c>>>0);if(!t.hasNameForId(o,g)){var A=i(p,"."+g,void 0,o);t.insertRules(o,g,A)}s.push(g)}}return s.join(" ")},r}(),go=/^\s*\/\/.*$/gm,bo=[":","[",".","#"];function vo(r){var e,t,i,o,s=r===void 0?mt:r,a=s.options,u=a===void 0?mt:a,f=s.plugins,h=f===void 0?fr:f,c=new In(u),p=[],k=function(d){function g(A){if(A)try{d(A+"}")}catch{}}return function(A,C,z,x,m,ee,te,E,G,ue){switch(A){case 1:if(G===0&&C.charCodeAt(0)===64)return d(C+";"),"";break;case 2:if(E===0)return C+"/*|*/";break;case 3:switch(E){case 102:case 112:return d(z[0]+C),"";default:return C+(ue===0?"/*|*/":"")}case-2:C.split("/*|*/}").forEach(g)}}}(function(d){p.push(d)}),D=function(d,g,A){return g===0&&bo.indexOf(A[t.length])!==-1||A.match(o)?d:"."+e};function T(d,g,A,C){C===void 0&&(C="&");var z=d.replace(go,""),x=g&&A?A+" "+g+" { "+z+" }":z;return e=C,t=g,i=new RegExp("\\"+t+"\\b","g"),o=new RegExp("(\\"+t+"\\b){2,}"),c(A||!g?"":g,x)}return c.use([].concat(h,[function(d,g,A){d===2&&A.length&&A[0].lastIndexOf(t)>0&&(A[0]=A[0].replace(i,D))},k,function(d){if(d===-2){var g=p;return p=[],g}}])),T.hash=h.length?h.reduce(function(d,g){return g.name||At(15),wt(d,g.name)},5381).toString():"",T}var Di=b.createContext();Di.Consumer;var Bi=b.createContext(),xo=(Bi.Consumer,new Ri),Xr=vo();function So(){return b.useContext(Di)||xo}function wo(){return b.useContext(Bi)||Xr}var Eo=function(){function r(e,t){var i=this;this.inject=function(o,s){s===void 0&&(s=Xr);var a=i.name+s.hash;o.hasNameForId(i.id,a)||o.insertRules(i.id,a,s(i.rules,a,"@keyframes"))},this.toString=function(){return At(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=Xr),this.name+e.hash},r}(),Co=/([A-Z])/,To=/([A-Z])/g,_o=/^ms-/,ko=function(r){return"-"+r.toLowerCase()};function Ii(r){return Co.test(r)?r.replace(To,ko).replace(_o,"-ms-"):r}var ji=function(r){return r==null||r===!1||r===""};function $t(r,e,t,i){if(Array.isArray(r)){for(var o,s=[],a=0,u=r.length;a<u;a+=1)(o=$t(r[a],e,t,i))!==""&&(Array.isArray(o)?s.push.apply(s,o):s.push(o));return s}if(ji(r))return"";if(Yr(r))return"."+r.styledComponentId;if(Qt(r)){if(typeof(h=r)!="function"||h.prototype&&h.prototype.isReactComponent||!e)return r;var f=r(e);return process.env.NODE_ENV!=="production"&&ur.exports.isElement(f)&&console.warn(Mr(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(f,e,t,i)}var h;return r instanceof Eo?t?(r.inject(t,i),r.getName(i)):r:Nr(r)?function c(p,k){var D,T,d=[];for(var g in p)p.hasOwnProperty(g)&&!ji(p[g])&&(Array.isArray(p[g])&&p[g].isCss||Qt(p[g])?d.push(Ii(g)+":",p[g],";"):Nr(p[g])?d.push.apply(d,c(p[g],g)):d.push(Ii(g)+": "+(D=g,(T=p[g])==null||typeof T=="boolean"||T===""?"":typeof T!="number"||T===0||D in jn?String(T).trim():T+"px")+";"));return k?[k+" {"].concat(d,["}"]):d}(r):r.toString()}var Ni=function(r){return Array.isArray(r)&&(r.isCss=!0),r};function Oo(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 Qt(r)||Nr(r)?Ni($t(Pi(fr,[r].concat(t)))):t.length===0&&r.length===1&&typeof r[0]=="string"?r:Ni($t(Pi(r,t)))}var Mi=/invalid hook call/i,mr=new Set,Po=function(r,e){if(process.env.NODE_ENV!=="production"){var t="The component "+r+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
|
|
58
|
+
You may see this warning because you've called styled inside another component.
|
|
59
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`,i=console.error;try{var o=!0;console.error=function(s){if(Mi.test(s))o=!1,mr.delete(t);else{for(var a=arguments.length,u=new Array(a>1?a-1:0),f=1;f<a;f++)u[f-1]=arguments[f];i.apply(void 0,[s].concat(u))}},b.useRef(),o&&!mr.has(t)&&(console.warn(t),mr.add(t))}catch(s){Mi.test(s.message)&&mr.delete(t)}finally{console.error=i}}},Ao=function(r,e,t){return t===void 0&&(t=mt),r.theme!==t.theme&&r.theme||e||t.theme},$o=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ro=/(^-|-$)/g;function Vr(r){return r.replace($o,"-").replace(Ro,"")}var Ho=function(r){return Lr(zi(r)>>>0)};function yr(r){return typeof r=="string"&&(process.env.NODE_ENV==="production"||r.charAt(0)===r.charAt(0).toLowerCase())}var Wr=function(r){return typeof r=="function"||typeof r=="object"&&r!==null&&!Array.isArray(r)},zo=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};function Do(r,e,t){var i=r[t];Wr(e)&&Wr(i)?Yi(i,e):r[t]=e}function Yi(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 o=0,s=t;o<s.length;o++){var a=s[o];if(Wr(a))for(var u in a)zo(u)&&Do(r,a[u],u)}return r}var Fi=b.createContext();Fi.Consumer;var Zr={};function Li(r,e,t){var i=Yr(r),o=!yr(r),s=e.attrs,a=s===void 0?fr:s,u=e.componentId,f=u===void 0?function(C,z){var x=typeof C!="string"?"sc":Vr(C);Zr[x]=(Zr[x]||0)+1;var m=x+"-"+Ho("5.3.6"+x+Zr[x]);return z?z+"-"+m:m}(e.displayName,e.parentComponentId):u,h=e.displayName,c=h===void 0?function(C){return yr(C)?"styled."+C:"Styled("+Mr(C)+")"}(r):h,p=e.displayName&&e.componentId?Vr(e.displayName)+"-"+e.componentId:e.componentId||f,k=i&&r.attrs?Array.prototype.concat(r.attrs,a).filter(Boolean):a,D=e.shouldForwardProp;i&&r.shouldForwardProp&&(D=e.shouldForwardProp?function(C,z,x){return r.shouldForwardProp(C,z,x)&&e.shouldForwardProp(C,z,x)}:r.shouldForwardProp);var T,d=new yo(t,p,i?r.componentStyle:void 0),g=d.isStatic&&a.length===0,A=function(C,z){return function(x,m,ee,te){var E=x.attrs,G=x.componentStyle,ue=x.defaultProps,we=x.foldedComponentIds,W=x.shouldForwardProp,q=x.styledComponentId,re=x.target;process.env.NODE_ENV!=="production"&&b.useDebugValue(q);var Z=function(M,y,ie){M===void 0&&(M=mt);var _=ot({},y,{theme:M}),ve={};return ie.forEach(function(K){var ne,S,ke,$=K;for(ne in Qt($)&&($=$(_)),$)_[ne]=ve[ne]=ne==="className"?(S=ve[ne],ke=$[ne],S&&ke?S+" "+ke:S||ke):$[ne]}),[_,ve]}(Ao(m,b.useContext(Fi),ue)||mt,m,E),Y=Z[0],be=Z[1],he=function(M,y,ie,_){var ve=So(),K=wo(),ne=y?M.generateAndInjectStyles(mt,ve,K):M.generateAndInjectStyles(ie,ve,K);return process.env.NODE_ENV!=="production"&&b.useDebugValue(ne),process.env.NODE_ENV!=="production"&&!y&&_&&_(ne),ne}(G,te,Y,process.env.NODE_ENV!=="production"?x.warnTooManyClasses:void 0),Ce=ee,_e=be.$as||m.$as||be.as||m.as||re,Ne=yr(_e),R=be!==m?ot({},m,{},be):m,O={};for(var H in R)H[0]!=="$"&&H!=="as"&&(H==="forwardedAs"?O.as=R[H]:(W?W(H,xi,_e):!Ne||xi(H))&&(O[H]=R[H]));return m.style&&be.style!==m.style&&(O.style=ot({},m.style,{},be.style)),O.className=Array.prototype.concat(we,q,he!==q?he:null,m.className,be.className).filter(Boolean).join(" "),O.ref=Ce,b.createElement(_e,O)}(T,C,z,g)};return A.displayName=c,(T=b.forwardRef(A)).attrs=k,T.componentStyle=d,T.displayName=c,T.shouldForwardProp=D,T.foldedComponentIds=i?Array.prototype.concat(r.foldedComponentIds,r.styledComponentId):fr,T.styledComponentId=p,T.target=i?r.target:r,T.withComponent=function(C){var z=e.componentId,x=function(ee,te){if(ee==null)return{};var E,G,ue={},we=Object.keys(ee);for(G=0;G<we.length;G++)E=we[G],te.indexOf(E)>=0||(ue[E]=ee[E]);return ue}(e,["componentId"]),m=z&&z+"-"+(yr(C)?C:Vr(Mr(C)));return Li(C,ot({},x,{attrs:k,componentId:m}),t)},Object.defineProperty(T,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(C){this._foldedDefaultProps=i?Yi({},r.defaultProps,C):C}}),process.env.NODE_ENV!=="production"&&(Po(c,p),T.warnTooManyClasses=function(C,z){var x={},m=!1;return function(ee){if(!m&&(x[ee]=!0,Object.keys(x).length>=200)){var te=z?' with the id of "'+z+'"':"";console.warn("Over 200 classes were generated for component "+C+te+`.
|
|
60
|
+
Consider using the attrs method, together with a style object for frequently changed styles.
|
|
61
|
+
Example:
|
|
62
|
+
const Component = styled.div.attrs(props => ({
|
|
63
|
+
style: {
|
|
64
|
+
background: props.background,
|
|
65
|
+
},
|
|
66
|
+
}))\`width: 100%;\`
|
|
67
|
+
|
|
68
|
+
<Component />`),m=!0,x={}}}}(c,p)),T.toString=function(){return"."+T.styledComponentId},o&&qn(T,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),T}var Ur=function(r){return function e(t,i,o){if(o===void 0&&(o=mt),!ur.exports.isValidElementType(i))return At(1,String(i));var s=function(){return t(i,o,Oo.apply(void 0,arguments))};return s.withConfig=function(a){return e(t,i,ot({},o,{},a))},s.attrs=function(a){return e(t,i,ot({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},s}(Li,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){Ur[r]=Ur(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.
|
|
69
|
+
Perhaps you're looking to import 'styled-components/native'?
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const yt=Ur,Bo=yt.div`
|
|
73
|
+
font-family: 'IBM Plex Mono', 'Roboto', sans-serif;
|
|
74
|
+
background-color: #fafafa;
|
|
75
|
+
color: #262729;
|
|
76
|
+
width: 500px;
|
|
77
|
+
height: 350px;
|
|
78
|
+
position: absolute;
|
|
79
|
+
right: 1vw;
|
|
80
|
+
bottom: 3vh;
|
|
81
|
+
z-index: 10000;
|
|
82
|
+
display: ${r=>r.display};
|
|
83
|
+
border-radius: 10px;
|
|
84
|
+
box-shadow: 5px 5px 23px 5px rgba(0, 0, 0, 0.25);
|
|
85
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
86
|
+
resize: both;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
|
|
89
|
+
& h1 span {
|
|
90
|
+
font-size: 0.5em;
|
|
91
|
+
}
|
|
92
|
+
`,Io=yt.div`
|
|
93
|
+
display: flex;
|
|
94
|
+
height: 100%;
|
|
95
|
+
width: 170px;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
border-right: 1px solid #ddd;
|
|
98
|
+
background-color: #ddd;
|
|
99
|
+
border-radius: 10px 0 0 10px;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
padding: 25px 0px 25px 15px;
|
|
102
|
+
|
|
103
|
+
& p {
|
|
104
|
+
color: #999;
|
|
105
|
+
margin-left: -3px;
|
|
106
|
+
font-size: 0.8em;
|
|
107
|
+
font-weight: bold;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
& h1 {
|
|
111
|
+
font-size: 1.8em;
|
|
112
|
+
font-weight: 700;
|
|
113
|
+
width: auto;
|
|
114
|
+
text-align: center;
|
|
115
|
+
margin: -20px 20px 10px 0px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:active {
|
|
119
|
+
cursor: grabbing;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
& span {
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
`,jo=yt.div`
|
|
126
|
+
width: 100%;
|
|
127
|
+
cursor: grab;
|
|
128
|
+
background-color: #eee;
|
|
129
|
+
border-bottom: 1px solid #0f52ba;
|
|
130
|
+
border-radius: 0 10px 0 0;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: space-between;
|
|
134
|
+
padding: 10px 20px;
|
|
135
|
+
|
|
136
|
+
& h1 {
|
|
137
|
+
font-size: 1.5em;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
}
|
|
140
|
+
`,No=yt.div`
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
transform: rotate(90deg);
|
|
143
|
+
color: gray;
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: 12px;
|
|
146
|
+
right: 0;
|
|
147
|
+
|
|
148
|
+
&:hover {
|
|
149
|
+
text-decoration: underline;
|
|
150
|
+
}
|
|
151
|
+
`,Mo=yt.span`
|
|
152
|
+
font-weight: 700;
|
|
153
|
+
cursor: default !important;
|
|
154
|
+
margin: 5px 15px 5px 0px;
|
|
155
|
+
`,Yo=yt.span`
|
|
156
|
+
margin: 5px 15px 5px 0px;
|
|
157
|
+
|
|
158
|
+
&:hover {
|
|
159
|
+
text-decoration: underline;
|
|
160
|
+
}
|
|
161
|
+
`,Fo=yt.div`
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
overflow-y: scroll;
|
|
165
|
+
overflow-x: hidden;
|
|
166
|
+
padding-bottom: 50px;
|
|
167
|
+
font-size: 0.8em;
|
|
168
|
+
`,Xi=yt.div`
|
|
169
|
+
font-size: 3em;
|
|
170
|
+
color: #0f52ba;
|
|
171
|
+
font-weight: bold;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
-webkit-touch-callout: none;
|
|
174
|
+
-webkit-user-select: none;
|
|
175
|
+
-khtml-user-select: none;
|
|
176
|
+
-moz-user-select: none;
|
|
177
|
+
-ms-user-select: none;
|
|
178
|
+
user-select: none;
|
|
179
|
+
`,Lo=b.forwardRef(({activeToolLocal:r,tools:e,changeActiveToolLocalHandler:t},i)=>{b.useImperativeHandle(i,()=>({changeTabletDisplayHandler(a){s(a==="switch"?u=>u==="none"?"flex":"none":a)}}));const[o,s]=b.useState("none");return v(b.Fragment,{children:ae(Bo,{display:o,id:"desktop--tablet--container",children:[ae(Io,{children:[ae("h1",{children:["NDMVR",v("span",{children:v("i",{children:"tablet"})})]}),v("p",{children:"Tools"}),v(Fo,{children:e.map((a,u)=>u===r?ae(Mo,{children:[v("span",{style:{fontWeight:700,color:"#0f52ba"},children:u<10?(u+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},u):ae(Yo,{onClick:()=>t(u),children:[v("span",{style:{fontWeight:700,color:"#0f52ba"},children:u<10?(u+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},u))})]}),ae("div",{style:{width:100+"%",overflow:"scroll"},children:[ae(jo,{id:"desktop--tablet--container--header",children:[v("h1",{children:e[r].name}),v(No,{id:"close--button",onClick:()=>s("none"),style:{cursor:"pointer",maxWidth:30+"px"},children:v("i",{children:"Hide"})})]}),v("div",{style:{display:"flex",flexDirection:"row",height:"83%",padding:"10px",alignItems:"center",justifyContent:"center"},children:e[r].fun})]})]})})}),Xo=window.AFRAME,Ae=new dt;let Gr,Vi;function Wi(){const r=b.useRef(),[e,t]=b.useState(0),[i,o]=b.useState("gitlab");Gr=e;const[s,a]=b.useState({xPos:0,yPos:0,zPos:0,absoluteContent:0}),[u,f]=b.useState(1),[h]=b.useState(Xo.utils.device.checkHeadsetConnected()?"oculus":"desktop"),c=b.useContext(qe).source,p=c.getOptions();b.useEffect(()=>(Vi=Ae.subscribe(k),()=>Vi.unsubscribe()),[]),b.useEffect(()=>{},[e]),b.useEffect(()=>{console.log(c),c&&c.executeFunction(0,i)},[i]);const k=x=>{typeof x=="number"?x+1<=T.length&&(t(x),Gr=e):x.changeTabletState?r.current.changeTabletDisplayHandler("switch"):x.binData?s!==x.binData&&a(x.binData):x.tool?(x.tool==="next"&&t(m=>m===T.length-1?0:m+1),x.tool==="prev"&&t(m=>m===0?T.length-1:m-1)):x.source?(x.source==="next"&&o(m=>p.indexOf(m)===p.length-1?p[0]:p[p.indexOf(m)+1]),x.source==="prev"&&o(m=>p.indexOf(m)===0?p[p.length-1]:p[p.indexOf(m)-1])):x.scale&&f(m=>m+=x.scale)},D=()=>{switch(e){case 0:return v(b.Fragment,{children:v("a-text",{value:`Selected bin:
|
|
180
|
+
|
|
181
|
+
Value: `+s.absoluteContent+`
|
|
182
|
+
X: `+s.xPos+`
|
|
183
|
+
Y: `+s.yPos+`
|
|
184
|
+
Z: `+s.zPos,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})});case 2:return v(b.Fragment,{children:v("a-text",{value:`Bin height changer:
|
|
185
|
+
|
|
186
|
+
For changing
|
|
187
|
+
the visual height of bins,
|
|
188
|
+
use grip + joystick on
|
|
189
|
+
the left controller.`,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return v("a-box",{id:"tablet",color:"white",depth:"0.001",height:"0.3",lenght:"0.01",width:"0.4",rotation:"-30 0 0",position:"0.25 0 0"});case 3:return v("a-entity",{rotation:"-30 0 0",children:p.map(x=>v("a-text",{value:x,color:x===i?"white":"lightgray",rotation:"0 0 0",position:"0.1 "+-.025*p.indexOf(x)+" 0","wrap-count":x===i?"360":"400"},x))});default:return v("a-text",{value:`This tool does not have
|
|
190
|
+
an interface for Oculus Tablet`,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})}},T=[{fun:d(),name:"Bin Info"},{fun:g(),name:"Scale Z axis"},{fun:A(),name:"Change Data Source"},{fun:null,name:"Tool with a longer name"}];function d(){if(h==="desktop")return v(b.Fragment,{children:v("table",{style:{width:"100%"},children:ae("tbody",{children:[ae("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ae("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"value:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:s.absoluteContent})]}),ae("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ae("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"x:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:s.xPos})]}),ae("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ae("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"y:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:s.yPos})]}),ae("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ae("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"z:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:s.zPos})]})]})})})}function g(){return v(b.Fragment,{children:ae("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[v(Xi,{onClick:()=>{f(u+.1),Se.changeHistogramScale(.1,"TH2"),nt.changeHistogramScale(.1,"TH1")},children:"+"}),v("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:u.toFixed(1)}),v(Xi,{onClick:()=>{f(u-.1),Se.changeHistogramScale(-.1,"TH2"),nt.changeHistogramScale(-.1,"TH1")},children:"-"})]})})}function A(){return v("div",{style:{display:"flex",flexDirection:"column"},children:p.map(x=>x===i?v("a",{style:{textTransform:"uppercase"},onClick:()=>o(x),children:x},x):v("a",{onClick:()=>o(x),children:x},x))})}document.getElementById("desktop--tablet--container")&&C(document.getElementById("desktop--tablet--container"));function C(x){let m=0,ee=0,te=0,E=0;document.getElementById(x.id+"--header")?document.getElementById(x.id+"--header").onmousedown=G:x.onmousedown=G;function G(W){W.preventDefault(),te=W.clientX,E=W.clientY,document.onmouseup=we,document.onmousemove=ue}function ue(W){W.preventDefault(),m=te-W.clientX,ee=E-W.clientY,te=W.clientX,E=W.clientY,x.style.top=x.offsetTop-ee+"px",x.style.left=x.offsetLeft-m+"px"}function we(){document.onmouseup=null,document.onmousemove=null}}const z=x=>{t(x)};return h==="desktop"?v(Lo,{tools:T,activeToolLocal:e,ref:r,changeActiveToolLocalHandler:z}):v(b.Fragment,{children:D()})}const qr=()=>Gr,Zi=window.AFRAME,Ui=()=>{let r;const t=b.useContext(qe).projPanelIds,[i,o]=b.useState(0),[s,a]=b.useState(null),[u,f]=b.useState(Zi.utils.device.checkHeadsetConnected()?"oculus":"keyboard"),[h,c]=b.useState(!1),[p,k]=b.useState(!1),[D,T]=b.useState(!0),d=E=>{E.device?(u!==E.device&&f(E.device),c(!h)):E==="shift"?A():E==="show"&&k(!p)},g=E=>{E.changeTabletState&&T(!1)},A=()=>{let E=i+90;E>=360&&(E=0),o(E)},C=E=>t[E]?t[E]:`panel_${E}`,z=()=>ae("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${i} 0; dur: 1000; easing: linear;`,material:"color: white",children:[ae("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color:white;",children:[v("a-text",{color:"black",width:50,value:u==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:50,value:u==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:50,value:u==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),v("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"}),v("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;"}),v("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"}),v("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;"}),v("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"}),v("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;"}),v("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"}),v("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;"})]}),x=()=>u==="keyboard"?ae("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${i} 0; dur: 1000; easing: linear;`,material:"color: white",children:[ae("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[v("a-text",{color:"black",width:"50",value:p?"Press C to show help panels":"Press C to show projection panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),v("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"}),v("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"}),v("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"}),v("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"})]}):ae("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${i} 0; dur: 1000; easing: linear;`,children:[ae("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[v("a-text",{color:"black",width:"50",value:p?"Press Button X to show help panels":"Press Button X to show projection panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),v("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"}),v("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"}),v("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"}),v("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"})]}),m=()=>{const E=document.getElementById(C(0));E&&E.setAttribute("material","opacity",0)},ee=()=>{const E=document.getElementById(C(0));E&&E.setAttribute("material","opacity",1)};b.useEffect(()=>(r=Ae.subscribe(g),()=>r.unsubscribe()),[]),b.useEffect(()=>(r=pt.getCameraSubject().subscribe(d),()=>r.unsubscribe()),[h,p,i]),b.useEffect(()=>{const E=document.getElementById("camera");h?(a({x:E.object3D.position.x,y:E.object3D.position.y,z:E.object3D.position.z}),E.object3D.position.y=E.object3D.position.y+30,m()):(E.object3D.position.y=1.6,s!==null&&(E.object3D.position.x=s.x,E.object3D.position.z=s.z,E.object3D.position.y=s.y),ee())},[h,u]);const te=()=>{const E=b.useContext(qe);return v(b.Fragment,{children:ae(qe.Provider,{value:{data:E.data,theme:E.theme,displayRange:E.displayRange},children:[v("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
|
|
191
|
+
lineOpacity: 0.5;
|
|
192
|
+
far: 20;`}),v("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,children:v(Wi,{})}),v("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]})})};return ae("a-entity",{id:"cameraWrapper",rotation:"0 -135 0",position:"-7 2 -7",children:[h&&!p&&x(),h&&p&&z(),ae("a-camera",{id:"camera","look-control":!0,"wasd-controls-enabled":"acceleration:=50",children:[D&&u==="keyboard"&&v("a-entity",{text:"value: Press E to open NDMVR Tablet;color:black;",position:"0.2 0.8 -1"}),!Zi.utils.device.checkHeadsetConnected()&&v("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"})]}),u==="oculus"&&te()]})};class Kr{constructor(){j(this,Le,void 0);j(this,Sr,void 0);j(this,Ke,[]);j(this,wr,e=>n(this,Ke).filter(t=>t.id!==e.id));He(this,"containThisBin",e=>n(this,Ke).filter(i=>i.id===e.id).length!==0);He(this,"storeBinToLocalStorage",e=>{this.containThisBin(e)||(n(this,Ke).push(e),n(this,Le).setItem("selectedBins",JSON.stringify(n(this,Ke))))});He(this,"deleteBinFromLocalStorage",e=>{this.containThisBin(e)&&(B(this,Ke,n(this,wr).call(this,e)),n(this,Le).setItem("selectedBins",JSON.stringify(n(this,Ke))))});He(this,"getBinsFromLocalStorage",()=>{const e=JSON.parse(n(this,Le).getItem("selectedBins"));return e===null?[]:e});B(this,Le,window.localStorage),B(this,Sr,document.getElementById("cameraWrapper")),B(this,Ke,this.getBinsFromLocalStorage())}storeCurrentBinToLocalStorage(e){n(this,Le).setItem("currentBin",JSON.stringify(e))}getCurrentBinFromLocalStorage(){const e=JSON.parse(n(this,Le).getItem("currentBin"));return e===void 0||e===""?null:e}loadProperty(e){return JSON.parse(n(this,Le).getItem(e))}storeProperty(e,t){n(this,Le).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 o=this.loadProperty("TH2"),s;o===null?(o={},s={name:"TH2",xOffset:1,yOffset:1,range:8}):s={name:"TH2",xOffset:e,yOffset:t,range:i},o.section=s,this.storeProperty("TH2",o)}storeTH3Offsets(e,t,i,o){let s=this.loadProperty("TH3"),a;s===null?(s={},a={name:"TH3",xOffset:1,yOffset:1,zOffset:1,range:4}):a={name:"TH3",xOffset:e,yOffset:t,zOffset:i,range:o},s.section=a,this.storeProperty("TH3",s)}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){n(this,Le).setItem("rootFile",e)}loadFilePath(){const e=n(this,Le).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()}}Le=new WeakMap,Sr=new WeakMap,Ke=new WeakMap,wr=new WeakMap;const gr=new Kr;class Vo{constructor(){j(this,Et,void 0);B(this,Et,new dt)}saveSelectedBinToLocalStorage(){n(this,Et).next(!0)}deleteBinFromLocalStorage(){n(this,Et).next(!1)}getKeyboardEvent(){return n(this,Et).asObservable()}}Et=new WeakMap;const br=new Vo;class Wo{constructor(){j(this,Rt,void 0);B(this,Rt,new dt)}showBinProjection(e){n(this,Rt).next(e)}getServiceEvent(){return n(this,Rt).asObservable()}}Rt=new WeakMap;const Gi=new Wo;class Zo{constructor(){j(this,Ct,void 0);B(this,Ct,new dt)}sendDataOfTheSelectedBin(e){n(this,Ct).next(e)}emmitCommand(e){n(this,Ct).next({data:e})}getBinDistributor(){return n(this,Ct).asObservable()}}Ct=new WeakMap;const tr=new Zo;function Jr(r,e,t){r.face.normal.x!==0?(e.setAttribute("material","color",e.userData.axisZ),tr.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Z",histogramName:e.userData.histogramName})):r.face.normal.y!==0?(e.setAttribute("material","color",e.userData.axisY),tr.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Y",histogramName:e.userData.histogramName})):(e.setAttribute("material","color",e.userData.axisX),tr.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"X",histogramName:e.userData.histogramName})),e.setAttribute("material","opacity","0.70")}xe.registerComponent("mouseevent",{init:function(){let r;const e=this.el;let t=0;e.addEventListener("mouseenter",function(o){const s=o.detail.intersection;r=br.getKeyboardEvent().subscribe(a=>{a?(gr.storeBinToLocalStorage(this.userData),gr.storeCurrentBinToLocalStorage(this.userData),this.userData.markedColor=this.userData.selectColor,this.setAttribute("material","opacity","0.70"),Gi.showBinProjection(this.userData)):(gr.deleteBinFromLocalStorage(this.userData),this.userData.markedColor=this.userData.color,this.setAttribute("material","opacity","0.50"))}),Jr(s,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(o){if(t=t+1,setTimeout(()=>{t=0},600),t===2){t=0,this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1");const a=o.detail.intersection;a&&Jr(a,this,"DB_CLICK")}else if(t===1){this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1"),Gi.showBinProjection(this.userData),Ae.next({binData:this.userData});const a=o.detail.intersection;a&&Jr(a,this,"CLICK")}let s=document.getElementById("th2-banner");if(s===null&&(s=document.getElementById("th3-banner")),s!==null){const a=s.childNodes;if(this.userData.typeName==="TH3"&&a.length===5){const u=`[${this.userData.zTitle}] [${this.userData.zMin},${this.userData.zMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
193
|
+
`:`
|
|
194
|
+
`}`,f=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
195
|
+
`:`
|
|
196
|
+
`}`,h=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
197
|
+
`:`
|
|
198
|
+
`}`,c=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
|
|
199
|
+
`;a[0].setAttribute("text",`value: ${c}; color: ${this.userData.color}; align: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${f}; 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: ${u}; color: ${this.userData.axisZ}; align: center; width: 30; height: auto;`)}else{const u=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
|
|
200
|
+
`,f=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
201
|
+
`:`
|
|
202
|
+
`}`,h=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
203
|
+
`:`
|
|
204
|
+
`}`;a[0].setAttribute("text",`value: ${u}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${f}; 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")}}),xe.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 rr{constructor(){j(this,$e,void 0);He(this,"verticalMoveCamera",(e,t)=>{n(this,$e)===null&&B(this,$e,document.getElementById("cameraWrapper")),n(this,$e)!==null&&(e?n(this,$e).object3D.position.y+=t:n(this,$e).object3D.position.y>0&&(n(this,$e).object3D.position.y-=t))});He(this,"horizontalMoveCamera",(e,t,i)=>{n(this,$e)===null&&B(this,$e,document.getElementById("cameraWrapper")),n(this,$e)!==null&&(t?n(this,$e).object3D.position[e]+=i:n(this,$e).object3D.position[e]-=i)});j(this,Ue,(e,t,i)=>{if(n(this,$e)!==null&&e!==null){const o=e.object3D.position.x+1*e.object3D.position.x,s=e.object3D.position.z+1*e.object3D.position.z,a=t;n(this,$e).setAttribute("animation",`property: position; to: ${o+1} ${a} ${s+1}; dur: 100;`),n(this,$e).setAttribute("animation__1",`property: rotation; to: ${n(this,$e).object3D.rotation.x} ${i} ${n(this,$e).object3D.rotation.z}; dur: 100;`)}});He(this,"setCameraPosition",e=>{if(n(this,$e)!==null){let t=n(this,$e).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const i=e.xOffset+e.xOffset,o=e.yOffset+e.yOffset;setTimeout(()=>{n(this,$e).setAttribute("animation",`property: position; to: ${i-3} ${t} ${o-3}; dur: 40;`)},1800)}});He(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&n(this,Ue).call(this,e,0,180)});He(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&n(this,Ue).call(this,e,0,0)});He(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&n(this,Ue).call(this,e,0,90)});He(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&n(this,Ue).call(this,e,0,270)});He(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&n(this,Ue).call(this,e,10,180)});He(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&n(this,Ue).call(this,e,10,0)});He(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&n(this,Ue).call(this,e,10,90)});He(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&n(this,Ue).call(this,e,10,270)});B(this,$e,document.getElementById("cameraWrapper"))}}$e=new WeakMap,Ue=new WeakMap;const st={};let Qr=new rr,ei,gt,vr=!1;Ae.next({changeTabletState:vr});const ti=(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),ei.setAttribute(r.name,`${r.xValue} ${r.yValue} ${r.zValue}`)},Uo=r=>{r.key==="k"||r.key==="K"?(Se.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Pe.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):r.key==="i"||r.key==="I"?(Se.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Pe.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):r.key==="u"||r.key==="U"?Pe.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):r.key==="o"||r.key==="O"?Pe.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):r.key==="l"||r.key==="L"?(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),Se.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Pe.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(r.key==="j"||r.key==="J")&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),Se.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Pe.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},Go=r=>{r.key==="k"||r.key==="K"?(Se.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Pe.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):r.key==="i"||r.key==="I"?(Se.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Pe.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):r.key==="u"||r.key==="U"?Pe.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):r.key==="o"||r.key==="O"?Pe.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):r.key==="l"||r.key==="L"?(Se.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Pe.changeHistogramSectionByOffset("xOffset","TH3",!1,!1)):(r.key==="j"||r.key==="J")&&(Se.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Pe.changeHistogramSectionByOffset("xOffset","TH3",!0,!1))},ri=r=>{st[r.key]=!0,(st.Z||st.z)&&ti(gt[0],r),(st.X||st.x)&&ti(gt[1],r),(st.C||st.c)&&ti(gt[2],r),st.Shift&&Go(r),Uo(r),r.key===" "&&Qr.verticalMoveCamera(!0,.3),r.shiftKey&&Qr.verticalMoveCamera(!1,.3),r.key==="1"&&Ae.next(0),r.key==="2"&&Ae.next(1),r.key==="3"&&Ae.next(2),r.key==="4"&&Ae.next(3),r.key==="5"&&Ae.next(4),r.key==="6"&&Ae.next(5),r.key==="7"&&Ae.next(6),r.key==="8"&&Ae.next(7),r.key==="9"&&Ae.next(8),r.key==="0"&&Ae.next(9),r.key==="Enter"&&tr.emmitCommand("REFRESH"),(r.key==="e"||r.key==="E")&&(vr=!vr,vr?Ae.next({changeTabletState:"flex"}):Ae.next({changeTabletState:"none"})),(r.key==="t"||r.key==="T")&&Se.changeHistogramScale(.1,"TH2"),r.key==="r"||r.key,(r.key==="m"||r.key==="M")&&Se.changeHistogramFunction("feet","TH2"),(r.key==="n"||r.key==="N")&&Se.changeHistogramFunction("default","TH2"),(r.key==="c"||r.key==="C")&&pt.setUserState(),(r.key==="v"||r.key==="V")&&pt.setVisibilityOfBanners("keyboard"),(r.key==="x"||r.key==="X")&&pt.shiftBanners(),(r.key==="x"||r.key==="X")&&pt.shiftBanners()},ii=r=>{delete st[r.key]},qi=(r,e)=>{ei=e,gt=[r.position,r.scale,r.rotation];for(let t=0;t<3;t++)ei.setAttribute(gt[t].name,`${gt[t].xValue} ${gt[t].yValue} ${gt[t].zValue}`)},Ki=()=>{Qr=new rr};xe.registerComponent("histogram-control",{schema:{position:{name:"position",xValue:0,yValue:0,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;qi(this.schema,r),document.addEventListener("keydown",ri),document.addEventListener("keyup",ii)},update:function(){Ki()}}),xe.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 je={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){je[e]?(this.xAxis=je[e].axis.x,this.yAxis=je[e].axis.y,this.zAxis=je[e].axis.z,this.palette=je[e].colorPalette,this.primaryAccent=je[e].accent.primary,this.secondaryAccent=je[e].accent.secondary,this.primaryFont=je[e].font.primary,this.secondaryFont=je[e].font.secondary):(this.xAxis=je.def.axis.x,this.yAxis=je.def.axis.y,this.zAxis=je.def.axis.z,this.palette=je.def.colorPalette,this.primaryAccent=je.def.accent.primary,this.secondaryAccent=je.def.accent.secondary,this.primaryFont=je.def.font.primary,this.secondaryFont=je.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 o=.12;let s=o;for(let a=0;a<=9;a++){if(e<=s){i=this.palette[a];break}s+=o}return i}}class qo{constructor(e,t,i,o,s,a,u){j(this,Yt);j(this,Re,"");j(this,or,[]);j(this,N,null);j(this,Je,"");j(this,F,null);j(this,Q,1);j(this,ce,1);j(this,I,1);j(this,Ye,0);j(this,Xe,0);j(this,Qe,0);j(this,ct,1);j(this,vt,1);j(this,sr,1);j(this,fe,8);j(this,Fe,{xInitial:0,yInitial:0,zInitial:0});j(this,et,void 0);j(this,Ht,1);j(this,tt,1);j(this,Tt,0);j(this,zt,2);j(this,L,{xOffset:0,yOffset:0,zOffset:0});j(this,xt,[]);He(this,"getXOffset",()=>n(this,Q));He(this,"getYOffset",()=>n(this,ce));He(this,"getZOffset",()=>n(this,I));He(this,"getContentScale",()=>n(this,tt));He(this,"getRange",()=>n(this,fe));j(this,lt,(e,t)=>{let i=e>t-n(this,fe)?t-n(this,fe):e;return i<1&&(i=1),i});j(this,Dt,e=>n(this,or).filter(i=>i.id===e).length!==0);j(this,Ge,(e,t,i,o,s,a,u,f,h,c,p,k)=>({key:e+n(this,Re),geometry:{primitive:"plane",width:f,height:h},text:{color:k,width:4,height:"auto"},labelHandler:{value:c,delay:500},rotation:{x:s,y:a,z:u},material:{color:p},animation:{fromX:t+n(this,L).xOffset,fromY:i+n(this,L).zOffset,fromZ:o+n(this,L).yOffset,toX:t,toY:i,toZ:o}}));j(this,Er,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,i,o,s,a,u,f,h,c,p,k,D;const T="";let d,g,A=0;const C=n(this,Q)+n(this,fe)>n(this,Ye)?n(this,Ye):n(this,Q)+n(this,fe),z=n(this,ce)+n(this,fe)>n(this,Xe)?n(this,Xe):n(this,ce)+n(this,fe),x=n(this,I)+n(this,fe)>n(this,Qe)?n(this,Qe):n(this,I)+n(this,fe),m=n(this,N).fXaxis.fTitle,ee=n(this,N).fYaxis.fTitle,te=n(this,N).fZaxis.fTitle,E=n(this,N).fXaxis.fLabels?n(this,N).fXaxis.fLabels.arr:[],G=n(this,N).fYaxis.fLabels?n(this,N).fYaxis.fLabels.arr:[],ue=n(this,N).fZaxis.fLabels?n(this,N).fZaxis.fLabels.arr:[],we=[];for(let re=n(this,I);re<=x;re++)for(let Z=n(this,ce);Z<=z;Z++)for(let Y=n(this,Q);Y<=C;Y++){if(t=n(this,N).fXaxis.GetBinCenter(Y),i=n(this,N).fXaxis.GetBinLowEdge(Y),o=t+(t-i),s=o-i,a=n(this,N).fYaxis.GetBinCenter(Z),u=n(this,N).fYaxis.GetBinLowEdge(Z),f=a+(a-u),h=f-u,c=n(this,N).fZaxis.GetBinCenter(re),p=n(this,N).fZaxis.GetBinLowEdge(re),k=c+(c-p),D=k-p,d=n(this,N).getBinContent(Y,Z,re),g=n(this,Bt).call(this,d),g>n(this,Tt)){let be=g;g<.15&&(be=.15);let he=n(this,et)?n(this,et).call(this,{histogram:n(this,N),x:o,y:f,z:k,content:g}):null;he=he||n(this,F).getBinColor(g);const Ce=n(this,Re)+i+"th3"+o+"th3"+p+"th3"+k+"th3"+u+"th3"+f;let _e;n(this,Dt).call(this,Ce)?_e=n(this,F).getSecondaryAccentColor():_e=he;const Ne=`id: ${Ce};
|
|
205
|
+
histogramName: ${n(this,Re)};
|
|
206
|
+
typeName: 'TH3';
|
|
207
|
+
content: ${g};
|
|
208
|
+
color: ${he};
|
|
209
|
+
yTitle: ${ee};
|
|
210
|
+
xTitle: ${m};
|
|
211
|
+
zTitle: ${te};
|
|
212
|
+
absoluteContent: ${d};
|
|
213
|
+
binName: ${T};
|
|
214
|
+
xMin: ${i};
|
|
215
|
+
yMin: ${u};
|
|
216
|
+
zMin: ${p};
|
|
217
|
+
xMax: ${o};
|
|
218
|
+
yMax: ${f};
|
|
219
|
+
zMax: ${k};
|
|
220
|
+
xPos: ${Y};
|
|
221
|
+
yPos: ${Z};
|
|
222
|
+
zPos: ${re};
|
|
223
|
+
xCenter: ${t};
|
|
224
|
+
yCenter: ${a};
|
|
225
|
+
zCenter: ${c};
|
|
226
|
+
xWidth: ${s};
|
|
227
|
+
yWidth: ${h};
|
|
228
|
+
zWidth: ${D};
|
|
229
|
+
markedColor: ${_e};
|
|
230
|
+
selectColor: ${n(this,F).getSecondaryAccentColor()};
|
|
231
|
+
axisX: ${n(this,F).getAxisColor("x")};
|
|
232
|
+
axisY: ${n(this,F).getAxisColor("y")};
|
|
233
|
+
axisZ: ${n(this,F).getAxisColor("z")}`,R=be*.8,O=Y-1,H=re-1,M=Z-1;e.bins[A]={id:Ce,color:he,binData:Ne,content:d,animation:{fromWidth:n(this,St).call(this,Ce),fromHeight:n(this,St).call(this,Ce),fromDepth:n(this,St).call(this,Ce),toWidth:R,toHeight:R,toDepth:R},animation2:{fromX:O+n(this,L).xOffset,fromY:H+n(this,L).zOffset,fromZ:M+n(this,L).yOffset,toX:O,toY:H,toZ:M},animation3:{fromColor:n(this,Ft).call(this,Ce),toColor:_e}},we[A]={key:Ce,scale:R,color:_e}}A++}B(this,xt,we);const W=[],q=[];return A=n(this,Nt).call(this,e,W,q,z,C,G,ee,0),A=n(this,Mt).call(this,e,W,q,C,z,E,m,A),A=n(this,jt).call(this,e,W,q,C,z,x,ue,te,A),Ar(this,Yt,$r).call(this,e,W,q,C,z,A),e.labels=[...W,...q],e});j(this,Cr,()=>{const e={type:"TH2",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,i,o,s,a,u,f,h,c,p;const k="";let D,T=0;const d=n(this,Q)+n(this,fe)>n(this,N).fXaxis.fNbins?n(this,N).fXaxis.fNbins:n(this,Q)+n(this,fe),g=n(this,ce)+n(this,fe)>n(this,N).fYaxis.fNbins?n(this,N).fYaxis.fNbins:n(this,ce)+n(this,fe),A=n(this,N).fXaxis.fTitle!==""?n(this,N).fXaxis.fTitle:"x",C=n(this,N).fYaxis.fTitle!==""?n(this,N).fYaxis.fTitle:"y",z=n(this,N).fXaxis.fLabels?n(this,N).fXaxis.fLabels.arr:[],x=n(this,N).fYaxis.fLabels?n(this,N).fYaxis.fLabels.arr:[],m=[];for(let E=n(this,ce);E<=g;E++)for(let G=n(this,Q);G<=d;G++){if(i=n(this,N).fXaxis.GetBinCenter(G),o=n(this,N).fXaxis.GetBinLowEdge(G),s=i+(i-o),a=s-o,u=n(this,N).fYaxis.GetBinCenter(E),f=n(this,N).fYaxis.GetBinLowEdge(E),h=u+(u-f),c=h-f,D=n(this,N).getBinContent(G,E),p=n(this,Bt).call(this,D),t=p*n(this,fe)*n(this,tt)/16,p>n(this,Tt)){let ue=n(this,et)?n(this,et).call(this,{histogram:n(this,N),x:s,y:h,content:p}):null;ue=ue||n(this,F).getBinColor(p);const we=n(this,Re)+o+"th2"+s+"th2"+f+"th2"+h;let W;n(this,Dt).call(this,we)?W=n(this,F).getSecondaryAccentColor():W=ue;const q=`id: ${we};
|
|
234
|
+
histogramName: ${n(this,Re)};
|
|
235
|
+
typeName: 'TH2';
|
|
236
|
+
content: ${p};
|
|
237
|
+
color: ${ue};
|
|
238
|
+
yTitle: ${C};
|
|
239
|
+
xTitle: ${A};
|
|
240
|
+
zTitle: 'none';
|
|
241
|
+
absoluteContent: ${D};
|
|
242
|
+
binName: ${k};
|
|
243
|
+
xMin: ${o};
|
|
244
|
+
yMin: ${f};
|
|
245
|
+
zMin: ${0};
|
|
246
|
+
xMax: ${s};
|
|
247
|
+
yMax: ${h};
|
|
248
|
+
zMax: ${0};
|
|
249
|
+
xPos: ${G};
|
|
250
|
+
yPos: ${E};
|
|
251
|
+
zPos: ${0};
|
|
252
|
+
xCenter: ${i};
|
|
253
|
+
yCenter: ${u};
|
|
254
|
+
yCenter: ${0};
|
|
255
|
+
xWidth: ${a};
|
|
256
|
+
yWidth: ${c};
|
|
257
|
+
zWidth: ${0};
|
|
258
|
+
markedColor: ${W};
|
|
259
|
+
selectColor: ${n(this,F).getSecondaryAccentColor()};
|
|
260
|
+
axisX: ${n(this,F).getAxisColor("x")};
|
|
261
|
+
axisY: ${n(this,F).getAxisColor("y")};
|
|
262
|
+
axisZ: ${n(this,F).getAxisColor("z")}`,re=a/n(this,ct)/n(this,zt),Z=c/n(this,vt)/n(this,zt),Y=G-1,be=E-1;e.bins[T]={id:we,color:ue,binData:q,content:D,animation:{fromWidth:re,fromHeight:n(this,St).call(this,we),fromDepth:Z,toWidth:re,toHeight:p*n(this,fe)*n(this,tt)/8,toDepth:Z},animation2:{fromX:Y+n(this,L).xOffset,fromY:t,fromZ:be+n(this,L).yOffset,toX:Y,toY:t,toZ:be},animation3:{fromColor:n(this,Ft).call(this,we),toColor:W}},m[T]={key:we,scale:p,color:W}}T++}B(this,xt,m);const ee=[],te=[];return T=n(this,Nt).call(this,e,ee,te,g,d,x,C,0),T=n(this,Mt).call(this,e,ee,te,d,g,z,A,T),T=n(this,jt).call(this,e,ee,te,d,g,void 0,void 0,void 0,T),Ar(this,Yt,$r).call(this,e,ee,te,d,g,T),e.labels=[...ee,...te],e});j(this,Tr,()=>{const e={type:"TH1",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,i,o,s,a,u;const f="";let h,c=0;const p=n(this,Q)+n(this,fe)>n(this,N).fXaxis.fNbins?n(this,N).fXaxis.fNbins:n(this,Q)+n(this,fe),k=1,D=n(this,N).fXaxis.fTitle!==""?n(this,N).fXaxis.fTitle:"x",T=n(this,N).fXaxis.fLabels?n(this,N).fXaxis.fLabels.arr:[],d=[];for(let C=n(this,Q);C<=p;C++){if(i=n(this,N).fXaxis.GetBinCenter(C),o=n(this,N).fXaxis.GetBinLowEdge(C),s=i+(i-o),a=s-o,h=n(this,N).getBinContent(C)/10,u=n(this,Bt).call(this,h),t=u*n(this,fe)*n(this,tt)/16,u>n(this,Tt)){let z=n(this,et)?n(this,et).call(this,{histogram:n(this,N),x:s,content:u}):null;z=z||n(this,F).getBinColor(u);const x=n(this,Re)+o+"th1"+s;let m;n(this,Dt).call(this,x)?m=n(this,F).getSecondaryAccentColor():m=z;const ee=`id: ${x};
|
|
263
|
+
histogramName: ${n(this,Re)};
|
|
264
|
+
typeName: 'TH1';
|
|
265
|
+
content: ${u};
|
|
266
|
+
xTitle: ${D};
|
|
267
|
+
zTitle: 'none';
|
|
268
|
+
absoluteContent: ${h};
|
|
269
|
+
binName: ${f};
|
|
270
|
+
xMin: ${o};
|
|
271
|
+
zMin: ${0};
|
|
272
|
+
xMax: ${s};
|
|
273
|
+
zMax: ${0};
|
|
274
|
+
xPos: ${C};
|
|
275
|
+
zPos: ${0};
|
|
276
|
+
xCenter: ${i};
|
|
277
|
+
yCenter: ${0};
|
|
278
|
+
xWidth: ${a};
|
|
279
|
+
zWidth: ${0};
|
|
280
|
+
markedColor: ${m};
|
|
281
|
+
selectColor: ${n(this,F).getSecondaryAccentColor()};
|
|
282
|
+
axisX: ${n(this,F).getAxisColor("x")};
|
|
283
|
+
axisY: ${n(this,F).getAxisColor("y")};
|
|
284
|
+
axisZ: ${n(this,F).getAxisColor("z")}`,te=a/n(this,ct)/n(this,zt),E=C-1,G=0;e.bins[c]={id:x,color:z,binData:ee,content:h,animation:{fromWidth:te,fromHeight:n(this,St).call(this,x),fromDepth:te,toWidth:te,toHeight:u*n(this,fe)*n(this,tt)/8,toDepth:te},animation2:{fromX:E+n(this,L).xOffset,fromY:t,fromZ:G,toX:E,toY:t,toZ:G},animation3:{fromColor:n(this,Ft).call(this,x),toColor:m}},d[c]={key:x,scale:u,color:m}}c++}B(this,xt,d);const g=[],A=[];return c=n(this,Nt).call(this,e,g,A,k,p,void 0,void 0,0),c=n(this,Mt).call(this,e,g,A,p,k,T,D,c),c=n(this,jt).call(this,e,g,A,p,k,void 0,void 0,void 0,c),Ar(this,Yt,$r).call(this,e,g,A,p,k,c),e.labels=[...g,...A],e});j(this,Bt,e=>e<=0?0:(n(this,Ht)>1&&(e=Math.round((e/n(this,Ht)+Number.EPSILON)*100)/100),e));j(this,It,(e,t,i,o,s)=>{if(B(this,L,{xOffset:0,yOffset:0,zOffset:0}),i){if(s?(t[o]+=1,n(this,L)[o]=-1):(t[o]+=t.range,n(this,L)[o]=-t.range),e[o]<=t.range)return t[o]=1,n(this,L)[o]=0,t;if(t[o]>e[o]-t.range)return t[o]=e[o]-t.range,n(this,L)[o]=0,t}else if(s?(t[o]-=1,n(this,L)[o]=1):(t[o]-=t.range,n(this,L)[o]=t.range),t[o]<1)return t[o]=1,n(this,L)[o]=0,t;return t});j(this,jt,(e,t,i,o,s,a,u,f,h)=>(t[h]=n(this,Ge).call(this,9e4+h,o+.5,n(this,I)-1,s+.5,270,360,0,2,2,`${u?u[n(this,I)-1]?u[n(this,I)-1].fString:Math.round((n(this,Fe).zInitial+n(this,I)-1+Number.EPSILON)*100)/100:"0"}`,n(this,F).getAxisColor("y"),n(this,F).getSecondaryFontColor()),i[h]=n(this,Ge).call(this,91e3+h,o+.5,n(this,I)-1,n(this,ce)-2.5,270,90,0,2,2,`${u?u[n(this,I)-1]?u[n(this,I)-1].fString:Math.round((n(this,Fe).zInitial+n(this,I)-1+Number.EPSILON)*100)/100:"0"}`,n(this,F).getAxisColor("y"),n(this,F).getSecondaryFontColor()),h++,t[h]=n(this,Ge).call(this,92e3+h,n(this,Q)-2.5,n(this,I)-1,s+.5,270,270,0,2,2,`${u?u[n(this,I)-1]?u[n(this,I)-1].fString:Math.round((n(this,Fe).zInitial+n(this,I)-1+Number.EPSILON)*100)/100:"0"}`,n(this,F).getAxisColor("y"),n(this,F).getSecondaryFontColor()),i[h]=n(this,Ge).call(this,93e3+h,n(this,Q)-2.5,n(this,I)-1,n(this,ce)-2.5,270,180,0,2,2,`${u?u[n(this,I)-1]?u[n(this,I)-1].fString:Math.round((n(this,Fe).zInitial+n(this,I)-1+Number.EPSILON)*100)/100:"0"}`,n(this,F).getAxisColor("y"),n(this,F).getSecondaryFontColor()),h++,f&&(e.axisLabels[4]={id:"upLabel1",key:95004+n(this,Re),text:{value:f,color:n(this,F).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:n(this,Q)-1.5+n(this,L).xOffset,fromY:a-1+n(this,L).zOffset,fromZ:n(this,ce)-2+n(this,L).yOffset,toX:n(this,Q)-1.5,toY:a-1,toZ:n(this,ce)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+n(this,Re),text:{value:f,color:n(this,F).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:o-.5+n(this,L).xOffset,fromY:a-1+n(this,L).zOffset,fromZ:s+n(this,L).yOffset,toX:o-.5,toY:a-1,toZ:s}},e.axisLabels[6]={id:"upLabel3",key:105006+n(this,Re),text:{value:f,color:n(this,F).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:n(this,Q)-2+n(this,L).xOffset,fromY:a-1+n(this,L).zOffset,fromZ:s-.5+n(this,L).yOffset,toX:n(this,Q)-2,toY:a-1,toZ:s-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+n(this,Re),text:{value:f,color:n(this,F).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:o-.5+n(this,L).xOffset,fromY:a-1+n(this,L).zOffset,fromZ:n(this,ce)-1.5+n(this,L).yOffset,toX:o-.5,toY:a-1,toZ:n(this,ce)-1.5}}),h));j(this,Nt,(e,t,i,o,s,a,u,f)=>{for(let h=n(this,ce);h<=o;h++)t[f]=n(this,Ge).call(this,1500+f,n(this,Q)-2.5,n(this,I)?n(this,I)-1:0,h-1,270,180,0,2,1,`${a?a[h-1]?a[h-1].fString:Math.round((n(this,Fe).yInitial+(h-1)*n(this,vt)+Number.EPSILON)*100)/100:""}`,n(this,F).getAxisColor("z"),n(this,F).getSecondaryFontColor()),i[f]=n(this,Ge).call(this,3e3+f,s+.5,n(this,I)?n(this,I)-1:0,h-1,270,360,0,2,1,`${a?a[h-1]?a[h-1].fString:Math.round((n(this,Fe).yInitial+(h-1)*n(this,vt)+Number.EPSILON)*100)/100:""}`,n(this,F).getAxisColor("z"),n(this,F).getSecondaryFontColor()),f++;return e.axisLabels[0]={id:"leftLabel",key:4500+n(this,Re),text:{value:u||"",color:n(this,F).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:n(this,Q)-4+n(this,L).xOffset,fromY:(n(this,I)?n(this,I)-1:0)+n(this,L).zOffset,fromZ:n(this,ce)+.5+n(this,L).yOffset,toX:n(this,Q)-4,toY:n(this,I)?n(this,I)-1:0,toZ:n(this,ce)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+n(this,Re),text:{value:u||"",color:n(this,F).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:s+2+n(this,L).xOffset,fromY:(n(this,I)?n(this,I)-1:0)+n(this,L).zOffset,fromZ:o-2.5+n(this,L).yOffset,toX:s+2,toY:n(this,I)?n(this,I)-1:0,toZ:o-2.5}},f});j(this,Mt,(e,t,i,o,s,a,u,f)=>{for(let h=n(this,Q);h<=o;h++)t[f]=n(this,Ge).call(this,7500+f,h-1,n(this,I)?n(this,I)-1:0,n(this,ce)-2.5,270,270,0,2,1,`${a[h-1]?a[h-1].fString:Math.round((n(this,Fe).xInitial+(h-1)*n(this,ct)+Number.EPSILON)*100)/100}`,n(this,F).getAxisColor("x"),n(this,F).getSecondaryFontColor()),i[f]=n(this,Ge).call(this,9e3+f,h-1,n(this,I)?n(this,I)-1:0,s+.5,270,90,0,2,1,`${a[h-1]?a[h-1].fString:Math.round((n(this,Fe).xInitial+(h-1)*n(this,ct)+Number.EPSILON)*100)/100}`,n(this,F).getAxisColor("x"),n(this,F).getSecondaryFontColor()),f++;return e.axisLabels[2]={id:"downLabel",key:10502+n(this,Re),text:{value:u,color:n(this,F).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:n(this,Q)+n(this,L).xOffset,fromY:(n(this,I)?n(this,I)-1:0)+n(this,L).zOffset,fromZ:n(this,ce)-4+n(this,L).yOffset,toX:n(this,Q),toY:n(this,I)?n(this,I)-1:0,toZ:n(this,ce)-4}},e.axisLabels[3]={id:"upLabel",key:12003+n(this,Re),text:{value:u,color:n(this,F).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:o-2.5+n(this,L).xOffset,fromY:(n(this,I)?n(this,I)-1:0)+n(this,L).zOffset,fromZ:s+2+n(this,L).yOffset,toX:o-2.5,toY:n(this,I)?n(this,I)-1:0,toZ:s+2}},f});j(this,_r,(e,t,i)=>{const o={xOffset:n(this,Ye),yOffset:n(this,Xe),zOffset:n(this,Qe)},s={name:"TH3",xOffset:n(this,Q),yOffset:n(this,ce),zOffset:n(this,I),range:n(this,fe)},a=n(this,It).call(this,o,s,t,e,i);return B(this,Q,a.xOffset),B(this,ce,a.yOffset),B(this,I,a.zOffset),a});j(this,kr,(e,t,i)=>{const o={xOffset:n(this,Ye),yOffset:n(this,Xe)},s={name:"TH2",xOffset:n(this,Q),yOffset:n(this,ce),range:n(this,fe)},a=n(this,It).call(this,o,s,t,e,i);return B(this,Q,a.xOffset),B(this,ce,a.yOffset),a});j(this,Or,(e,t,i)=>{const o={xOffset:n(this,Ye)},s={name:"TH1",xOffset:n(this,Q),range:n(this,fe)},a=n(this,It).call(this,o,s,t,e,i);return B(this,Q,a.xOffset),a});j(this,St,e=>{const t=n(this,xt).filter(i=>i.key===e);return t[0]&&t[0].scale?t[0].scale:0});j(this,Ft,e=>{const t=n(this,xt).filter(i=>i.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});this.initializeFactory(e,t,i,o,s,a,u)}initializeFactory(e,t,i,o,s,a,u){this.setUniqueName(e),this.setTheme(s),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(i),this.setRange(o),this.setSelectedBin(a),this.setViewFunction(u)}setUniqueName(e){B(this,Re,e)}updateContentScale(e){n(this,tt)+e>=0&&B(this,tt,n(this,tt)+e)}updateMinDisplayedContent(e){e>=0&&B(this,Tt,e)}setHistogramContentMaximum(e){B(this,Ht,e>0?e:1)}setSelectedBin(e){B(this,or,e||[])}setViewFunction(e){B(this,et,e)}setSection(e){e&&(e.xOffset&&B(this,Q,n(this,lt).call(this,e.xOffset,n(this,Ye))),e.yOffset&&!histogram._typename.includes("TH1")&&B(this,ce,n(this,lt).call(this,e.yOffset,n(this,Xe))),e.zOffset&&histogram._typename.includes("TH3")&&B(this,I,n(this,lt).call(this,e.zOffset,n(this,Qe))))}setHistogram(e){B(this,N,e),B(this,Je,e._typename),B(this,Q,1),B(this,ce,1),B(this,I,1),B(this,Ye,0),B(this,Xe,0),B(this,Qe,0),B(this,ct,1),B(this,vt,1),B(this,sr,1),B(this,Ye,e.fXaxis.fNbins),B(this,ct,(e.fXaxis.fXmax-e.fXaxis.fXmin)/e.fXaxis.fNbins),n(this,Fe).xInitial=e.fXaxis.fXmin,B(this,Q,n(this,lt).call(this,n(this,Q),n(this,Ye))),e._typename.includes("TH1")||(B(this,Xe,e.fYaxis.fNbins),B(this,vt,(e.fYaxis.fXmax-e.fYaxis.fXmin)/e.fYaxis.fNbins),n(this,Fe).yInitial=e.fYaxis.fXmin,B(this,ce,n(this,lt).call(this,n(this,ce),n(this,Xe)))),e._typename.includes("TH3")&&(B(this,Qe,e.fZaxis.fNbins),B(this,sr,e.fZaxis.fXmax/e.fZaxis.fNbins),n(this,Fe).zInitial=e.fZaxis.fXmin,B(this,I,n(this,lt).call(this,n(this,I),n(this,Qe)))),this.setHistogramContentMaximum(e.fMaximum)}setRange(e){e&&(e<4&&B(this,fe,4),B(this,fe,e))}setTheme(e){B(this,F,new Ji(e))}getElements(){let e={};return n(this,Je).includes("TH2")?e=n(this,Cr).call(this):n(this,Je).includes("TH3")?e=n(this,Er).call(this):n(this,Je).includes("TH1")&&(e=n(this,Tr).call(this)),e}updateSection(e,t,i){if(n(this,Je).includes("TH3"))return n(this,_r).call(this,e,t,i);if(n(this,Je).includes("TH2"))return n(this,kr).call(this,e,t,i);if(n(this,Je).includes("TH1"))return n(this,Or).call(this,e,t,i)}}Re=new WeakMap,or=new WeakMap,N=new WeakMap,Je=new WeakMap,F=new WeakMap,Q=new WeakMap,ce=new WeakMap,I=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,Qe=new WeakMap,ct=new WeakMap,vt=new WeakMap,sr=new WeakMap,fe=new WeakMap,Fe=new WeakMap,et=new WeakMap,Ht=new WeakMap,tt=new WeakMap,Tt=new WeakMap,zt=new WeakMap,L=new WeakMap,xt=new WeakMap,lt=new WeakMap,Dt=new WeakMap,Ge=new WeakMap,Er=new WeakMap,Cr=new WeakMap,Tr=new WeakMap,Bt=new WeakMap,It=new WeakMap,jt=new WeakMap,Nt=new WeakMap,Mt=new WeakMap,Yt=new WeakSet,$r=function(e,t,i,o,s,a,u,f){f++,e.titles[0]={key:195e3+n(this,Re),text:{value:n(this,N).fTitle,color:n(this,F).getPrimaryFontColor()},rotation:{x:0,y:123,z:0},position:{x:n(this,Q)-90,y:16.5,z:n(this,ce)+90},innerText:{value:"Press V to show projections or controls",color:n(this,F).getPrimaryFontColor()}},f++;const h=n(this,fe)>n(this,Ye)?n(this,Ye)+1:n(this,fe),c=n(this,fe)>n(this,Xe)?n(this,Xe)+1:n(this,fe);e.ground={key:22500+f+n(this,Re),scale:{width:h+8,height:.2,depth:c+8},animation:{fromX:n(this,Q)+h*.5-1+n(this,L).xOffset,fromY:-.5,fromZ:n(this,ce)+c*.5-.5+n(this,L).yOffset,toX:n(this,Q)+h*.5-1,toY:-.5,toZ:n(this,ce)+c*.5-.5}},f++,e.banners[1]={key:24e4+f+n(this,Re),geometry:{width:.1,height:15,depth:22},position:{x:o+8,y:(n(this,I)?n(this,I)+7:7)+n(this,L).zOffset,z:n(this,ce)+n(this,fe)/2+2.5},material:{color:"#ffffff",transparent:!0}}},_r=new WeakMap,kr=new WeakMap,Or=new WeakMap,St=new WeakMap,Ft=new WeakMap;const Qi=({name:r,histogram:e,histoSection:t,range:i,theme:o})=>{let s;const a=b.useContext(qe).selectedBins,u=b.useContext(qe).projPanelIds,f=b.useContext(qe).onViewChange,h=b.useContext(qe).selectedView,[c]=b.useState(new qo(r,e,t||null,i,o||"def",a,f)),[p,k]=b.useState(c.getElements()),[D]=b.useState(1),T=d=>{e._typename.includes(d.name)&&(d.axis?(c.updateSection(d.axis,d.increment,d.defaultRange),k(c.getElements())):d.scale?(c.updateContentScale(d.scale),k(c.getElements())):d.minValue&&(c.updateMinDisplayedContent(d.minValue),k(c.getElements())))};return b.useEffect(()=>{c.setUniqueName(r),k(c.getElements())},[r]),b.useEffect(()=>{c.setHistogram(e),k(c.getElements())},[e]),b.useEffect(()=>{c.setSection(t),k(c.getElements())},[t]),b.useEffect(()=>{c.setRange(i),k(c.getElements())},[i]),b.useEffect(()=>{c.setTheme(o),k(c.getElements())},[o]),b.useEffect(()=>{c.setSelectedBin(a),k(c.getElements())},[a]),b.useEffect(()=>{c.setViewFunction(f),k(c.getElements())},[f]),b.useEffect(()=>{c.setViewFunction(f),k(c.getElements())},[h]),b.useEffect(()=>{if(e._typename.includes("TH2")?s=Se.getChangedSection().subscribe(T):e._typename.includes("TH3")?s=Pe.getChangedSection().subscribe(T):e._typename.includes("TH1")&&(s=nt.getChangedSection().subscribe(T)),s)return()=>s.unsubscribe()},[p]),p!=null&&p.bins?ae("a-entity",{"histogram-control":!0,children:[p.bins.map(d=>v("a-box",{class:"clickable",material:`color: ${d.color}; transparent: true`,binth:d.binData,mouseevent:!0,geometry:`width:${d.animation.toWidth}; height:${d.animation.toHeight}; depth:${d.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${d.animation2.fromX} ${d.animation2.fromY} ${d.animation2.fromZ}; to: ${d.animation2.toX} ${d.animation2.toY} ${d.animation2.toZ}; dur: 1000;`,animation__3:`property: material.color; from: ${d.animation3.fromColor}; to: ${d.animation3.toColor}; dur: 1600;`,children:v("a-text",{value:d.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${d.color}; opacity: 0.50; transparent: true`,rotation:"270 180 0","wrap-count":"50",position:`0 ${.001+(D===1?-1:1)*d.animation.toHeight/2} 0`})},d.id)),p.labels.map(d=>v("a-entity",{geometry:`primitive: ${d.geometry.primitive}; width:${d.geometry.width}; height:${d.geometry.height};`,text:`color: ${d.text.color}; width: ${d.text.width}; height: ${d.text.height}; align:center;`,"label-handler":`value: ${d.labelHandler.value}; delay:${d.labelHandler.delay}`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,material:`color: ${d.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: ${d.animation.fromX} ${d.animation.fromY} ${d.animation.fromZ}; to: ${d.animation.toX} ${d.animation.toY} ${d.animation.toZ}; dur: 1005;`},d.key)),p.titles.map(d=>ae("a-entity",{text:`value: ${d.text.value}; color: ${d.text.color}; width: 230; height:auto; align:center;`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,position:`${d.position.x} ${d.position.y} ${d.position.z}`,material:"transparent: true",children:[v("a-text",{value:d.innerText.value,position:"0 10 0",width:"150",height:"auto",align:"center",color:d.innerText.color}),v("a-entity",{geometry:"primitive: plane; width:170; height:30;",position:"0 0 -1",material:"opacity: 0.9; color: white; transparent: true"})]},d.key)),p.axisLabels.map(d=>v("a-entity",{id:d.id,text:`value: ${d.text.value}; color: ${d.text.color}; width: 10; height:auto; align:center;`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,animation:`property: position; from: ${d.animation.fromX} ${d.animation.fromY} ${d.animation.fromZ}; to: ${d.animation.toX} ${d.animation.toY} ${d.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},d.key)),p.ground&&v("a-box",{width:p.ground.scale.width,material:"color: #fafafa",height:p.ground.scale.height,depth:p.ground.scale.depth,animation:`property: position; from: ${p.ground.animation.fromX} ${p.ground.animation.fromY} ${p.ground.animation.fromZ};
|
|
285
|
+
to:
|
|
286
|
+
${p.ground.animation.toX} ${p.ground.animation.toY} ${p.ground.animation.toZ}; dur: 1000;`},p.ground.key),p.banners.map(d=>v("a-box",{id:u[0]?u[0]:"panel_0",geometry:`width:${d.geometry.width}; height:${d.geometry.height}; depth:${d.geometry.depth};`,position:`${d.position.x} ${d.position.y} ${d.position.z}`,material:`color: ${d.material.color}, transparent: ${d.material.transparent}`},u[0]?u[0]:"panel_0"))]}):v("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 en(){return ae(b.Fragment,{children:[v("a-sky",{color:"#dbf0fe"}),v("a-plane",{rotation:"-90 0 0",position:"0 -0.5 0",width:"1000",height:"1000",color:"#aaa",material:"shader:flat;"})]})}var Ko=Object.defineProperty,Jo=(r,e,t)=>e in r?Ko(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,xr=(r,e,t)=>(Jo(r,typeof e!="symbol"?e+"":e,t),t);const ir=r=>{const[e,t]=b.useState(r.initialState);return b.useLayoutEffect(()=>{const i=r.subscribe(t);return()=>i.unsubscribe()},[]),e},tn=b.createContext(null);class Qo{constructor(){xr(this,"state"),xr(this,"distributors",new Map),xr(this,"handlerFunc",new Map),xr(this,"subscriptions",new Map)}addDistributor(e){this.distributors.set(e.getId(),e)}addHandlerFunc(e,t=null,i=null,o=null){this.handlerFunc.set(e,{callbackInputFunc:t,callbackOutputFunc:i,callbackCustomFunc:o})}getDistributorById(e){return this.distributors.get(e)}addSubscription(e){this.subscriptions.get(e)&&(this.clearSubscription(e),console.log("unsubscribe"));const t=this.createSubscription(e);this.subscriptions.set(e,t)}createExternalSubscription(e,t=null,i=null,o=null){return this.distributors.get(e).getObservableInstance().subscribe(s=>{s.flag==="IN"?t&&t(s.data):s.flag==="OUT"?i&&i(s.data):o&&o(s.data)})}createSubscription(e){const t=this.handlerFunc.get(e);return this.distributors.get(e).getObservableInstance().subscribe(i=>{i.flag==="IN"?t!=null&&t.callbackInputFunc&&t.callbackInputFunc(i.data):i.flag==="OUT"?t!=null&&t.callbackOutputFunc&&t.callbackOutputFunc(i.data):t!=null&&t.callbackCustomFunc&&t.callbackCustomFunc(i.data)})}addAllSubscriptions(){this.distributors.forEach((e,t)=>{this.addSubscription(t)})}clearSubscription(e){var t;(t=this.subscriptions.get(e))==null||t.unsubscribe()}clearAllSubscriptions(){this.distributors.forEach((e,t)=>this.clearSubscription(t))}}new Qo;const es=()=>{const[r,e]=b.useState(0),t=b.useContext(tn);return b.useEffect(()=>{const i=document.getElementById("camera"),o=new Rr.Vector3,s=new Rr.Quaternion;i.object3D.getWorldPosition(o);const a=setInterval(()=>{i.object3D.getWorldPosition(o),i.object3D.getWorldQuaternion(s),t.send(JSON.stringify({type:"move",payload:{position:o.toArray(),rotation:s.toArray()}})),e(u=>u+1)},100);return()=>clearInterval(a)},[r]),v("a-entity",{})},ts=({position:r,rotation:e,id:t,color:i})=>(b.useEffect(()=>{},[r]),b.useEffect(()=>{const o=new Rr.Quaternion().fromArray(e);document.getElementById(t).object3D.setRotationFromQuaternion(o)},[e]),ae("a-entity",{position:r,id:t,children:[v("a-sphere",{radius:"0.1",color:i}),v("a-sphere",{position:"0.05 0.03 -0.08",radius:"0.02","segments-width":"8","segments-height":"8",color:"#000000"}),v("a-sphere",{position:"-0.05 0.03 -0.08",radius:"0.02","segments-width":"8","segments-height":"8",color:"#000000"}),v("a-sphere",{position:"0 -0.07 -0.1",scale:"1 1 0.5","segments-width":"4","segments-height":"4",radius:"0.02",color:"#11fd3e"}),v("a-cone",{position:"0.03 -0.07 -0.1",rotation:"0 0 90",scale:"1 1 0.5","segments-radial":"8","segments-height":"1",height:"0.03","radius-bottom":"0.03",color:"#1cff3c"}),v("a-cone",{position:"-0.03 -0.07 -0.1",rotation:"0 0 -90",scale:"1 1 0.5","segments-radial":"8","segments-height":"1",height:"0.03","radius-bottom":"0.03",color:"#1cff3c"})]})),rs=13,is=77,ns=73,os=74,ss=75,as=76,rn=new Map([[os,"LEFT"],[ns,"UP"],[ss,"DOWN"],[as,"RIGHT"]]),cs=()=>{const r=b.useContext(tn),e=o=>{switch(o.keyCode){case is:r.send(JSON.stringify({type:"assign_master",payload:{}}))}},t=o=>{switch(o.keyCode){case rs:r.send(JSON.stringify({type:"selected_bins",payload:{selectedBins:JSON.parse(localStorage.getItem("selectedBins")).map(s=>s.id)}}));break}},i=o=>{if(!rn.has(o.keyCode))return;let s=rn.get(o.keyCode);r.send(JSON.stringify({type:"axis_scaling",payload:{axis:s}}))};return b.useEffect(()=>(window.addEventListener("keypress",t),window.addEventListener("keypress",e),window.addEventListener("keypress",i),()=>{window.removeEventListener("keypress",t),window.removeEventListener("keypress",e),window.removeEventListener("keypress",i)}),[]),v("div",{})},nn=({store:r})=>{const e=r.move?ir(r.move):{},t=r.ws?ir(r.ws):{},i=r.master?ir(r.master):{},o=r.selectedBins?ir(r.selectedBins):{},s=r.axisScaling?ir(r.axisScaling):new Map,[a,u]=b.useState([]),[f,h]=b.useState(""),[c,p]=b.useState(""),[k,D]=b.useState([]);return b.useEffect(()=>{e.clients!==void 0&&(e.clients.length>0?u(e.clients):u([]))},[e]),b.useEffect(()=>{h(t.id),p(t.color)},[t]),b.useEffect(()=>{console.log(i.master)},[i]),b.useEffect(()=>{o!==void 0&&(D(o.selectedBins),console.log(o.selectedBins))},[o]),b.useEffect(()=>{console.log(s.axisMap)},[s.axisMap]),ae("a-entity",{children:[v(cs,{}),v(es,{}),a.filter(T=>T.id!==f).map(T=>{const d=T.position,g=T.rotation,A=d.join(" ");return v(ts,{id:T.id,position:A,rotation:g,color:c},"key"+T.id)})]})},ls=({data:r,info:e,onClick:t=u=>{console.log("click")},onDbClick:i=u=>{console.log("DbClick")},onHover:o=u=>{console.log("Hover")},onView:s=u=>{console.log("View")},onExeCommand:a=u=>{console.log("exeCommand")}})=>{let u;return b.useEffect(()=>{if(u=tr.getBinDistributor().subscribe(f=>{if(f.data.histogramName===e.name){const h={intersectionAxis:f.intersect,obj:r.histogram,name:f.histogramName};switch(f.data.zPos?(h.binz=f.data.zPos,h.biny=f.data.yPos,h.binx=f.data.xPos,h.bin=r.histogram.getBin(f.data.xPos,f.data.yPos,f.data.zPos),h.con=r.histogram.getBinContent(f.data.xPos,f.data.yPos,f.data.zPos)):f.data.yPos?(h.biny=f.data.yPos,h.binx=f.data.xPos,h.bin=r.histogram.getBin(f.data.xPos,f.data.yPos),h.con=r.histogram.getBinContent(f.data.xPos,f.data.yPos)):f.data.xPos&&(h.binx=f.data.xPos,h.bin=r.histogram.getBin(f.data.xPos),h.con=r.histogram.getBinContent(f.data.xPos)),f.event){case"CLICK":t(h);break;case"HOVER":o(h);break;case"DB_CLICK":i(h);break}}else f.data==="REFRESH"&&a(f.data)}),u)return()=>u.unsubscribe()},[r,e,t,i,o]),window.AFRAME.utils.device.checkHeadsetConnected()?v(b.Fragment,{children:v(qe.Provider,{value:{source:r.sourceStore,theme:r.themeStore,range:r.rangeStore,views:r.viewStore,projPanelIds:r.projPanelIds,selectedBins:r.selectedBins,projectionNames:r.projectionsNames},children:ae("a-scene",{embedded:!0,style:{zIndex:"1",width:"100%",minHeight:"calc(90vh)"},children:[v("a-assets",{children:v("img",{id:"skyTexture",src:e.background.url,alt:"background"})}),v(nn,{store:r.sharedStore}),v(en,{}),v(Ui,{}),v(Qi,{name:e.name,histogram:r.histogram,histoSection:r.section,projections:r.projections,range:r.range,theme:e.theme})]})})}):v(b.Fragment,{children:ae(qe.Provider,{value:{source:r.sourceStore,theme:r.themeStore,range:r.rangeStore,views:r.viewStore,onViewChange:s,projPanelIds:r.projPanelIds,selectedBins:r.selectedBins,projectionNames:r.projectionsNames,selectedView:r.selectedView},children:[ae("a-scene",{embedded:!0,style:{zIndex:"1",width:"100%",minHeight:"calc(90vh)"},children:[v("a-assets",{children:v("img",{id:"skyTexture",src:e.background.url,alt:"background"})}),v(en,{}),v(nn,{store:r.sharedStore}),v(Ui,{}),v(Qi,{name:e.name,histogram:r.histogram,histoSection:r.section,range:r.range,theme:e.theme})]}),v(Wi,{})]})})};class us{constructor(e){He(this,"model",null);this.model=e}updateElement(e,t,i,o){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],o);else{let s;i==="titles"?s=this.createTitle(void 0,this.model[i].attributes[e]):s=this.createElement(void 0,this.model[i].attributes[e],o),this.model[i].elements[e]=s,t.appendChild(s)}}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 o=e;if(o==null){const s=this.checkEntityType(i);o=document.createElement(s)}for(const s in t)o.setAttribute(s,t[s]);return o}createBannerElement(e,t,i){let o=e;return o==null&&(o=document.createElement("a-entity"),this.createBannerLines(t,i).map(a=>o.append(a))),o.setAttribute("position",i.position),o.setAttribute("id",i.id),o}createBannerLines(e,t){const i=[];for(let s=e-1;s>-1;s--){t.line.position.y=2*s;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 o=document.createElement("a-entity");return o.setAttribute("geometry",t.background.geometry),o.setAttribute("position",t.background.position),o.setAttribute("material",t.background.material),i.push(o),i}createTitle(e,t){let i=e;if(i==null){i=document.createElement("a-entity");const o=this.createElement(void 0,t.background);i.appendChild(o)}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 fs{bannerTemplate(e,t,i){const o={x:e.positionX,y:e.positionY,z:e.positionZ},s=e.id,a=this.bannerBackgroundTemplate(i),u=this.lineTemplate(t);return{position:o,id:s,background:a,line:u}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.scaleX,y:e.scaleY,z:e.scaleZ},o={color:e.color,opacity:.75},s=e.class,a=e.data,u=e.id;return{position:t,scale:i,material:o,id:u,class:s,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},o={primitive:"plane",width:4,height:1},s={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},u=e.id;return{position:t,rotation:i,geometry:o,text:s,material:a,id:u}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={primitive:"plane",width:e.width,height:e.height},s={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:i,geometry:o,text:s,material:a}}titleTemplate(e,t){const i={x:e.positionX,y:e.positionY,z:e.positionZ},o={x:e.rotationX,y:e.rotationY,z:e.rotationZ},s={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},u=this.titleTextTemplate(t);return{position:i,rotation:o,material:s,text:a,background:u}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},i={x:e.positionX,y:e.positionY,z:e.positionZ},o={color:e.color,opacity:.6};return{position:i,geometry:t,material:o}}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},o={color:e.color};return{position:t,geometry:i,material:o}}}let on=[];function hs(r){return on.filter(t=>t.id===r).length!==0}function ni(r,e,t,i,o,s,a){on=gr.getBinsFromLocalStorage();const u=new fs,f=new us(e),h=new Ji(a),c={},p=r;let k,D,T,d,g,A,C,z,x,m;const ee="";let te,E=0;const G=i+s>t.fXaxis.fXmax?t.fXaxis.fXmax:i+s,ue=o+s>t.fYaxis.fXmax?t.fYaxis.fXmax:o+s,we=t.fXaxis.fTitle,W=t.fYaxis.fTitle,q=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],re=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let Y=o;Y<=ue;Y++)for(let be=i;be<=G;be++)if(D=t.fXaxis.GetBinCenter(be),T=t.fXaxis.GetBinLowEdge(be),d=D+(D-T),g=d-T,A=t.fYaxis.GetBinCenter(Y),C=t.fYaxis.GetBinLowEdge(Y),z=A+(A-C),x=z-C,te=t.getBinContent(be,Y),m=ds(te,t.fMaximum),k=m/2,m>0){const he=h.getBinColor(m),Ce=T+"th2"+d+"th2"+C+"th2"+z;let _e;hs(Ce)?_e=h.getSecondaryAccentColor():_e=he;const Ne=`id: ${Ce};
|
|
287
|
+
content: ${m};
|
|
288
|
+
color: ${he};
|
|
289
|
+
yTitle: ${W};
|
|
290
|
+
xTitle: ${we};
|
|
291
|
+
absoluteContent: ${te};
|
|
292
|
+
binName: ${ee};
|
|
293
|
+
xMin: ${T};
|
|
294
|
+
yMin: ${C};
|
|
295
|
+
xMax: ${d};
|
|
296
|
+
yMax: ${z};
|
|
297
|
+
xCenter: ${D};
|
|
298
|
+
yCenter: ${A};
|
|
299
|
+
xWidth: ${g};
|
|
300
|
+
yWidth: ${x};
|
|
301
|
+
markedColor: ${_e};
|
|
302
|
+
selectColor: ${h.getSecondaryAccentColor()};
|
|
303
|
+
axisX: ${h.getAxisColor("x")};
|
|
304
|
+
axisY: ${h.getAxisColor("y")};
|
|
305
|
+
axisZ: ${h.getAxisColor("z")}`;c.id=Ce,c.positionX=T,c.positionY=k,c.positionZ=C,c.scaleX=g/2,c.scaleY=m,c.scaleZ=x/2,c.color=_e,c.class="clickable",c.data=Ne,e.bins.attributes[E]=u.binTemplate(c),f.updateElement(E,p,"bins","a-box"),E++}f.deleteUnnecessaryElements(E,["bins"]),c.id=1500+E,c.positionX=G+.5,c.positionY=0,c.positionZ=ue+.5,c.rotationX=270,c.rotationY=360,c.rotationZ=0,c.width=2,c.height=2,c.value="0",c.color=h.getAxisColor("y"),e.normalXAxis.attributes[0]=u.axisTemplate(c),f.updateElement(0,p,"normalXAxis","a-entity"),c.positionZ=o-2.5,c.rotationX=270,c.rotationY=180,e.reversedYAxis.attributes[0]=u.axisTemplate(c),f.updateElement(0,p,"reversedYAxis","a-entity"),c.positionX=i-2.5,c.positionZ=ue+.5,e.normalYAxis.attributes[0]=u.axisTemplate(c),f.updateElement(0,p,"normalYAxis","a-entity"),c.positionZ=o-2.5,c.rotationY=180,e.reversedXAxis.attributes[0]=u.axisTemplate(c),f.updateElement(0,p,"reversedXAxis","a-entity"),E=1;for(let Y=o;Y<=ue;Y++)c.id=1500+E,c.positionX=i-2.5,c.positionY=0,c.positionZ=Y-1,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=2,c.height=1,c.value=`${re[Y-1]?re[Y-1].fString:Y-1}`,c.color=h.getAxisColor("z"),e.normalYAxis.attributes[E]=u.axisTemplate(c),f.updateElement(E,p,"normalYAxis","a-entity"),c.id=4500+E,c.positionX=G+.5,c.rotationY=360,c.value=`${re[Y-1]?re[Y-1].fString:Y-1}`,e.reversedYAxis.attributes[E]=u.axisTemplate(c),f.updateElement(E,p,"reversedYAxis","a-entity"),E++;f.deleteUnnecessaryElements(E,["normalYAxis","reversedYAxis"]),E=1;for(let Y=i;Y<=G;Y++)c.id=1500+E,c.positionX=Y-1,c.positionY=0,c.positionZ=o-2.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=2,c.height=1,c.value=`${q[Y-1]?q[Y-1].fString:Y-1}`,c.color=h.getAxisColor("x"),e.normalXAxis.attributes[E]=u.axisTemplate(c),f.updateElement(E,p,"normalXAxis","a-entity"),c.id=4500+E,c.positionZ=ue+.5,c.rotationX=270,c.rotationY=90,c.value=`${q[Y-1]?q[Y-1].fString:Y-1}`,e.reversedXAxis.attributes[E]=u.axisTemplate(c),f.updateElement(E,p,"reversedXAxis","a-entity"),E++;f.deleteUnnecessaryElements(E,["normalXAxis","reversedXAxis"]),c.positionX=i,c.positionY=0,c.positionZ=o-4,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=4,c.height=1,c.value=we,c.id="downLabel",e.labels.attributes[0]=u.labelTemplate(c),f.updateElement(0,p,"labels","a-entity"),c.positionX=G-2.5,c.positionZ=ue+2,c.rotationY=0,c.id="upLabel",e.labels.attributes[1]=u.labelTemplate(c),f.updateElement(1,p,"labels","a-entity"),c.positionX=i-4,c.positionY=0,c.positionZ=o+.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=4,c.height=1,c.value=W,c.color=h.getAxisColor("z"),c.id="leftLabel",e.labels.attributes[2]=u.labelTemplate(c),f.updateElement(2,p,"labels","a-entity"),c.positionX=G+2,c.positionZ=ue-2.5,c.rotationX=270,c.rotationY=90,c.id="rightLabel",e.labels.attributes[3]=u.labelTemplate(c),f.updateElement(3,p,"labels","a-entity"),c.positionX=i-90,c.positionY=-6.5,c.positionZ=o+90,c.rotationX=0,c.rotationY=123,c.rotationZ=0,c.title=t.fTitle,c.color=h.getPrimaryFontColor();const Z={};Z.positionX=0,Z.positionY=0,Z.positionZ=-1,Z.width=170,Z.height=30,Z.color="white",e.titles.attributes[0]=u.titleTemplate(c,Z),f.updateElement(0,p,"titles","a-entity"),c.positionX=i+120,c.positionZ=o-70,c.rotationY=330,c.title=t.fName,e.titles.attributes[1]=u.titleTemplate(c,Z),f.updateElement(1,p,"titles","a-entity")}const ds=(r,e)=>r<=0?0:(e>1&&(r=Math.round((r/e+Number.EPSILON)*100)/100),r);class ps{constructor(e){j(this,Pr,void 0);B(this,Pr,e)}createTH2DemoHistogram(e,t,i,o){const s=_t.createHistogram("TH2I",e,t);let a=i;for(let u=1;u<=20;u++)for(let f=1;f<=20;f++){const h=s.getBin(f,u);let c=0;c=a,s.setBinContent(h,c),a+=o}return s.fXaxis.fTitle="x Axis",s.fYaxis.fTitle="y Axis",s.fName="You don't have a valid file path",s.fTitle="This is a TH2 histogram demo",s.fMaximum=a,s}createTH3DemoHistogram(e,t,i,o,s){const a=_t.createHistogram("TH3I",e,t,i);let u=o;for(let f=1;f<=20;f++)for(let h=1;h<=20;h++)for(let c=1;c<=20;c++){const p=a.getBin(c,h,f);let k=0;k=u,a.setBinContent(p,k),u+=s}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=u,a}}Pr=new WeakMap;const ms=xe.registerComponent("th2-histogram",{schema:{section:{type:"string"},filename:{type:"string"},theme:{type:"string",default:"def"},position:{name:"position",xValue:0,yValue:0,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;qi(this.schema,r),document.addEventListener("keydown",ri),document.addEventListener("keyup",ii),this.demoHistogramService=new ps,this.localStorageService=new Kr,this.cameraService=new rr,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),ni(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=Se.getChangedSection().subscribe(t)},update:function(){Ki(),this.section=JSON.parse(this.data.section),_t.openFile(this.data.filename).then(r=>r.readObject("hUsersVsProjects")).then(r=>{this.localStorageService.initHistogramData(r),this.histogram=r,ni(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),ni(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",ri),document.removeEventListener("keyup",ii)}}),ys=xe.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(){}});let nr=new rr;const gs=r=>{r.detail.y>.95&&(Se.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Pe.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),r.detail.y<-.95&&(Se.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Pe.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),r.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),Se.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Pe.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),r.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),Se.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Pe.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},bs=r=>{r.detail.y>.95&&(Se.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Pe.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),r.detail.y<-.95&&(Se.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Pe.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),r.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),Se.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Pe.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),r.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),Se.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Pe.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},vs=(r,e)=>{r.detail.y>.95&&nr.horizontalMoveCamera("z",!1,e),r.detail.y<-.95&&nr.horizontalMoveCamera("z",!0,e),r.detail.x<-.95&&nr.horizontalMoveCamera("x",!0,e),r.detail.x>.95&&nr.horizontalMoveCamera("x",!1,e)},xs=r=>{r.detail.y>.95&&(Se.changeHistogramScale(-.1,"TH2"),Ae.next({scale:-.1})),r.detail.y<-.95&&(Se.changeHistogramScale(.1,"TH2"),Ae.next({scale:.1}))},Ss=r=>{r.detail.y>.95?Ae.next({source:"next"}):r.detail.y<-.95&&Ae.next({source:"prev"})},sn=r=>{r==="Y"?Ae.next({tool:"next"}):Ae.next({tool:"prev"})},an=r=>{Pe.changeHistogramSectionByOffset("zOffset","TH3",!0,r)},cn=r=>{Pe.changeHistogramSectionByOffset("zOffset","TH3",!1,r)},ln=()=>{nr=new rr},ws=r=>{gs(r)},Es=r=>{bs(r)},Cs=(r,e)=>{vs(r,e)},Ts=()=>{br.saveSelectedBinToLocalStorage(),qr()===0&&Ae.next({binData:br})},_s=()=>{br.deleteBinFromLocalStorage()},ks=()=>{Se.changeHistogramFunction("feet","TH2")},Os=()=>{Se.changeHistogramFunction("default","TH2")},Ps=()=>{pt.setVisibilityOfBanners("oculus")},As=()=>{pt.setUserState()},$s=()=>{pt.shiftBanners()},Rs=r=>{r.forEach(e=>{})},Hs=xe.registerComponent("left-controller-logging",{init:function(){let r=!1,e=!0,t=1,i=!1;const o=this.el;o.addEventListener("gripdown",()=>{r=!0}),o.addEventListener("gripup",()=>{r=!1}),o.addEventListener("thumbstickdown",()=>{r?(t++,t>20&&(t=20)):(t--,t<1&&(t=1))}),o.addEventListener("thumbstickmoved",s=>{if(r&&qr()===2)xs(s);else if(r&&qr()===3){if(e){e=!1,Ss(s);const a=setTimeout(()=>{e=!0},100);return()=>clearTimeout(a)}}else Cs(s,t)}),o.addEventListener("ybuttondown",()=>{r?i||(i=!0,sn("Y")):Ps()}),o.addEventListener("xbuttondown",()=>{r?i||(i=!0,sn("X")):As()}),o.addEventListener("ybuttonup",()=>{i=!1}),o.addEventListener("xbuttonup",()=>{i=!1})},update:function(){ln()}}),zs=xe.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?ws(t):Es(t)}),e.addEventListener("bbuttondown",()=>{an(!r)}),e.addEventListener("abuttondown",()=>{cn(!r)}),e.addEventListener("thumbstickdown",()=>{r?ks():Os()}),e.addEventListener("triggerdown",()=>{r?(Ts(),Rs()):(_s(),$s())})},update:function(){ln()}});class Ds{constructor(){j(this,Lt,void 0);B(this,Lt,new dt)}sendSourceSubject(e){n(this,Lt).next(e)}getSourceSettingSubject(){return n(this,Lt).asObservable()}}Lt=new WeakMap;const Bs=new Ds,Is=new Kr;J.Banner=ys,J.HistogramTH2=ms,J.LeftController=Hs,J.NdmVrScene=ls,J.RightController=zs,J.ndmVrStorage=Is,J.sourceSettingSubject=Bs,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|