!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs"),require("babylonjs-gui"),require("babylonjs-loaders"),require("babylonjs-materials"),require("babylonjs-serializers")):"function"==typeof define&&define.amd?define("babylonjs-inspector",["babylonjs","babylonjs-gui","babylonjs-loaders","babylonjs-materials","babylonjs-serializers"],t):"object"==typeof exports?exports["babylonjs-inspector"]=t(require("babylonjs"),require("babylonjs-gui"),require("babylonjs-loaders"),require("babylonjs-materials"),require("babylonjs-serializers")):e.INSPECTOR=t(e.BABYLON,e.BABYLON.GUI,e.BABYLON,e.BABYLON,e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,(function(e,t,n,r,a){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){"use strict";e.exports=n(19)},function(t,n){t.exports=e},function(e,t,n){e.exports=n(26)()},function(e,n){e.exports=t},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=i(e),p=1;p<arguments.length;p++){for(var c in n=Object(arguments[p]))a.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var u=0;u<s.length;u++)o.call(n,s[u])&&(l[s[u]]=n[s[u]])}}return l}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(20)},function(e,t,n){var r;
/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var i=a.apply(null,r);i&&e.push(i)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=n},function(e,t,n){"use strict";var r,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function s(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],a=0;a<e.length;a++){var o=e[a],l=t.base?o[0]+t.base:o[0],p=n[l]||0,c="".concat(l," ").concat(p);n[l]=p+1;var u=s(c),d={css:o[1],media:o[2],sourceMap:o[3]};-1!==u?(i[u].references++,i[u].updater(d)):i.push({identifier:c,updater:g(d,t),references:1}),r.push(c)}return r}function p(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,r){var a=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function h(e,t,n){var r=n.css,a=n.media,o=n.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var m=null,b=0;function g(e,t){var n,r,a;if(t.singleton){var o=b++;n=m||(m=p(t)),r=d.bind(null,n,o,!1),a=d.bind(null,n,o,!0)}else n=p(t),r=h.bind(null,n,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var a=s(n[r]);i[a].references--}for(var o=l(e,t),p=0;p<n.length;p++){var c=s(n[p]);0===i[c].references&&(i[c].updater(),i.splice(c,1))}n=o}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(i=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([a]).join("\n")}var i,s,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&a[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";var r=n(0),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i={base:{position:"absolute",userSelect:"none",MsUserSelect:"none"},top:{width:"100%",height:"10px",top:"-5px",left:"0px",cursor:"row-resize"},right:{width:"10px",height:"100%",top:"0px",right:"-5px",cursor:"col-resize"},bottom:{width:"100%",height:"10px",bottom:"-5px",left:"0px",cursor:"row-resize"},left:{width:"10px",height:"100%",top:"0px",left:"-5px",cursor:"col-resize"},topRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",top:"-10px",cursor:"ne-resize"},bottomRight:{width:"20px",height:"20px",position:"absolute",right:"-10px",bottom:"-10px",cursor:"se-resize"},bottomLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",bottom:"-10px",cursor:"sw-resize"},topLeft:{width:"20px",height:"20px",position:"absolute",left:"-10px",top:"-10px",cursor:"nw-resize"}},s=function(e){return r.createElement("div",{className:e.className,style:o({},i.base,i[e.direction],e.replaceStyles||{}),onMouseDown:function(t){e.onResizeStart(t,e.direction)},onTouchStart:function(t){e.onResizeStart(t,e.direction)}},e.children)},l={userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",MsUserSelect:"none"},p={userSelect:"auto",MozUserSelect:"auto",WebkitUserSelect:"auto",MsUserSelect:"auto"},c=function(e,t,n){return Math.max(Math.min(e,n),t)},u=function(e,t){return Math.round(e/t)*t},d=function(e,t){return t.reduce((function(t,n){return Math.abs(n-e)<Math.abs(t-e)?n:t}))},h=function(e,t){return e.substr(e.length-t.length,t.length)===t},m=function(e){return"auto"===e.toString()||h(e.toString(),"px")||h(e.toString(),"%")||h(e.toString(),"vh")||h(e.toString(),"vw")||h(e.toString(),"vmax")||h(e.toString(),"vmin")?e.toString():e+"px"},b=["style","className","grid","snap","bounds","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent"],g=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isResizing:!1,resizeCursor:"auto",width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0}},n.updateExtendsProps(e),n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),"undefined"!=typeof window&&(window.addEventListener("mouseup",n.onMouseUp),window.addEventListener("mousemove",n.onMouseMove),window.addEventListener("mouseleave",n.onMouseUp),window.addEventListener("touchmove",n.onMouseMove),window.addEventListener("touchend",n.onMouseUp)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"updateExtendsProps",value:function(e){this.extendsProps=Object.keys(e).reduce((function(t,n){return-1!==b.indexOf(n)||(t[n]=e[n]),t}),{})}},{key:"getParentSize",value:function(){var e=this.base;if(!e)return{width:window.innerWidth,height:window.innerHeight};var t=!1,n=this.parentNode.style.flexWrap,r=e.style.minWidth;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%";var a={width:e.offsetWidth,height:e.offsetHeight};return e.style.position="absolute",t&&(this.parentNode.style.flexWrap=n),e.style.minWidth=r,a}},{key:"componentDidMount",value:function(){var e=this.size;this.setState({width:this.state.width||e.width,height:this.state.height||e.height});var t=this.parentNode;if(t instanceof HTMLElement&&!this.base){var n=document.createElement("div");n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.transform="scale(0, 0)",n.style.left="0",n.style.flex="0",n.classList?n.classList.add("__resizable_base__"):n.className+="__resizable_base__",t.appendChild(n)}}},{key:"componentWillReceiveProps",value:function(e){this.updateExtendsProps(e)}},{key:"componentWillUnmount",value:function(){if("undefined"!=typeof window){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseleave",this.onMouseUp),window.removeEventListener("touchmove",this.onMouseMove),window.removeEventListener("touchend",this.onMouseUp);var e=this.parentNode,t=this.base;if(!t||!e)return;if(!(e instanceof HTMLElement&&t instanceof Node))return;e.removeChild(t)}}},{key:"calculateNewSize",value:function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"}},{key:"onResizeStart",value:function(e,t){var n=0,r=0;if(e.nativeEvent instanceof MouseEvent){if(n=e.nativeEvent.clientX,r=e.nativeEvent.clientY,3===e.nativeEvent.which)return}else e.nativeEvent instanceof TouchEvent&&(n=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY);this.props.onResizeStart&&this.props.onResizeStart(e,t,this.resizable),this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.setState({original:{x:n,y:r,width:this.size.width,height:this.size.height},isResizing:!0,resizeCursor:window.getComputedStyle(e.target).cursor,direction:t})}},{key:"onMouseMove",value:function(e){if(this.state.isResizing){var t=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,n=e instanceof MouseEvent?e.clientY:e.touches[0].clientY,r=this.state,a=r.direction,o=r.original,i=r.width,s=r.height,l=this.props,p=l.lockAspectRatio,m=l.lockAspectRatioExtraHeight,b=l.lockAspectRatioExtraWidth,g=this.props,f=g.maxWidth,v=g.maxHeight,y=g.minWidth,C=g.minHeight,E=this.getParentSize();if(f&&"string"==typeof f&&h(f,"%")){var x=Number(f.replace("%",""))/100;f=E.width*x}if(v&&"string"==typeof v&&h(v,"%")){var O=Number(v.replace("%",""))/100;v=E.height*O}if(y&&"string"==typeof y&&h(y,"%")){var S=Number(y.replace("%",""))/100;y=E.width*S}if(C&&"string"==typeof C&&h(C,"%")){var _=Number(C.replace("%",""))/100;C=E.height*_}f=void 0===f?void 0:Number(f),v=void 0===v?void 0:Number(v),y=void 0===y?void 0:Number(y),C=void 0===C?void 0:Number(C);var w="number"==typeof p?p:o.width/o.height,P=o.width,T=o.height;if(/right/i.test(a)&&(P=o.width+(t-o.x),p&&(T=(P-b)/w+m)),/left/i.test(a)&&(P=o.width-(t-o.x),p&&(T=(P-b)/w+m)),/bottom/i.test(a)&&(T=o.height+(n-o.y),p&&(P=(T-m)*w+b)),/top/i.test(a)&&(T=o.height-(n-o.y),p&&(P=(T-m)*w+b)),"parent"===this.props.bounds){var k=this.parentNode;if(k instanceof HTMLElement){var N=k.getBoundingClientRect(),M=N.left,A=N.top,L=this.resizable.getBoundingClientRect(),R=L.left,I=L.top,D=k.offsetWidth+(M-R),j=k.offsetHeight+(A-I);f=f&&f<D?f:D,v=v&&v<j?v:j}}else if("window"===this.props.bounds){if("undefined"!=typeof window){var z=this.resizable.getBoundingClientRect(),F=z.left,V=z.top,U=window.innerWidth-F,G=window.innerHeight-V;f=f&&f<U?f:U,v=v&&v<G?v:G}}else if(this.props.bounds instanceof HTMLElement){var B=this.props.bounds.getBoundingClientRect(),H=B.left,W=B.top,K=this.resizable.getBoundingClientRect(),Y=K.left,X=K.top;if(!(this.props.bounds instanceof HTMLElement))return;var Z=this.props.bounds.offsetWidth+(H-Y),q=this.props.bounds.offsetHeight+(W-X);f=f&&f<Z?f:Z,v=v&&v<q?v:q}var Q=void 0===y?10:y,J=void 0===f||f<0?P:f,$=void 0===C?10:C,ee=void 0===v||v<0?T:v;if(p){var te=($-m)*w+b,ne=(ee-m)*w+b,re=(Q-b)/w+m,ae=(J-b)/w+m,oe=Math.max(Q,te),ie=Math.min(J,ne),se=Math.max($,re),le=Math.min(ee,ae);P=c(P,oe,ie),T=c(T,se,le)}else P=c(P,Q,J),T=c(T,$,ee);this.props.grid&&(P=u(P,this.props.grid[0])),this.props.grid&&(T=u(T,this.props.grid[1])),this.props.snap&&this.props.snap.x&&(P=d(P,this.props.snap.x)),this.props.snap&&this.props.snap.y&&(T=d(T,this.props.snap.y));var pe={width:P-o.width,height:T-o.height};if(i&&"string"==typeof i&&h(i,"%"))P=P/E.width*100+"%";if(s&&"string"==typeof s&&h(s,"%"))T=T/E.height*100+"%";this.setState({width:this.calculateNewSize(P,"width"),height:this.calculateNewSize(T,"height")}),this.props.onResize&&this.props.onResize(e,a,this.resizable,pe)}}},{key:"onMouseUp",value:function(e){var t=this.state,n=t.isResizing,r=t.direction,a=t.original;if(n){var o={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.setState({isResizing:!1,resizeCursor:"auto"})}}},{key:"updateSize",value:function(e){this.setState({width:e.width,height:e.height})}},{key:"renderResizer",value:function(){var e=this,t=this.props,n=t.enable,a=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,l=t.handleWrapperClass,p=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?r.createElement(s,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:a&&a[t],className:o&&o[t]},p&&p[t]?r.createElement(p[t]):null):null}));return r.createElement("span",{className:l,style:i},c)}},{key:"render",value:function(){var e=this,t=this.state.isResizing?l:p;return r.createElement("div",o({ref:function(t){t&&(e.resizable=t)},style:o({position:"relative"},t,this.props.style,this.sizeStyle,{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box"}),className:this.props.className},this.extendsProps),this.state.isResizing&&r.createElement("div",{style:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:""+(this.state.resizeCursor||"auto"),opacity:"0",position:"fixed",zIndex:"9999",top:"0",left:"0",bottom:"0",right:"0"}}),this.props.children,this.renderResizer())}},{key:"parentNode",get:function(){return this.resizable.parentNode}},{key:"propsSize",get:function(){return this.props.size||this.props.defaultSize}},{key:"base",get:function(){var e=this.parentNode;if(e)for(var t=[].slice.call(e.children),n=0;n<t.length;n+=1){var r=t[n];if(r instanceof HTMLElement&&r.classList.contains("__resizable_base__"))return r}}},{key:"size",get:function(){var e=0,t=0;if("undefined"!=typeof window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,a=this.resizable.style.position;"relative"!==a&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=a}return{width:e,height:t}}},{key:"sizeStyle",get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&h(e.propsSize[t].toString(),"%")){if(h(e.state[t].toString(),"%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return m(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?m(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?m(t.height):n("height")}}}]),t}(r.Component);g.defaultProps={onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0},e.exports=g},function(e,t,n){"use strict";(function(e,r){
/*!
 * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 */
function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.d(t,"a",(function(){return Se})),n.d(t,"b",(function(){return Oe}));var p=function(){},c={},u={},d={mark:p,measure:p};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(u=document),"undefined"!=typeof MutationObserver&&MutationObserver,"undefined"!=typeof performance&&(d=performance)}catch(e){}var h=(c.navigator||{}).userAgent,m=void 0===h?"":h,b=c,g=u,f=d,v=(b.document,!!g.documentElement&&!!g.head&&"function"==typeof g.addEventListener&&"function"==typeof g.createElement),y=(~m.indexOf("MSIE")||m.indexOf("Trident/"),function(){try{}catch(e){return!1}}(),[1,2,3,4,5,6,7,8,9,10]),C=y.concat([11,12,13,14,15,16,17,18,19,20]),E={GROUP:"group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},x=(["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter",E.GROUP,E.SWAP_OPACITY,E.PRIMARY,E.SECONDARY].concat(y.map((function(e){return"".concat(e,"x")}))).concat(C.map((function(e){return"w-".concat(e)}))),b.FontAwesomeConfig||{});if(g&&"function"==typeof g.querySelector){[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((function(e){var t=l(e,2),n=t[0],r=t[1],a=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=g.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=a&&(x[r]=a)}))}var O=s({},{familyPrefix:"fa",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},x);O.autoReplaceSvg||(O.observeMutations=!1);var S=s({},O);b.FontAwesomeConfig=S;var _=b||{};_.___FONT_AWESOME___||(_.___FONT_AWESOME___={}),_.___FONT_AWESOME___.styles||(_.___FONT_AWESOME___.styles={}),_.___FONT_AWESOME___.hooks||(_.___FONT_AWESOME___.hooks={}),_.___FONT_AWESOME___.shims||(_.___FONT_AWESOME___.shims=[]);var w=_.___FONT_AWESOME___,P=[];v&&((g.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(g.readyState)||g.addEventListener("DOMContentLoaded",(function e(){g.removeEventListener("DOMContentLoaded",e),1,P.map((function(e){return e()}))})));var T,k=function(){},N=void 0!==e&&void 0!==e.process&&"function"==typeof e.process.emit,M=void 0===r?setTimeout:r,A=[];function L(){for(var e=0;e<A.length;e++)A[e][0](A[e][1]);A=[],T=!1}function R(e,t){A.push([e,t]),T||(T=!0,M(L,0))}function I(e){var t=e.owner,n=t._state,r=t._data,a=e[n],o=e.then;if("function"==typeof a){n="fulfilled";try{r=a(r)}catch(e){F(o,e)}}D(o,r)||("fulfilled"===n&&j(o,r),"rejected"===n&&F(o,r))}function D(e,t){var n;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&("function"==typeof t||"object"===a(t))){var r=t.then;if("function"==typeof r)return r.call(t,(function(r){n||(n=!0,t===r?z(e,r):j(e,r))}),(function(t){n||(n=!0,F(e,t))})),!0}}catch(t){return n||F(e,t),!0}return!1}function j(e,t){e!==t&&D(e,t)||z(e,t)}function z(e,t){"pending"===e._state&&(e._state="settled",e._data=t,R(U,e))}function F(e,t){"pending"===e._state&&(e._state="settled",e._data=t,R(G,e))}function V(e){e._then=e._then.forEach(I)}function U(e){e._state="fulfilled",V(e)}function G(t){t._state="rejected",V(t),!t._handled&&N&&e.process.emit("unhandledRejection",t._data,t)}function B(t){e.process.emit("rejectionHandled",t)}function H(e){if("function"!=typeof e)throw new TypeError("Promise resolver "+e+" is not a function");if(this instanceof H==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(e,t){function n(e){F(t,e)}try{e((function(e){j(t,e)}),n)}catch(e){n(e)}}(e,this)}H.prototype={constructor:H,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(e,t){var n={owner:this,then:new this.constructor(k),fulfilled:e,rejected:t};return!t&&!e||this._handled||(this._handled=!0,"rejected"===this._state&&N&&R(B,this)),"fulfilled"===this._state||"rejected"===this._state?R(I,n):this._then.push(n),n.then},catch:function(e){return this.then(null,e)}},H.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new H((function(t,n){var r=[],a=0;function o(e){return a++,function(n){r[e]=n,--a||t(r)}}for(var i,s=0;s<e.length;s++)(i=e[s])&&"function"==typeof i.then?i.then(o(s),n):r[s]=i;a||t(r)}))},H.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new H((function(t,n){for(var r,a=0;a<e.length;a++)(r=e[a])&&"function"==typeof r.then?r.then(t,n):t(r)}))},H.resolve=function(e){return e&&"object"===a(e)&&e.constructor===H?e:new H((function(t){t(e)}))},H.reject=function(e){return new H((function(t,n){n(e)}))};var W={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function K(e){if(e&&v){var t=g.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=g.head.childNodes,r=null,a=n.length-1;a>-1;a--){var o=n[a],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=o)}return g.head.insertBefore(t,r),e}}function Y(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function X(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Z(e){return Object.keys(e||{}).reduce((function(t,n){return t+"".concat(n,": ").concat(e[n],";")}),"")}function q(e){return e.size!==W.size||e.x!==W.x||e.y!==W.y||e.rotate!==W.rotate||e.flipX||e.flipY}function Q(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,a={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(32*t.x,", ").concat(32*t.y,") "),i="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:a,inner:{transform:"".concat(o," ").concat(i," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}var J={x:0,y:0,width:"100%",height:"100%"};function $(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function ee(e){var t=e.icons,n=t.main,r=t.mask,a=e.prefix,o=e.iconName,i=e.transform,l=e.symbol,p=e.title,c=e.maskId,u=e.titleId,d=e.extra,h=e.watchable,m=void 0!==h&&h,b=r.found?r:n,g=b.width,f=b.height,v="fak"===a,y=v?"":"fa-w-".concat(Math.ceil(g/f*16)),C=[S.replacementClass,o?"".concat(S.familyPrefix,"-").concat(o):"",y].filter((function(e){return-1===d.classes.indexOf(e)})).filter((function(e){return""!==e||!!e})).concat(d.classes).join(" "),E={children:[],attributes:s({},d.attributes,{"data-prefix":a,"data-icon":o,class:C,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(f)})},x=v&&!~d.classes.indexOf("fa-fw")?{width:"".concat(g/f*16*.0625,"em")}:{};m&&(E.attributes["data-fa-i2svg"]=""),p&&E.children.push({tag:"title",attributes:{id:E.attributes["aria-labelledby"]||"title-".concat(u||Y())},children:[p]});var O=s({},E,{prefix:a,iconName:o,main:n,mask:r,maskId:c,transform:i,symbol:l,styles:s({},x,d.styles)}),_=r.found&&n.found?function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.mask,i=e.maskId,l=e.transform,p=a.width,c=a.icon,u=o.width,d=o.icon,h=Q({transform:l,containerWidth:u,iconWidth:p}),m={tag:"rect",attributes:s({},J,{fill:"white"})},b=c.children?{children:c.children.map($)}:{},g={tag:"g",attributes:s({},h.inner),children:[$(s({tag:c.tag,attributes:s({},c.attributes,h.path)},b))]},f={tag:"g",attributes:s({},h.outer),children:[g]},v="mask-".concat(i||Y()),y="clip-".concat(i||Y()),C={tag:"mask",attributes:s({},J,{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[m,f]},E={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:(t=d,"g"===t.tag?t.children:[t])},C]};return n.push(E,{tag:"rect",attributes:s({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(v,")")},J)}),{children:n,attributes:r}}(O):function(e){var t=e.children,n=e.attributes,r=e.main,a=e.transform,o=Z(e.styles);if(o.length>0&&(n.style=o),q(a)){var i=Q({transform:a,containerWidth:r.width,iconWidth:r.width});t.push({tag:"g",attributes:s({},i.outer),children:[{tag:"g",attributes:s({},i.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:s({},r.icon.attributes,i.path)}]}]})}else t.push(r.icon);return{children:t,attributes:n}}(O),w=_.children,P=_.attributes;return O.children=w,O.attributes=P,l?function(e){var t=e.prefix,n=e.iconName,r=e.children,a=e.attributes,o=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:s({},a,{id:!0===o?"".concat(t,"-").concat(S.familyPrefix,"-").concat(n):o}),children:r}]}]}(O):function(e){var t=e.children,n=e.main,r=e.mask,a=e.attributes,o=e.styles,i=e.transform;if(q(i)&&n.found&&!r.found){var l={x:n.width/n.height/2,y:.5};a.style=Z(s({},o,{"transform-origin":"".concat(l.x+i.x/16,"em ").concat(l.y+i.y/16,"em")}))}return[{tag:"svg",attributes:a,children:t}]}(O)}var te=function(){},ne=(S.measurePerformance&&f&&f.mark&&f.measure,function(e,t,n,r){var a,o,i,s=Object.keys(e),l=s.length,p=void 0!==r?function(e,t){return function(n,r,a,o){return e.call(t,n,r,a,o)}}(t,r):t;for(void 0===n?(a=1,i=e[s[0]]):(a=0,i=n);a<l;a++)i=p(i,e[o=s[a]],o,e);return i});function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,a=void 0!==r&&r,o=Object.keys(t).reduce((function(e,n){var r=t[n];return!!r.icon?e[r.iconName]=r.icon:e[n]=r,e}),{});"function"!=typeof w.hooks.addPack||a?w.styles[e]=s({},w.styles[e]||{},o):w.hooks.addPack(e,o),"fas"===e&&re("fa",t)}var ae=w.styles,oe=w.shims,ie=function(){var e=function(e){return ne(ae,(function(t,n,r){return t[r]=ne(n,e,{}),t}),{})};e((function(e,t,n){return t[3]&&(e[t[3]]=n),e})),e((function(e,t,n){var r=t[2];return e[n]=n,r.forEach((function(t){e[t]=n})),e}));var t="far"in ae;ne(oe,(function(e,n){var r=n[0],a=n[1],o=n[2];return"far"!==a||t||(a="fas"),e[r]={prefix:a,iconName:o},e}),{})};ie();w.styles;function se(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}function le(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,a=e.children,o=void 0===a?[]:a;return"string"==typeof e?X(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce((function(t,n){return t+"".concat(n,'="').concat(X(e[n]),'" ')}),"").trim()}(r),">").concat(o.map(le).join(""),"</").concat(t,">")}var pe=function(e){var t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e?e.toLowerCase().split(" ").reduce((function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(a=parseFloat(a),isNaN(a))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e}),t):t};function ce(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}ce.prototype=Object.create(Error.prototype),ce.prototype.constructor=ce;var ue={fill:"currentColor"},de={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},he={tag:"path",attributes:s({},ue,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},me=s({},de,{attributeName:"opacity"});s({},ue,{cx:"256",cy:"364",r:"28"}),s({},de,{attributeName:"r",values:"28;14;28;28;14;28;"}),s({},me,{values:"1;0;1;1;0;1;"}),s({},ue,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),s({},me,{values:"1;0;0;0;0;1;"}),s({},ue,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),s({},me,{values:"0;0;1;1;0;0;"}),w.styles;function be(e){var t=e[0],n=e[1],r=l(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(S.familyPrefix,"-").concat(E.GROUP)},children:[{tag:"path",attributes:{class:"".concat(S.familyPrefix,"-").concat(E.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(S.familyPrefix,"-").concat(E.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}w.styles;function ge(){var e="svg-inline--fa",t=S.familyPrefix,n=S.replacementClass,r='svg:not(:root).svg-inline--fa {\n  overflow: visible;\n}\n\n.svg-inline--fa {\n  display: inline-block;\n  font-size: inherit;\n  height: 1em;\n  overflow: visible;\n  vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n  vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n  width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n  width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n  width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n  width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n  width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n  width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n  width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n  width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n  width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n  width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n  width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n  width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n  width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n  width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n  width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n  width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n  width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n  width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n  width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n  width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n  margin-right: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n  margin-left: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-border {\n  height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n  width: 2em;\n}\n.svg-inline--fa.fa-fw {\n  width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.fa-layers {\n  display: inline-block;\n  height: 1em;\n  position: relative;\n  text-align: center;\n  vertical-align: -0.125em;\n  width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n  display: inline-block;\n  position: absolute;\n  text-align: center;\n}\n\n.fa-layers-text {\n  left: 50%;\n  top: 50%;\n  -webkit-transform: translate(-50%, -50%);\n          transform: translate(-50%, -50%);\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter {\n  background-color: #ff253a;\n  border-radius: 1em;\n  -webkit-box-sizing: border-box;\n          box-sizing: border-box;\n  color: #fff;\n  height: 1.5em;\n  line-height: 1;\n  max-width: 5em;\n  min-width: 1.5em;\n  overflow: hidden;\n  padding: 0.25em;\n  right: 0;\n  text-overflow: ellipsis;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n  bottom: 0;\n  right: 0;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom right;\n          transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n  bottom: 0;\n  left: 0;\n  right: auto;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom left;\n          transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n  right: 0;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-top-left {\n  left: 0;\n  right: auto;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top left;\n          transform-origin: top left;\n}\n\n.fa-lg {\n  font-size: 1.3333333333em;\n  line-height: 0.75em;\n  vertical-align: -0.0667em;\n}\n\n.fa-xs {\n  font-size: 0.75em;\n}\n\n.fa-sm {\n  font-size: 0.875em;\n}\n\n.fa-1x {\n  font-size: 1em;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-6x {\n  font-size: 6em;\n}\n\n.fa-7x {\n  font-size: 7em;\n}\n\n.fa-8x {\n  font-size: 8em;\n}\n\n.fa-9x {\n  font-size: 9em;\n}\n\n.fa-10x {\n  font-size: 10em;\n}\n\n.fa-fw {\n  text-align: center;\n  width: 1.25em;\n}\n\n.fa-ul {\n  list-style-type: none;\n  margin-left: 2.5em;\n  padding-left: 0;\n}\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  left: -2em;\n  position: absolute;\n  text-align: center;\n  width: 2em;\n  line-height: inherit;\n}\n\n.fa-border {\n  border: solid 0.08em #eee;\n  border-radius: 0.1em;\n  padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n  float: left;\n}\n\n.fa-pull-right {\n  float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n  margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n  margin-left: 0.3em;\n}\n\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n          animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n          animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n.fa-rotate-90 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n  -webkit-transform: rotate(90deg);\n          transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n  -webkit-transform: rotate(180deg);\n          transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n  -webkit-transform: rotate(270deg);\n          transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n  -webkit-transform: scale(-1, 1);\n          transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(1, -1);\n          transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(-1, -1);\n          transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n  -webkit-filter: none;\n          filter: none;\n}\n\n.fa-stack {\n  display: inline-block;\n  height: 2em;\n  position: relative;\n  width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n  height: 1em;\n  width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n  height: 2em;\n  width: 2.5em;\n}\n\n.fa-inverse {\n  color: #fff;\n}\n\n.sr-only {\n  border: 0;\n  clip: rect(0, 0, 0, 0);\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n  clip: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  position: static;\n  width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n  fill: var(--fa-primary-color, currentColor);\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n  fill: var(--fa-secondary-color, currentColor);\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n  fill: black;\n}\n\n.fad.fa-inverse {\n  color: #fff;\n}';if("fa"!==t||n!==e){var a=new RegExp("\\.".concat("fa","\\-"),"g"),o=new RegExp("\\--".concat("fa","\\-"),"g"),i=new RegExp("\\.".concat(e),"g");r=r.replace(a,".".concat(t,"-")).replace(o,"--".concat(t,"-")).replace(i,".".concat(n))}return r}function fe(){S.autoAddCss&&!xe&&(K(ge()),xe=!0)}function ve(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map((function(e){return le(e)}))}}),Object.defineProperty(e,"node",{get:function(){if(v){var t=g.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function ye(e){var t=e.prefix,n=void 0===t?"fa":t,r=e.iconName;if(r)return se(Ee.definitions,n,r)||se(w.styles,n,r)}var Ce,Ee=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,n,r;return t=e,(n=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach((function(t){e.definitions[t]=s({},e.definitions[t]||{},a[t]),re(t,a[t]),ie()}))}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map((function(t){var r=n[t],a=r.prefix,o=r.iconName,i=r.icon;e[a]||(e[a]={}),e[a][o]=i})),e}}])&&o(t.prototype,n),r&&o(t,r),e}()),xe=!1,Oe={transform:function(e){return pe(e)}},Se=(Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?W:n,a=t.symbol,o=void 0!==a&&a,i=t.mask,l=void 0===i?null:i,p=t.maskId,c=void 0===p?null:p,u=t.title,d=void 0===u?null:u,h=t.titleId,m=void 0===h?null:h,b=t.classes,g=void 0===b?[]:b,f=t.attributes,v=void 0===f?{}:f,y=t.styles,C=void 0===y?{}:y;if(e){var E=e.prefix,x=e.iconName,O=e.icon;return ve(s({type:"icon"},e),(function(){return fe(),S.autoA11y&&(d?v["aria-labelledby"]="".concat(S.replacementClass,"-title-").concat(m||Y()):(v["aria-hidden"]="true",v.focusable="false")),ee({icons:{main:be(O),mask:l?be(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:E,iconName:x,transform:s({},W,r),symbol:o,title:d,maskId:c,titleId:m,extra:{attributes:v,styles:C,classes:g}})}))}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e||{}).icon?e:ye(e||{}),r=t.mask;return r&&(r=(r||{}).icon?r:ye(r||{})),Ce(n,s({},t,{mask:r}))})}).call(this,n(12),n(23).setImmediate)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return hi}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function i(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;Object.create;var l=n(0),p=n.n(l),c=n(5),u=n(1),d=n(11),h=n(2),m=n.n(h);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function C(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function E(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1);var t}function x(e){return e.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var n,r=t.indexOf(":"),a=E(t.slice(0,r)),o=t.slice(r+1).trim();return a.startsWith("webkit")?e[(n=a,n.charAt(0).toUpperCase()+n.slice(1))]=o:e[a]=o,e}),{})}var O=!1;try{O=!0}catch(e){}function S(e){return d.b.icon?d.b.icon(e):null===e?null:"object"===b(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function _(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?g({},e,t):{}}function w(e){var t=e.forwardedRef,n=y(e,["forwardedRef"]),r=n.icon,a=n.mask,o=n.symbol,i=n.className,s=n.title,l=n.titleId,p=S(r),c=_("classes",[].concat(C(function(e){var t,n=e.spin,r=e.pulse,a=e.fixedWidth,o=e.inverse,i=e.border,s=e.listItem,l=e.flip,p=e.size,c=e.rotation,u=e.pull,d=(g(t={"fa-spin":n,"fa-pulse":r,"fa-fw":a,"fa-inverse":o,"fa-border":i,"fa-li":s,"fa-flip-horizontal":"horizontal"===l||"both"===l,"fa-flip-vertical":"vertical"===l||"both"===l},"fa-".concat(p),null!=p),g(t,"fa-rotate-".concat(c),null!=c&&0!==c),g(t,"fa-pull-".concat(u),null!=u),g(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(d).map((function(e){return d[e]?e:null})).filter((function(e){return e}))}(n)),C(i.split(" ")))),u=_("transform","string"==typeof n.transform?d.b.transform(n.transform):n.transform),h=_("mask",S(a)),m=Object(d.a)(p,v({},c,{},u,{},h,{symbol:o,title:s,titleId:l}));if(!m)return function(){var e;!O&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",p),null;var b=m.abstract,f={ref:t};return Object.keys(n).forEach((function(e){w.defaultProps.hasOwnProperty(e)||(f[e]=n[e])})),P(b[0],f)}w.displayName="FontAwesomeIcon",w.propTypes={border:m.a.bool,className:m.a.string,mask:m.a.oneOfType([m.a.object,m.a.array,m.a.string]),fixedWidth:m.a.bool,inverse:m.a.bool,flip:m.a.oneOf(["horizontal","vertical","both"]),icon:m.a.oneOfType([m.a.object,m.a.array,m.a.string]),listItem:m.a.bool,pull:m.a.oneOf(["right","left"]),pulse:m.a.bool,rotation:m.a.oneOf([0,90,180,270]),size:m.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:m.a.bool,symbol:m.a.oneOfType([m.a.bool,m.a.string]),title:m.a.string,transform:m.a.oneOfType([m.a.string,m.a.object]),swapOpacity:m.a.bool},w.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var P=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var a=(n.children||[]).map((function(n){return e(t,n)})),o=Object.keys(n.attributes||{}).reduce((function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=x(r);break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[E(t)]=r}return e}),{attrs:{}}),i=r.style,s=void 0===i?{}:i,l=y(r,["style"]);return o.attrs.style=v({},o.attrs.style,{},s),t.apply(void 0,[n.tag,v({},o.attrs,{},l)].concat(C(a)))}.bind(null,p.a.createElement),T=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onSelect=function(e){this.props.onSelectedIndexChange(e)},t.prototype.renderLabel=function(e,t){var n=this,r=this.props.selectedIndex===t?"label active":"label";return l.createElement("div",{className:r,key:t,onClick:function(){return n.onSelect(t)},title:e.props.title},l.createElement("div",null,l.createElement(w,{icon:e.props.icon})))},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"tabs",onContextMenu:function(e){return e.preventDefault()}},l.createElement("div",{className:"labels"},this.props.children.map((function(t,n){return e.renderLabel(t,n)}))),l.createElement("div",{className:"panes"},this.props.children[this.props.selectedIndex]))},t}(l.Component),k={prefix:"fas",iconName:"address-book",icon:[448,512,[],"f2b9","M436 160c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20zm-228-32c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H118.4C106 384 96 375.4 96 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z"]},N={prefix:"fas",iconName:"arrow-left",icon:[448,512,[],"f060","M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"]},M={prefix:"fas",iconName:"arrows-alt",icon:[512,512,[],"f0b2","M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"]},A={prefix:"fas",iconName:"ban",icon:[512,512,[],"f05e","M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"]},L={prefix:"fas",iconName:"bone",icon:[640,512,[],"f5d7","M598.88 244.56c25.2-12.6 41.12-38.36 41.12-66.53v-7.64C640 129.3 606.7 96 565.61 96c-32.02 0-60.44 20.49-70.57 50.86-7.68 23.03-11.6 45.14-38.11 45.14H183.06c-27.38 0-31.58-25.54-38.11-45.14C134.83 116.49 106.4 96 74.39 96 33.3 96 0 129.3 0 170.39v7.64c0 28.17 15.92 53.93 41.12 66.53 9.43 4.71 9.43 18.17 0 22.88C15.92 280.04 0 305.8 0 333.97v7.64C0 382.7 33.3 416 74.38 416c32.02 0 60.44-20.49 70.57-50.86 7.68-23.03 11.6-45.14 38.11-45.14h273.87c27.38 0 31.58 25.54 38.11 45.14C505.17 395.51 533.6 416 565.61 416c41.08 0 74.38-33.3 74.38-74.39v-7.64c0-28.18-15.92-53.93-41.12-66.53-9.42-4.71-9.42-18.17.01-22.88z"]},R={prefix:"fas",iconName:"braille",icon:[640,512,[],"f2a1","M128 256c0 35.346-28.654 64-64 64S0 291.346 0 256s28.654-64 64-64 64 28.654 64 64zM64 384c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352C28.654 32 0 60.654 0 96s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm224 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zm160 192c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0 160c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32zm0-320c-17.673 0-32 14.327-32 32s14.327 32 32 32 32-14.327 32-32-14.327-32-32-32z"]},I={prefix:"fas",iconName:"brush",icon:[384,512,[],"f55d","M352 0H32C14.33 0 0 14.33 0 32v224h384V32c0-17.67-14.33-32-32-32zM0 320c0 35.35 28.66 64 64 64h64v64c0 35.35 28.66 64 64 64s64-28.65 64-64v-64h64c35.34 0 64-28.65 64-64v-32H0v32zm192 104c13.25 0 24 10.74 24 24 0 13.25-10.75 24-24 24s-24-10.75-24-24c0-13.26 10.75-24 24-24z"]},D={prefix:"fas",iconName:"bug",icon:[512,512,[],"f188","M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"]},j={prefix:"fas",iconName:"camera",icon:[512,512,[],"f030","M512 144v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h88l12.3-32.9c7-18.7 24.9-31.1 44.9-31.1h125.5c20 0 37.9 12.4 44.9 31.1L376 96h88c26.5 0 48 21.5 48 48zM376 288c0-66.2-53.8-120-120-120s-120 53.8-120 120 53.8 120 120 120 120-53.8 120-120zm-32 0c0 48.5-39.5 88-88 88s-88-39.5-88-88 39.5-88 88-88 88 39.5 88 88z"]},z={prefix:"fas",iconName:"chart-bar",icon:[512,512,[],"f080","M332.8 320h38.4c6.4 0 12.8-6.4 12.8-12.8V172.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V76.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-288 0h38.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h38.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-38.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zM496 384H64V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"]},F={prefix:"fas",iconName:"check",icon:[512,512,[],"f00c","M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"]},V={prefix:"fas",iconName:"code-branch",icon:[384,512,[],"f126","M384 144c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 36.4 24.3 67.1 57.5 76.8-.6 16.1-4.2 28.5-11 36.9-15.4 19.2-49.3 22.4-85.2 25.7-28.2 2.6-57.4 5.4-81.3 16.9v-144c32.5-10.2 56-40.5 56-76.3 0-44.2-35.8-80-80-80S0 35.8 0 80c0 35.8 23.5 66.1 56 76.3v199.3C23.5 365.9 0 396.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-34-21.2-63.1-51.2-74.6 3.1-5.2 7.8-9.8 14.9-13.4 16.2-8.2 40.4-10.4 66.1-12.8 42.2-3.9 90-8.4 118.2-43.4 14-17.4 21.1-39.8 21.6-67.9 31.6-10.8 54.4-40.7 54.4-75.9zM80 64c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm0 384c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm224-320c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16z"]},U={prefix:"fas",iconName:"cog",icon:[512,512,[],"f013","M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"]},G={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm0 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"]},B={prefix:"fas",iconName:"crosshairs",icon:[512,512,[],"f05b","M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"]},H={prefix:"fas",iconName:"cube",icon:[512,512,[],"f1b2","M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z"]},W={prefix:"fas",iconName:"ellipsis-h",icon:[512,512,[],"f141","M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"]},K={prefix:"fas",iconName:"expand-arrows-alt",icon:[448,512,[],"f31e","M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"]},Y={prefix:"fas",iconName:"eye",icon:[576,512,[],"f06e","M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"]},X={prefix:"fas",iconName:"eye-slash",icon:[640,512,[],"f070","M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"]},Z={prefix:"fas",iconName:"file-alt",icon:[384,512,[],"f15c","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm64 236c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-64c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12v8zm0-72v8c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-8c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm96-114.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},q={prefix:"fas",iconName:"film",icon:[512,512,[],"f008","M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm272 208c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm0-168c0 6.6-5.4 12-12 12H156c-6.6 0-12-5.4-12-12v-96c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v96zm112 152c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z"]},Q={prefix:"fas",iconName:"ghost",icon:[384,512,[],"f6e2","M186.1.09C81.01 3.24 0 94.92 0 200.05v263.92c0 14.26 17.23 21.39 27.31 11.31l24.92-18.53c6.66-4.95 16-3.99 21.51 2.21l42.95 48.35c6.25 6.25 16.38 6.25 22.63 0l40.72-45.85c6.37-7.17 17.56-7.17 23.92 0l40.72 45.85c6.25 6.25 16.38 6.25 22.63 0l42.95-48.35c5.51-6.2 14.85-7.17 21.51-2.21l24.92 18.53c10.08 10.08 27.31 2.94 27.31-11.31V192C384 84 294.83-3.17 186.1.09zM128 224c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm128 0c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"]},J={prefix:"fas",iconName:"highlighter",icon:[544,512,[],"f591","M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z"]},$={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"]},ee={prefix:"fas",iconName:"layer-group",icon:[512,512,[],"f5fd","M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"]},te={prefix:"fas",iconName:"lightbulb",icon:[352,512,[],"f0eb","M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z"]},ne={prefix:"fas",iconName:"magic",icon:[512,512,[],"f0d0","M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.66-53.33L160 80l-53.34-26.67L80 0 53.34 53.33 0 80l53.34 26.67L80 160zm352 128l-26.66 53.33L352 368l53.34 26.67L432 448l26.66-53.33L512 368l-53.34-26.67L432 288zm70.62-193.77L417.77 9.38C411.53 3.12 403.34 0 395.15 0c-8.19 0-16.38 3.12-22.63 9.38L9.38 372.52c-12.5 12.5-12.5 32.76 0 45.25l84.85 84.85c6.25 6.25 14.44 9.37 22.62 9.37 8.19 0 16.38-3.12 22.63-9.37l363.14-363.15c12.5-12.48 12.5-32.75 0-45.24zM359.45 203.46l-50.91-50.91 86.6-86.6 50.91 50.91-86.6 86.6z"]},re={prefix:"fas",iconName:"minus",icon:[448,512,[],"f068","M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},ae={prefix:"fas",iconName:"music",icon:[512,512,[],"f001","M470.38 1.51L150.41 96A32 32 0 0 0 128 126.51v261.41A139 139 0 0 0 96 384c-53 0-96 28.66-96 64s43 64 96 64 96-28.66 96-64V214.32l256-75v184.61a138.4 138.4 0 0 0-32-3.93c-53 0-96 28.66-96 64s43 64 96 64 96-28.65 96-64V32a32 32 0 0 0-41.62-30.49z"]},oe={prefix:"fas",iconName:"object-group",icon:[512,512,[],"f247","M480 128V96h20c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v20H64V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v40c0 6.627 5.373 12 12 12h20v320H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-20h384v20c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-20V128zM96 276V140c0-6.627 5.373-12 12-12h168c6.627 0 12 5.373 12 12v136c0 6.627-5.373 12-12 12H108c-6.627 0-12-5.373-12-12zm320 96c0 6.627-5.373 12-12 12H236c-6.627 0-12-5.373-12-12v-52h72c13.255 0 24-10.745 24-24v-72h84c6.627 0 12 5.373 12 12v136z"]},ie={prefix:"fas",iconName:"pen",icon:[512,512,[],"f304","M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"]},se={prefix:"fas",iconName:"plus",icon:[448,512,[],"f067","M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},le={prefix:"fas",iconName:"project-diagram",icon:[640,512,[],"f542","M384 320H256c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h128c17.67 0 32-14.33 32-32V352c0-17.67-14.33-32-32-32zM192 32c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v128c0 17.67 14.33 32 32 32h95.72l73.16 128.04C211.98 300.98 232.4 288 256 288h.28L192 175.51V128h224V64H192V32zM608 0H480c-17.67 0-32 14.33-32 32v128c0 17.67 14.33 32 32 32h128c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32z"]},pe={prefix:"fas",iconName:"redo-alt",icon:[512,512,[],"f2f9","M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"]},ce={prefix:"fas",iconName:"skull",icon:[512,512,[],"f54c","M256 0C114.6 0 0 100.3 0 224c0 70.1 36.9 132.6 94.5 173.7 9.6 6.9 15.2 18.1 13.5 29.9l-9.4 66.2c-1.4 9.6 6 18.2 15.7 18.2H192v-56c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v56h64v-56c0-4.4 3.6-8 8-8h16c4.4 0 8 3.6 8 8v56h77.7c9.7 0 17.1-8.6 15.7-18.2l-9.4-66.2c-1.7-11.7 3.8-23 13.5-29.9C475.1 356.6 512 294.1 512 224 512 100.3 397.4 0 256 0zm-96 320c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64zm192 0c-35.3 0-64-28.7-64-64s28.7-64 64-64 64 28.7 64 64-28.7 64-64 64z"]},ue={prefix:"fas",iconName:"sun",icon:[512,512,[],"f185","M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"]},de={prefix:"fas",iconName:"sync-alt",icon:[512,512,[],"f2f1","M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"]},he={prefix:"fas",iconName:"times",icon:[352,512,[],"f00d","M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"]},me={prefix:"fas",iconName:"times-circle",icon:[512,512,[],"f057","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"]},be={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"]},ge={prefix:"fas",iconName:"vector-square",icon:[512,512,[],"f5cb","M512 128V32c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32H160c0-17.67-14.33-32-32-32H32C14.33 0 0 14.33 0 32v96c0 17.67 14.33 32 32 32v192c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32h192c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32V160c17.67 0 32-14.33 32-32zm-96-64h32v32h-32V64zM64 64h32v32H64V64zm32 384H64v-32h32v32zm352 0h-32v-32h32v32zm-32-96h-32c-17.67 0-32 14.33-32 32v32H160v-32c0-17.67-14.33-32-32-32H96V160h32c17.67 0 32-14.33 32-32V96h192v32c0 17.67 14.33 32 32 32h32v192z"]},fe={prefix:"fas",iconName:"video",icon:[576,512,[],"f03d","M336.2 64H47.8C21.4 64 0 85.4 0 111.8v288.4C0 426.6 21.4 448 47.8 448h288.4c26.4 0 47.8-21.4 47.8-47.8V111.8c0-26.4-21.4-47.8-47.8-47.8zm189.4 37.7L416 177.3v157.4l109.6 75.5c21.2 14.6 50.4-.3 50.4-25.8V127.5c0-25.4-29.1-40.4-50.4-25.8z"]},ve={prefix:"fas",iconName:"window-restore",icon:[512,512,[],"f2d2","M512 48v288c0 26.5-21.5 48-48 48h-48V176c0-44.1-35.9-80-80-80H128V48c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zM384 176v288c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zm-68 28c0-6.6-5.4-12-12-12H76c-6.6 0-12 5.4-12 12v52h252v-52z"]},ye={prefix:"fas",iconName:"wrench",icon:[512,512,[],"f0ad","M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]},Ce=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){return l.createElement("div",{className:"pane"})},t}(l.Component),Ee=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onLink=function(){this.props.url?window.open(this.props.url,"_blank"):this.props.onLink&&this.props.onLink()},t.prototype.renderContent=function(){var e=this;return this.props.ignoreValue?null:this.props.onLink||this.props.url?l.createElement("div",{className:"link-value",title:this.props.value,onClick:function(){return e.onLink()}},this.props.url?"doc":this.props.value||"no name"):l.createElement("div",{className:"value",title:this.props.value,style:{color:this.props.color?this.props.color:""}},this.props.value||"no name")},t.prototype.render=function(){var e,t,n;return l.createElement("div",{className:this.props.underline?"textLine underline":"textLine"+(this.props.additionalClass?" "+this.props.additionalClass:"")},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:null!==(t=null!==(e=this.props.tooltip)&&void 0!==e?e:this.props.label)&&void 0!==t?t:""},null!==(n=this.props.label)&&void 0!==n?n:""),this.renderContent())},t}(l.Component),xe=n(28),Oe=function(e){function t(t){var n=e.call(this,t)||this,r=u.DataStorage.ReadBoolean(n.props.title,!n.props.closed);return n.state={isExpanded:r,isHighlighted:!1},n}return a(t,e),t.prototype.switchExpandedState=function(){var e=!this.state.isExpanded;u.DataStorage.WriteBoolean(this.props.title,e),this.setState({isExpanded:e})},t.prototype.renderHeader=function(){var e=this,t=this.state.isExpanded?"collapse":"collapse closed";return l.createElement("div",{className:"header",onClick:function(){return e.switchExpandedState()}},l.createElement("div",{className:"title"},this.props.title),l.createElement("div",{className:t},l.createElement("img",{className:"img",title:this.props.title,src:xe})))},t.prototype.componentDidMount=function(){var e=this;this.props.selection&&(0===this.props.selection.selectedLineContainerTitles.length&&0===this.props.selection.selectedLineContainerTitlesNoFocus.length||(this.props.selection.selectedLineContainerTitles.indexOf(this.props.title)>-1?(setTimeout((function(){e.props.selection.selectedLineContainerTitles=[]})),this.setState({isExpanded:!0,isHighlighted:!0}),window.setTimeout((function(){e.setState({isHighlighted:!1})}),5e3)):this.props.selection.selectedLineContainerTitlesNoFocus.indexOf(this.props.title)>-1?this.setState({isExpanded:!0,isHighlighted:!1}):this.setState({isExpanded:!1})))},t.prototype.render=function(){return this.state.isExpanded?l.createElement("div",{className:"paneContainer"},l.createElement("div",{className:"paneContainer-content"},this.renderHeader(),l.createElement("div",{className:"paneList"},this.props.children)),l.createElement("div",{className:"paneContainer-highlight-border"+(this.state.isHighlighted?"":" transparent")})):l.createElement("div",{className:"paneContainer"},l.createElement("div",{className:"paneContainer-content"},this.renderHeader()))},t}(l.Component),Se=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=void 0!==this.props.fractionDigits?this.props.fractionDigits:2,t=this.props.value.toFixed(e)+(this.props.units?" "+this.props.units:"");return l.createElement("div",{className:"textLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"value",style:{color:this.props.color?this.props.color:""}},t))},t}(l.Component),_e=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.value?l.createElement(w,{icon:F}):l.createElement(w,{icon:me}),t=this.props.value?"value check":"value uncheck";return l.createElement("div",{className:"textLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:t},e))},t}(l.Component),we=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"buttonLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("button",{onClick:function(){return e.props.onClick()}},this.props.label))},t}(l.Component),Pe=function(e){function t(n){var r=e.call(this,n)||this;return r._id=t._IDGenerator++,r.uploadInputRef=l.createRef(),r}return a(t,e),t.prototype.onChange=function(e){var t=e.target.files;t&&t.length&&this.props.onClick(t[0]),e.target.value=""},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"buttonLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("label",{htmlFor:"file-upload"+this._id,className:"file-upload"},this.props.label),l.createElement("input",{ref:this.uploadInputRef,id:"file-upload"+this._id,type:"file",accept:this.props.accept,onChange:function(t){return e.onChange(t)}}))},t._IDGenerator=0,t}(l.Component),Te=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.updateValue=function(e){if(!/[^0-9\.\-]/g.test(e)){var t=parseInt(e);isNaN(t)||(null!=this.props.max&&t>this.props.max&&(t=this.props.max),null!=this.props.min&&t<this.props.min&&(t=this.props.min),this.props.onChange(t))}},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"color-picker-component"},l.createElement("div",{className:"color-picker-component-value"},l.createElement("input",{type:"number",step:1,className:"numeric-input",value:this.props.value,onChange:function(t){return e.updateValue(t.target.value)}})),l.createElement("div",{className:"color-picker-component-label"},this.props.label))},t}(l.Component),ke=function(e){function t(t){var n=e.call(this,t)||this;return n.state={hex:n.props.value.replace("#","")},n}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){return e.value!==this.props.value&&(t.hex=e.value.replace("#","")),!0},t.prototype.updateHexValue=function(e){""!=e&&0==/^[0-9A-Fa-f]+$/g.test(e)||(this.setState({hex:e}),e.length===this.props.expectedLength&&this.props.onChange("#"+e))},t.prototype.render=function(){var e=this;return l.createElement("input",{type:"string",className:"hex-input",value:this.state.hex,onChange:function(t){return e.updateHexValue(t.target.value)}})},t}(l.Component);n(29);var Ne,Me=function(e){function t(t){var n=e.call(this,t)||this;return n.props.color instanceof u.Color4?n.state={color:new u.Color3(n.props.color.r,n.props.color.g,n.props.color.b),alpha:n.props.color.a}:n.state={color:n.props.color.clone(),alpha:1},n._saturationRef=l.createRef(),n._hueRef=l.createRef(),n}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){return e.color.toHexString()!==this.props.color.toHexString()||t.color.toHexString()!==this.props.color.toHexString()},t.prototype.onSaturationPointerDown=function(e){this._evaluateSaturation(e),this._isSaturationPointerDown=!0,e.currentTarget.setPointerCapture(e.pointerId)},t.prototype.onSaturationPointerUp=function(e){this._isSaturationPointerDown=!1,e.currentTarget.releasePointerCapture(e.pointerId)},t.prototype.onSaturationPointerMove=function(e){this._isSaturationPointerDown&&this._evaluateSaturation(e)},t.prototype.onHuePointerDown=function(e){this._evaluateHue(e),this._isHuePointerDown=!0,e.currentTarget.setPointerCapture(e.pointerId)},t.prototype.onHuePointerUp=function(e){this._isHuePointerDown=!1,e.currentTarget.releasePointerCapture(e.pointerId)},t.prototype.onHuePointerMove=function(e){this._isHuePointerDown&&this._evaluateHue(e)},t.prototype._evaluateSaturation=function(e){var t=e.nativeEvent.offsetX,n=e.nativeEvent.offsetY,r=Math.min(1,Math.max(1e-4,t/this._saturationRef.current.clientWidth)),a=Math.min(1,Math.max(1e-4,1-n/this._saturationRef.current.clientHeight));this.props.debugMode&&(console.log("Saturation: "+r),console.log("Value: "+a));var o=this.state.color.toHSV();u.Color3.HSVtoRGBToRef(o.r,r,a,this.state.color),this.setState({color:this.state.color})},t.prototype._evaluateHue=function(e){var t=e.nativeEvent.offsetX,n=360*Math.min(.9999,Math.max(1e-4,t/this._hueRef.current.clientWidth));this.props.debugMode&&console.log("Hue: "+n);var r=this.state.color.toHSV();u.Color3.HSVtoRGBToRef(n,Math.max(r.g,.01),Math.max(r.b,.01),this.state.color),this.setState({color:this.state.color})},t.prototype.componentDidUpdate=function(){this.raiseOnColorChanged()},t.prototype.raiseOnColorChanged=function(){if(this.props.onColorChanged)if(this.props.color instanceof u.Color4){var e=u.Color4.FromColor3(this.state.color,this.state.alpha);this.props.onColorChanged(e)}else this.props.onColorChanged(this.state.color.clone())},t.prototype.render=function(){var e=this,t=this.state.color.toHexString(),n=this.state.color.toHSV(),r=new u.Color3;u.Color3.HSVtoRGBToRef(n.r,1,1,r);var a=r.toHexString(),o=this.props.color instanceof u.Color4;return l.createElement("div",{className:"color-picker-container"+(this.props.linearhint?" with-hints":"")},l.createElement("div",{className:"color-picker-saturation",onPointerMove:function(t){return e.onSaturationPointerMove(t)},onPointerDown:function(t){return e.onSaturationPointerDown(t)},onPointerUp:function(t){return e.onSaturationPointerUp(t)},ref:this._saturationRef,style:{background:a}},l.createElement("div",{className:"color-picker-saturation-white"}),l.createElement("div",{className:"color-picker-saturation-black"}),l.createElement("div",{className:"color-picker-saturation-cursor",style:{top:-100*n.b+100+"%",left:100*n.g+"%"}})),l.createElement("div",{className:"color-picker-hue"},l.createElement("div",{className:"color-picker-hue-color",style:{background:t}}),l.createElement("div",{className:"color-picker-hue-slider",ref:this._hueRef,onPointerMove:function(t){return e.onHuePointerMove(t)},onPointerDown:function(t){return e.onHuePointerDown(t)},onPointerUp:function(t){return e.onHuePointerUp(t)}},l.createElement("div",{className:"color-picker-hue-cursor",style:{left:n.r/360*100+"%",border:"1px solid "+a}}))),l.createElement("div",{className:"color-picker-rgb"},l.createElement("div",{className:"red"},l.createElement(Te,{label:"R",min:0,max:255,value:Math.round(255*this.state.color.r),onChange:function(t){e.state.color.r=t/255,e.forceUpdate()}})),l.createElement("div",{className:"green"},l.createElement(Te,{label:"G",min:0,max:255,value:Math.round(255*this.state.color.g),onChange:function(t){e.state.color.g=t/255,e.forceUpdate()}})),l.createElement("div",{className:"blue"},l.createElement(Te,{label:"B",min:0,max:255,value:Math.round(255*this.state.color.b),onChange:function(t){e.state.color.b=t/255,e.forceUpdate()}})),l.createElement("div",{className:"alpha"+(o?"":" grayed")},l.createElement(Te,{label:"A",min:0,max:255,value:Math.round(255*this.state.alpha),onChange:function(t){e.setState({alpha:t/255}),e.forceUpdate()}}))),l.createElement("div",{className:"color-picker-hex"},l.createElement("div",{className:"color-picker-hex-label"},"Hex"),l.createElement("div",{className:"color-picker-hex-value"},l.createElement(ke,{expectedLength:6,value:t,onChange:function(t){e.setState({color:u.Color3.FromHexString(t)})}}))),this.props.linearhint&&l.createElement("div",{className:"color-picker-warning"},"(Note: color is stored in linear mode and was converted to gamma to be displayed here (toGammaSpace() / toLinearSpace()))"))},t}(l.Component),Ae=function(e){function t(t){var n=e.call(this,t)||this;return n.state={pickerEnabled:!1,color:n.props.value,hex:n.props.value.toHexString()},n._floatRef=l.createRef(),n._floatHostRef=l.createRef(),n}return a(t,e),t.prototype.syncPositions=function(){var e=this._floatRef.current,t=this._floatHostRef.current;if(e&&t){var n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().height;n+r+10>window.innerHeight&&(n=window.innerHeight-r-10),e.style.top=n+"px",this.props.shouldPopRight?e.style.left=t.getBoundingClientRect().left+"px":e.style.left=t.getBoundingClientRect().left-e.getBoundingClientRect().width+"px"}},t.prototype.shouldComponentUpdate=function(e,t){var n=e.value.toHexString()!==this.props.value.toHexString();return n&&(t.color=e.value,t.hex=e.value.toHexString()),n||t.hex!==this.state.hex||t.pickerEnabled!==this.state.pickerEnabled},t.prototype.componentDidUpdate=function(){this.syncPositions()},t.prototype.componentDidMount=function(){this.syncPositions()},t.prototype.render=function(){var e=this,t=this.state.color;return l.createElement("div",{className:"color-picker"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"color-rect",ref:this._floatHostRef,style:{background:this.state.hex},onClick:function(){return e.setState({pickerEnabled:!0})}}),this.state.pickerEnabled&&l.createElement(l.Fragment,null,l.createElement("div",{className:"color-picker-cover",onClick:function(t){var n,r;t.target===(null===(r=null===(n=e._floatRef.current)||void 0===n?void 0:n.ownerDocument)||void 0===r?void 0:r.querySelector(".color-picker-cover"))&&e.setState({pickerEnabled:!1})}},l.createElement("div",{className:"color-picker-float",ref:this._floatRef},l.createElement(Me,{color:t,linearhint:this.props.linearHint,onColorChanged:function(t){var n=t.toHexString();e.setState({hex:n,color:t}),e.props.onColorChanged(n)}})))))},t}(l.Component),Le=function(e){function t(n){var r=e.call(this,n)||this;return r._localChange=!1,r._uniqueId=t._UniqueIdSeed++,r.props.isSelected?r.state={isSelected:r.props.isSelected()}:r.state={isSelected:1==r.props.target[r.props.propertyName]},r.props.disabled&&(r.state=o(o({},r.state),{isDisabled:r.props.disabled})),r}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n;return(n=e.isSelected?e.isSelected():1==e.target[e.propertyName])!==t.isSelected||this._localChange?(t.isSelected=n,this._localChange=!1,!0):e.disabled!==t.isDisabled||(e.label!==this.props.label||e.target!==this.props.target)},t.prototype.onChange=function(){this._localChange=!0,this.props.onSelect?this.props.onSelect(!this.state.isSelected):(this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:!this.state.isSelected,initialValue:this.state.isSelected}),this.props.target[this.props.propertyName]=!this.state.isSelected),this.props.onValueChanged&&this.props.onValueChanged(),this.setState({isSelected:!this.state.isSelected})},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"checkBoxLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),this.props.label&&l.createElement("div",{className:"label",title:this.props.iconLabel},this.props.label),this.props.faIcons&&l.createElement(w,{className:"cbx "+(this.props.disabled?"disabled":""),icon:this.state.isSelected?this.props.faIcons.enabled:this.props.faIcons.disabled,onClick:function(){return!e.props.disabled&&e.onChange()}}),!this.props.faIcons&&l.createElement("div",{className:"checkBox"},l.createElement("input",{type:"checkbox",id:"checkbox"+this._uniqueId,className:"cbx hidden",checked:this.state.isSelected,onChange:function(){return e.onChange()},disabled:!!this.props.disabled}),l.createElement("label",{htmlFor:"checkbox"+this._uniqueId,className:"lbl"+(this.props.disabled?" disabled":"")})))},t._UniqueIdSeed=0,t}(l.Component);!function(e){e[e.Milliseconds=0]="Milliseconds",e[e.Seconds=1]="Seconds",e[e.Minutes=2]="Minutes",e[e.Hours=3]="Hours"}(Ne||(Ne={}));var Re="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";!function(){function e(e,t){var n,r,a,o=this;this._sizeOfWindow=300,this.update=(n=function(){return o._draw()},r=15,a=0,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=Date.now();o-a<r||(a=o,n.apply(void 0,e))}),this._handleDataHover=function(e){o._panPosition||(o._hoverPosition={xPos:e.clientX,yPos:e.clientY},o._debouncedTooltip(o._hoverPosition,o._drawableArea))},this._debouncedTooltip=function(e,t){var n;return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,r)}),t)}}((function(e,t){o._preprocessTooltip(e,t),o._drawTooltip(e,t)}),32),this._handleStopHover=function(){o._hoverPosition=null},this._handleZoom=function(e){if(e.preventDefault(),e.deltaY){var t=100*(-.01*e.deltaY|0),n=o._getNumberOfSlices();o._shouldBecomeRealtime()&&(o._position=null),o._sizeOfWindow=u.Scalar.Clamp(o._sizeOfWindow-t,60,n)}},this._handlePanStart=function(e){var t=o._ctx;if(t&&t.canvas){var n=t.canvas;o._panPosition={xPos:e.clientX,delta:0},o._hoverPosition=null,n.addEventListener("mousemove",o._handlePan)}},this._handlePan=function(e){var t;if(o._panPosition&&0!==o._getNumberOfSlices()){var n=o._panPosition.delta+e.clientX-o._panPosition.xPos,r=n/((o._drawableArea.right-o._drawableArea.left)/o._sizeOfWindow)|0,a=null!==(t=o._position)&&void 0!==t?t:o._getNumberOfSlices()-1;o._position=u.Scalar.Clamp(a-r,Math.floor(.8*o._sizeOfWindow),o._getNumberOfSlices()-Math.floor(o._sizeOfWindow*(1-.8))),0===r?o._panPosition.delta+=n:o._panPosition.delta=0,o._panPosition.xPos=e.clientX}},this._handlePanStop=function(){var e=o._ctx;e&&e.canvas&&(o._shouldBecomeRealtime()&&(o._position=null),e.canvas.removeEventListener("mousemove",o._handlePan),o._panPosition=null)},this._ctx=e.getContext&&e.getContext("2d"),this._width=e.width,this._height=e.height,this._ticks=[],this._panPosition=null,this._hoverPosition=null,this._position=null,this._datasetBounds={start:0,end:0},this._globalTimeMinMax={min:1/0,max:0},this._drawableArea={top:0,left:0,right:0,bottom:0},this._tooltipTextCache={text:"",width:0},this._tickerTextCache={text:"",width:0},this._tooltipItems=[],this._tickerItems=[],this._preprocessedTooltipInfo={focusedId:"",longestText:"",numberOfTooltipItems:0,xForActualTimestamp:0},this._numberOfTickers=0,this._onVisibleRangeChangedObservable=t.onVisibleRangeChangedObservable;for(var i=0;i<64;i++)this._tooltipItems.push({text:"",color:""}),this._tickerItems.push({text:"",id:"",max:0,min:0});if(!this._ctx)throw Error("No canvas context accessible");var s=this._ctx.measureText(Re);this._defaultLineHeight=s.actualBoundingBoxAscent+s.actualBoundingBoxDescent,this._axisHeight=20+this._defaultLineHeight+10,this._ctx.save(),this._ctx.font="12px Arial";var l=this._ctx.measureText(Re);this._addonFontLineHeight=l.actualBoundingBoxAscent+l.actualBoundingBoxDescent,this._ctx.restore(),this.datasets=t.datasets,this.metadata=new Map,this._attachEventListeners(e)}e.prototype.resize=function(e){var t=this._ctx,n=e.width,r=e.height;t&&t.canvas&&(this._width=n,this._height=r,t.canvas.width=n,t.canvas.height=r,this.update())},e.prototype.resetDataPosition=function(){this._position=null},e.prototype._draw=function(){var e,t=this,n=this._ctx;if(n){var r=this._getNumberOfSlices();if(0!==r){this.clear(),this._globalTimeMinMax.min=1/0,this._globalTimeMinMax.max=0;var a=null!==(e=this._position)&&void 0!==e?e:r-1,o=a-Math.ceil(.8*this._sizeOfWindow),i=0;o<0&&(i=0-o,o=0);var s=Math.ceil(a+this._sizeOfWindow*(1-.8)+i);if(s>r){var l=s-r;s=r,o=Math.max(o-l,0)}this._datasetBounds.start=o,this._datasetBounds.end=s,this._globalTimeMinMax.min=this.datasets.data.at(this.datasets.startingIndices.at(this._datasetBounds.start)),this._globalTimeMinMax.max=this.datasets.data.at(this.datasets.startingIndices.at(this._datasetBounds.end-1));var p=Math.ceil((this._globalTimeMinMax.max-this._globalTimeMinMax.min)/.8+this._globalTimeMinMax.min);this._datasetBounds.end=this._getClosestPointToTimestamp(p)+1,this._globalTimeMinMax.max=Math.max(this.datasets.data.at(this.datasets.startingIndices.at(this._datasetBounds.end-1)),this._globalTimeMinMax.max);var c=u.Scalar.Clamp((this._globalTimeMinMax.max-this._globalTimeMinMax.min)/(p-this._globalTimeMinMax.min),.8,1);this._globalTimeMinMax.max=p,this._drawableArea.top=0,this._drawableArea.left=0,this._drawableArea.bottom=this._height,this._drawableArea.right=this._width,this._drawTickers(this._drawableArea,this._datasetBounds),this._drawTimeAxis(this._globalTimeMinMax,this._drawableArea),this._drawPlayheadRegion(this._drawableArea,c),this._drawableArea.top+=2,this._drawableArea.bottom-=2,this._preprocessTooltip(this._hoverPosition,this._drawableArea);var d=this._drawableArea,h=d.left,m=d.right,b=d.bottom,g=d.top;this.datasets.ids.forEach((function(e,r){for(var a,o,i,s=0;s<t._numberOfTickers;s++)t._tickerItems[s].id===e&&(i=t._tickerItems[s]);if(i){var l;n.beginPath(),n.strokeStyle=null!==(o=null===(a=t.metadata.get(e))||void 0===a?void 0:a.color)&&void 0!==o?o:"#000",t._preprocessedTooltipInfo.focusedId===e?n.globalAlpha=1:""!==t._preprocessedTooltipInfo.focusedId&&(n.globalAlpha=.2);for(var p=t._datasetBounds.start;p<t._datasetBounds.end;p++){if(!(r>=t.datasets.data.at(t.datasets.startingIndices.at(p)+u.PerformanceViewerCollector.NumberOfPointsOffset))){var c=t.datasets.startingIndices.at(p)+u.PerformanceViewerCollector.SliceDataOffset+r,d=t.datasets.data.at(t.datasets.startingIndices.at(p)),f=t.datasets.data.at(c),v=t._getPixelForNumber(d,t._globalTimeMinMax,h,m-h,!1),y=t._getPixelForNumber(f,i,g,b-g,!0);void 0===l&&(l=[v,y]);var C=v-l[0];C>.1*(m-h)?(n.fillStyle="#aaaaaa",n.fillRect(l[0],g,C,b-g)):(n.moveTo(l[0],l[1]),n.lineTo(v,y)),l[0]=v,l[1]=y}}n.stroke()}})),n.globalAlpha=1,this._drawTooltip(this._hoverPosition,this._drawableArea)}}},e.prototype._drawTickers=function(e,t){var n,r=this,a=this._ctx;if(a){var o="";this._numberOfTickers=0;var i,s=new Map;this.datasets.ids.forEach((function(e,n){var a;if(!(null===(a=r.metadata.get(e))||void 0===a?void 0:a.hidden)){var i=r._getMinMax(t,n),l=r.datasets.data.at(r.datasets.startingIndices.at(t.end-1)+u.PerformanceViewerCollector.SliceDataOffset+n),p=e+": "+l.toFixed(2)+" (max: "+i.max.toFixed(2)+", min: "+i.min.toFixed(2)+")";s.set(e,{min:i.min,max:i.max,current:l}),p.length>o.length&&(o=p),r._tickerItems[r._numberOfTickers].id=e,r._tickerItems[r._numberOfTickers].max=i.max,r._tickerItems[r._numberOfTickers].min=i.min,r._tickerItems[r._numberOfTickers].text=p,r._numberOfTickers++}})),null===(n=this._onVisibleRangeChangedObservable)||void 0===n||n.notifyObservers({valueMap:s}),a.save(),a.font="12px Arial",a.textBaseline="middle",a.textAlign="left",this._tickerTextCache.text.length===o.length?i=this._tickerTextCache.width:(i=a.measureText(o).width+20,this._tickerTextCache.text=o,this._tickerTextCache.width=i),a.restore()}},e.prototype._getClosestPointToTimestamp=function(e){for(var t=0,n=this._getNumberOfSlices()-1,r=0;t<=n;){var a=Math.trunc((t+n)/2),o=this.datasets.data.at(this.datasets.startingIndices.at(a));if(Math.abs(o-e)<Math.abs(this.datasets.data.at(this.datasets.startingIndices.at(r))-e)&&(r=a),o<e)t=a+1;else{if(!(o>e))break;n=a-1}}return r},e.prototype._getNumberOfSlices=function(){return this.datasets.startingIndices.itemLength},e.prototype._drawTimeAxis=function(e,t){var n=this,r=this._ctx;if(r){var a=t.right-t.left;this._generateTicks(e,a),t.bottom-=this._axisHeight,r.save(),r.fillStyle="#c0c4c8",r.fillRect(t.left,t.bottom,a,this._axisHeight),r.beginPath(),r.strokeStyle="#000",r.moveTo(t.left,t.bottom),r.lineTo(t.right,t.bottom),r.fillStyle="#000",r.textAlign="center",r.textBaseline="middle";var o=this._getTimestampUnit(this._ticks[this._ticks.length-1]);this._ticks.forEach((function(i){var s=n._getPixelForNumber(i,e,t.left,a,!1);s>a&&(s=a),r.moveTo(s,t.bottom),r.lineTo(s,t.bottom+10),r.fillText(n._parseTimestamp(i,o),s,t.bottom+20)})),r.stroke(),r.restore()}},e.prototype._getTimestampUnit=function(e){return e/36e5>1?Ne.Hours:e/6e4>1?Ne.Minutes:e/1e3>1?Ne.Seconds:Ne.Milliseconds},e.prototype._parseTimestamp=function(e,t){var n="";if(t>=Ne.Hours){var r=Math.floor(e/36e5);e-=36e5*r,n+=r.toString().padStart(t>Ne.Hours?2:1,"0")+":"}if(t>=Ne.Minutes){var a=Math.floor(e/6e4);e-=6e4*a,n+=a.toString().padStart(t>Ne.Minutes?2:1,"0")+":"}var o=Math.floor(e/1e3);return e-=1e3*o,n+=o.toString().padStart(t>Ne.Seconds?2:1,"0"),e>0&&(n.length>0&&(n+="."),n+=Math.round(e).toString().padStart(3,"0")),n},e.prototype._generateTicks=function(e,t){var n=e.min,r=e.max;this._ticks.length=0;for(var a=Math.ceil(t/40),o=this._niceNumber(r-n,!1),i=this._niceNumber(o/(a-1),!0),s=Math.floor(n/i)*i,l=Math.floor(r/i)*i,p=s;p<=l+.5*i;p+=i)this._ticks.push(p)},e.prototype._niceNumber=function(e,t){var n=Math.floor(Math.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},e.prototype._getMinMax=function(e,t){for(var n=1/0,r=0,a=e.start;a<e.end;a++){if(!(t>=this.datasets.data.at(this.datasets.startingIndices.at(a)+u.PerformanceViewerCollector.NumberOfPointsOffset))){var o=this.datasets.startingIndices.at(a)+u.PerformanceViewerCollector.SliceDataOffset+t,i=this.datasets.data.at(o);i<n&&(n=i),i>r&&(r=i)}}return{min:n,max:r}},e.prototype._getPixelForNumber=function(e,t,n,r,a){var o=t.min,i=t.max,s=i!==o?(e-o)/(i-o):1;return a&&(s=1-s),n+s*r},e.prototype._attachEventListeners=function(e){e.addEventListener("wheel",this._handleZoom),e.addEventListener("mousemove",this._handleDataHover),e.addEventListener("mousedown",this._handlePanStart),e.addEventListener("mouseleave",this._handleStopHover),e.ownerDocument.addEventListener("mouseup",this._handlePanStop)},e.prototype._removeEventListeners=function(e){e.removeEventListener("wheel",this._handleZoom),e.removeEventListener("mousemove",this._handleDataHover),e.removeEventListener("mousedown",this._handlePanStart),e.removeEventListener("mouseleave",this._handleStopHover),e.ownerDocument.removeEventListener("mouseup",this._handlePanStop)},e.prototype._getDistanceFromLine=function(e,t,n,r,a,o){if(e===n&&t===r)return Math.sqrt(Math.pow(e-a,2)+Math.pow(t-o,2));var i=0,s=0,l=0,p=0;return t>=r?(i=e,s=t,l=n,p=r):(i=n,s=r,l=e,p=t),o<p?Math.sqrt(Math.pow(l-a,2)+Math.pow(p-o,2)):o>s?Math.sqrt(Math.pow(i-a,2)+Math.pow(s-o,2)):Math.abs((n-e)*(t-o)-(e-a)*(r-t))/Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))},e.prototype._preprocessTooltip=function(e,t){var n,r,a=this,o=this._ctx;if(null!==e&&o&&o.canvas&&0!==this._getNumberOfSlices()){var i=o.canvas.getBoundingClientRect(),s=i.left,l=i.top,p=e.yPos-l,c=e.xPos-s;c>t.right&&(c=t.right);var d=this._getNumberFromPixel(c,this._globalTimeMinMax,t.left,t.right,!1),h="",m=0,b=this._getClosestPointToTimestamp(d),g=0,f="",v={min:0,max:0},y=Number.POSITIVE_INFINITY;this.datasets.ids.forEach((function(n,r){var o,i,l;if(!(null===(o=a.metadata.get(n))||void 0===o?void 0:o.hidden)&&!(r>=a.datasets.data.at(a.datasets.startingIndices.at(b)+u.PerformanceViewerCollector.NumberOfPointsOffset))){for(var c,d=a.datasets.startingIndices.at(b)+u.PerformanceViewerCollector.SliceDataOffset+r,C=a.datasets.data.at(d),E=0;E<a._numberOfTickers;E++)a._tickerItems[E].id===n&&(c=a._tickerItems[E]);if(c){g=a.datasets.data.at(a.datasets.startingIndices.at(b));var x=a._getPixelForNumber(C,c,t.top,t.bottom-t.top,!0),O=a._getPixelForNumber(g,a._globalTimeMinMax,t.left,t.right-t.left,!1),S=n+": "+C.toFixed(2);if(S.length>h.length&&(h=S),a._tooltipItems[m].text=S,a._tooltipItems[m].color=null!==(l=null===(i=a.metadata.get(n))||void 0===i?void 0:i.color)&&void 0!==l?l:"#000",m++,a._position){var _=a._getDistanceFromLine(O,x,O,x,e.xPos-s,p);if(b+1<a.datasets.data.itemLength&&a.datasets.data.at(a.datasets.startingIndices.at(b+1)+u.PerformanceViewerCollector.NumberOfPointsOffset)>r){var w=a.datasets.data.at(a.datasets.startingIndices.at(b+1)),P=a._getPixelForNumber(w,a._globalTimeMinMax,t.left,t.right-t.left,!1),T=a.datasets.data.at(a.datasets.startingIndices.at(b+1)+u.PerformanceViewerCollector.SliceDataOffset+r),k=a._getPixelForNumber(T,c,t.top,t.bottom-t.top,!0);_=Math.min(a._getDistanceFromLine(O,x,P,k,e.xPos-s,p),_)}if(b-1>=0&&a.datasets.data.at(a.datasets.startingIndices.at(b+1)+u.PerformanceViewerCollector.NumberOfPointsOffset)>r){w=a.datasets.data.at(a.datasets.startingIndices.at(b-1)),P=a._getPixelForNumber(w,a._globalTimeMinMax,t.left,t.right-t.left,!1),T=a.datasets.data.at(a.datasets.startingIndices.at(b-1)+u.PerformanceViewerCollector.SliceDataOffset+r),k=a._getPixelForNumber(T,c,t.top,t.bottom-t.top,!0);_=Math.min(a._getDistanceFromLine(O,x,P,k,e.xPos-s,p),_)}_<y&&(f=n,y=_,v=c)}}}}));var C=this._getPixelForNumber(g,this._globalTimeMinMax,t.left,t.right-t.left,!1);if(this._preprocessedTooltipInfo.xForActualTimestamp=C,y<=10&&this._position){this._preprocessedTooltipInfo.focusedId=f;var E=this._getNumberFromPixel(p,v,t.top,t.bottom,!0),x=f+": "+E.toFixed(2);this._preprocessedTooltipInfo.longestText=x,this._preprocessedTooltipInfo.numberOfTooltipItems=1,this._tooltipItems[0].text=x,this._tooltipItems[0].color=null!==(r=null===(n=this.metadata.get(f))||void 0===n?void 0:n.color)&&void 0!==r?r:"#000"}else this._preprocessedTooltipInfo.focusedId="",this._preprocessedTooltipInfo.longestText=h,this._preprocessedTooltipInfo.numberOfTooltipItems=m}},e.prototype._drawTooltip=function(e,t){var n=this._ctx;if(null!==e&&n&&n.canvas&&0!==this._getNumberOfSlices()){var r=n.canvas.getBoundingClientRect(),a=r.left,o=r.top,i=this._preprocessedTooltipInfo,s=i.numberOfTooltipItems,l=i.xForActualTimestamp,p=i.longestText;n.save(),n.fillStyle="#4d5960";var c=t.bottom+3;if(n.beginPath(),n.moveTo(l,c),n.lineTo(l+10,c+10),n.lineTo(l-10,c+10),n.closePath(),n.fill(),n.strokeStyle="#4d5960",n.beginPath(),""===this._preprocessedTooltipInfo.focusedId)n.moveTo(l,t.bottom),n.lineTo(l,0);else{var u=e.yPos-o;n.moveTo(t.left,u),n.lineTo(t.right,u)}n.stroke(),n.font="12px Arial",n.textBaseline="middle",n.textAlign="left";var d,h=this._addonFontLineHeight,m=this._addonFontLineHeight+Math.floor(5);p===this._tooltipTextCache.text?d=this._tooltipTextCache.width:(d=n.measureText(p).width+h+20+5,this._tooltipTextCache.text=p,this._tooltipTextCache.width=d);var b=m*(s+1),g=e.xPos-a,f=t.bottom-20-b;g+d>this._width&&(g-=d),n.globalAlpha=.8,n.fillStyle="#566268",n.fillRect(g,f,d,b),n.globalAlpha=1,g+=10,f+=m;for(var v=0;v<s;v++){var y=this._tooltipItems[v];n.fillStyle=y.color,n.fillRect(g,f-Math.floor(h/2),h,h),n.fillStyle="#fbfbfb",n.fillText(y.text,g+h+5,f),f+=m}n.restore()}},e.prototype._getNumberFromPixel=function(e,t,n,r,a){var o=(e-n)/(r-n);return a&&(o=1-o),t.min+o*(t.max-t.min)},e.prototype._shouldBecomeRealtime=function(){if(0===this._getNumberOfSlices())return!1;var e=this._position,t=this._getNumberOfSlices()-1;if(null===e)return!1;var n=Math.max(0-(e-Math.ceil(.8*this._sizeOfWindow)),0),r=Math.min(n+e+Math.ceil(this._sizeOfWindow*(1-.8)),t);return this.datasets.data.at(this.datasets.startingIndices.at(r))/this.datasets.data.at(this.datasets.startingIndices.at(t))>.998},e.prototype._drawPlayheadRegion=function(e,t){var n=this._ctx;if(n&&!(t>=.95)){var r=Math.ceil(e.right*t),a=r-8,o=r+2,i=e.bottom-e.top-1;n.save(),n.fillStyle="#dfe9ed",n.fillRect(o,e.top,e.right-o,i),n.fillStyle="#0a3066",n.fillRect(r,e.top,2,i),n.fillStyle="#b9dbef",n.fillRect(a,e.top,8,i),n.restore()}},e.prototype.destroy=function(){this._ctx&&this._ctx.canvas&&(this._removeEventListeners(this._ctx.canvas),this._ctx=null)},e.prototype.clear=function(){var e=this._ctx,t=this._width,n=this._height;e&&(e.save(),e.resetTransform(),e.clearRect(0,0,t,n),e.restore())}}();n(31);var Ie;!function(e){e.Count="Count",e.FrameSteps="Frame Steps Duration"}(Ie||(Ie={}));var De=[{strategyCallback:u.PerfCollectionStrategy.FpsStrategy()},{strategyCallback:u.PerfCollectionStrategy.TotalMeshesStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.ActiveMeshesStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.ActiveIndicesStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.ActiveBonesStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.ActiveParticlesStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.DrawCallsStrategy(),category:Ie.Count},{strategyCallback:u.PerfCollectionStrategy.TotalLightsStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.TotalVerticesStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.TotalMaterialsStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.TotalTexturesStrategy(),category:Ie.Count,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.AbsoluteFpsStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.MeshesSelectionStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.RenderTargetsStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.ParticlesStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.SpritesStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.AnimationsStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.PhysicsStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.RenderStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.FrameTotalStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.InterFrameStrategy(),category:Ie.FrameSteps,hidden:!0},{strategyCallback:u.PerfCollectionStrategy.GpuFrameTimeStrategy(),category:Ie.FrameSteps,hidden:!0}],je=function(e){var t=e.scene,n=Object(l.useState)(!1),r=(n[0],n[1],Object(l.useState)(!1)),a=r[0],o=(r[1],Object(l.useState)()),i=o[0],s=o[1];Object(l.useState)(new u.Observable)[0],Object(l.useState)(new u.Observable)[0];Object(l.useEffect)((function(){a||i&&(i.stop(),i.clear(!1),p(i))}),[a]);var p=function(e){e.addCollectionStrategies.apply(e,De),u.ComputePressureObserverWrapper.IsAvailable&&e.addCollectionStrategies({strategyCallback:u.PerfCollectionStrategy.CpuStrategy(),category:Ie.FrameSteps})};return Object(l.useEffect)((function(){var e=t.getPerfCollector();p(e),s(e)}),[]),l.createElement(l.Fragment,null,!1)},ze=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.scene;return r?(n._sceneInstrumentation=new u.SceneInstrumentation(r),n._sceneInstrumentation.captureActiveMeshesEvaluationTime=!0,n._sceneInstrumentation.captureRenderTargetsRenderTime=!0,n._sceneInstrumentation.captureFrameTime=!0,n._sceneInstrumentation.captureRenderTime=!0,n._sceneInstrumentation.captureInterFrameTime=!0,n._sceneInstrumentation.captureParticlesRenderTime=!0,n._sceneInstrumentation.captureSpritesRenderTime=!0,n._sceneInstrumentation.capturePhysicsTime=!0,n._sceneInstrumentation.captureAnimationsTime=!0,n._engineInstrumentation=new u.EngineInstrumentation(r.getEngine()),n._engineInstrumentation.captureGPUFrameTime=!0,n._timerIntervalId=window.setInterval((function(){return n.forceUpdate()}),500),n):n}return a(t,e),t.prototype.componentWillUnmount=function(){this._sceneInstrumentation&&(this._sceneInstrumentation.dispose(),this._sceneInstrumentation=null),this._engineInstrumentation&&(this._engineInstrumentation.dispose(),this._engineInstrumentation=null),window.clearInterval(this._timerIntervalId)},t.prototype.render=function(){var e=this.props.scene;if(!e||!this._sceneInstrumentation||!this._engineInstrumentation)return null;var t=e.getEngine(),n=this._sceneInstrumentation,r=this._engineInstrumentation,a=t.getCaps();return l.createElement("div",{className:"pane"},l.createElement(Ee,{label:"Version",value:u.Engine.Version,color:"rgb(113, 159, 255)"}),l.createElement(Se,{label:"FPS",value:t.getFps(),fractionDigits:0}),l.createElement(je,{scene:e}),l.createElement(Oe,{title:"COUNT"},l.createElement(Ee,{label:"Total meshes",value:e.meshes.length.toString()}),l.createElement(Ee,{label:"Active meshes",value:e.getActiveMeshes().length.toString()}),l.createElement(Ee,{label:"Active indices",value:e.getActiveIndices().toString()}),l.createElement(Ee,{label:"Active faces",value:(e.getActiveIndices()/3).toString()}),l.createElement(Ee,{label:"Active bones",value:e.getActiveBones().toString()}),l.createElement(Ee,{label:"Active particles",value:e.getActiveParticles().toString()}),l.createElement(Ee,{label:"Draw calls",value:n.drawCallsCounter.current.toString()}),l.createElement(Ee,{label:"Total lights",value:e.lights.length.toString()}),l.createElement(Ee,{label:"Total vertices",value:e.getTotalVertices().toString()}),l.createElement(Ee,{label:"Total materials",value:e.materials.length.toString()}),l.createElement(Ee,{label:"Total textures",value:e.textures.length.toString()})),l.createElement(Oe,{title:"FRAME STEPS DURATION"},l.createElement(Se,{label:"Absolute FPS",value:1e3/this._sceneInstrumentation.frameTimeCounter.lastSecAverage,fractionDigits:0}),l.createElement(Se,{label:"Meshes selection",value:n.activeMeshesEvaluationTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Render targets",value:n.renderTargetsRenderTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Particles",value:n.particlesRenderTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Sprites",value:n.spritesRenderTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Animations",value:n.animationsTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Physics",value:n.physicsTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Render",value:n.renderTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Frame total",value:n.frameTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"Inter-frame",value:n.interFrameTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"GPU Frame time",value:1e-6*r.gpuFrameTimeCounter.lastSecAverage,units:"ms"}),l.createElement(Se,{label:"GPU Frame time (average)",value:1e-6*r.gpuFrameTimeCounter.average,units:"ms"})),l.createElement(Oe,{title:"SYSTEM INFO"},l.createElement(Ee,{label:"Resolution",value:t.getRenderWidth()+"x"+t.getRenderHeight()}),l.createElement(Ee,{label:"Hardware scaling level",value:t.getHardwareScalingLevel().toString()}),l.createElement(Ee,{label:"Engine",value:t.description}),l.createElement(_e,{label:"Std derivatives",value:a.standardDerivatives}),l.createElement(_e,{label:"Compressed textures",value:void 0!==a.s3tc}),l.createElement(_e,{label:"Hardware instances",value:a.instancedArrays}),l.createElement(_e,{label:"Texture float",value:a.textureFloat}),l.createElement(_e,{label:"Texture half-float",value:a.textureHalfFloat}),l.createElement(_e,{label:"Render to texture float",value:a.textureFloatRender}),l.createElement(_e,{label:"Render to texture half-float",value:a.textureHalfFloatRender}),l.createElement(_e,{label:"32bits indices",value:a.uintIndices}),l.createElement(_e,{label:"Fragment depth",value:a.fragmentDepthSupported}),l.createElement(_e,{label:"High precision shaders",value:a.highPrecisionShaderSupported}),l.createElement(_e,{label:"Draw buffers",value:a.drawBuffersExtension}),l.createElement(_e,{label:"Vertex array object",value:a.vertexArrayObject}),l.createElement(_e,{label:"Timer query",value:void 0!==a.timerQuery}),l.createElement(_e,{label:"Stencil",value:t.isStencilEnable}),l.createElement(_e,{label:"Parallel shader compilation",value:null!=a.parallelShaderCompile}),l.createElement(Se,{label:"Max textures units",value:a.maxTexturesImageUnits,fractionDigits:0}),l.createElement(Se,{label:"Max textures size",value:a.maxTextureSize,fractionDigits:0}),l.createElement(Se,{label:"Max anisotropy",value:a.maxAnisotropy,fractionDigits:0}),l.createElement(Ee,{label:"Driver",value:t.getGlInfo().renderer})))},t}(Ce),Fe=n(16),Ve=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isEnabled:!1},n}return a(t,e),t.prototype.componentDidMount=function(){for(var e=0,t=u.UtilityLayerRenderer.DefaultKeepDepthUtilityLayer.utilityLayerScene.meshes;e<t.length;e++){var n=t[e];if(n.reservedDataStore&&n.reservedDataStore.isInspectorGrid)return this._gridMesh=n,void this.setState({isEnabled:!0})}},t.prototype.addOrRemoveGrid=function(){var e=u.UtilityLayerRenderer.DefaultKeepDepthUtilityLayer.utilityLayerScene;if(!this._gridMesh){var t=this.props.scene.getWorldExtends(),n=5*(t.max.x-t.min.x),r=5*(t.max.z-t.min.z);this._gridMesh=Object(u.CreateGround)("grid",{width:1,height:1,subdivisions:1},e),this._gridMesh.reservedDataStore||(this._gridMesh.reservedDataStore={}),this._gridMesh.scaling.x=Math.max(n,r),this._gridMesh.scaling.z=this._gridMesh.scaling.x,this._gridMesh.reservedDataStore.isInspectorGrid=!0,this._gridMesh.isPickable=!1;var a=new Fe.GridMaterial("GridMaterial",e);return a.majorUnitFrequency=10,a.minorUnitVisibility=.3,a.gridRatio=.01,a.backFaceCulling=!1,a.mainColor=new u.Color3(1,1,1),a.lineColor=new u.Color3(1,1,1),a.opacity=.8,a.zOffset=1,a.opacityTexture=new u.Texture("https://assets.babylonjs.com/environments/backgroundGround.png",e),this._gridMesh.material=a,void this.setState({isEnabled:!0})}this.setState({isEnabled:!this.state.isEnabled}),this._gridMesh.dispose(!0,!0),this._gridMesh=null},t.prototype.render=function(){var e=this;return l.createElement("div",null,l.createElement(Le,{label:"Render grid",isSelected:function(){return e.state.isEnabled},onSelect:function(){return e.addOrRemoveGrid()}}))},t}(l.Component),Ue=function(e){function t(t){var n=e.call(this,t)||this;n._physicsViewersEnabled=!1;var r=n.props.scene;return r?(r.reservedDataStore||(r.reservedDataStore={}),n._physicsViewersEnabled=null!=r.reservedDataStore.physicsViewer,n):n}return a(t,e),t.prototype.switchPhysicsViewers=function(){this._physicsViewersEnabled=!this._physicsViewersEnabled;var e=this.props.scene;if(this._physicsViewersEnabled){var t=new u.PhysicsViewer(e);e.reservedDataStore.physicsViewer=t;for(var n=0,r=e.meshes;n<r.length;n++){var a=r[n];if(a.physicsImpostor){var o=t.showImpostor(a.physicsImpostor,a);o&&(o.reservedDataStore={hidden:!0},o.material.reservedDataStore={hidden:!0})}}}else e.reservedDataStore.physicsViewer.dispose(),e.reservedDataStore.physicsViewer=null},t.prototype.render=function(){var e=this,t=this.props.scene;return t?l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"HELPERS",selection:this.props.globalState},l.createElement(Ve,{globalState:this.props.globalState,scene:t}),l.createElement(Le,{label:"Physics",isSelected:function(){return e._physicsViewersEnabled},onSelect:function(){return e.switchPhysicsViewers()}})),l.createElement(Oe,{title:"CORE TEXTURE CHANNELS",selection:this.props.globalState},l.createElement(Le,{label:"Diffuse",isSelected:function(){return u.StandardMaterial.DiffuseTextureEnabled},onSelect:function(){return u.StandardMaterial.DiffuseTextureEnabled=!u.StandardMaterial.DiffuseTextureEnabled}}),l.createElement(Le,{label:"Ambient",isSelected:function(){return u.StandardMaterial.AmbientTextureEnabled},onSelect:function(){return u.StandardMaterial.AmbientTextureEnabled=!u.StandardMaterial.AmbientTextureEnabled}}),l.createElement(Le,{label:"Specular",isSelected:function(){return u.StandardMaterial.SpecularTextureEnabled},onSelect:function(){return u.StandardMaterial.SpecularTextureEnabled=!u.StandardMaterial.SpecularTextureEnabled}}),l.createElement(Le,{label:"Emissive",isSelected:function(){return u.StandardMaterial.EmissiveTextureEnabled},onSelect:function(){return u.StandardMaterial.EmissiveTextureEnabled=!u.StandardMaterial.EmissiveTextureEnabled}}),l.createElement(Le,{label:"Bump",isSelected:function(){return u.StandardMaterial.BumpTextureEnabled},onSelect:function(){return u.StandardMaterial.BumpTextureEnabled=!u.StandardMaterial.BumpTextureEnabled}}),l.createElement(Le,{label:"Opacity",isSelected:function(){return u.StandardMaterial.OpacityTextureEnabled},onSelect:function(){return u.StandardMaterial.OpacityTextureEnabled=!u.StandardMaterial.OpacityTextureEnabled}}),l.createElement(Le,{label:"Reflection",isSelected:function(){return u.StandardMaterial.ReflectionTextureEnabled},onSelect:function(){return u.StandardMaterial.ReflectionTextureEnabled=!u.StandardMaterial.ReflectionTextureEnabled}}),l.createElement(Le,{label:"Refraction",isSelected:function(){return u.StandardMaterial.RefractionTextureEnabled},onSelect:function(){return u.StandardMaterial.RefractionTextureEnabled=!u.StandardMaterial.RefractionTextureEnabled}}),l.createElement(Le,{label:"ColorGrading",isSelected:function(){return u.StandardMaterial.ColorGradingTextureEnabled},onSelect:function(){return u.StandardMaterial.ColorGradingTextureEnabled=!u.StandardMaterial.ColorGradingTextureEnabled}}),l.createElement(Le,{label:"Lightmap",isSelected:function(){return u.StandardMaterial.LightmapTextureEnabled},onSelect:function(){return u.StandardMaterial.LightmapTextureEnabled=!u.StandardMaterial.LightmapTextureEnabled}}),l.createElement(Le,{label:"Fresnel",isSelected:function(){return u.StandardMaterial.FresnelEnabled},onSelect:function(){return u.StandardMaterial.FresnelEnabled=!u.StandardMaterial.FresnelEnabled}})),l.createElement(Oe,{title:"FEATURES",selection:this.props.globalState},l.createElement(Le,{label:"Animations",isSelected:function(){return t.animationsEnabled},onSelect:function(){return t.animationsEnabled=!t.animationsEnabled}}),l.createElement(Le,{label:"Physics",isSelected:function(){return t.physicsEnabled},onSelect:function(){return t.physicsEnabled=!t.physicsEnabled}}),l.createElement(Le,{label:"Collisions",isSelected:function(){return t.collisionsEnabled},onSelect:function(){return t.collisionsEnabled=!t.collisionsEnabled}}),l.createElement(Le,{label:"Fog",isSelected:function(){return t.fogEnabled},onSelect:function(){return t.fogEnabled=!t.fogEnabled}}),l.createElement(Le,{label:"Lens flares",isSelected:function(){return t.lensFlaresEnabled},onSelect:function(){return t.lensFlaresEnabled=!t.lensFlaresEnabled}}),l.createElement(Le,{label:"Lights",isSelected:function(){return t.lightsEnabled},onSelect:function(){return t.lightsEnabled=!t.lightsEnabled}}),l.createElement(Le,{label:"Particles",isSelected:function(){return t.particlesEnabled},onSelect:function(){return t.particlesEnabled=!t.particlesEnabled}}),l.createElement(Le,{label:"Post-processes",isSelected:function(){return t.postProcessesEnabled},onSelect:function(){return t.postProcessesEnabled=!t.postProcessesEnabled}}),l.createElement(Le,{label:"Probes",isSelected:function(){return t.probesEnabled},onSelect:function(){return t.probesEnabled=!t.probesEnabled}}),l.createElement(Le,{label:"Textures",isSelected:function(){return t.texturesEnabled},onSelect:function(){return t.texturesEnabled=!t.texturesEnabled}}),l.createElement(Le,{label:"Procedural textures",isSelected:function(){return t.proceduralTexturesEnabled},onSelect:function(){return t.proceduralTexturesEnabled=!t.proceduralTexturesEnabled}}),l.createElement(Le,{label:"Render targets",isSelected:function(){return t.renderTargetsEnabled},onSelect:function(){return t.renderTargetsEnabled=!t.renderTargetsEnabled}}),l.createElement(Le,{label:"Shadows",isSelected:function(){return t.shadowsEnabled},onSelect:function(){return t.shadowsEnabled=!t.shadowsEnabled}}),l.createElement(Le,{label:"Skeletons",isSelected:function(){return t.skeletonsEnabled},onSelect:function(){return t.skeletonsEnabled=!t.skeletonsEnabled}}),l.createElement(Le,{label:"Sprites",isSelected:function(){return t.spritesEnabled},onSelect:function(){return t.spritesEnabled=!t.spritesEnabled}}))):null},t}(Ce),Ge=n(10),Be=n.n(Ge),He=function(e){function t(t){var n=e.call(this,t)||this;n._localChange=!1;var r=n.props.target[n.props.propertyName];return n.state={value:r?n.props.isInteger?r.toFixed(0):r.toFixed(n.props.digits||4):"0"},n._store=r,n}return a(t,e),t.prototype.componentWillUnmount=function(){this.unlock()},t.prototype.shouldComponentUpdate=function(e,t){if(this._localChange)return this._localChange=!1,!0;var n=e.target[e.propertyName],r=n?this.props.isInteger?n.toFixed(0):n.toFixed(this.props.digits||4):"0";return r!==t.value&&(t.value=r,!0)},t.prototype.raiseOnPropertyChanged=function(e,t){this.props.onChange&&this.props.onChange(e),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:e,initialValue:t})},t.prototype.updateValue=function(e){var t;/[^0-9\.\-]/g.test(e)||(t=this.props.isInteger?parseInt(e):parseFloat(e),isNaN(t)?null!=this.props.defaultValue&&(t=this.props.defaultValue):(void 0!==this.props.min&&t<this.props.min&&(e=(t=this.props.min).toString()),void 0!==this.props.max&&t>this.props.max&&(e=(t=this.props.max).toString())),this._localChange=!0,this.setState({value:e}),isNaN(t)||(this.props.target[this.props.propertyName]=t,this.raiseOnPropertyChanged(t,this._store),this._store=t))},t.prototype.lock=function(){this.props.lockObject&&(this.props.lockObject.lock=!0)},t.prototype.unlock=function(){this.props.lockObject&&(this.props.lockObject.lock=!1)},t.prototype.render=function(){var e,t=this;e=this.props.isInteger?parseInt(this.state.value):parseFloat(this.state.value);var n=this.props.smallUI?"short":"value";return l.createElement(l.Fragment,null,!this.props.useEuler&&l.createElement("div",{className:this.props.additionalClass?this.props.additionalClass+" floatLine":"floatLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),(!this.props.icon||""!=this.props.label)&&l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:n},l.createElement("input",{type:"number",step:this.props.step||this.props.isInteger?"1":"0.01",className:"numeric-input",onKeyDown:function(e){13===e.keyCode&&t.props.onEnter&&t.props.onEnter(t._store)},value:this.state.value,onBlur:function(){t.unlock(),t.props.onEnter&&t.props.onEnter(t._store)},onFocus:function(){return t.lock()},onChange:function(e){return t.updateValue(e.target.value)}}))),this.props.useEuler&&l.createElement(We,{label:this.props.label,minimum:0,maximum:360,step:.1,directValue:u.Tools.ToDegrees(e),onChange:function(e){return t.updateValue(u.Tools.ToRadians(e).toString())}}))},t}(l.Component),We=function(e){function t(t){var n=e.call(this,t)||this;if(n._localChange=!1,void 0!==n.props.directValue)n.state={value:n.props.directValue};else{var r=n.props.target[n.props.propertyName];void 0===r&&(r=n.props.maximum),n.state={value:r}}return n}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){if(void 0!==e.directValue)return t.value=e.directValue,!0;var n=e.target[e.propertyName];return void 0===n&&(n=e.maximum),!(n===t.value&&!this._localChange&&e.maximum===this.props.maximum&&e.minimum===this.props.minimum)&&(t.value=n,this._localChange=!1,!0)},t.prototype.onChange=function(e){this._localChange=!0;var t=parseFloat(e);this.props.useEuler&&(t=u.Tools.ToRadians(t)),this.props.target&&(this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:t,initialValue:this.state.value}),this.props.target[this.props.propertyName]=t),this.props.onChange&&this.props.onChange(t),this.setState({value:t})},t.prototype.onInput=function(e){var t=parseFloat(e);this.props.onInput&&this.props.onInput(t)},t.prototype.prepareDataToRead=function(e){return null===e&&(e=0),this.props.useEuler?u.Tools.ToDegrees(e):e},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"sliderLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),(!this.props.icon||""!=this.props.label)&&l.createElement("div",{className:this.props.margin?"label withMargins":"label",title:this.props.label},this.props.label),l.createElement(He,{lockObject:this.props.lockObject,isInteger:0===this.props.decimalCount,smallUI:!0,label:"",target:this.state,digits:void 0===this.props.decimalCount?4:this.props.decimalCount,propertyName:"value",min:this.props.minimum,max:this.props.maximum,onEnter:function(){var t=e.prepareDataToRead(e.state.value);e.onChange(t)},onChange:function(t){var n=e.prepareDataToRead(e.state.value);e.onChange(n)}}),l.createElement("div",{className:"slider"},l.createElement("input",{className:"range",type:"range",step:this.props.step,min:this.prepareDataToRead(this.props.minimum),max:this.prepareDataToRead(this.props.maximum),value:this.prepareDataToRead(this.state.value),onInput:function(t){return e.onInput(t.target.value)},onChange:function(t){return e.onChange(t.target.value)}})))},t}(l.Component),Ke=Number.MAX_SAFE_INTEGER,Ye=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={value:n.remapValueIn(n.props.extractValue?n.props.extractValue():t.target[t.propertyName])},n}return a(t,e),t.prototype.remapValueIn=function(e){return this.props.allowNullValue&&null===e?Ke:e},t.prototype.remapValueOut=function(e){return this.props.allowNullValue&&e===Ke?null:e},t.prototype.shouldComponentUpdate=function(e,t){if(this._localChange)return this._localChange=!1,!0;var n=this.remapValueIn(e.extractValue?e.extractValue():e.target[e.propertyName]);return null!=n&&n!==t.value&&(t.value=n,!0)},t.prototype.raiseOnPropertyChanged=function(e,t){this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:e,initialValue:t,allowNullValue:this.props.allowNullValue})},t.prototype.updateValue=function(e){var t=parseInt(e);this._localChange=!0;var n=this.props.extractValue?this.props.extractValue():this.props.target[this.props.propertyName];this.props.noDirectUpdate||(this.props.target[this.props.propertyName]=this.remapValueOut(t)),this.setState({value:t}),this.props.onSelect&&this.props.onSelect(t);var r=this.props.extractValue?this.props.extractValue():this.props.target[this.props.propertyName];this.raiseOnPropertyChanged(r,n)},t.prototype.render=function(){var e,t=this;return l.createElement("div",{className:"listLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,color:"black",className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"options"},l.createElement("select",{onChange:function(e){return t.updateValue(e.target.value)},value:null!==(e=this.state.value)&&void 0!==e?e:""},this.props.options.map((function(e,t){return l.createElement("option",{selected:e.selected,key:e.label+t,value:e.value,title:e.label},e.label)})))))},t}(l.Component),Xe=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={value:n.props.value.toFixed(void 0!==n.props.precision?n.props.precision:3)},n}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){return!!this._localChange||e.value.toString()!==t.value&&(t.value=e.value.toFixed(void 0!==this.props.precision?this.props.precision:3),!0)},t.prototype.updateValue=function(e){var t=e.target.value;if(!/[^0-9\.\-]/g.test(t)){var n=parseFloat(t);this._localChange=!0,this.setState({value:t}),isNaN(n)||this.props.onChange(n)}},t.prototype.onBlur=function(){this._localChange=!1;var e=parseFloat(this.state.value);isNaN(e)?this.props.onChange(this.props.value):this.props.onChange(e)},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"numeric"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),this.props.label&&l.createElement("div",{className:"numeric-label",title:this.props.label},this.props.label+": "),l.createElement("input",{type:"number",step:this.props.step,className:"numeric-input",value:this.state.value,onChange:function(t){return e.updateValue(t)},onBlur:function(){return e.onBlur()}}))},t.defaultProps={step:1},t}(l.Component),Ze=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={value:(void 0!==n.props.value?n.props.value:n.props.target[n.props.propertyName])||""},n}return a(t,e),t.prototype.componentWillUnmount=function(){this.props.lockObject.lock=!1},t.prototype.shouldComponentUpdate=function(e,t){if(this._localChange)return this._localChange=!1,!0;var n=void 0!==e.value?e.value:e.target[e.propertyName];return n!==t.value&&(t.value=n||"",!0)},t.prototype.raiseOnPropertyChanged=function(e,t){this.props.onChange?this.props.onChange(e):this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:e,initialValue:t})},t.prototype.updateValue=function(e){if(this.props.numbersOnly){if(/[^0-9\.\p\x\%\-]/g.test(e))return;e||(e="0"),0===e.search(/0+[0-9\-]/g)&&(e=e.substr(1))}this._localChange=!0;var t=void 0!==this.props.value?this.props.value:this.props.target[this.props.propertyName];this.setState({value:e}),this.props.propertyName&&!this.props.delayInput&&(this.props.target[this.props.propertyName]=e),this.raiseOnPropertyChanged(e,t)},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"textInputLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,color:"black",className:"icon"}),(!this.props.icon||this.props.icon&&""!=this.props.label)&&l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"value"+(!0===this.props.noUnderline?" noUnderline":"")},l.createElement("input",{value:this.state.value,onBlur:function(){e.props.lockObject.lock=!1,e.updateValue((void 0!==e.props.value?e.props.value:e.props.target[e.props.propertyName])||"")},onFocus:function(){return e.props.lockObject.lock=!0},onChange:function(t){return e.updateValue(t.target.value)}})))},t}(l.Component),qe=n(15),Qe=function(e){function t(t){var n=e.call(this,t)||this;if(n._localChange=!1,"string"===typeof n.props.target[n.props.propertyName]){var r=n.convertToColor3(n.props.target[n.props.propertyName]);n.state={isExpanded:!1,color:r,colorText:n.props.target[n.props.propertyName]}}else n.state={isExpanded:!1,color:n.props.target[n.props.propertyName].clone(),colorText:n.props.target[n.props.propertyName].toHexString()};return t.isLinear&&n.state.color.toGammaSpaceToRef(n.state.color),t.target._isLinearColor=t.isLinear,n._colorPickerOpen=!1,n}return a(t,e),t.prototype.convertToColor3=function(e){if(""===e||"transparent"===e)return new u.Color4(0,0,0,0);if("#"!==e.substring(0,1)||7!==e.length){var t=document.createElement("div");t.style.color=e,document.body.append(t);var n=window.getComputedStyle(t).color;document.body.removeChild(t);var r=n.substring(4,n.length-1).replace(/ /g,"").split(",");return new u.Color3(parseInt(r[0])/255,parseInt(r[1])/255,parseInt(r[2])/255)}return u.Color3.FromHexString(e)},t.prototype.shouldComponentUpdate=function(e,t){var n="string"==typeof this.props.target[this.props.propertyName],r=n?this.convertToColor3(e.target[e.propertyName]):this.props.isLinear?e.target[e.propertyName].toGammaSpace():e.target[e.propertyName];return!(r.equals(t.color)&&!this._localChange)&&(t.color=r.clone(),t.colorText=n?e.target[e.propertyName]:e.target[e.propertyName].toHexString(),this._localChange=!1,!0)},t.prototype.setPropertyValue=function(e,t){"string"==typeof this.props.target[this.props.propertyName]?this.props.target[this.props.propertyName]=t:(this.props.target[this.props.propertyName]=e,this.props.isLinear&&(this.props.target[this.props.propertyName]=e.toLinearSpace()))},t.prototype.onChange=function(e){this._localChange=!0;var t=this.convertToColor3(e);this._colorPickerOpen&&this.props.icon&&(this.convertToColor3(this._colorStringSaved).equals(t)&&(e=this._colorStringSaved));this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:t,initialValue:this.state.color}),this.setPropertyValue(t,e),this.setState({color:t,colorText:e}),this.props.onValueChange&&this.props.onValueChange(e)},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.color,initialValue:e})},t.prototype.updateStateR=function(e){this._localChange=!0;var t=this.state.color.clone();this.state.color.r=e;var n=this.state.color.toHexString();this.setPropertyValue(this.state.color,n),this.setState({color:this.state.color,colorText:n}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateG=function(e){this._localChange=!0;var t=this.state.color.clone();this.state.color.g=e;var n=this.state.color.toHexString();this.setPropertyValue(this.state.color,n),this.setState({color:this.state.color,colorText:n}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateB=function(e){this._localChange=!0;var t=this.state.color.clone();this.state.color.b=e;var n=this.state.color.toHexString();this.setPropertyValue(this.state.color,n),this.setState({color:this.state.color,colorText:n}),this.raiseOnPropertyChanged(t)},t.prototype.copyToClipboard=function(){var e=document.createElement("div");if(e.textContent=this.state.color.toHexString(),document.body.appendChild(e),window.getSelection){var t=document.createRange();t.selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}document.execCommand("copy"),e.remove()},t.prototype.convert=function(e){this.onChange(this._colorString)},t.prototype.render=function(){var e=this,t=this.state.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se});return this._colorString=this.state.colorText,l.createElement("div",{className:"color3Line"},l.createElement("div",{className:"firstLine",title:this.props.label},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label"},this.props.label),l.createElement("div",{className:"color3"},l.createElement(Ae,{linearHint:this.props.isLinear,value:this.state.color,onColorChanged:function(t){e._colorPickerOpen||(e._colorStringSaved=e._colorString),e._colorPickerOpen=!0,e.onChange(t)}})),this.props.icon&&this.props.lockObject&&l.createElement(Ze,{lockObject:this.props.lockObject,label:"",target:this,propertyName:"_colorString",onChange:function(t){e._colorPickerOpen=!1,e.convert(t)},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement("div",{className:"copy hoverIcon",onClick:function(){return e.copyToClipboard()},title:"Copy to clipboard"},l.createElement("img",{src:qe,alt:""})),l.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"r",value:this.state.color.r,onChange:function(t){return e.updateStateR(t)}}),l.createElement(Xe,{label:"g",value:this.state.color.g,onChange:function(t){return e.updateStateG(t)}}),l.createElement(Xe,{label:"b",value:this.state.color.b,onChange:function(t){return e.updateStateB(t)}})))},t}(l.Component),Je=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,value:n.getCurrentValue().clone()},n}return a(t,e),t.prototype.getCurrentValue=function(){return this.props.target[this.props.propertyName]},t.prototype.shouldComponentUpdate=function(e,t){var n=this.getCurrentValue();return!(n.equals(t.value)&&!this._localChange)&&(t.value=n.clone(),this._localChange=!1,!0)},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onChange&&this.props.onChange(this.state.value),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.value,initialValue:e})},t.prototype.updateVector3=function(){var e=this.props.target[this.props.propertyName].clone();this.props.target[this.props.propertyName]=this.state.value,this.setState({value:e}),this.raiseOnPropertyChanged(e)},t.prototype.updateStateX=function(e){this._localChange=!0,this.state.value.x=e,this.updateVector3()},t.prototype.updateStateY=function(e){this._localChange=!0,this.state.value.y=e,this.updateVector3()},t.prototype.updateStateZ=function(e){this._localChange=!0,this.state.value.z=e,this.updateVector3()},t.prototype.render=function(){var e=this,t=this.state.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se});return l.createElement("div",{className:"vector3Line"},l.createElement("div",{className:"firstLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"vector"},!this.props.useEuler&&"X: "+this.state.value.x.toFixed(2)+", Y: "+this.state.value.y.toFixed(2)+", Z: "+this.state.value.z.toFixed(2),this.props.useEuler&&"X: "+u.Tools.ToDegrees(this.state.value.x).toFixed(2)+", Y: "+u.Tools.ToDegrees(this.state.value.y).toFixed(2)+", Z: "+u.Tools.ToDegrees(this.state.value.z).toFixed(2)),l.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&!this.props.useEuler&&l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),l.createElement(Xe,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}}),l.createElement(Xe,{label:"z",step:this.props.step,value:this.state.value.z,onChange:function(t){return e.updateStateZ(t)}})),this.state.isExpanded&&this.props.useEuler&&!this.props.noSlider&&l.createElement("div",{className:"secondLine"},l.createElement(We,{margin:!0,label:"x",minimum:0,maximum:360,step:.1,directValue:u.Tools.ToDegrees(this.state.value.x),onChange:function(t){return e.updateStateX(u.Tools.ToRadians(t))}}),l.createElement(We,{margin:!0,label:"y",minimum:0,maximum:360,step:.1,directValue:u.Tools.ToDegrees(this.state.value.y),onChange:function(t){return e.updateStateY(u.Tools.ToRadians(t))}}),l.createElement(We,{margin:!0,label:"z",minimum:0,maximum:360,step:.1,directValue:u.Tools.ToDegrees(this.state.value.z),onChange:function(t){return e.updateStateZ(u.Tools.ToRadians(t))}})),this.state.isExpanded&&this.props.useEuler&&this.props.noSlider&&l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"x",step:this.props.step,value:u.Tools.ToDegrees(this.state.value.x),onChange:function(t){return e.updateStateX(u.Tools.ToRadians(t))}}),l.createElement(Xe,{label:"y",step:this.props.step,value:u.Tools.ToDegrees(this.state.value.y),onChange:function(t){return e.updateStateY(u.Tools.ToRadians(t))}}),l.createElement(Xe,{label:"z",step:this.props.step,value:u.Tools.ToDegrees(this.state.value.z),onChange:function(t){return e.updateStateZ(u.Tools.ToRadians(t))}})))},t.defaultProps={step:.001},t}(l.Component),$e=function(e){function t(t){var n=e.call(this,t)||this;n._localChange=!1;var r=n.props.target[n.props.propertyName].clone();return n.state={isExpanded:!1,value:r,eulerValue:r.toEulerAngles()},n}return a(t,e),t.prototype._checkRoundCircle=function(e,t){return Math.abs(u.Tools.ToDegrees(e))+Math.abs(u.Tools.ToDegrees(t))===360},t.prototype.shouldComponentUpdate=function(e,t){var n=e.target[e.propertyName];return!(n.equals(t.value)&&!this._localChange)&&(t.value=n.clone(),t.eulerValue=n.toEulerAngles(),this._checkRoundCircle(t.eulerValue.x,this.state.eulerValue.x)&&(t.eulerValue.x=this.state.eulerValue.x),this._checkRoundCircle(t.eulerValue.y,this.state.eulerValue.y)&&(t.eulerValue.y=this.state.eulerValue.y),this._checkRoundCircle(t.eulerValue.z,this.state.eulerValue.z)&&(t.eulerValue.z=this.state.eulerValue.z),this._localChange=!1,!0)},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e,t){this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:e,initialValue:t})},t.prototype.updateQuaternion=function(){var e=this.props.target[this.props.propertyName].clone();this.props.target[this.props.propertyName]=this.state.value,this.setState({value:e}),this.raiseOnPropertyChanged(this.state.value,e)},t.prototype.updateStateX=function(e){this._localChange=!0,this.state.value.x=e,this.updateQuaternion()},t.prototype.updateStateY=function(e){this._localChange=!0,this.state.value.y=e,this.updateQuaternion()},t.prototype.updateStateZ=function(e){this._localChange=!0,this.state.value.z=e,this.updateQuaternion()},t.prototype.updateStateW=function(e){this._localChange=!0,this.state.value.w=e,this.updateQuaternion()},t.prototype.updateQuaternionFromEuler=function(){var e=this.state.eulerValue.toQuaternion();this.state.value.x=e.x,this.state.value.y=e.y,this.state.value.z=e.z,this.state.value.w=e.w,this.updateQuaternion()},t.prototype.updateStateEulerX=function(e){this._localChange=!0,this.state.eulerValue.x=u.Tools.ToRadians(e),this.updateQuaternionFromEuler()},t.prototype.updateStateEulerY=function(e){this._localChange=!0,this.state.eulerValue.y=u.Tools.ToRadians(e),this.updateQuaternionFromEuler()},t.prototype.updateStateEulerZ=function(e){this._localChange=!0,this.state.eulerValue.z=u.Tools.ToRadians(e),this.updateQuaternionFromEuler()},t.prototype.render=function(){var e=this,t=this.state.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se}),n=this.state.value,r=this.state.eulerValue.clone();return r.x=u.Tools.ToDegrees(r.x),r.y=u.Tools.ToDegrees(r.y),r.z=u.Tools.ToDegrees(r.z),l.createElement("div",{className:"vector3Line"},l.createElement("div",{className:"firstLine",title:this.props.label+" (Using Quaternion)"},l.createElement("div",{className:"label"},this.props.label+" (Using Quaternion)"),l.createElement("div",{className:"vector"},!this.props.useEuler&&"X: "+n.x.toFixed(1)+", Y: "+n.y.toFixed(1)+", Z: "+n.z.toFixed(1)+", W: "+n.w.toFixed(1),this.props.useEuler&&"X: "+r.x.toFixed(2)+", Y: "+r.y.toFixed(2)+", Z: "+r.z.toFixed(2)),l.createElement("div",{className:"expand",onClick:function(){return e.switchExpandState()}},t)),this.state.isExpanded&&!this.props.useEuler&&l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"x",value:n.x,onChange:function(t){return e.updateStateX(t)}}),l.createElement(Xe,{label:"y",value:n.y,onChange:function(t){return e.updateStateY(t)}}),l.createElement(Xe,{label:"z",value:n.z,onChange:function(t){return e.updateStateZ(t)}}),l.createElement(Xe,{label:"w",value:n.w,onChange:function(t){return e.updateStateW(t)}})),this.state.isExpanded&&this.props.useEuler&&l.createElement("div",{className:"secondLine"},l.createElement(He,{label:"x",target:r,propertyName:"x",onChange:function(t){e.updateStateEulerX(t)}}),l.createElement(He,{label:"y",target:r,propertyName:"y",onChange:function(t){e.updateStateEulerY(t)}}),l.createElement(He,{label:"z",target:r,propertyName:"z",onChange:function(t){e.updateStateEulerZ(t)}})))},t}(l.Component),et=function(e){function t(t){var n=e.call(this,t)||this;return n.state={mode:0},n}return a(t,e),t.prototype.renderInspectable=function(e){switch(e.type){case u.InspectableType.Checkbox:return l.createElement(Le,{key:e.label,label:e.label,target:this.props.target,propertyName:e.propertyName,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.InspectableType.Slider:return l.createElement(We,{key:e.label,label:e.label,target:this.props.target,propertyName:e.propertyName,step:void 0!==e.step?e.step:.1,minimum:void 0!==e.min?e.min:0,maximum:void 0!==e.max?e.max:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.InspectableType.Vector3:return l.createElement(Je,{key:e.label,label:e.label,target:this.props.target,propertyName:e.propertyName,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.InspectableType.Quaternion:return l.createElement($e,{useEuler:this.props.globalState.onlyUseEulers,key:e.label,label:e.label,target:this.props.target,propertyName:e.propertyName,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.InspectableType.Color3:return l.createElement(Qe,{key:e.label,label:e.label,target:this.props.target,propertyName:e.propertyName,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.InspectableType.String:return l.createElement(Ze,{key:e.label,label:e.label,lockObject:this.props.lockObject,target:this.props.target,propertyName:e.propertyName,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.InspectableType.Button:return l.createElement(we,{key:e.label,label:e.label,onClick:e.callback||function(){console.warn("no call back function added")}});case u.InspectableType.Options:return l.createElement(Ye,{key:e.label,label:e.label,target:this.props.target,propertyName:e.propertyName,options:e.options||[],onSelect:e.callback||function(e){console.log("Option "+e+" is selected")}});case u.InspectableType.Tab:return l.createElement(Ee,{key:e.label,label:e.label,value:" "})}return null},t.prototype.render=function(){var e=this,t=this.props.target.inspectableCustomProperties;return t&&0!==t.length?l.createElement(Oe,{title:"CUSTOM",selection:this.props.globalState},t.map((function(t){return e.renderInspectable(t)}))):null},t}(l.Component),tt=function(e){function t(t){var n=e.call(this,t)||this;return n._container=document.createElement("div"),n._container.id=n.props.id,n._window,n.state={isComponentMounted:!1,blockedByBrowser:!1},n}return a(t,e),t.prototype.componentDidMount=function(){this.openPopup(),this.setState({isComponentMounted:!0})},t.prototype.openPopup=function(){var e=this,t=this.props,n=t.title,r=t.size,a=t.onClose,o=t.onOpen,i="window_"+n;this._container=hi._CreatePopup(n,i,r.width,r.height,!0),this._container&&(this._host=this._container.ownerDocument.createElement("div"),this._host.id="host",this._host.style.width="auto",this._container.appendChild(this._host)),this._window=hi[i],this._window?(o&&o(this._window),this._window.addEventListener("keyup",(function(t){e.props.onKeyUp&&e.props.onKeyUp(t)})),this._window.addEventListener("keydown",(function(t){e.props.onKeyDown&&e.props.onKeyDown(t)})),this._window.addEventListener("beforeunload",(function(){return e._window&&a(e._window)})),this._window.addEventListener("resize",(function(){e.props.onResize&&e._window&&e.props.onResize(e._window)}))):this._window||this.setState({blockedByBrowser:!0},(function(){e.state.blockedByBrowser&&console.warn("Popup window couldn't be created")}))},t.prototype.componentWillUnmount=function(){this._window&&this._window.close()},t.prototype.getWindow=function(){return this._window},t.prototype.render=function(){return this.state.isComponentMounted&&null!==this._container?c.createPortal(this.props.children,this._host):null},t}(l.Component),nt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value,isFocused:!1},n}return a(t,e),t.prototype._onChange=function(e){if(this.props.isNumber){var t=parseFloat(e);if(isNaN(t)){if("-"!==e&&""!==e)return}else this.props.onValueAsNumberChanged&&this.props.onValueAsNumberChanged(t,!0),this._lastKnownGoodValue=t.toString()}this._lastKnownGoodValue=e,this.setState({value:e})},t.prototype._onBlur=function(){if(this.props.context.focusedInput=!1,this.props.isNumber){var e=parseFloat(this.state.value);isNaN(e)?this.setState({value:this._lastKnownGoodValue,isFocused:!1}):(this.props.onValueAsNumberChanged&&this.props.onValueAsNumberChanged(e,!1),this.setState({value:e.toString(),isFocused:!1}))}else this.setState({isFocused:!1})},t.prototype._onFocus=function(){this.props.context.focusedInput=!0,this.setState({isFocused:!0})},t.prototype.shouldComponentUpdate=function(e,t){return e!==this.props&&(t.value=e.value),!0},t.prototype._onKeyPress=function(e){if("Enter"===e.key){var t=parseFloat(this.state.value);isNaN(t)||this.props.onValueAsNumberChanged&&this.props.onValueAsNumberChanged(t,!1)}},t.prototype.render=function(){var e=this;return l.createElement("input",{type:"text",title:this.props.tooltip,onFocus:function(){return e._onFocus()},onBlur:function(){return e._onBlur()},className:"text-input"+(this.props.className?" "+this.props.className:""),onChange:function(t){return e._onChange(e.props.complement?t.target.value.replace(e.props.complement,""):t.target.value)},onKeyPress:function(t){return e._onKeyPress(t)},value:(this.state.value||"")+(!this.state.isFocused&&this.props.complement?this.props.complement:""),id:this.props.id})},t}(l.Component),rt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{title:this.props.tooltip,className:"control-button"+(this.props.className?" "+this.props.className:""),id:this.props.id,onClick:function(){return e.props.onClick()}},l.createElement("img",{className:"control-button-image",src:this.props.icon}),l.createElement("img",{className:"control-button-hover-image",src:this.props.hoverIcon}))},t}(l.Component),at=n(33),ot=n(34),it=n(35),st=n(36),lt=n(37),pt=n(38),ct=n(39),ut=n(40),dt=n(41),ht=n(42),mt=n(43),bt=n(44),gt=n(45),ft=n(46),vt=n(47),yt=n(48),Ct=n(49),Et=n(50),xt=function(e){function t(t){var n=e.call(this,t)||this;return n._isMounted=!1,n.state={},n.props.context.onAnimationStateChanged.add((function(){n._isMounted&&n.forceUpdate()})),n}return a(t,e),t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype._onFirstKey=function(){this.props.context.onMoveToFrameRequired.notifyObservers(this.props.context.fromKey)},t.prototype._onPrevKey=function(){var e=this.props.context.getPrevKey();null!==e&&this.props.context.onMoveToFrameRequired.notifyObservers(e)},t.prototype._onRewind=function(){this.props.context.play(!1),this.forceUpdate()},t.prototype._onForward=function(){this.props.context.play(!0),this.forceUpdate()},t.prototype._onPrevFrame=function(){this.props.context.onMoveToFrameRequired.notifyObservers(Math.max(0,this.props.context.activeFrame-1))},t.prototype._onNextFrame=function(){this.props.context.onMoveToFrameRequired.notifyObservers(this.props.context.activeFrame+1)},t.prototype._onNextKey=function(){var e=this.props.context.getNextKey();null!==e&&this.props.context.onMoveToFrameRequired.notifyObservers(e)},t.prototype._onEndKey=function(){this.props.context.onMoveToFrameRequired.notifyObservers(this.props.context.toKey)},t.prototype._onStop=function(){this.props.context.stop(),this.forceUpdate()},t.prototype.render=function(){var e=this;return l.createElement("div",{id:"media-player"},l.createElement(rt,{tooltip:"Rewind to the first frame of the selected timeline",id:"start-key",context:this.props.context,globalState:this.props.globalState,icon:dt,hoverIcon:ht,onClick:function(){return e._onFirstKey()}}),l.createElement(rt,{tooltip:"Rewind to the previous frame",id:"prev-frame",context:this.props.context,globalState:this.props.globalState,icon:Ct,hoverIcon:Et,onClick:function(){return e._onPrevFrame()}}),l.createElement(rt,{tooltip:"Rewind to the previous key frame",id:"first-key",context:this.props.context,globalState:this.props.globalState,icon:at,hoverIcon:ot,onClick:function(){return e._onPrevKey()}}),(this.props.context.isPlaying&&this.props.context.forwardAnimation||!this.props.context.isPlaying)&&l.createElement(rt,{tooltip:"Play backwards",id:"rev-key",context:this.props.context,globalState:this.props.globalState,icon:it,hoverIcon:st,onClick:function(){return e._onRewind()}}),this.props.context.isPlaying&&!this.props.context.forwardAnimation&&l.createElement(rt,{tooltip:"Stop",id:"stop-key",context:this.props.context,globalState:this.props.globalState,icon:gt,hoverIcon:ft,onClick:function(){return e._onStop()}}),(this.props.context.isPlaying&&!this.props.context.forwardAnimation||!this.props.context.isPlaying)&&l.createElement(rt,{tooltip:"Play forwards",id:"fwd-key",context:this.props.context,globalState:this.props.globalState,icon:lt,hoverIcon:pt,onClick:function(){return e._onForward()}}),this.props.context.isPlaying&&this.props.context.forwardAnimation&&l.createElement(rt,{tooltip:"Stop",id:"stop-key",context:this.props.context,globalState:this.props.globalState,icon:gt,hoverIcon:ft,onClick:function(){return e._onStop()}}),l.createElement(rt,{tooltip:"Advance to the next key frame",id:"next-key",context:this.props.context,globalState:this.props.globalState,icon:ct,hoverIcon:ut,onClick:function(){return e._onNextKey()}}),l.createElement(rt,{tooltip:"Advance to the next frame",id:"next-frame",context:this.props.context,globalState:this.props.globalState,icon:vt,hoverIcon:yt,onClick:function(){return e._onNextFrame()}}),l.createElement(rt,{tooltip:"Advance to the last frame of the selected timeline",id:"end-key",context:this.props.context,globalState:this.props.globalState,icon:mt,hoverIcon:bt,onClick:function(){return e._onEndKey()}}))},t}(l.Component),Ot=n(51),St=function(e){function t(t){var n=e.call(this,t)||this;return n._viewWidth=748,n.state={},n._rangeHost=l.createRef(),n._rangeScrollbarHost=l.createRef(),n.props.context.onHostWindowResized.add((function(){n._computeSizes()})),n.props.context.onFrameSet.add((function(){n.forceUpdate()})),n.props.context.onAnimationsLoaded.add((function(){n.forceUpdate()})),n._updateLimits(),n}return a(t,e),t.prototype._computeSizes=function(){this._rangeHost.current&&(this._viewWidth=this._rangeHost.current.clientWidth-4,this.forceUpdate())},t.prototype._onPointerDown=function(e){this._bothHandleIsActive=!1,"left-handle"===e.nativeEvent.target.id?this._leftHandleIsActive=!0:"right-handle"===e.nativeEvent.target.id?this._leftHandleIsActive=!1:(this._bothHandleIsActive=!0,this._currentOffset=e.nativeEvent.clientX,this._currentFrom=this.props.context.fromKey,this._currentTo=this.props.context.toKey),this._pointerIsDown=!0,e.currentTarget.setPointerCapture(e.pointerId)},t.prototype._onPointerMove=function(e){if(this._pointerIsDown&&this.props.context.animations&&this.props.context.animations.length){this._updateLimits();var t=e.nativeEvent.offsetX;this._bothHandleIsActive&&(t=e.nativeEvent.clientX-this._currentOffset);var n=t/this._viewWidth*(this._maxFrame-this._minFrame),r=Math.min(this._maxFrame,Math.max(this._minFrame,Math.round(this._minFrame+n)));this._bothHandleIsActive?(this._currentTo+n>this._maxFrame&&(n=this._maxFrame-this._currentTo),this._currentFrom+n<this._minFrame&&(n=this._minFrame-this._currentFrom),this.props.context.fromKey=Math.min(this._maxFrame,Math.max(this._minFrame,this._currentFrom+n|0)),this.props.context.toKey=Math.min(this._maxFrame,Math.max(this._minFrame,this._currentTo+n|0))):this._leftHandleIsActive?(this.props.context.fromKey=r,this.props.context.fromKey=Math.min(this.props.context.toKey-1,this.props.context.fromKey)):(this.props.context.toKey=r,this.props.context.toKey=Math.max(this.props.context.fromKey+1,this.props.context.toKey)),this.props.context.onRangeUpdated.notifyObservers(),this.props.context.stop(),this.forceUpdate()}},t.prototype._updateLimits=function(){if(this.props.context.animations&&this.props.context.animations.length){for(var e=Number.MAX_VALUE,t=-Number.MAX_VALUE,n=0,r=this.props.context.animations;n<r.length;n++){var a=r[n],o=this.props.context.useTargetAnimations?a.animation.getKeys():a.getKeys();e=Math.min(e,o[0].frame),t=Math.max(t,o[o.length-1].frame)}this._minFrame=e,this._maxFrame=t}},t.prototype._onPointerUp=function(e){this._pointerIsDown=!1,e.currentTarget.releasePointerCapture(e.pointerId)},t.prototype.render=function(){var e=this;this._updateLimits();var t=this._maxFrame-this._minFrame;return this.props.context.toKey>this._maxFrame&&(this.props.context.toKey=this._maxFrame),l.createElement("div",{id:"range-selector",ref:this._rangeHost,onPointerDown:function(t){return e._onPointerDown(t)},onPointerMove:function(t){return e._onPointerMove(t)},onPointerUp:function(t){return e._onPointerUp(t)}},l.createElement("div",{id:"range-scrollbar",ref:this._rangeScrollbarHost,style:{left:2+(this.props.context.fromKey-this._minFrame)/t*this._viewWidth+"px",right:2+(this._maxFrame-this.props.context.toKey)/t*this._viewWidth+"px"}},l.createElement("div",{id:"left-handle",className:"handle"},l.createElement("img",{src:Ot})),l.createElement("div",{id:"from-key"},0|this.props.context.fromKey),l.createElement("div",{id:"to-key"},0|this.props.context.toKey),l.createElement("div",{id:"right-handle",className:"handle"},l.createElement("img",{src:Ot}))))},t}(l.Component);n(52);var _t=function(e){function t(t){var n=e.call(this,t)||this;return n.state={clipLength:n.props.context.clipLength?n.props.context.clipLength.toFixed(0):n.props.context.referenceMaxFrame.toFixed(0)},n._onAnimationsLoadedObserver=n.props.context.onAnimationsLoaded.add((function(){n.forceUpdate()})),n._onActiveAnimationChangedObserver=n.props.context.onActiveAnimationChanged.add((function(){n.forceUpdate()})),n._onClipLengthIncreasedObserver=n.props.context.onClipLengthIncreased.add((function(e){n.props.context.clipLength=e,n.props.context.onMoveToFrameRequired.notifyObservers(e),null!==n.props.context.getKeyAtAnyFrameIndex(e)||n.props.context.onCreateOrUpdateKeyPointRequired.notifyObservers(),n.setState({clipLength:e.toFixed(0)})})),n._onClipLengthIncreasedObserver=n.props.context.onClipLengthDecreased.add((function(e){n.props.context.clipLength=e,n.props.context.onMoveToFrameRequired.notifyObservers(e),null!==n.props.context.getKeyAtAnyFrameIndex(e)||n.props.context.onCreateOrUpdateKeyPointRequired.notifyObservers(),n.props.context.toKey=Math.min(n.props.context.toKey,n.props.context.clipLength),n.props.context.onRangeUpdated.notifyObservers(),n.setState({clipLength:e.toFixed(0)})})),n}return a(t,e),t.prototype._changeClipLength=function(e){var t=this.props.context.clipLength||this.props.context.referenceMaxFrame;t<e?this.props.context.onClipLengthIncreased.notifyObservers(e):t>e&&this.props.context.onClipLengthDecreased.notifyObservers(e),this.setState({clipLength:e.toFixed(0)})},t.prototype.componentWillUnmount=function(){this._onAnimationsLoadedObserver&&this.props.context.onAnimationsLoaded.remove(this._onAnimationsLoadedObserver),this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver),this._onClipLengthDecreasedObserver&&this.props.context.onClipLengthDecreased.remove(this._onClipLengthDecreasedObserver),this._onClipLengthIncreasedObserver&&this.props.context.onClipLengthDecreased.remove(this._onClipLengthIncreasedObserver)},t.prototype.render=function(){var e=this;return l.createElement("div",{id:"bottom-bar"},l.createElement(xt,{globalState:this.props.globalState,context:this.props.context}),l.createElement(St,{globalState:this.props.globalState,context:this.props.context}),this.props.context.activeAnimations.length>0&&l.createElement("div",{id:"bottom-bar-total"},l.createElement(nt,{isNumber:!0,value:this.state.clipLength,tooltip:"Clip Length",id:"clip-range",onValueAsNumberChanged:function(t,n){!n&&e._changeClipLength(t)},globalState:this.props.globalState,context:this.props.context})))},t}(l.Component),wt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{title:this.props.tooltip,className:"action-button"+(this.props.isActive?" active":"")+(this.props.className?" "+this.props.className:""),id:this.props.id,onClick:function(){return e.props.onClick()}},l.createElement("img",{className:"action-button-image",src:this.props.icon}))},t}(l.Component);n(54);var Pt,Tt,kt=n(56),Nt=n(57),Mt=n(58),At=n(59),Lt=n(60),Rt=n(61),It=n(62),Dt=n(63),jt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={keyFrameValue:"",keyValue:"",editControlsVisible:!1},n._onFrameSetObserver=n.props.context.onFrameSet.add((function(e){n.setState({keyFrameValue:e.toFixed(0)})})),n._onValueSetObserver=n.props.context.onValueSet.add((function(e){n.setState({keyValue:e.toFixed(2)})})),n._onActiveAnimationChangedObserver=n.props.context.onActiveAnimationChanged.add((function(){n.setState({keyFrameValue:"",keyValue:""})})),n.onActiveKeyPointChanged=n.props.context.onActiveKeyPointChanged.add((function(){var e;n.setState({keyFrameValue:"",keyValue:"",editControlsVisible:1===(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.length)})})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onFrameSetObserver&&this.props.context.onFrameSet.remove(this._onFrameSetObserver),this._onValueSetObserver&&this.props.context.onValueSet.remove(this._onValueSetObserver),this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver),this.onActiveKeyPointChanged&&this.props.context.onActiveKeyPointChanged.remove(this.onActiveKeyPointChanged)},t.prototype.render=function(){var e=this,t=this.props.context.activeAnimations.length>0;return l.createElement("div",{id:"top-bar"},l.createElement("img",{id:"top-bar-logo",src:kt}),l.createElement("div",{id:"top-bar-parent-name"},this.props.context.title),l.createElement(nt,{className:t&&this.state.editControlsVisible?"":"disabled",isNumber:!0,value:this.state.keyFrameValue,tooltip:"Frame",id:"key-frame",onValueAsNumberChanged:function(t){return e.props.context.onFrameManuallyEntered.notifyObservers(t)},globalState:this.props.globalState,context:this.props.context}),l.createElement(nt,{className:t&&this.state.editControlsVisible?"":"disabled",isNumber:!0,value:this.state.keyValue,tooltip:"Value",id:"key-value",onValueAsNumberChanged:function(t){return e.props.context.onValueManuallyEntered.notifyObservers(t)},globalState:this.props.globalState,context:this.props.context}),l.createElement(wt,{className:t?"":"disabled",tooltip:"New key",id:"new-key",globalState:this.props.globalState,context:this.props.context,icon:Mt,onClick:function(){return e.props.context.onCreateOrUpdateKeyPointRequired.notifyObservers()}}),l.createElement(wt,{tooltip:"Frame canvas",id:"frame-canvas",globalState:this.props.globalState,context:this.props.context,icon:Nt,onClick:function(){return e.props.context.onFrameRequired.notifyObservers()}}),l.createElement(wt,{className:this.props.context.activeKeyPoints&&this.props.context.activeKeyPoints.length>0?"":"disabled",tooltip:"Flatten tangent",id:"flatten-tangent",globalState:this.props.globalState,context:this.props.context,icon:At,onClick:function(){return e.props.context.onFlattenTangentRequired.notifyObservers()}}),l.createElement(wt,{className:this.props.context.activeKeyPoints&&this.props.context.activeKeyPoints.length>0?"":"disabled",tooltip:"Linear tangent",id:"linear-tangent",globalState:this.props.globalState,context:this.props.context,icon:Lt,onClick:function(){return e.props.context.onLinearTangentRequired.notifyObservers()}}),l.createElement(wt,{className:this.props.context.activeKeyPoints&&this.props.context.activeKeyPoints.length>0?"":"disabled",tooltip:"Break tangent",id:"break-tangent",globalState:this.props.globalState,context:this.props.context,icon:Rt,onClick:function(){return e.props.context.onBreakTangentRequired.notifyObservers()}}),l.createElement(wt,{className:this.props.context.activeKeyPoints&&this.props.context.activeKeyPoints.length>0?"":"disabled",tooltip:"Unify tangent",id:"unify-tangent",globalState:this.props.globalState,context:this.props.context,icon:It,onClick:function(){return e.props.context.onUnifyTangentRequired.notifyObservers()}}),l.createElement(wt,{className:this.props.context.activeKeyPoints&&this.props.context.activeKeyPoints.length>0?"":"disabled",tooltip:"Step tangent",id:"step-tangent",globalState:this.props.globalState,context:this.props.context,icon:Dt,onClick:function(){return e.props.context.onStepTangentRequired.notifyObservers()}}))},t}(l.Component),zt=function(e){function t(t){var n=e.call(this,t)||this;return n._GraphAbsoluteWidth=788,n._viewWidth=748,n._viewScale=1,n._offsetX=0,n.state={},n._svgHost=l.createRef(),n.props.context.onHostWindowResized.add((function(){n._computeSizes()})),n._onActiveAnimationChangedObserver=n.props.context.onActiveAnimationChanged.add((function(){n._computeSizes(),n.forceUpdate()})),n.props.context.onGraphMoved.add((function(e){n._offsetX=e,n.forceUpdate()})),n.props.context.onGraphScaled.add((function(e){n._viewScale=e,n.forceUpdate()})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver)},t.prototype._computeSizes=function(){this._svgHost.current&&(this._viewWidth=this._svgHost.current.clientWidth,this.forceUpdate())},t.prototype._buildFrames=function(){var e=this;if(0===this.props.context.activeAnimations.length)return null;var t=this.props.context.referenceMinFrame,n=this.props.context.referenceMaxFrame-t,r=n/20|0,a=n/this._GraphAbsoluteWidth,o=[];0===r&&(r=1);for(var i=this._offsetX*a,s=t-(i/r|0)*r,p=s+this._viewWidth*this._viewScale*a,c=s-r;c<=p+r;c+=r)o.push(c);return o.map((function(n,r){var o=(n-t)/a;return l.createElement("g",{key:"axis"+n},l.createElement("line",{key:"line"+n,x1:o,y1:5*e._viewScale+"px",x2:o,y2:30*e._viewScale+"px",style:{stroke:"#333333",strokeWidth:.5}}),l.createElement("text",{key:"label"+n,x:o,y:0,dx:7*e._viewScale+"px",textAnchor:"middle",dy:15*e._viewScale+"px",style:{fontFamily:"acumin-pro-condensed",fontSize:10*e._viewScale+"px",fill:"#555555",textAlign:"center"}},n.toFixed(0)))}))},t.prototype.render=function(){var e=-this._offsetX+" 0 "+Math.round(this._viewWidth*this._viewScale)+" "+Math.round(30*this._viewScale);return l.createElement("div",{id:"frame-bar"},this.props.context.activeAnimations.length>0&&l.createElement("div",{id:"angle-unit"}),l.createElement("div",{id:"frames"},l.createElement("svg",{id:"svg-frames",viewBox:e,ref:this._svgHost},this._buildFrames())))},t}(l.Component),Ft=function(){function e(e,t,n,r,a,o){this.keys=new Array,this.onDataUpdatedObservable=new u.Observable,this.color=e,this.animation=t,this.property=n,this.tangentBuilder=r,this.setDefaultInTangent=a,this.setDefaultOutTangent=o}return e.prototype.getPathData=function(t,n){var r=this.keys;if(r.length<2)return"";for(var a="M"+t(r[0].frame)+" "+n(r[0].value),o=1;o<r.length;o++){var i=r[o-1].outTangent,s=r[o].inTangent,l=r[o].frame,p=r[o].value,c=r[o-1].frame,d=r[o-1].value,h=l-c;if(r[o-1].interpolation!==u.AnimationKeyInterpolation.STEP)if(void 0!==i||void 0!==s){for(var m=c;m<l;m+=h/e.SampleRate){var b=this.animation.evaluate(m),g=this.property?b[this.property]:b;a+=" L"+t(m)+" "+n(g)}a+=" L"+t(l)+" "+n(p)}else a+=" L"+t(l)+" "+n(p);else a+="L "+t(l)+" "+n(d),a+="L "+t(l)+" "+n(p)}return a},e.prototype.updateLockedTangentMode=function(e,t){this.keys[e].lockedTangent=t,this.animation.getKeys()[e].lockedTangent=t},e.prototype.updateInterpolationMode=function(e,t){this.keys[e].interpolation=t,this.animation.getKeys()[e].interpolation=t,this.onDataUpdatedObservable.notifyObservers()},e.prototype.getInControlPoint=function(e){if(0===e)return 0;var t=this.keys[e].inTangent;return void 0===t&&this.hasDefinedInTangent(e)&&(t=this.evaluateInTangent(e)),t},e.prototype.getOutControlPoint=function(e){var t=this.keys;if(e===t.length-1)return 0;var n=t[e].outTangent;return void 0===n&&this.hasDefinedOutTangent(e)&&(n=this.evaluateOutTangent(e)),n},e.prototype.hasDefinedOutTangent=function(e){var t=this.keys;return e!==this.keys.length-1&&t[e].frame!==t[e+1].frame},e.prototype.evaluateOutTangent=function(e){var t=this.keys,n=t[e].frame,r=t[e+1].frame;return(t[e+1].value-t[e].value)/(r-n)},e.prototype.hasDefinedInTangent=function(e){if(0===e)return!1;var t=this.keys;return t[e-1].frame!==t[e].frame},e.prototype.evaluateInTangent=function(e){var t=this.keys,n=t[e-1].frame,r=t[e].frame;return(t[e].value-t[e-1].value)/(r-n)},e.prototype.storeDefaultInTangent=function(e){var t=this.keys,n=this.animation.getKeys();this.hasDefinedInTangent(e)&&(t[e].inTangent=this.evaluateInTangent(e)),this.property?(n[e].inTangent||(n[e].inTangent=this.tangentBuilder(),this.setDefaultInTangent(e)),n[e].inTangent[this.property]=t[e].inTangent):n[e].inTangent=t[e].inTangent},e.prototype.storeDefaultOutTangent=function(e){var t=this.keys,n=this.animation.getKeys();this.hasDefinedOutTangent(e)&&(t[e].outTangent=this.evaluateOutTangent(e)),this.property?(n[e].outTangent||(n[e].outTangent=this.tangentBuilder(),this.setDefaultOutTangent(e)),n[e].outTangent[this.property]=t[e].outTangent):n[e].outTangent=t[e].outTangent},e.prototype.updateInTangentFromControlPoint=function(e,t){var n=this.keys;n[e].inTangent=t;var r=this.animation.getKeys();this.property?(r[e].inTangent||(r[e].inTangent=this.tangentBuilder(),this.setDefaultInTangent(e)),r[e-1].outTangent||(r[e-1].outTangent=this.tangentBuilder(),this.setDefaultOutTangent(e-1)),r[e].inTangent[this.property]=n[e].inTangent):(r[e].inTangent=n[e].inTangent,void 0===r[e-1].outTangent&&this.storeDefaultOutTangent(e-1)),this.onDataUpdatedObservable.notifyObservers()},e.prototype.updateOutTangentFromControlPoint=function(e,t){var n=this.keys;n[e].outTangent=t;var r=this.animation.getKeys();this.property?(r[e+1].inTangent||(r[e+1].inTangent=this.tangentBuilder(),this.setDefaultInTangent(e+1)),r[e].outTangent||(r[e].outTangent=this.tangentBuilder(),this.setDefaultOutTangent(e)),r[e].outTangent[this.property]=n[e].outTangent):(r[e].outTangent=n[e].outTangent,void 0===r[e+1].inTangent&&this.storeDefaultInTangent(e+1)),this.onDataUpdatedObservable.notifyObservers()},e.prototype.updateKeyFrame=function(e,t){this.animation.getKeys()[e].frame=t,this.keys[e].frame=t,this.onDataUpdatedObservable.notifyObservers()},e.prototype.updateKeyValue=function(e,t){this.keys[e].value=t;var n=this.animation.getKeys()[e];this.property?n.value[this.property]=t:n.value=t,this.onDataUpdatedObservable.notifyObservers()},e.SampleRate=50,e.TangentLength=50,e}(),Vt=n(64),Ut=n(14),Gt=n(65);!function(e){e[e.None=0]="None",e[e.Selected=1]="Selected",e[e.Siblings=2]="Siblings"}(Pt||(Pt={})),function(e){e[e.None=0]="None",e[e.Key=1]="Key",e[e.TangentLeft=2]="TangentLeft",e[e.TangentRight=3]="TangentRight"}(Tt||(Tt={}));var Bt=function(e){function t(t){var n=e.call(this,t)||this;return n._controlMode=Tt.None,n._lockX=!1,n._lockY=!1,n._accumulatedX=0,n._accumulatedY=0,n.state={selectedState:Pt.None,x:n.props.x,y:n.props.y,tangentSelectedIndex:-1},n._svgHost=l.createRef(),n._keyPointSVG=l.createRef(),n._onSelectAllKeysObserver=n.props.context.onSelectAllKeys.add((function(){var e,t;-1!==(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.indexOf(n))||null===(t=n.props.context.activeKeyPoints)||void 0===t||t.push(n)})),n._onUnifyTangentRequiredObserver=n.props.context.onUnifyTangentRequired.add((function(){var e;-1!==(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.indexOf(n))&&n._unifyTangent()})),n._onBreakTangentRequiredObserver=n.props.context.onBreakTangentRequired.add((function(){var e;-1!==(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.indexOf(n))&&n._breakTangent()})),n._onFlattenTangentRequiredObserver=n.props.context.onFlattenTangentRequired.add((function(){var e;-1!==(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.indexOf(n))&&n._flattenTangent()})),n._onLinearTangentRequiredObserver=n.props.context.onLinearTangentRequired.add((function(){var e;-1!==(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.indexOf(n))&&n._linearTangent()})),n._onStepTangentRequiredObserver=n.props.context.onStepTangentRequired.add((function(){var e;-1!==(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.indexOf(n))&&n._stepTangent()})),n._onSelectionRectangleMovedObserver=n.props.context.onSelectionRectangleMoved.add((function(e){if(n._svgHost.current){var t=n._svgHost.current.getBoundingClientRect(),r=!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom);n.props.context.activeKeyPoints||(n.props.context.activeKeyPoints=[]);var a=n.props.context.activeKeyPoints.indexOf(n);r?-1===a&&(n.props.context.activeKeyPoints.push(n),n.props.context.onActiveKeyPointChanged.notifyObservers()):a>-1&&(n.props.context.activeKeyPoints.splice(a,1),n.props.context.onActiveKeyPointChanged.notifyObservers())}})),n._onMainKeyPointSetObserver=n.props.context.onMainKeyPointSet.add((function(){var e,t;n.props.context.mainKeyPoint&&n.props.context.mainKeyPoint!==n&&(n._offsetXToMain=n.state.x-(null===(e=n.props.context.mainKeyPoint)||void 0===e?void 0:e.state.x),n._offsetYToMain=n.state.y-(null===(t=n.props.context.mainKeyPoint)||void 0===t?void 0:t.state.y))})),n._onMainKeyPointMovedObserver=n.props.context.onMainKeyPointMoved.add((function(){var e=n.props.context.mainKeyPoint;if(e!==n&&e){if(n.state.selectedState!==Pt.None&&0!==n.props.keyId){var t=e.state.x+n._offsetXToMain;n.setState({x:t}),n.props.onFrameValueChanged(n.props.invertX(t))}if(n.state.selectedState===Pt.Selected){var r=e.state.y+n._offsetYToMain;n.setState({y:r}),n.props.onKeyValueChanged(n.props.invertY(r))}}})),n._onActiveKeyPointChangedObserver=n.props.context.onActiveKeyPointChanged.add((function(){var e,t=-1!==(null===(e=n.props.context.activeKeyPoints)||void 0===e?void 0:e.indexOf(n));if(!t&&n.props.context.activeKeyPoints){for(var r=n.props.curve,a=Pt.None,o=0,i=n.props.context.activeKeyPoints;o<i.length;o++){var s=i[o];if(s.props.keyId===n.props.keyId&&r!==s.props.curve&&r.animation===s.props.curve.animation){a=Pt.Siblings;break}}n.setState({selectedState:a,tangentSelectedIndex:-1})}else n.setState({selectedState:Pt.Selected,tangentSelectedIndex:-1});t&&(n.props.context.onFrameSet.notifyObservers(n.props.invertX(n.state.x)),n.props.context.onValueSet.notifyObservers(n.props.invertY(n.state.y)))})),n._onActiveKeyFrameChangedObserver=n.props.context.onActiveKeyFrameChanged.add((function(e){n.state.selectedState!==Pt.Siblings||n.props.context.mainKeyPoint||(n.setState({x:e}),n.props.onFrameValueChanged(n.props.invertX(e)))})),n._onFrameManuallyEnteredObserver=n.props.context.onFrameManuallyEntered.add((function(e){if(n.state.selectedState!==Pt.None){var t=n.props.convertX(e),r=n.props.getPreviousX(),a=n.props.getNextX();null!==r&&(t=Math.max(r,t)),null!==a&&(t=Math.min(a,t));var o=n.props.invertX(t);n.setState({x:t}),n.props.onFrameValueChanged(o)}})),n._onValueManuallyEnteredObserver=n.props.context.onValueManuallyEntered.add((function(e){if(n.state.selectedState===Pt.Selected){var t=n.props.convertY(e);n.setState({y:t}),n.props.onKeyValueChanged(e)}})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onSelectAllKeysObserver&&this.props.context.onSelectAllKeys.remove(this._onSelectAllKeysObserver),this._onUnifyTangentRequiredObserver&&this.props.context.onUnifyTangentRequired.remove(this._onUnifyTangentRequiredObserver),this._onBreakTangentRequiredObserver&&this.props.context.onBreakTangentRequired.remove(this._onBreakTangentRequiredObserver),this._onFlattenTangentRequiredObserver&&this.props.context.onFlattenTangentRequired.remove(this._onFlattenTangentRequiredObserver),this._onLinearTangentRequiredObserver&&this.props.context.onLinearTangentRequired.remove(this._onLinearTangentRequiredObserver),this._onStepTangentRequiredObserver&&this.props.context.onStepTangentRequired.remove(this._onStepTangentRequiredObserver),this._onSelectionRectangleMovedObserver&&this.props.context.onSelectionRectangleMoved.remove(this._onSelectionRectangleMovedObserver),this._onMainKeyPointSetObserver&&this.props.context.onMainKeyPointSet.remove(this._onMainKeyPointSetObserver),this._onMainKeyPointMovedObserver&&this.props.context.onMainKeyPointMoved.remove(this._onMainKeyPointMovedObserver),this._onActiveKeyPointChangedObserver&&this.props.context.onActiveKeyPointChanged.remove(this._onActiveKeyPointChangedObserver),this._onActiveKeyFrameChangedObserver&&this.props.context.onActiveKeyFrameChanged.remove(this._onActiveKeyFrameChangedObserver),this._onFrameManuallyEnteredObserver&&this.props.context.onFrameManuallyEntered.remove(this._onFrameManuallyEnteredObserver),this._onValueManuallyEnteredObserver&&this.props.context.onValueManuallyEntered.remove(this._onValueManuallyEnteredObserver)},t.prototype.shouldComponentUpdate=function(e,t){return e!==this.props&&(t.x=e.x,t.y=e.y),!0},t.prototype._breakTangent=function(){this.props.context.onInterpolationModeSet.notifyObservers({keyId:this.props.keyId,value:u.AnimationKeyInterpolation.NONE}),this.props.curve.updateLockedTangentMode(this.props.keyId,!1),this.forceUpdate()},t.prototype._unifyTangent=function(){this.props.context.onInterpolationModeSet.notifyObservers({keyId:this.props.keyId,value:u.AnimationKeyInterpolation.NONE}),this.props.curve.updateLockedTangentMode(this.props.keyId,!0),this.forceUpdate()},t.prototype._flattenTangent=function(){this.props.context.onInterpolationModeSet.notifyObservers({keyId:this.props.keyId,value:u.AnimationKeyInterpolation.NONE}),-1!==this.state.tangentSelectedIndex&&0!==this.state.tangentSelectedIndex||0!==this.props.keyId&&this.props.curve.updateInTangentFromControlPoint(this.props.keyId,0),-1!==this.state.tangentSelectedIndex&&1!==this.state.tangentSelectedIndex||this.props.keyId!==this.props.curve.keys.length-1&&this.props.curve.updateOutTangentFromControlPoint(this.props.keyId,0),this.forceUpdate()},t.prototype._linearTangent=function(){this.props.context.onInterpolationModeSet.notifyObservers({keyId:this.props.keyId,value:u.AnimationKeyInterpolation.NONE}),-1!==this.state.tangentSelectedIndex&&0!==this.state.tangentSelectedIndex||0!==this.props.keyId&&this.props.curve.storeDefaultInTangent(this.props.keyId),-1!==this.state.tangentSelectedIndex&&1!==this.state.tangentSelectedIndex||this.props.keyId!==this.props.curve.keys.length-1&&this.props.curve.storeDefaultOutTangent(this.props.keyId),this.props.curve.onDataUpdatedObservable.notifyObservers(),this.forceUpdate()},t.prototype._stepTangent=function(){this.props.context.onInterpolationModeSet.notifyObservers({keyId:this.props.keyId,value:u.AnimationKeyInterpolation.STEP}),this.forceUpdate()},t.prototype._select=function(e){if(this.props.context.activeKeyPoints){var t=this.props.context.activeKeyPoints.indexOf(this);-1===t?(e||(this.props.context.activeKeyPoints=[]),this.props.context.activeKeyPoints.push(this),this.props.context.activeKeyPoints.length>1?(this.props.context.mainKeyPoint=this,this.props.context.onMainKeyPointSet.notifyObservers()):this.props.context.mainKeyPoint=null):e?(this.props.context.activeKeyPoints.splice(t,1),this.props.context.mainKeyPoint=null):this.props.context.activeKeyPoints.length>1?(this.props.context.mainKeyPoint=this,this.props.context.onMainKeyPointSet.notifyObservers()):this.props.context.mainKeyPoint=null}},t.prototype._onPointerDown=function(e){this.props.context.activeKeyPoints||(this.props.context.activeKeyPoints=[]),this._select(e.nativeEvent.ctrlKey),this.props.context.onActiveKeyPointChanged.notifyObservers(),this._pointerIsDown=!0,e.currentTarget.setPointerCapture(e.pointerId),this._sourcePointerX=e.nativeEvent.offsetX,this._sourcePointerY=e.nativeEvent.offsetY;var t=e.nativeEvent.target;"image"===t.tagName?(this._controlMode=Tt.Key,this.setState({tangentSelectedIndex:-1})):t.classList.contains("left-tangent")?(this._controlMode=Tt.TangentLeft,this.setState({tangentSelectedIndex:0})):t.classList.contains("right-tangent")&&(this._controlMode=Tt.TangentRight,this.setState({tangentSelectedIndex:1})),this._lockX=!1,this._lockY=!1,this._accumulatedX=0,this._accumulatedY=0,e.stopPropagation()},t.prototype._extractSlope=function(e,t,n){n&&e.x>=0?e.x=-.01:!n&&e.x<=0&&(e.x=.01);var r=e.clone();r.normalize(),r.scaleInPlace(t);var a=this.props.curve.keys;return(n?a[this.props.keyId].value-this.props.invertY(r.y+this.state.y):this.props.invertY(r.y+this.state.y)-a[this.props.keyId].value)/(n?a[this.props.keyId].frame-this.props.invertX(r.x+this.state.x):this.props.invertX(r.x+this.state.x)-a[this.props.keyId].frame)},t.prototype._processTangentMove=function(e,t,n,r){return t.x+=(e.nativeEvent.offsetX-this._sourcePointerX)*this.props.scale,t.y+=(e.nativeEvent.offsetY-this._sourcePointerY)*this.props.scale,this._extractSlope(t,n,r)},t.prototype._onPointerMove=function(e){var t=this;if(this._pointerIsDown&&this.state.selectedState===Pt.Selected){if(this._controlMode===Tt.Key){var n=e.nativeEvent.offsetX-this._sourcePointerX,r=e.nativeEvent.offsetY-this._sourcePointerY;e.shiftKey?this._lockX||this._lockY||(this._accumulatedX+=Math.abs(n),this._accumulatedY+=Math.abs(r),(this._accumulatedX>5||this._accumulatedY>5)&&(this._accumulatedX>this._accumulatedY?this._lockY=!0:this._lockX=!0)):(this._lockX=!1,this._lockY=!1);var a=this.state.x+(this._lockX?0:n*this.props.scale),o=this.state.y+(this._lockY?0:r*this.props.scale),i=this.props.getPreviousX(),s=this.props.getNextX();if(null!==i&&(a=Math.max(i+.01,a)),null!==s&&(a=Math.min(s-.01,a)),0!==this.props.keyId){var l=this.props.invertX(a);this.props.onFrameValueChanged(l),this.props.context.onFrameSet.notifyObservers(l),a!==this.state.x&&this.props.context.onActiveKeyFrameChanged.notifyObservers(a)}else a=this.state.x;var p=this.props.invertY(o);this.props.onKeyValueChanged(p),this.props.context.onValueSet.notifyObservers(p),this.setState({x:a,y:o}),this.props.context.activeKeyPoints.length>1&&setTimeout((function(){t.props.context.mainKeyPoint&&t.props.context.onMainKeyPointMoved.notifyObservers()}))}else{var c=this.props.curve.keys,d=c[this.props.keyId].lockedTangent&&0!==this.props.keyId&&this.props.keyId!==c.length-1&&void 0!==c[this.props.keyId].inTangent&&void 0!==c[this.props.keyId].outTangent,h=0,m=u.TmpVectors.Vector2[0];if(d){var b=u.TmpVectors.Vector2[1],g=u.TmpVectors.Vector2[2];u.Vector2.NormalizeToRef(this._inVec,b),u.Vector2.NormalizeToRef(this._outVec,g),h=Math.acos(Math.min(1,Math.max(-1,u.Vector2.Dot(b,g)))),this._inVec.rotateToRef(-h,m),u.Vector2.Distance(m,this._outVec)>.01&&(h=-h)}this._controlMode===Tt.TangentLeft?(this.props.curve.updateInTangentFromControlPoint(this.props.keyId,this._processTangentMove(e,this._inVec,this._storedLengthIn,!0)),d&&(this._inVec.rotateToRef(-h,m),m.x=Math.abs(m.x),this.props.curve.updateOutTangentFromControlPoint(this.props.keyId,this._extractSlope(m,this._storedLengthOut,!1)))):this._controlMode===Tt.TangentRight&&(this.props.curve.updateOutTangentFromControlPoint(this.props.keyId,this._processTangentMove(e,this._outVec,this._storedLengthOut,!1)),d&&(this._outVec.rotateToRef(h,m),m.x=-Math.abs(m.x),this.props.curve.updateInTangentFromControlPoint(this.props.keyId,this._extractSlope(m,this._storedLengthIn,!0)))),this.props.context.refreshTarget(),this.forceUpdate()}this._sourcePointerX=e.nativeEvent.offsetX,this._sourcePointerY=e.nativeEvent.offsetY,e.stopPropagation()}},t.prototype._onPointerUp=function(e){this._pointerIsDown=!1,e.currentTarget.releasePointerCapture(e.pointerId),e.stopPropagation(),this._controlMode=Tt.None},t.prototype.render=function(){var e,t,n,r,a,o=this;if(!this.props.context.isChannelEnabled(this.props.curve.animation,this.props.curve.color))return null;var i=this.props.curve.animation.dataType,s=i===u.Animation.ANIMATIONTYPE_COLOR3||i===u.Animation.ANIMATIONTYPE_COLOR4,p=this.state.selectedState===Pt.Selected?Ut:this.state.selectedState===Pt.Siblings?Gt:Vt,c=this.props.curve.keys,d=null===(e=c[this.props.keyId].lockedTangent)||void 0===e||e,h=null!==(n=null===(t=c[this.props.keyId-1])||void 0===t?void 0:t.interpolation)&&void 0!==n&&n,m=null!==(a=null===(r=c[this.props.keyId])||void 0===r?void 0:r.interpolation)&&void 0!==a&&a,b=this.props.curve.hasDefinedInTangent(this.props.keyId),g=this.props.curve.hasDefinedOutTangent(this.props.keyId),f=this.props.invertX(this.state.x),v=this.props.invertY(this.state.y);if(b){var y=v-this.props.curve.getInControlPoint(this.props.keyId);this._inVec=new u.Vector2(this.props.convertX(f-1)-this.state.x,this.props.convertY(y)-this.state.y)}else this._inVec=new u.Vector2;if(g){var C=v+this.props.curve.getOutControlPoint(this.props.keyId);this._outVec=new u.Vector2(this.props.convertX(f+1)-this.state.x,this.props.convertY(C)-this.state.y)}else this._outVec=new u.Vector2;return this._storedLengthIn=this._inVec.length(),this._storedLengthOut=this._outVec.length(),this._inVec.normalize(),this._inVec.scaleInPlace(100*this.props.scale),this._outVec.normalize(),this._outVec.scaleInPlace(100*this.props.scale),l.createElement("svg",{ref:this._svgHost,onPointerDown:function(e){return o._onPointerDown(e)},onPointerMove:function(e){return o._onPointerMove(e)},onPointerUp:function(e){return o._onPointerUp(e)},x:this.state.x,y:this.state.y,style:{cursor:"pointer",overflow:"auto"}},l.createElement("image",{x:"-"+8*this.props.scale,y:"-"+8*this.props.scale,width:""+16*this.props.scale,height:""+16*this.props.scale,ref:this._keyPointSVG,href:p}),this.state.selectedState===Pt.Selected&&l.createElement("g",null,0!==this.props.keyId&&!h&&!s&&b&&l.createElement(l.Fragment,null,l.createElement("line",{x1:0,y1:0,x2:this._inVec.x+"px",y2:this._inVec.y+"px",style:{stroke:0===this.state.tangentSelectedIndex||-1===this.state.tangentSelectedIndex?"#F9BF00":"#AAAAAA",strokeWidth:""+1*this.props.scale,strokeDasharray:d?"":"2, 2"}}),l.createElement("circle",{className:"left-tangent",cx:this._inVec.x+"px",cy:this._inVec.y+"px",r:""+4*this.props.scale,style:{fill:0===this.state.tangentSelectedIndex||-1===this.state.tangentSelectedIndex?"#F9BF00":"#AAAAAA"}})),this.props.keyId!==c.length-1&&!m&&!s&&g&&l.createElement(l.Fragment,null,l.createElement("line",{x1:0,y1:0,x2:this._outVec.x+"px",y2:this._outVec.y+"px",style:{stroke:1===this.state.tangentSelectedIndex||-1===this.state.tangentSelectedIndex?"#F9BF00":"#AAAAAA",strokeWidth:""+1*this.props.scale,strokeDasharray:d?"":"2, 2"}}),l.createElement("circle",{className:"right-tangent",cx:this._outVec.x+"px",cy:this._outVec.y+"px",r:""+4*this.props.scale,style:{fill:1===this.state.tangentSelectedIndex||-1===this.state.tangentSelectedIndex?"#F9BF00":"#AAAAAA"}}))))},t}(l.Component),Ht=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isSelected:!1},n._onDataUpdatedObserver=n.props.curve.onDataUpdatedObservable.add((function(){return n.forceUpdate()})),n._onActiveAnimationChangedObserver=t.context.onActiveAnimationChanged.add((function(){n._onDataUpdatedObserver&&n.props.curve.onDataUpdatedObservable.remove(n._onDataUpdatedObserver),n._onDataUpdatedObserver=null,n.forceUpdate()})),n._onInterpolationModeSetObserver=t.context.onInterpolationModeSet.add((function(e){var t=e.keyId,r=e.value;n.props.curve.updateInterpolationMode(t,r)})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onDataUpdatedObserver&&this.props.curve.onDataUpdatedObservable.remove(this._onDataUpdatedObserver),this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver),this._onInterpolationModeSetObserver&&this.props.context.onInterpolationModeSet.remove(this._onInterpolationModeSetObserver)},t.prototype.componentDidUpdate=function(){var e=this;return this._onDataUpdatedObserver||(this._onDataUpdatedObserver=this.props.curve.onDataUpdatedObservable.add((function(){return e.forceUpdate()}))),!0},t.prototype.render=function(){return this.props.context.isChannelEnabled(this.props.curve.animation,this.props.curve.color)?l.createElement("svg",{style:{cursor:"pointer",overflow:"auto"}},l.createElement("path",{d:this.props.curve.getPathData(this.props.convertX,this.props.convertY),style:{stroke:this.props.curve.color,fill:"none",strokeWidth:"1"}})):null},t}(l.Component),Wt=function(e){function t(t){var n=e.call(this,t)||this;return n._MinScale=.5,n._MaxScale=4,n._GraphAbsoluteWidth=788,n._GraphAbsoluteHeight=357,n._viewWidth=788,n._viewCurveWidth=788,n._viewHeight=357,n._viewScale=1,n._offsetX=0,n._offsetY=0,n._graphOffsetX=30,n.state={},n._svgHost=l.createRef(),n._svgHost2=l.createRef(),n._selectionRectangle=l.createRef(),n._evaluateKeys(),n.props.context.onHostWindowResized.add((function(){n._computeSizes()})),n._onActiveAnimationChangedObserver=n.props.context.onActiveAnimationChanged.add((function(){n._evaluateKeys(),n._computeSizes(),n.forceUpdate()})),n.props.context.onFrameRequired.add((function(){n._frame(),n.forceUpdate()})),n.props.context.onRangeUpdated.add((function(){n.forceUpdate()})),n.props.context.onDeleteKeyActiveKeyPoints.add((function(){if(0!==n.props.context.activeAnimations.length&&n.props.context.activeKeyPoints){for(var e=0,t=n.props.context.activeAnimations;e<t.length;e++){for(var r=t[e],a=r.getKeys(),o=a.slice(0),i=null,s=0,l=n.props.context.activeKeyPoints;s<l.length;s++){var p=l[s];if(0!==p.props.keyId&&p.props.keyId!==a.length-1){var c=a[p.props.keyId],u=o.indexOf(c);u>-1&&(o.splice(u,1),null===i&&(i=c.frame))}}n.props.context.stop(),r.setKeys(o),null!==i&&n.props.context.moveToFrame(i),n.props.context.activeKeyPoints=[]}n.props.context.onActiveAnimationChanged.notifyObservers()}})),n.props.context.onCreateOrUpdateKeyPointRequired.add((function(){if(0!==n.props.context.activeAnimations.length){for(var e=0,t=n.props.context.activeAnimations;e<t.length;e++){for(var r=t[e],a=r.getKeys(),o=n.props.context.activeFrame,i=-1,s=0,l=a;s<l.length;s++){if(!(l[s].frame<o))break;i++}var p=void 0;if(n.props.context.target){p=n.props.context.target;for(var c=0,d=r.targetPropertyPath;c<d.length;c++){p=p[d[c]]}p.clone&&(p=p.clone())}else p=r.evaluate(o);var h=a[i],m=a[i+1];if(0===Math.floor(o-(null==h?void 0:h.frame)))h.value=p;else if(0===Math.floor(m.frame-o))m.value=p;else{var b={frame:o,value:p};if(void 0!==h.outTangent&&void 0!==m.inTangent){var g=null,f=1/(m.frame-h.frame),v=(o-h.frame)*f;switch(r.dataType){case u.Animation.ANIMATIONTYPE_FLOAT:g=u.Scalar.Hermite1stDerivative(h.value*f,h.outTangent,m.value*f,m.inTangent,v);break;case u.Animation.ANIMATIONTYPE_VECTOR2:g=u.Vector2.Hermite1stDerivative(h.value.scale(f),h.outTangent,m.value.scale(f),m.inTangent,v);break;case u.Animation.ANIMATIONTYPE_VECTOR3:g=u.Vector3.Hermite1stDerivative(h.value.scale(f),h.outTangent,m.value.scale(f),m.inTangent,v);break;case u.Animation.ANIMATIONTYPE_QUATERNION:g=u.Quaternion.Hermite1stDerivative(h.value.scale(f),h.outTangent,m.value.scale(f),m.inTangent,v);break;case u.Animation.ANIMATIONTYPE_COLOR3:g=u.Color3.Hermite1stDerivative(h.value.scale(f),h.outTangent,m.value.scale(f),m.inTangent,v);break;case u.Animation.ANIMATIONTYPE_COLOR4:g=u.Color4.Hermite1stDerivative(h.value.scale(f),h.outTangent,m.value.scale(f),m.inTangent,v)}null!==g&&(b.inTangent=g,b.outTangent=g.clone?g.clone():g)}a.splice(i+1,0,b)}r.setKeys(a)}n._evaluateKeys(!1,!1),n.props.context.activeKeyPoints=[],n.props.context.onActiveKeyPointChanged.notifyObservers(),n.props.context.onActiveAnimationChanged.notifyObservers(),n.forceUpdate()}})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver)},t.prototype._computeSizes=function(){this._svgHost.current&&this._svgHost2.current&&(this._viewWidth=this._svgHost.current.clientWidth,this._viewCurveWidth=this._svgHost2.current.clientWidth,this._viewHeight=this._svgHost.current.clientHeight,this.forceUpdate())},t.prototype._setDefaultInTangent=function(e){for(var t=0,n=this._curves;t<n.length;t++){n[t].storeDefaultInTangent(e)}},t.prototype._setDefaultOutTangent=function(e){for(var t=0,n=this._curves;t<n.length;t++){n[t].storeDefaultOutTangent(e)}},t.prototype._evaluateKeys=function(e,t){var n,r=this;if(void 0===e&&(e=!0),void 0===t&&(t=!0),0!==this.props.context.activeAnimations.length){this._curves=[],this._minValue=Number.MAX_VALUE,this._maxValue=-Number.MAX_VALUE,this._minFrame=Number.MAX_VALUE,this._maxFrame=-Number.MAX_VALUE;for(var a=0,o=this.props.context.activeAnimations;a<o.length;a++){var i=o[a],s=i.getKeys(),l=[];switch(i.dataType){case u.Animation.ANIMATIONTYPE_FLOAT:l.push(new Ft("#DB3E3E",i));break;case u.Animation.ANIMATIONTYPE_VECTOR2:l.push(new Ft("#DB3E3E",i,"x",(function(){return u.Vector2.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#51E22D",i,"y",(function(){return u.Vector2.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)})));break;case u.Animation.ANIMATIONTYPE_VECTOR3:l.push(new Ft("#DB3E3E",i,"x",(function(){return u.Vector3.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#51E22D",i,"y",(function(){return u.Vector3.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#00A3FF",i,"z",(function(){return u.Vector3.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)})));break;case u.Animation.ANIMATIONTYPE_COLOR3:l.push(new Ft("#DB3E3E",i,"r",(function(){return u.Color3.Black()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#51E22D",i,"g",(function(){return u.Color3.Black()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#00A3FF",i,"b",(function(){return u.Color3.Black()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)})));break;case u.Animation.ANIMATIONTYPE_QUATERNION:l.push(new Ft("#DB3E3E",i,"x",(function(){return u.Quaternion.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#51E22D",i,"y",(function(){return u.Quaternion.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#00A3FF",i,"z",(function(){return u.Quaternion.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#8700FF",i,"w",(function(){return u.Quaternion.Zero()}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)})));break;case u.Animation.ANIMATIONTYPE_COLOR4:l.push(new Ft("#DB3E3E",i,"r",(function(){return new u.Color4}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#51E22D",i,"g",(function(){return new u.Color4}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#00A3FF",i,"b",(function(){return new u.Color4}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)}))),l.push(new Ft("#8700FF",i,"a",(function(){return new u.Color4}),(function(e){return r._setDefaultInTangent(e)}),(function(e){return r._setDefaultOutTangent(e)})))}var p=this._extractValuesFromKeys(s,i.dataType,l);(n=this._curves).push.apply(n,l),t&&(this._minValue=Math.min(this._minValue,p.min),this._maxValue=Math.max(this._maxValue,p.max),this._minFrame=Math.min(this._minFrame,s[0].frame),this._maxFrame=Math.max(this._maxFrame,s[s.length-1].frame))}e&&this._frame()}else this._curves=[]},t.prototype._extractValuesFromKeys=function(e,t,n,r){for(var a,o,i,s,l,p,c,d,h,m,b,g,f,v,y,C,E,x,O,S,_,w,P,T,k,N,M,A,L,R,I,D,j=Number.MAX_VALUE,z=-Number.MAX_VALUE,F=0,V=e;F<V.length;F++){var U=V[F],G=!0;switch(void 0!==U.lockedTangent&&(G=U.lockedTangent),t){case u.Animation.ANIMATIONTYPE_FLOAT:j=Math.min(j,U.value),z=Math.max(z,U.value),n&&n[0].keys.push({frame:U.frame,value:U.value,inTangent:U.inTangent,outTangent:U.outTangent,lockedTangent:G,interpolation:U.interpolation});break;case u.Animation.ANIMATIONTYPE_VECTOR2:r&&"x"!==r||(j=Math.min(j,U.value.x),z=Math.max(z,U.value.x)),r&&"y"!==r||(j=Math.min(j,U.value.y),z=Math.max(z,U.value.y)),n&&(n[0].keys.push({frame:U.frame,value:U.value.x,inTangent:null===(a=U.inTangent)||void 0===a?void 0:a.x,outTangent:null===(o=U.outTangent)||void 0===o?void 0:o.x,lockedTangent:G,interpolation:U.interpolation}),n[1].keys.push({frame:U.frame,value:U.value.y,inTangent:null===(i=U.inTangent)||void 0===i?void 0:i.y,outTangent:null===(s=U.outTangent)||void 0===s?void 0:s.y,lockedTangent:G,interpolation:U.interpolation}));break;case u.Animation.ANIMATIONTYPE_VECTOR3:r&&"x"!==r||(j=Math.min(j,U.value.x),z=Math.max(z,U.value.x)),r&&"y"!==r||(j=Math.min(j,U.value.y),z=Math.max(z,U.value.y)),r&&"z"!==r||(j=Math.min(j,U.value.z),z=Math.max(z,U.value.z)),n&&(n[0].keys.push({frame:U.frame,value:U.value.x,inTangent:null===(l=U.inTangent)||void 0===l?void 0:l.x,outTangent:null===(p=U.outTangent)||void 0===p?void 0:p.x,lockedTangent:G,interpolation:U.interpolation}),n[1].keys.push({frame:U.frame,value:U.value.y,inTangent:null===(c=U.inTangent)||void 0===c?void 0:c.y,outTangent:null===(d=U.outTangent)||void 0===d?void 0:d.y,lockedTangent:G,interpolation:U.interpolation}),n[2].keys.push({frame:U.frame,value:U.value.z,inTangent:null===(h=U.inTangent)||void 0===h?void 0:h.z,outTangent:null===(m=U.outTangent)||void 0===m?void 0:m.z,lockedTangent:G,interpolation:U.interpolation}));break;case u.Animation.ANIMATIONTYPE_COLOR3:r&&"r"!==r||(j=Math.min(j,U.value.r),z=Math.max(z,U.value.r)),r&&"g"!==r||(j=Math.min(j,U.value.g),z=Math.max(z,U.value.g)),r&&"b"!==r||(j=Math.min(j,U.value.b),z=Math.max(z,U.value.b)),n&&(n[0].keys.push({frame:U.frame,value:U.value.r,inTangent:null===(b=U.inTangent)||void 0===b?void 0:b.r,outTangent:null===(g=U.outTangent)||void 0===g?void 0:g.r,lockedTangent:G,interpolation:U.interpolation}),n[1].keys.push({frame:U.frame,value:U.value.g,inTangent:null===(f=U.inTangent)||void 0===f?void 0:f.g,outTangent:null===(v=U.outTangent)||void 0===v?void 0:v.g,lockedTangent:G,interpolation:U.interpolation}),n[2].keys.push({frame:U.frame,value:U.value.b,inTangent:null===(y=U.inTangent)||void 0===y?void 0:y.b,outTangent:null===(C=U.outTangent)||void 0===C?void 0:C.b,lockedTangent:G,interpolation:U.interpolation}));break;case u.Animation.ANIMATIONTYPE_QUATERNION:r&&"x"!==r||(j=Math.min(j,U.value.x),z=Math.max(z,U.value.x)),r&&"y"!==r||(j=Math.min(j,U.value.y),z=Math.max(z,U.value.y)),r&&"z"!==r||(j=Math.min(j,U.value.z),z=Math.max(z,U.value.z)),r&&"w"!==r||(j=Math.min(j,U.value.w),z=Math.max(z,U.value.w)),n&&(n[0].keys.push({frame:U.frame,value:U.value.x,inTangent:null===(E=U.inTangent)||void 0===E?void 0:E.x,outTangent:null===(x=U.outTangent)||void 0===x?void 0:x.x,lockedTangent:G,interpolation:U.interpolation}),n[1].keys.push({frame:U.frame,value:U.value.y,inTangent:null===(O=U.inTangent)||void 0===O?void 0:O.y,outTangent:null===(S=U.outTangent)||void 0===S?void 0:S.y,lockedTangent:G,interpolation:U.interpolation}),n[2].keys.push({frame:U.frame,value:U.value.z,inTangent:null===(_=U.inTangent)||void 0===_?void 0:_.z,outTangent:null===(w=U.outTangent)||void 0===w?void 0:w.z,lockedTangent:G,interpolation:U.interpolation}),n[3].keys.push({frame:U.frame,value:U.value.w,inTangent:null===(P=U.inTangent)||void 0===P?void 0:P.w,outTangent:null===(T=U.outTangent)||void 0===T?void 0:T.w,lockedTangent:G,interpolation:U.interpolation}));break;case u.Animation.ANIMATIONTYPE_COLOR4:r&&"r"!==r||(j=Math.min(j,U.value.r),z=Math.max(z,U.value.r)),r&&"g"!==r||(j=Math.min(j,U.value.g),z=Math.max(z,U.value.g)),r&&"b"!==r||(j=Math.min(j,U.value.b),z=Math.max(z,U.value.b)),r&&"a"!==r||(j=Math.min(j,U.value.a),z=Math.max(z,U.value.a)),n&&(n[0].keys.push({frame:U.frame,value:U.value.r,inTangent:null===(k=U.inTangent)||void 0===k?void 0:k.r,outTangent:null===(N=U.outTangent)||void 0===N?void 0:N.r,lockedTangent:G,interpolation:U.interpolation}),n[1].keys.push({frame:U.frame,value:U.value.g,inTangent:null===(M=U.inTangent)||void 0===M?void 0:M.g,outTangent:null===(A=U.outTangent)||void 0===A?void 0:A.g,lockedTangent:G,interpolation:U.interpolation}),n[2].keys.push({frame:U.frame,value:U.value.b,inTangent:null===(L=U.inTangent)||void 0===L?void 0:L.b,outTangent:null===(R=U.outTangent)||void 0===R?void 0:R.b,lockedTangent:G,interpolation:U.interpolation}),n[3].keys.push({frame:U.frame,value:U.value.a,inTangent:null===(I=U.inTangent)||void 0===I?void 0:I.a,outTangent:null===(D=U.outTangent)||void 0===D?void 0:D.a,lockedTangent:G,interpolation:U.interpolation}))}}return{min:j,max:z}},t.prototype._convertX=function(e){var t=this._maxFrame-this._minFrame;return 0===t&&(t=1),(e-this._minFrame)/t*this._GraphAbsoluteWidth},t.prototype._invertX=function(e){return e/this._GraphAbsoluteWidth*(this._maxFrame-this._minFrame)+this._minFrame},t.prototype._convertY=function(e){var t=this._maxValue-this._minValue;return 0===t&&(t=1),this._GraphAbsoluteHeight-(e-this._minValue)/t*this._GraphAbsoluteHeight},t.prototype._invertY=function(e){var t=this._maxValue-this._minValue;return 0===t&&(t=1),(this._GraphAbsoluteHeight-e)/this._GraphAbsoluteHeight*t+this._minValue},t.prototype._buildFrameIntervalAxis=function(){var e=this;if(0===this.props.context.activeAnimations.length)return null;var t=this.props.context.referenceMaxFrame,n=this.props.context.activeAnimations[0].framePerSecond,r=t/this._GraphAbsoluteWidth,a=[];0===n&&(n=1);for(var o=-(this._offsetX*r/n|0)*n,i=o+(this._viewWidth-40)*this._viewScale*r,s=o-n;s<=i+n;s+=n)a.push(s);return a.map((function(t,n){var a=t/r;return l.createElement("g",{key:"axis"+t},l.createElement("line",{key:"line"+t,x1:a,y1:0,x2:a,y2:e._viewHeight*e._viewScale,style:{stroke:"#666666",strokeWidth:1}}))}))},t.prototype._buildYAxis=function(){var e=this;if(0===this.props.context.activeAnimations.length)return null;for(var t=this._maxValue!==this._minValue?this._maxValue-this._minValue:1,n=t/10*this._viewScale,r=t/this._GraphAbsoluteHeight,a=[],o=n,i=2;(0).toFixed(i)===o.toFixed(i);)i++;var s=Math.pow(10,i);(n=Math.round(n*s))%2!=0&&(n-=1),n/=s;for(var p=(this._viewHeight*this._viewScale-this._GraphAbsoluteHeight-this._offsetY)*r,c=Math.ceil((this._minValue-(p/n|0)*n)/n)*n,u=Math.round((c+this._viewHeight*this._viewScale*r)/n)*n,d=c-n;d<=u+n;d+=n)a.push(d);return a.map((function(t,n){var a=e._GraphAbsoluteHeight-(t-e._minValue)/r,o=t.toFixed(i),s=(o=parseFloat(o).toFixed(i))===(0).toFixed(i);return l.createElement("g",{key:"axis"+t},l.createElement("line",{key:"line"+t,x1:e._graphOffsetX*e._viewScale,y1:a,x2:e._viewWidth*e._viewScale,y2:a,style:{stroke:s?"#666666":"#333333",strokeWidth:s?1:.5}}),l.createElement("text",{key:"label"+t,x:0,y:a,dx:15*e._viewScale+"px",textAnchor:"middle",dy:3*e._viewScale+"px",style:{fontFamily:"acumin-pro-condensed",fontSize:10*e._viewScale+"px",fill:"#888888",textAlign:"center"}},o))}))},t.prototype._frame=function(){if(0!==this.props.context.activeAnimations.length){this._offsetX=20,this._offsetY=20,this._minValue=Number.MAX_VALUE,this._maxValue=-Number.MAX_VALUE,this._minFrame=Number.MAX_VALUE,this._maxFrame=-Number.MAX_VALUE;for(var e=function(e){var n=void 0,r=t.props.context.getActiveChannel(e);if(r){var a=t._curves.filter((function(e){return e.color===r}))[0];a&&(n=a.property)}var o=e.getKeys();if(t.props.context.activeKeyPoints&&t.props.context.activeKeyPoints.length>1){for(var i=[],s=0,l=t.props.context.activeKeyPoints;s<l.length;s++){var p=l[s];p.props.curve.animation===e&&i.push(o[p.props.keyId])}o=i}if(0===o.length)return"continue";var c=t._extractValuesFromKeys(o,e.dataType,void 0,n);t._minValue=Math.min(t._minValue,c.min),t._maxValue=Math.max(t._maxValue,c.max),t._minFrame=Math.min(t._minFrame,o[0].frame),t._maxFrame=Math.max(t._maxFrame,o[o.length-1].frame)},t=this,n=0,r=this.props.context.activeAnimations;n<r.length;n++){e(r[n])}this.props.context.referenceMinFrame=this._minFrame,this.props.context.referenceMaxFrame=this._maxFrame;var a=Math.abs(this._convertX(this._maxFrame)-this._convertX(this._minFrame))+2*this._offsetX,o=this._minValue!==this._maxValue?Math.abs(this._convertY(this._minValue)-this._convertY(this._maxValue))+2*this._offsetY:1,i=a/this._viewCurveWidth,s=o/this._viewHeight;this._viewScale=i*this._viewHeight<o?s:i,this.props.context.onGraphMoved.notifyObservers(this._offsetX),this.props.context.onGraphScaled.notifyObservers(this._viewScale)}},t.prototype._dropKeyFrames=function(e){var t=this;return e.keys.map((function(n,r){var a=t._convertX(n.frame),o=t._convertY(n.value);return l.createElement(Bt,{x:a,y:o,context:t.props.context,scale:t._viewScale,getPreviousX:function(){return r>0?t._convertX(e.keys[r-1].frame):null},getNextX:function(){return r<e.keys.length-1?t._convertX(e.keys[r+1].frame):null},channel:e.color,keyId:r,curve:e,key:"curve-"+r,invertX:function(e){return t._invertX(e)},invertY:function(e){return t._invertY(e)},convertX:function(e){return t._convertX(e)},convertY:function(e){return t._convertY(e)},onFrameValueChanged:function(n){e.updateKeyFrame(r,n),t.props.context.refreshTarget()},onKeyValueChanged:function(n){e.updateKeyValue(r,n),t.props.context.refreshTarget()}})}))},t.prototype._onPointerDown=function(e){if("svg-graph-curves"===e.nativeEvent.target.id){this._pointerIsDown=!0,e.currentTarget.setPointerCapture(e.pointerId),this._sourcePointerX=e.nativeEvent.offsetX,this._sourcePointerY=e.nativeEvent.offsetY;var t=2==e.nativeEvent.which||4==e.button;this._inSelectionMode=!t&&!e.altKey,this._inSelectionMode&&(this._selectionStartX=this._sourcePointerX+40,this._selectionStartY=this._sourcePointerY)}},t.prototype._onPointerMove=function(e){if(this._pointerIsDown){if(this._inSelectionMode){var t=this._selectionRectangle.current.style;t.visibility="visible";var n=e.nativeEvent.offsetX,r=e.nativeEvent.offsetY;return n>this._selectionStartX?(t.left=this._selectionStartX+"px",t.width=n-this._selectionStartX+"px"):(t.left=n+"px",t.width=this._selectionStartX-n+"px"),r>this._selectionStartY?(t.top=this._selectionStartY+"px",t.height=r-this._selectionStartY+"px"):(t.top=r+"px",t.height=this._selectionStartY-r+"px"),void this.props.context.onSelectionRectangleMoved.notifyObservers(this._selectionRectangle.current.getBoundingClientRect())}this._offsetX+=(e.nativeEvent.offsetX-this._sourcePointerX)*this._viewScale,this._offsetY+=(e.nativeEvent.offsetY-this._sourcePointerY)*this._viewScale,this._sourcePointerX=e.nativeEvent.offsetX,this._sourcePointerY=e.nativeEvent.offsetY,this.props.context.onGraphMoved.notifyObservers(this._offsetX),this.forceUpdate()}},t.prototype._onPointerUp=function(e){this._pointerIsDown=!1,e.currentTarget.releasePointerCapture(e.pointerId),this._selectionRectangle.current.style.visibility="hidden",this._inSelectionMode||this.props.context.clearSelection()},t.prototype._onWheel=function(e){var t=e.deltaY<0?-.05:.05,n=this._viewScale;this._viewScale=Math.min(Math.max(this._MinScale,this._viewScale+t*this._viewScale),this._MaxScale);var r=e.nativeEvent.offsetX,a=e.nativeEvent.offsetY,o=r*n-r*this._viewScale,i=a*n-a*this._viewScale;this._offsetX-=o,this._offsetY-=i,this.forceUpdate(),e.stopPropagation(),this.props.context.onGraphMoved.notifyObservers(this._offsetX),this.props.context.onGraphScaled.notifyObservers(this._viewScale)},t.prototype.render=function(){var e=this,t=this._viewScale,n=-this._offsetX+" "+-this._offsetY+" "+Math.round(t*this._viewCurveWidth)+" "+Math.round(t*this._viewHeight),r="0 "+-this._offsetY+" "+Math.round(t*this._viewWidth)+" "+Math.round(t*this._viewHeight),a=-this._offsetX+" 0 "+Math.round((this._viewWidth-40)*this._viewScale)+"  "+Math.round(t*this._viewHeight),o=0,i=0;if(0!==this.props.context.activeAnimations.length){var s=this.props.context.referenceMinFrame,p=this.props.context.referenceMaxFrame;o=((this.props.context.fromKey-s)/(p-s)*this._GraphAbsoluteWidth+this._offsetX)/this._viewScale,i=((this.props.context.toKey-s)/(p-s)*this._GraphAbsoluteWidth+this._offsetX)/this._viewScale}return l.createElement("div",{id:"graph",onWheel:function(t){return e._onWheel(t)},onPointerDown:function(t){return e._onPointerDown(t)},onPointerMove:function(t){return e._onPointerMove(t)},onPointerUp:function(t){return e._onPointerUp(t)}},0!==this.props.context.activeAnimations.length&&l.createElement("div",{id:"dark-rectangle",style:{left:o+"px",width:i-o+"px"}}),l.createElement("div",{id:"block-rectangle"}),l.createElement("svg",{id:"svg-graph-grid",viewBox:r,ref:this._svgHost},this._buildYAxis()),l.createElement("svg",{id:"svg-graph-horizontal",viewBox:a},this._buildFrameIntervalAxis()),l.createElement("svg",{ref:this._svgHost2,id:"svg-graph-curves",tabIndex:0,viewBox:n},this._curves.map((function(t,n){return l.createElement(Ht,{key:n,context:e.props.context,curve:t,convertX:function(t){return e._convertX(t)},convertY:function(t){return e._convertY(t)}})})),this._curves.map((function(t){return e._dropKeyFrames(t)}))),l.createElement("div",{ref:this._selectionRectangle,id:"selection-rectangle"}))},t}(l.Component),Kt=function(e){function t(t){var n=e.call(this,t)||this;return n._GraphAbsoluteWidth=788,n._viewScale=1,n._offsetX=0,n.state={},n._playHead=l.createRef(),n._playHeadCircle=l.createRef(),n._onActiveAnimationChangedObserver=n.props.context.onActiveAnimationChanged.add((function(){n.forceUpdate()})),n._onBeforeRenderObserver=n.props.context.scene.onBeforeRenderObservable.add((function(){var e;if(0!==n.props.context.activeAnimations.length){var t=n.props.context.activeAnimations[0];if(t){var r=t.runtimeAnimations[0];r?n._moveHead(r.currentFrame):(null===(e=n._playHeadCircle.current)||void 0===e?void 0:e.innerHTML)||n._moveHead(0)}}})),n.props.context.onMoveToFrameRequired.add((function(e){n.props.context.moveToFrame(e),n._moveHead(e)})),n.props.context.onGraphMoved.add((function(e){n._offsetX=e,n.forceUpdate(),n._moveHead(n.props.context.activeFrame)})),n.props.context.onGraphScaled.add((function(e){n._viewScale=1/e,n.forceUpdate(),n._moveHead(n.props.context.activeFrame)})),n}return a(t,e),t.prototype._moveHead=function(e){this._playHead.current&&this._playHeadCircle.current&&void 0!==e&&(this._playHead.current.style.left=this._frameToPixel(e)+"px",this._playHeadCircle.current.innerHTML=e.toFixed(0),this.props.context.activeFrame=e)},t.prototype._frameToPixel=function(e){var t=this.props.context.referenceMinFrame;return((e-t)/(this.props.context.referenceMaxFrame-t)*this._GraphAbsoluteWidth+this._offsetX)*this._viewScale},t.prototype._pixelToFrame=function(e){var t=this.props.context.activeAnimations[0].getKeys(),n=this.props.context.referenceMinFrame,r=this.props.context.referenceMaxFrame;return Math.max(Math.min(t[t.length-1].frame,(e/this._viewScale-this._offsetX)/this._GraphAbsoluteWidth*(r-n)+n),t[0].frame)},t.prototype.componentWillUnmount=function(){this._onBeforeRenderObserver&&(this.props.context.scene.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=null),this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver)},t.prototype._onPointerDown=function(e){this._pointerIsDown=!0,e.currentTarget.setPointerCapture(e.pointerId);var t=this._pixelToFrame(e.nativeEvent.offsetX);this.props.context.moveToFrame(t),this._moveHead(t)},t.prototype._onPointerMove=function(e){if(this._pointerIsDown){var t=this._pixelToFrame(e.nativeEvent.offsetX);this.props.context.moveToFrame(t),this._moveHead(t)}},t.prototype._onPointerUp=function(e){this._pointerIsDown=!1,e.currentTarget.releasePointerCapture(e.pointerId)},t.prototype.render=function(){var e=this;return 0===this.props.context.activeAnimations.length?null:l.createElement(l.Fragment,null,l.createElement("div",{id:"play-head",ref:this._playHead},l.createElement("div",{id:"play-head-bar"}),l.createElement("div",{id:"play-head-circle",ref:this._playHeadCircle})),l.createElement("div",{id:"play-head-control",onPointerDown:function(t){return e._onPointerDown(t)},onPointerMove:function(t){return e._onPointerMove(t)},onPointerUp:function(t){return e._onPointerUp(t)}}))},t}(l.Component),Yt=function(e){function t(t){var n=e.call(this,t)||this;return n._viewWidth=748,n._offsetX=10,n._isMounted=!1,n.state={},n._svgHost=l.createRef(),n.props.context.onHostWindowResized.add((function(){n._computeSizes()})),n._onActiveAnimationChangedObserver=n.props.context.onActiveAnimationChanged.add((function(){n._isMounted&&(n._computeSizes(),n.forceUpdate())})),n.props.context.onFrameSet.add((function(){n._isMounted&&n.forceUpdate()})),n.props.context.onRangeUpdated.add((function(){n._isMounted&&n.forceUpdate()})),n}return a(t,e),t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver),this._isMounted=!1},t.prototype._computeSizes=function(){this._svgHost.current&&(this._viewWidth=this._svgHost.current.clientWidth,this.forceUpdate())},t.prototype._dropKeyFrames=function(e){var t=this.props.context.fromKey,n=(this.props.context.toKey-t)/this._viewWidth;return e.getKeys().map((function(e,r){var a=(e.frame-t)/n;return l.createElement("line",{key:"frame-line"+e.frame+r,x1:a,y1:"0px",x2:a,y2:"40px",style:{stroke:"#ffc017",strokeWidth:.5}})}))},t.prototype._buildFrames=function(){if(0===this.props.context.activeAnimations.length)return null;for(var e=this.props.context.fromKey,t=this.props.context.toKey,n=t-e,r=n/Math.min(20,t-e)|0,a=n/this._viewWidth,o=[],i=e+n,s=e;s<=i;s+=r)o.push(s);return o[o.length-1]<i-r/2&&o.push(i),o.map((function(t,n){var r=(t-e)/a;return l.createElement("g",{key:"axis"+t+n},l.createElement("line",{key:"line"+t+n,x1:r,y1:"22px",x2:r,y2:"40px",style:{stroke:"#333333",strokeWidth:.5}}),l.createElement("text",{key:"label"+t+n,x:r,y:0,dx:"6px",textAnchor:"middle",dy:"14px",style:{fontFamily:"acumin-pro-condensed",fontSize:"12px",fill:"#555555",textAlign:"center"}},t.toFixed(0)))}))},t.prototype.render=function(){var e=this,t=-this._offsetX+" 0 "+(this._viewWidth+4*this._offsetX)+" 40";return l.createElement("div",{id:"range-frame-bar"},l.createElement("svg",{id:"svg-range-frames",viewBox:t,ref:this._svgHost},this._buildFrames(),this.props.context.activeAnimations.map((function(t){return e._dropKeyFrames(t)}))))},t}(l.Component);n(66);var Xt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._onActiveAnimationChangedObserver=n.props.context.onActiveAnimationChanged.add((function(){n.forceUpdate()})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver)},t.prototype.render=function(){return l.createElement("div",{id:"canvas-zone"},l.createElement(Wt,{globalState:this.props.globalState,context:this.props.context}),l.createElement(zt,{globalState:this.props.globalState,context:this.props.context}),l.createElement(Kt,{context:this.props.context,globalState:this.props.globalState}),l.createElement(Yt,{context:this.props.context,globalState:this.props.globalState}),this.props.context.activeAnimations.length>0&&l.createElement("div",{id:"angle-mode"}))},t}(l.Component),Zt=n(14),qt=function(e){function t(t){var n=e.call(this,t)||this,r=!1;if(-1!==n.props.context.activeAnimations.indexOf(n.props.animation)&&n.props.context.activeKeyPoints)for(var a=0,o=n.props.context.activeKeyPoints;a<o.length;a++){var i=o[a];i.state.selectedState===Pt.Selected&&i.props.channel===n.props.color&&(r=!0)}return n.state={isSelected:r},n._onActiveAnimationChangedObserver=t.context.onActiveAnimationChanged.add((function(e){n.forceUpdate()})),n._onActiveKeyPointChangedObserver=n.props.context.onActiveKeyPointChanged.add((function(){var e=!1;if(n.props.context.activeKeyPoints)for(var t=0,r=n.props.context.activeKeyPoints;t<r.length;t++){var a=r[t];if(a.props.curve.animation===n.props.animation&&a.props.channel===n.props.color&&-1!==n.props.context.activeAnimations.indexOf(n.props.animation)){e=!0;break}}n.setState({isSelected:e})})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver),this._onActiveKeyPointChangedObserver&&this.props.context.onActiveKeyPointChanged.remove(this._onActiveKeyPointChangedObserver)},t.prototype._activate=function(e){var t=this.props.context.activeAnimations.indexOf(this.props.animation);-1!==t&&this.props.context.getActiveChannel(this.props.animation)===this.props.color||(e.ctrlKey?-1===t&&this.props.context.activeAnimations.push(this.props.animation):(this.props.context.activeAnimations=[this.props.animation],this.props.context.resetAllActiveChannels()),this.props.context.enableChannel(this.props.animation,this.props.color),this.props.context.onActiveAnimationChanged.notifyObservers())},t.prototype.render=function(){var e=this,t=-1!==this.props.context.activeAnimations.indexOf(this.props.animation)&&this.props.context.isChannelEnabled(this.props.animation,this.props.color);return l.createElement(l.Fragment,null,l.createElement("div",{className:"animation-entry"+(t?" isActive":"")},this.state.isSelected&&l.createElement("div",{className:"animation-active-indicator"},l.createElement("img",{src:Zt})),l.createElement("div",{className:"animation-name",style:{color:this.props.color},onClick:function(t){return e._activate(t)}},this.props.subName)))},t}(l.Component),Qt=n(68),Jt=n(69),$t=n(70),en=n(14),tn=n(71),nn=function(e){function t(t){var n=e.call(this,t)||this;return n._unmount=!1,n.state={isExpanded:!1,isSelected:!1},n._onActiveAnimationChangedObserver=t.context.onActiveAnimationChanged.add((function(){n._unmount||(-1===n.props.context.activeAnimations.indexOf(n.props.animation)&&n.setState({isSelected:!1}),n.forceUpdate())})),n._onActiveKeyPointChangedObserver=n.props.context.onActiveKeyPointChanged.add((function(){n.setState({isSelected:n.props.animation.dataType===u.Animation.ANIMATIONTYPE_FLOAT&&-1!==n.props.context.activeAnimations.indexOf(n.props.animation)&&null!==n.props.context.activeKeyPoints&&n.props.context.activeKeyPoints.length>0&&n.props.context.activeKeyPoints.some((function(e){return e.props.curve.animation===n.props.animation}))})})),n._onSelectToActivatedObserver=n.props.context.onSelectToActivated.add((function(e){var t=n.props.context.getAnimationSortIndex(n.props.animation),r=n.props.context.activeAnimations.indexOf(n.props.animation);t>e.from&&t<=e.to||t>=e.to&&t<e.from?-1===r&&n.props.context.activeAnimations.push(n.props.animation):t!==e.from&&-1!==r&&n.props.context.activeAnimations.splice(r,1)})),n}return a(t,e),t.prototype._onGear=function(){var e=this;this.props.context.onEditAnimationUIClosed.addOnce((function(){e._unmount||e.forceUpdate()})),this.props.context.onEditAnimationRequired.notifyObservers(this.props.animation)},t.prototype._onDelete=function(){this.props.context.onDeleteAnimation.notifyObservers(this.props.animation)},t.prototype.componentWillUnmount=function(){this._unmount=!0,this._onActiveAnimationChangedObserver&&this.props.context.onActiveAnimationChanged.remove(this._onActiveAnimationChangedObserver),this._onActiveKeyPointChangedObserver&&this.props.context.onActiveKeyPointChanged.remove(this._onActiveKeyPointChangedObserver),this._onSelectToActivatedObserver&&this.props.context.onSelectToActivated.remove(this._onSelectToActivatedObserver)},t.prototype._activate=function(e){if(e.shiftKey){if(this.props.context.activeAnimations.length>0){var t=this.props.context.activeAnimations[0],n={from:this.props.context.getAnimationSortIndex(t),to:this.props.context.getAnimationSortIndex(this.props.animation)};this.props.context.onSelectToActivated.notifyObservers(n),this.props.context.onActiveAnimationChanged.notifyObservers()}}else{if(e.ctrlKey){var r=this.props.context.activeAnimations.indexOf(this.props.animation);-1!==r?this.props.context.activeAnimations.splice(r,1):this.props.context.activeAnimations.push(this.props.animation)}else this.props.context.activeAnimations=[this.props.animation],this.props.context.resetAllActiveChannels();this.props.context.disableChannel(this.props.animation),this.props.context.onActiveAnimationChanged.notifyObservers()}},t.prototype._expandOrCollapse=function(){this.setState({isExpanded:!this.state.isExpanded})},t.prototype.render=function(){var e=this,t=-1!==this.props.context.activeAnimations.indexOf(this.props.animation);return l.createElement(l.Fragment,null,l.createElement("div",{className:"animation-entry"+(t?" isActive":"")},this.state.isSelected&&l.createElement("div",{className:"animation-active-indicator"},l.createElement("img",{src:en})),this.props.animation.dataType===u.Animation.ANIMATIONTYPE_FLOAT&&l.createElement("div",{className:"animation-chevron"},l.createElement("img",{src:$t})),this.props.animation.dataType!==u.Animation.ANIMATIONTYPE_FLOAT&&l.createElement("div",{className:"animation-chevron",onClick:function(){return e._expandOrCollapse()}},l.createElement("img",{className:"animation-chevron-image"+(this.state.isExpanded?"":" collapsed"),src:tn})),l.createElement("div",{className:"animation-name",onClick:function(t){return e._activate(t)}},this.props.animation.name),l.createElement(wt,{className:"animation-options",context:this.props.context,globalState:this.props.globalState,icon:Qt,onClick:function(){return e._onGear()}}),l.createElement(wt,{className:"animation-delete",context:this.props.context,globalState:this.props.globalState,icon:Jt,onClick:function(){return e._onDelete()}})),this.state.isExpanded&&this.props.animation.dataType===u.Animation.ANIMATIONTYPE_COLOR3&&l.createElement(l.Fragment,null,l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#DB3E3E",subName:"Red"}),l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#51E22D",subName:"Green"}),l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#00A3FF",subName:"Blue"})),this.state.isExpanded&&this.props.animation.dataType===u.Animation.ANIMATIONTYPE_VECTOR3&&l.createElement(l.Fragment,null,l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#DB3E3E",subName:"X"}),l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#51E22D",subName:"Y"}),l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#00A3FF",subName:"Z"})),this.state.isExpanded&&this.props.animation.dataType===u.Animation.ANIMATIONTYPE_VECTOR2&&l.createElement(l.Fragment,null,l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#DB3E3E",subName:"X"}),l.createElement(qt,{globalState:this.props.globalState,context:this.props.context,animation:this.props.animation,color:"#51E22D",subName:"Y"})))},t}(l.Component),rn=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isVisible:!0},n._onEditAnimationRequiredObserver=n.props.context.onEditAnimationRequired.add((function(e){n.setState({isVisible:!1})})),n._onEditAnimationUIClosedObserver=n.props.context.onEditAnimationUIClosed.add((function(){n.setState({isVisible:!0})})),n._onDeleteAnimationObserver=n.props.context.onDeleteAnimation.add((function(){n.forceUpdate()})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onEditAnimationRequiredObserver&&this.props.context.onEditAnimationRequired.remove(this._onEditAnimationRequiredObserver),this._onEditAnimationUIClosedObserver&&this.props.context.onEditAnimationUIClosed.remove(this._onEditAnimationUIClosedObserver),this._onDeleteAnimationObserver&&this.props.context.onDeleteAnimation.remove(this._onDeleteAnimationObserver)},t.prototype.render=function(){var e,t=this;return this.state.isVisible?l.createElement("div",{id:"animation-list"},null===(e=this.props.context.animations)||void 0===e?void 0:e.map((function(e,n){return l.createElement(nn,{key:n,globalState:t.props.globalState,context:t.props.context,animation:t.props.context.useTargetAnimations?e.animation:e})}))):null},t}(l.Component),an=function(){function e(){}return e._SaveAs=function(e,t,n){var r=this;if("download"in HTMLAnchorElement.prototype){var a=window.URL||window.webkitURL,o=n.createElement("a");return o.download=t,o.rel="noopener",o.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(o.href)}),4e4),void setTimeout((function(){r._Click(o,n)}),0)}var i=open("","_blank");i&&(i.document.title=i.document.body.innerText="downloading...");var s="application/octet-stream"===e.type,l=/constructor/i.test(window.HTMLElement)||window.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||s&&l)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=p?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var u=(a=window.URL||window.webkitURL).createObjectURL(e);i?i.location.href=u:location.href=u,i=null,setTimeout((function(){a.revokeObjectURL(u)}),4e4)}},e._Click=function(e,t){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var n=t.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}},e.DownloadAsFile=function(e,t,n){var r=new Blob([t],{type:"application/octet-stream"});this._SaveAs(r,n,e)},e}(),on=function(e){function t(t){var n=e.call(this,t)||this;if(n._selectedAnimations=[],n.state={},n._root=l.createRef(),n.props.context.animations)if(n.props.context.useTargetAnimations)for(var r=0,a=n.props.context.animations;r<a.length;r++){var o=a[r];n._selectedAnimations.push(o.animation)}else n._selectedAnimations=n.props.context.animations.slice(0);return n}return a(t,e),t.prototype._getJson=function(){for(var e={animations:[]},t=0,n=this._selectedAnimations;t<n.length;t++){var r=n[t];e.animations.push(r.serialize())}return JSON.stringify(e)},t.prototype.saveToSnippetServer=function(){var e=this,t=new XMLHttpRequest,n=this._root.current.ownerDocument,r=this._getJson();t.onreadystatechange=function(){if(4==t.readyState)if(200==t.status){var r=JSON.parse(t.responseText),o=e.props.context.snippetId;e.props.context.snippetId=r.id,r.version&&"0"!=r.version&&(e.props.context.snippetId+="#"+r.version),e.forceUpdate();var i=window;i.Playground&&o&&i.Playground.onRequestCodeChangeObservable.notifyObservers({regex:new RegExp(o,"g"),replace:e.props.context.snippetId}),n.defaultView.alert("Animations saved with ID: "+e.props.context.snippetId)}else n.defaultView.alert("Unable to save your animations. It may be too large ("+(a.payload.length/1024).toFixed(2)+" KB). Please try reducing the number of animations or the number of keys per animation and try again.")},t.open("POST",u.Animation.SnippetUrl+(this.props.context.snippetId?"/"+this.props.context.snippetId:""),!0),t.setRequestHeader("Content-Type","application/json");var a={payload:JSON.stringify({animations:r}),name:"",description:"",tags:""};t.send(JSON.stringify(a))},t.prototype.saveToFile=function(){an.DownloadAsFile(this._root.current.ownerDocument,this._getJson(),"animations.json")},t.prototype.render=function(){var e,t=this;return l.createElement("div",{id:"save-animation-pane",ref:this._root},l.createElement("div",{id:"save-animation-list"},null===(e=this.props.context.animations)||void 0===e?void 0:e.map((function(e,n){var r=t.props.context.useTargetAnimations?e.animation:e;return l.createElement("div",{className:"save-animation-list-entry",key:n},l.createElement("input",{type:"checkbox",value:r.name,defaultChecked:!0,onClick:function(e){if(e.currentTarget.checked)t._selectedAnimations.push(r);else{var n=t._selectedAnimations.indexOf(r);n>-1&&t._selectedAnimations.splice(n,1)}}}),r.name)}))),l.createElement("div",{id:"save-animation-buttons"},l.createElement("button",{className:"simple-button",id:"save-snippet",type:"button",onClick:function(){t.saveToSnippetServer()}},"Save Snippet"),l.createElement("button",{className:"simple-button",id:"save-file",type:"button",onClick:function(){t.saveToFile()}},"Save File")),this.props.context.snippetId&&l.createElement("div",{id:"save-animation-snippet"},"Snippet ID: ",this.props.context.snippetId))},t}(l.Component),sn=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._root=l.createRef(),n._textInput=l.createRef(),n}return a(t,e),t.prototype.loadFromFile=function(e){var t=this,n=e.target.files;if(n&&n.length){var r=n[0];u.Tools.ReadFile(r,(function(e){var n=t.props.context,r=new TextDecoder("utf-8"),a=JSON.parse(r.decode(e)).animations;n.animations=[];for(var o=n.animations,i=0,s=a;i<s.length;i++){var l=s[i];o.push(u.Animation.Parse(l))}n.stop(),n.target.animations=o,n.activeAnimations=o.length?o:[],n.prepare(),n.onAnimationsLoaded.notifyObservers(),n.onActiveAnimationChanged.notifyObservers()}),void 0,!0),e.target.value=""}},t.prototype.loadFromSnippetServer=function(){var e=this,t=this.props.context,n=this._textInput.current.value;u.Animation.CreateFromSnippetAsync(n).then((function(e){t.snippetId=n,void 0!==e.length?t.animations=e:t.animations=[e],t.stop(),t.target.animations=t.animations,t.activeAnimations=t.animations.length?t.animations:[],t.prepare(),t.onAnimationsLoaded.notifyObservers(),t.onActiveAnimationChanged.notifyObservers()})).catch((function(t){var n;null===(n=e._root.current)||void 0===n||n.ownerDocument.defaultView.alert("Unable to load your animations: "+t)}))},t.prototype.render=function(){var e=this;return l.createElement("div",{id:"load-animation-pane",ref:this._root},l.createElement("div",{id:"load-animation-snippet-id-label"},"Snippet Id"),l.createElement("div",{id:"load-animation-local-file-label"},"Local File"),l.createElement("input",{type:"text",id:"load-snippet-id",ref:this._textInput}),l.createElement("button",{className:"simple-button",id:"load-snippet",type:"button",onClick:function(){return e.loadFromSnippetServer()}},"Load"),l.createElement("label",{htmlFor:"upload-snippet",id:"file-snippet-label",className:"simple-button"},"Browse"),l.createElement("input",{id:"upload-snippet",type:"file",accept:".json",onChange:function(t){return e.loadFromFile(t)}}),this.props.context.snippetId&&l.createElement("div",{id:"load-animation-snippet"},"Snippet ID: ",this.props.context.snippetId))},t}(l.Component),ln=function(e){function t(t){var n=e.call(this,t)||this;return n.state={customPropertyMode:!1},n._root=l.createRef(),n._displayName=l.createRef(),n._property=l.createRef(),n._typeElement=l.createRef(),n._loopModeElement=l.createRef(),n._propertylement=l.createRef(),n}return a(t,e),t.prototype.createNew=function(){var e=this.props.context,t=this._displayName.current.ownerDocument,n=this._displayName.current.value,r=this._property.current?this._property.current.value:this._propertylement.current.value,a=this._typeElement.current?this._typeElement.current.value:this.getInferredType(),o=this._loopModeElement.current.value;if(n)if(r){var i,s,l=this.props.context.animations&&this.props.context.animations.length?this.props.context.useTargetAnimations?this.props.context.animations[0].animation.framePerSecond:this.props.context.animations[0].framePerSecond:60,p=0,c=0;switch(a){case"Float":p=u.Animation.ANIMATIONTYPE_FLOAT,i=0,s=1;break;case"Vector2":p=u.Animation.ANIMATIONTYPE_VECTOR2,i=u.Vector2.Zero(),s=new u.Vector2(1,1);break;case"Vector3":p=u.Animation.ANIMATIONTYPE_VECTOR3,i=u.Vector3.Zero(),s=new u.Vector3(1,1,1);break;case"Quaternion":p=u.Animation.ANIMATIONTYPE_QUATERNION,i=u.Quaternion.Zero(),s=new u.Quaternion(1,1,1,0);break;case"Color3":p=u.Animation.ANIMATIONTYPE_COLOR3,i=u.Color3.Black(),s=u.Color3.White();break;case"Color4":p=u.Animation.ANIMATIONTYPE_COLOR4,i=new u.Color4(0,0,0,0),s=new u.Color4(1,1,1,1)}switch(o){case"Cycle":c=u.Animation.ANIMATIONLOOPMODE_CYCLE;break;case"Relative":c=u.Animation.ANIMATIONLOOPMODE_RELATIVE;break;case"Constant":c=u.Animation.ANIMATIONLOOPMODE_CONSTANT}var d=new u.Animation(n,r,l,p,c),h=[];h.push({frame:e.referenceMinFrame,value:i}),h.push({frame:e.referenceMaxFrame,value:s}),d.setKeys(h),e.stop(),e.animations&&0!==e.animations.length||(e.animations=[],e.target&&(e.target.animations=e.animations)),e.useTargetAnimations||e.animations.push(d),e.activeAnimations.push(d),e.prepare(),e.onActiveAnimationChanged.notifyObservers(),e.onAnimationsLoaded.notifyObservers()}else t.defaultView.alert("Please define a property");else t.defaultView.alert("Please define a display name")},t.prototype.getInferredType=function(e){void 0===e&&(e="");var t=this.props.context.target;this._propertylement.current&&(e=this._propertylement.current.value);var n=t[e];return isNaN(parseFloat(n))?n.getClassName():"Float"},t.prototype.render=function(){var e=this,t=[],n="";if(this.props.context.target){for(var r=this.props.context.target,a=r;null!==r;){var o=Object.getOwnPropertyDescriptors(r);for(var i in o){var s=o[i];"_"!==i[0]&&null!==a[i]&&void 0!==a[i]&&(void 0===a[i].r&&void 0===a[i].x&&isNaN(parseFloat(a[i]))||-1===t.indexOf(i)&&(s.writable||s.set)&&t.push(i))}r=Object.getPrototypeOf(r)}t.sort();for(var p=0,c=["scaling","rotation","position"];p<c.length;p++){var u=c[p],d=t.indexOf(u);-1!==d&&(t.splice(d,1),t.splice(0,0,u))}n=this._propertylement.current?this.getInferredType():this.getInferredType(t[0])}var h=this.state.customPropertyMode||0===t.length;return l.createElement("div",{id:"add-animation-pane",ref:this._root},l.createElement("div",{id:"add-animation-display-name-label"},"Display Name"),l.createElement("div",{id:"add-animation-mode-label"},"Mode"),l.createElement("div",{id:"add-animation-property-label"},"Property"),l.createElement("div",{id:"add-animation-type-label"},"Type"),l.createElement("div",{id:"add-animation-loop-mode-label"},"Loop Mode"),l.createElement("input",{type:"text",id:"add-animation-name",ref:this._displayName,className:"input-text",defaultValue:""}),l.createElement("select",{id:"add-animation-mode",className:"option",value:this.state.customPropertyMode?"Custom":"List",onChange:function(t){e.setState({customPropertyMode:"Custom"===t.currentTarget.value})}},["Custom","List"].map((function(e,t){return l.createElement("option",{key:e+t,value:e,title:e},e)}))),h&&l.createElement(l.Fragment,null,l.createElement("input",{type:"text",id:"add-animation-property",ref:this._property,className:"input-text",defaultValue:""}),l.createElement("select",{id:"add-animation-type",className:"option",ref:this._typeElement},["Float","Vector2","Vector3","Quaternion","Color3","Color4"].map((function(e,t){return l.createElement("option",{key:e+t,value:e,title:e},e)})))),!h&&l.createElement(l.Fragment,null,l.createElement("select",{id:"add-animation-property",className:"option",ref:this._propertylement,onClick:function(){e.forceUpdate()}},t.map((function(e,t){return l.createElement("option",{key:e+t,value:e,title:e},e)}))),l.createElement("div",{id:"add-animation-type"},n)),l.createElement("select",{id:"add-animation-loop-mode",className:"option",ref:this._loopModeElement},["Cycle","Relative","Constant"].map((function(e,t){return l.createElement("option",{key:e+t,value:e,title:e},e)}))),l.createElement("button",{className:"simple-button",id:"add-animation",type:"button",onClick:function(){return e.createNew()}},"Create"))},t}(l.Component),pn=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isVisible:!1,animation:null},n._root=l.createRef(),n._displayName=l.createRef(),n._property=l.createRef(),n._loopModeElement=l.createRef(),n._onEditAnimationRequiredObserver=n.props.context.onEditAnimationRequired.add((function(e){n.setState({isVisible:!0,animation:e})})),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._onEditAnimationRequiredObserver&&this.props.context.onEditAnimationRequired.remove(this._onEditAnimationRequiredObserver)},t.prototype.close=function(){this.setState({isVisible:!1}),this.props.context.onEditAnimationUIClosed.notifyObservers()},t.prototype.validate=function(){var e=this.props.context,t=this._displayName.current.ownerDocument,n=this._displayName.current.value,r=this._property.current.value,a=this._loopModeElement.current.value;if(n)if(r){var o=this.state.animation;switch(o.name=n,o.targetProperty!==r&&(o.targetProperty=r,o.targetPropertyPath=r.split("."),e.stop()),a){case"Cycle":o.loopMode=u.Animation.ANIMATIONLOOPMODE_CYCLE;break;case"Relative":o.loopMode=u.Animation.ANIMATIONLOOPMODE_RELATIVE;break;case"Constant":o.loopMode=u.Animation.ANIMATIONLOOPMODE_CONSTANT}this.close()}else t.defaultView.alert("Please define a property");else t.defaultView.alert("Please define a display name")},t.prototype.render=function(){var e,t=this;if(!this.state.isVisible)return null;var n=["Relative","Cycle","Constant"];return l.createElement("div",{id:"edit-animation-pane",ref:this._root},l.createElement("div",{id:"edit-animation-display-name-label"},"Display Name"),l.createElement("div",{id:"edit-animation-property-label"},"Property"),l.createElement("div",{id:"edit-animation-loop-mode-label"},"Loop Mode"),l.createElement("input",{type:"text",id:"edit-animation-name",ref:this._displayName,className:"input-text",defaultValue:this.state.animation.name||""}),l.createElement("input",{type:"text",id:"edit-animation-property",ref:this._property,className:"input-text",defaultValue:this.state.animation.targetProperty}),l.createElement("select",{id:"edit-animation-loop-mode",className:"option",ref:this._loopModeElement,defaultValue:n[null!==(e=this.state.animation.loopMode)&&void 0!==e?e:1]},n.map((function(e,t){return l.createElement("option",{key:e+t,value:e,title:e},e)}))),l.createElement("div",{id:"edit-animation"},l.createElement("button",{className:"simple-button",id:"edit-animation-ok",type:"button",onClick:function(){return t.validate()}},"OK"),l.createElement("button",{className:"simple-button",id:"edit-animation-cancel",type:"button",onClick:function(){return t.close()}},"Cancel")))},t}(l.Component);n(72);var cn,un=n(74),dn=n(75),hn=n(76),mn=n(77);!function(e){e[e.Edit=0]="Edit",e[e.Add=1]="Add",e[e.Load=2]="Load",e[e.Save=3]="Save"}(cn||(cn={}));var bn=function(e){function t(t){var n=e.call(this,t)||this;return n.state={mode:cn.Edit},n.props.context.onDeleteAnimation.add((function(e){var t=n.props.context.activeAnimations.indexOf(e);-1!==t&&(n.props.context.activeAnimations.splice(t,1),n.props.context.onActiveAnimationChanged.notifyObservers());var r=-1;if(n.props.context.useTargetAnimations){for(var a=n.props.context.animations,o=0;o<a.length;o++)if(a[o].animation===e){r=o;break}}else r=n.props.context.animations.indexOf(e);r>-1&&(n.props.context.animations.splice(r,1),n.forceUpdate())})),n.props.context.onAnimationsLoaded.add((function(){return n.setState({mode:cn.Edit})})),n}return a(t,e),t.prototype._onAddAnimation=function(){this.state.mode!==cn.Add&&this.setState({mode:cn.Add})},t.prototype._onLoadAnimation=function(){this.state.mode!==cn.Load&&this.setState({mode:cn.Load})},t.prototype._onSaveAnimation=function(){this.state.mode!==cn.Save&&this.setState({mode:cn.Save})},t.prototype._onEditAnimation=function(){this.state.mode!==cn.Edit&&this.setState({mode:cn.Edit})},t.prototype.render=function(){var e=this,t="60";return this.props.context.animations&&this.props.context.animations.length&&(t=this.props.context.useTargetAnimations?this.props.context.animations[0].animation.framePerSecond.toString():this.props.context.animations[0].framePerSecond.toString()),l.createElement("div",{id:"sideBar"},l.createElement("div",{id:"menu-bar",className:this.props.context.useTargetAnimations?"small":""},!this.props.context.useTargetAnimations&&l.createElement(wt,{tooltip:"Add new animation",isActive:this.state.mode===cn.Add,id:"add-animation",globalState:this.props.globalState,context:this.props.context,icon:un,onClick:function(){return e._onAddAnimation()}}),!this.props.context.useTargetAnimations&&l.createElement(wt,{tooltip:"Load animations",isActive:this.state.mode===cn.Load,id:"load-animation",globalState:this.props.globalState,context:this.props.context,icon:dn,onClick:function(){return e._onLoadAnimation()}}),l.createElement(wt,{tooltip:"save current animations",isActive:this.state.mode===cn.Save,id:"save-animation",globalState:this.props.globalState,context:this.props.context,icon:hn,onClick:function(){return e._onSaveAnimation()}}),l.createElement(wt,{tooltip:"Edit animations",isActive:this.state.mode===cn.Edit,id:"edit-animation",globalState:this.props.globalState,context:this.props.context,icon:mn,onClick:function(){return e._onEditAnimation()}}),l.createElement(nt,{value:t,complement:" fps",isNumber:!0,onValueAsNumberChanged:function(t){var n;null===(n=e.props.context.animations)||void 0===n||n.forEach((function(n){e.props.context.useTargetAnimations?n.animation.framePerSecond=t:n.framePerSecond=t}))},tooltip:"Framerate",id:"framerate-animation",globalState:this.props.globalState,context:this.props.context})),this.state.mode===cn.Edit&&l.createElement(l.Fragment,null,l.createElement(rn,{globalState:this.props.globalState,context:this.props.context}),l.createElement(pn,{globalState:this.props.globalState,context:this.props.context})),this.state.mode===cn.Save&&l.createElement(on,{globalState:this.props.globalState,context:this.props.context}),this.state.mode===cn.Load&&l.createElement(sn,{globalState:this.props.globalState,context:this.props.context}),this.state.mode===cn.Add&&l.createElement(ln,{globalState:this.props.globalState,context:this.props.context}))},t}(l.Component);n(78);var gn=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isOpen:!1},n}return a(t,e),t.prototype.onCloseAnimationCurveEditor=function(e){null!==e&&e.close(),this.setState({isOpen:!1}),this.props.context.activeAnimations=[],this.props.context.onActiveAnimationChanged.notifyObservers()},t.prototype.shouldComponentUpdate=function(e,t){var n=this;return t.isOpen!==this.state.isOpen&&(t.isOpen&&(this.props.context.prepare(),this.props.context.animations&&this.props.context.animations.length&&setTimeout((function(){n.props.context.activeAnimations.push(n.props.context.useTargetAnimations?n.props.context.animations[0].animation:n.props.context.animations[0]),n.props.context.onActiveAnimationChanged.notifyObservers()}))),!0)},t.prototype._onKeyDown=function(e){var t;switch(e.key){case"Delete":(null===(t=this.props.context.activeKeyPoints)||void 0===t?void 0:t.length)&&!this.props.context.focusedInput&&this.props.context.onDeleteKeyActiveKeyPoints.notifyObservers();break;case" ":this.props.context.isPlaying?this.props.context.stop():this.props.context.play(!0);break;case"a":e.ctrlKey&&(this.props.context.onSelectAllKeys.notifyObservers(),this.props.context.onActiveKeyPointChanged.notifyObservers(),e.preventDefault());break;case"ArrowLeft":this.props.context.focusedInput||this.props.context.onMoveToFrameRequired.notifyObservers(Math.max(0,this.props.context.activeFrame-1));break;case"ArrowRight":this.props.context.focusedInput||this.props.context.onMoveToFrameRequired.notifyObservers(Math.min(this.props.context.clipLength,this.props.context.activeFrame+1));break;case"ArrowDown":var n=this.props.context.getPrevKey();null!==n&&this.props.context.onMoveToFrameRequired.notifyObservers(n);break;case"ArrowUp":var r=this.props.context.getNextKey();null!==r&&this.props.context.onMoveToFrameRequired.notifyObservers(r)}},t.prototype.render=function(){var e=this;return l.createElement(l.Fragment,null,l.createElement(we,{label:"Edit",onClick:function(){e.setState({isOpen:!0})}}),this.state.isOpen&&l.createElement(tt,{id:"curve-editor",title:"Animation Curve Editor",size:{width:1024,height:512},onResize:function(){return e.props.context.onHostWindowResized.notifyObservers()},onClose:function(t){return e.onCloseAnimationCurveEditor(t)},onKeyDown:function(t){return e._onKeyDown(t)}},l.createElement("div",{id:"curve-editor"},l.createElement(jt,{globalState:this.props.globalState,context:this.props.context}),l.createElement(bn,{globalState:this.props.globalState,context:this.props.context}),l.createElement(Xt,{globalState:this.props.globalState,context:this.props.context}),l.createElement(_t,{globalState:this.props.globalState,context:this.props.context}))))},t}(l.Component),fn=function(){function e(){this.activeAnimations=[],this.activeChannels={},this.forwardAnimation=!0,this.referenceMinFrame=0,this.referenceMaxFrame=100,this.focusedInput=!1,this.onActiveAnimationChanged=new u.Observable,this.onActiveKeyPointChanged=new u.Observable,this.onHostWindowResized=new u.Observable,this.onSelectAllKeys=new u.Observable,this.onActiveKeyFrameChanged=new u.Observable,this.onFrameSet=new u.Observable,this.onFrameManuallyEntered=new u.Observable,this.onMainKeyPointSet=new u.Observable,this.onMainKeyPointMoved=new u.Observable,this.onValueSet=new u.Observable,this.onValueManuallyEntered=new u.Observable,this.onFrameRequired=new u.Observable,this.onCreateOrUpdateKeyPointRequired=new u.Observable,this.onFlattenTangentRequired=new u.Observable,this.onLinearTangentRequired=new u.Observable,this.onBreakTangentRequired=new u.Observable,this.onUnifyTangentRequired=new u.Observable,this.onStepTangentRequired=new u.Observable,this.onDeleteAnimation=new u.Observable,this.onGraphMoved=new u.Observable,this.onGraphScaled=new u.Observable,this.onRangeUpdated=new u.Observable,this.onMoveToFrameRequired=new u.Observable,this.onAnimationStateChanged=new u.Observable,this.onDeleteKeyActiveKeyPoints=new u.Observable,this.onSelectionRectangleMoved=new u.Observable,this.onAnimationsLoaded=new u.Observable,this.onEditAnimationRequired=new u.Observable,this.onEditAnimationUIClosed=new u.Observable,this.onClipLengthIncreased=new u.Observable,this.onClipLengthDecreased=new u.Observable,this.onInterpolationModeSet=new u.Observable,this.onSelectToActivated=new u.Observable}return e.prototype.prepare=function(){if(this.isPlaying=!1,this.animations&&this.animations.length){var e=this.useTargetAnimations?this.animations[0].animation:this.animations[0],t=e.getKeys();this.fromKey=t[0].frame,this.toKey=t[t.length-1].frame,this.referenceMinFrame=0,this.referenceMaxFrame=this.toKey,this.snippetId=e.snippetId,this.clipLength=this.referenceMaxFrame,e&&e.hasRunningRuntimeAnimations&&(this.isPlaying=!0)}},e.prototype.play=function(e){var t;this.isPlaying=!0,this.scene.stopAnimation(this.target),e?this.rootAnimationGroup?this.rootAnimationGroup.start(!0,1,this.fromKey,this.toKey):t=this.scene.beginAnimation(this.target,this.fromKey,this.toKey,!0):this.rootAnimationGroup?this.rootAnimationGroup.start(!0,1,this.toKey,this.fromKey):t=this.scene.beginAnimation(this.target,this.toKey,this.fromKey,!0),this.forwardAnimation=e,this.rootAnimationGroup?this.rootAnimationGroup.goToFrame(this.activeFrame):t.goToFrame(this.activeFrame),this.onAnimationStateChanged.notifyObservers()},e.prototype.stop=function(){this.isPlaying=!1,this.rootAnimationGroup?this.rootAnimationGroup.stop():this.scene.stopAnimation(this.target),this.onAnimationStateChanged.notifyObservers()},e.prototype.moveToFrame=function(e){if(this.animations&&this.animations.length){this.activeFrame=e,this.isPlaying||(this.rootAnimationGroup?this.rootAnimationGroup.start(!1,1,this.fromKey,this.toKey):this.scene.beginAnimation(this.target,this.fromKey,this.toKey,!1));for(var t=0,n=this.animations;t<n.length;t++){var r=n[t],a=this.useTargetAnimations?r.animation:r;if(!a.hasRunningRuntimeAnimations)return;for(var o=0,i=a.runtimeAnimations;o<i.length;o++){i[o].goToFrame(e)}}this.stop()}},e.prototype.refreshTarget=function(){this.animations&&this.animations.length&&(this.isPlaying||this.moveToFrame(this.activeFrame))},e.prototype.clearSelection=function(){this.activeKeyPoints=[],this.onActiveKeyPointChanged.notifyObservers()},e.prototype.enableChannel=function(e,t){this.activeChannels[e.uniqueId]=t},e.prototype.disableChannel=function(e){delete this.activeChannels[e.uniqueId]},e.prototype.isChannelEnabled=function(e,t){return void 0===this.activeChannels[e.uniqueId]||this.activeChannels[e.uniqueId]===t},e.prototype.getActiveChannel=function(e){return this.activeChannels[e.uniqueId]},e.prototype.resetAllActiveChannels=function(){this.activeChannels={}},e.prototype.getAnimationSortIndex=function(e){var t;if(!this.animations)return-1;for(var n=0;n<(null===(t=this.animations)||void 0===t?void 0:t.length);n++)if(e===(this.useTargetAnimations?this.animations[0].animation:this.animations[n]))return n;return-1},e.prototype.getPrevKey=function(){if(!this.animations||!this.animations.length||0===this.activeAnimations.length)return null;for(var e=-Number.MAX_VALUE,t=0,n=this.activeAnimations;t<n.length;t++)for(var r=0,a=n[t].getKeys();r<a.length;r++){var o=a[r];o.frame<this.activeFrame&&o.frame>e&&(e=o.frame)}return e===-Number.MAX_VALUE&&(e=this.fromKey),e},e.prototype.getNextKey=function(){if(!this.animations||!this.animations.length)return null;for(var e=Number.MAX_VALUE,t=0,n=this.activeAnimations;t<n.length;t++)for(var r=0,a=n[t].getKeys();r<a.length;r++){var o=a[r];o.frame>this.activeFrame&&o.frame<e&&(e=o.frame)}return e===Number.MAX_VALUE&&(e=this.toKey),e},e.prototype.getKeyAtAnyFrameIndex=function(e){if(!(this.animations&&this.animations.length&&this.activeAnimations&&this.activeAnimations.length))return null;for(var t=0,n=0,r=this.activeAnimations;n<r.length;n++){for(var a=0,o=0,i=r[n].getKeys();o<i.length;o++){var s=i[o];if(0===Math.floor(e-s.frame))return{animationIndex:t,keyIndex:a};a++}t++}return null},e}(),vn=function(e){function t(t){var n,r=e.call(this,t)||this;r._animations=null,r._isPlaying=!1,r._animationControl={from:0,to:0,loop:!1},r.state={currentFrame:0};var a=r.props.animatable;if(r._ranges=a.getAnimationRanges?a.getAnimationRanges():[],a.getAnimatables){var o=a.getAnimatables();r._animations=new Array,o.forEach((function(e){var t;e.animations&&(t=r._animations).push.apply(t,e.animations)})),a.animations&&(n=r._animations).push.apply(n,a.animations),r._animations&&r._animations.length&&r._animations.forEach((function(e){var t=e.getKeys();if(t&&t.length>0){t[0].frame<r._animationControl.from&&(r._animationControl.from=t[0].frame);var n=t.length-1;t[n].frame>r._animationControl.to&&(r._animationControl.to=t[n].frame)}}))}return r.timelineRef=l.createRef(),r}return a(t,e),t.prototype.playOrPause=function(){var e=this.props.animatable;this._isPlaying=this.props.scene.getAllAnimatablesByTarget(e).length>0,this._isPlaying?(this.props.scene.stopAnimation(this.props.animatable),this._mainAnimatable=null):this._mainAnimatable=this.props.scene.beginAnimation(this.props.animatable,this._animationControl.from,this._animationControl.to,this._animationControl.loop),this.forceUpdate()},t.prototype.componentDidMount=function(){var e=this;this._onBeforeRenderObserver=this.props.scene.onBeforeRenderObservable.add((function(){e._isPlaying&&e._mainAnimatable&&e.setState({currentFrame:e._mainAnimatable.masterFrame})}))},t.prototype.componentWillUnmount=function(){this._onBeforeRenderObserver&&(this.props.scene.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=null)},t.prototype.onCurrentFrameChange=function(e){this._mainAnimatable&&(this._mainAnimatable.goToFrame(e),this.setState({currentFrame:e}))},t.prototype.onChangeFromOrTo=function(){this.playOrPause(),this._isPlaying&&this.playOrPause()},t.prototype.componentDidUpdate=function(e){e.animatable.uniqueId!==this.props.animatable.uniqueId&&(this._animationCurveEditorContext=null)},t.prototype.render=function(){var e=this,t=this.props.animatable,n=this.props.animatable,r=this.props.scene.getAllAnimatablesByTarget(t);this._isPlaying=r.length>0,this._isPlaying&&(this._mainAnimatable=r[0],this._mainAnimatable&&(this._animationControl.from=this._mainAnimatable.fromFrame,this._animationControl.to=this._mainAnimatable.toFrame,this._animationControl.loop=this._mainAnimatable.loopAnimation));var a=t.animations;return this._animationCurveEditorContext||(this._animationCurveEditorContext=new fn,this._animationCurveEditorContext.title=this.props.animatable.name||"",this._animationCurveEditorContext.animations=a,this._animationCurveEditorContext.target=this.props.animatable,this._animationCurveEditorContext.scene=this.props.scene),l.createElement("div",null,this._ranges.length>0&&l.createElement(Oe,{title:"ANIMATION RANGES",selection:this.props.globalState},this._ranges.map((function(n,r){return l.createElement(we,{key:n.name+r,label:n.name,onClick:function(){e._mainAnimatable=null,e.props.scene.beginAnimation(t,n.from,n.to,!0)}})}))),a&&l.createElement(l.Fragment,null,l.createElement(Oe,{title:"ANIMATIONS",selection:this.props.globalState},l.createElement(Ee,{label:"Count",value:a.length.toString()}),a.map((function(e,t){return l.createElement(Ee,{key:e.targetProperty+t,label:"#"+t+" >",value:e.targetProperty})})),l.createElement(gn,{globalState:this.props.globalState,context:this._animationCurveEditorContext})),a.length>0&&l.createElement(Oe,{title:"ANIMATION GENERAL CONTROL",selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,isInteger:!0,label:"From",target:this._animationControl,propertyName:"from",onChange:function(){return e.onChangeFromOrTo()}}),l.createElement(He,{lockObject:this.props.lockObject,isInteger:!0,label:"To",target:this._animationControl,propertyName:"to",onChange:function(){return e.onChangeFromOrTo()}}),l.createElement(Le,{label:"Loop",onSelect:function(t){e._animationControl.loop=t,r.forEach((function(e){e.loopAnimation=t}))},isSelected:function(){return e._animationControl.loop}}),this._isPlaying&&l.createElement(We,{ref:this.timelineRef,label:"Current frame",minimum:this._animationControl.from,maximum:this._animationControl.to,step:(this._animationControl.to-this._animationControl.from)/1e3,directValue:this.state.currentFrame,onInput:function(t){return e.onCurrentFrameChange(t)}}),l.createElement(we,{label:this._isPlaying?"Stop":"Play",onClick:function(){return e.playOrPause()}}),(this._ranges.length>0||this._animations&&this._animations.length>0)&&l.createElement(l.Fragment,null,l.createElement(Le,{label:"Enable override",onSelect:function(t){t?(n.animationPropertiesOverride=new u.AnimationPropertiesOverride,n.animationPropertiesOverride.blendingSpeed=.05):n.animationPropertiesOverride=null,e.forceUpdate()},isSelected:function(){return null!=n.animationPropertiesOverride},onValueChanged:function(){return e.forceUpdate()}}),null!=n.animationPropertiesOverride&&l.createElement("div",null,l.createElement(Le,{label:"Enable blending",target:n.animationPropertiesOverride,propertyName:"enableBlending",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Blending speed",target:n.animationPropertiesOverride,propertyName:"blendingSpeed",minimum:0,maximum:.1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))))))},t}(l.Component),yn=function(e){function t(t){var n=e.call(this,t)||this;n._localChange=!1,n._propertyChange=!0;var r=n.props.target[n.props.propertyName];return n.state={value:r?n.props.isInteger?r.toFixed(0):r.toFixed(n.props.digits||3):"0"},n._store=r,n}return a(t,e),t.prototype.componentWillUnmount=function(){this.unlock()},t.prototype.shouldComponentUpdate=function(e,t){if(this._localChange)return this._localChange=!1,!0;var n=e.target[e.propertyName],r=n?this.props.isInteger?n.toFixed(0):n.toFixed(this.props.digits||3):"0";return r!==t.value&&(t.value=r,!0)},t.prototype.raiseOnPropertyChanged=function(e,t){var n;this.props.onChange&&this.props.onChange(e),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:null!==(n=this.props.replaySourceReplacement)&&void 0!==n?n:this.props.target,property:this.props.propertyName,value:e,initialValue:t})},t.prototype.convertToHexString=function(e){for(;e.length<10;)e+="0";return e},t.prototype.updateValue=function(e,t){"0x"!=e.substr(0,2)&&(e="0"!=e.substr(0,1)?"0x"+e:"0x"+e.substr(1));var n=e.substr(2);if(!(""!=n&&0==/^[0-9A-Fa-f]+$/g.test(n)||e.length>10)){var r,a=this.convertToHexString(e);r=parseInt(a),isNaN(r)||void 0===this.props.min||r<this.props.min&&(e=(r=this.props.min).toString()),this._localChange=!0,isNaN(r)||(this.setState({value:e}),t?(this._propertyChange=!0,this.props.target[this.props.propertyName]=r,this.raiseOnPropertyChanged(r,this._store)):this._propertyChange=!1,this._store=r)}},t.prototype.lock=function(){this.props.lockObject&&(this.props.lockObject.lock=!0)},t.prototype.unlock=function(){this.props.lockObject&&(this.props.lockObject.lock=!1)},t.prototype.render=function(){var e,t=this;if(this._propertyChange){e=parseInt(this.state.value).toString(16);for(var n="",r=0;r<8-e.length;r++)n+="0";e="0x"+n+e.toUpperCase()}else e=this.state.value;return l.createElement("div",null,!this.props.useEuler&&l.createElement("div",{className:this.props.additionalClass?this.props.additionalClass+" floatLine":"floatLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"value"},l.createElement("input",{type:"string",className:"hex-input",value:e,onBlur:function(){return t.unlock()},onFocus:function(){return t.lock()},onChange:function(e){return t.updateValue(e.target.value,!1)},onKeyDown:function(e){13===e.keyCode&&t.updateValue(t.state.value,!0)}}))))},t}(l.Component),Cn=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e,t=this,n=this.props.material;n.depthFunction=null!==(e=n.depthFunction)&&void 0!==e?e:0;var r=[{label:"Clockwise",value:u.Material.ClockWiseSideOrientation},{label:"Counterclockwise",value:u.Material.CounterClockWiseSideOrientation}],a=[{label:"<Not Defined>",value:Ke},{label:"Opaque",value:u.PBRMaterial.PBRMATERIAL_OPAQUE},{label:"Alpha test",value:u.PBRMaterial.PBRMATERIAL_ALPHATEST},{label:"Alpha blend",value:u.PBRMaterial.PBRMATERIAL_ALPHABLEND},{label:"Alpha blend and test",value:u.PBRMaterial.PBRMATERIAL_ALPHATESTANDBLEND}],o=[{label:"Combine",value:u.Constants.ALPHA_COMBINE},{label:"One one",value:u.Constants.ALPHA_ONEONE},{label:"Add",value:u.Constants.ALPHA_ADD},{label:"Subtract",value:u.Constants.ALPHA_SUBTRACT},{label:"Multiply",value:u.Constants.ALPHA_MULTIPLY},{label:"Maximized",value:u.Constants.ALPHA_MAXIMIZED},{label:"Pre-multiplied",value:u.Constants.ALPHA_PREMULTIPLIED}],i=[{label:"<Engine Default>",value:0},{label:"Never",value:u.Engine.NEVER},{label:"Always",value:u.Engine.ALWAYS},{label:"Equal",value:u.Engine.EQUAL},{label:"Less",value:u.Engine.LESS},{label:"Less or equal",value:u.Engine.LEQUAL},{label:"Greater",value:u.Engine.GREATER},{label:"Greater or equal",value:u.Engine.GEQUAL},{label:"Not equal",value:u.Engine.NOTEQUAL}],s=[{label:"Never",value:u.Constants.NEVER},{label:"Always",value:u.Constants.ALWAYS},{label:"Equal",value:u.Constants.EQUAL},{label:"Less",value:u.Constants.LESS},{label:"Less or equal",value:u.Constants.LEQUAL},{label:"Greater",value:u.Constants.GREATER},{label:"Greater or equal",value:u.Constants.GEQUAL},{label:"Not equal",value:u.Constants.NOTEQUAL}],p=[{label:"Keep",value:u.Constants.KEEP},{label:"Zero",value:u.Constants.ZERO},{label:"Replace",value:u.Constants.REPLACE},{label:"Incr",value:u.Constants.INCR},{label:"Decr",value:u.Constants.DECR},{label:"Invert",value:u.Constants.INVERT},{label:"Incr wrap",value:u.Constants.INCR_WRAP},{label:"Decr wrap",value:u.Constants.DECR_WRAP}];return l.createElement("div",null,l.createElement(et,{globalState:this.props.globalState,target:n,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"ID",value:n.id}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:n,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:n.uniqueId.toString()}),l.createElement(Ee,{label:"Class",value:n.getClassName()}),l.createElement(Le,{label:"Backface culling",target:n,propertyName:"backFaceCulling",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Orientation",options:r,target:n,propertyName:"sideOrientation",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({mode:e})}}),l.createElement(Le,{label:"Disable lighting",target:n,propertyName:"disableLighting",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Disable color write",target:n,propertyName:"disableColorWrite",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Disable depth write",target:n,propertyName:"disableDepthWrite",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Depth function",options:i,target:n,propertyName:"depthFunction",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({depthFunction:e})}}),l.createElement(Le,{label:"Need depth pre-pass",target:n,propertyName:"needDepthPrePass",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Wireframe",target:n,propertyName:"wireframe",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Point cloud",target:n,propertyName:"pointsCloud",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Point size",target:n,propertyName:"pointSize",minimum:0,maximum:100,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Z-offset Factor",target:n,propertyName:"zOffset",minimum:-10,maximum:10,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Z-offset Units",target:n,propertyName:"zOffsetUnits",minimum:-10,maximum:10,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:"Dispose",onClick:function(){n.dispose(),t.props.globalState.onSelectionChangedObservable.notifyObservers(null)}})),l.createElement(Oe,{title:"TRANSPARENCY",selection:this.props.globalState},l.createElement(We,{label:"Alpha",target:n,propertyName:"alpha",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),void 0!==n.transparencyMode&&l.createElement(Ye,{allowNullValue:!0,label:"Transparency mode",options:a,target:n,propertyName:"transparencyMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({transparencyMode:e})}}),l.createElement(Ye,{label:"Alpha mode",options:o,target:n,propertyName:"alphaMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({alphaMode:e})}}),n.diffuseTexture&&l.createElement(Le,{label:"Diffuse texture has alpha",target:n.diffuseTexture,propertyName:"hasAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),void 0!==n.useAlphaFromDiffuseTexture&&l.createElement(Le,{label:"Use alpha from diffuse texture",target:n,propertyName:"useAlphaFromDiffuseTexture",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),n.albedoTexture&&l.createElement(Le,{label:"Albedo texture has alpha",target:n.albedoTexture,propertyName:"hasAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),void 0!==n.useAlphaFromAlbedoTexture&&l.createElement(Le,{label:"Use alpha from albedo texture",target:n,propertyName:"useAlphaFromAlbedoTexture",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Separate culling pass",target:n,propertyName:"separateCullingPass",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),n.stencil&&l.createElement(l.Fragment,null,l.createElement(Oe,{title:"STENCIL",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:n.stencil,propertyName:"enabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(yn,{isInteger:!0,lockObject:this.props.lockObject,label:"Mask",target:n.stencil,propertyName:"mask",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Function",options:s,target:n.stencil,propertyName:"func",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({stencilFunction:e})}}),l.createElement(He,{isInteger:!0,lockObject:this.props.lockObject,label:"Function reference",target:n.stencil,propertyName:"funcRef",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(yn,{isInteger:!0,lockObject:this.props.lockObject,label:"Function mask",target:n.stencil,propertyName:"funcMask",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Op stencil fail",options:p,target:n.stencil,propertyName:"opStencilFail",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({opStencilFail:e})}}),l.createElement(Ye,{label:"Op depth fail",options:p,target:n.stencil,propertyName:"opDepthFail",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({opDepthFail:e})}}),l.createElement(Ye,{label:"Op stencil+depth pass",options:p,target:n.stencil,propertyName:"opStencilDepthPass",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return t.setState({opStencilDepthPass:e})}}))),l.createElement(vn,{globalState:this.props.globalState,animatable:n,scene:n.getScene(),lockObject:this.props.lockObject}))},t}(l.Component),En=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.material;return l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),xn=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.material,a=n.props.texture;return n.state={isDebugSelected:r&&r.reservedDataStore&&r.reservedDataStore.debugTexture===a},n}return a(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.onDebugSelectionChangeObservable&&(this._onDebugSelectionChangeObserver=this.props.onDebugSelectionChangeObservable.add((function(t){t!==e&&e.setState({isDebugSelected:!1})})))},t.prototype.componentWillUnmount=function(){this.props.onDebugSelectionChangeObservable&&this._onDebugSelectionChangeObserver&&this.props.onDebugSelectionChangeObservable.remove(this._onDebugSelectionChangeObserver)},t.prototype.debugTexture=function(){if(this.props.customDebugAction){var e=!this.state.isDebugSelected;return this.props.customDebugAction(e),this.setState({isDebugSelected:e}),void(this.props.onDebugSelectionChangeObservable&&this.props.onDebugSelectionChangeObservable.notifyObservers(this))}var t=this.props.texture,n=this.props.material;if(n&&t){var r=n.getScene();if(n.reservedDataStore&&n.reservedDataStore.debugTexture===t){var a=n.reservedDataStore.debugMaterial;t.level=n.reservedDataStore.level;for(var o=0,i=r.meshes;o<i.length;o++){(h=i[o]).material===a&&(h.material=n)}return a.dispose(),n.reservedDataStore.debugTexture=null,n.reservedDataStore.debugMaterial=null,void this.setState({isDebugSelected:!1})}var s=n,l=!1;n.reservedDataStore&&n.reservedDataStore.debugTexture&&(s=n.reservedDataStore.debugMaterial,l=!0);var p=new u.StandardMaterial("debugMaterial",r);p.disableLighting=!0,p.sideOrientation=n.sideOrientation,p.emissiveTexture=t,p.forceDepthWrite=!0,p.reservedDataStore={hidden:!0};for(var c=0,d=r.meshes;c<d.length;c++){var h;(h=d[c]).material===s&&(h.material=p)}n.reservedDataStore||(n.reservedDataStore={}),n.reservedDataStore.debugTexture=t,n.reservedDataStore.debugMaterial=p,n.reservedDataStore.level=t.level,t.level=1,this.props.onDebugSelectionChangeObservable&&this.props.onDebugSelectionChangeObservable.notifyObservers(this),l&&s.dispose(),this.setState({isDebugSelected:!0})}},t.prototype.onLink=function(){if(this.props.onSelectionChangedObservable){var e=this.props.texture;this.props.onSelectionChangedObservable.notifyObservers(e)}},t.prototype.updateTexture=function(e){var t=this,n=this.props.material;u.Tools.ReadFile(e,(function(e){var r=new Blob([e],{type:"octet/stream"}),a=URL.createObjectURL(r),o=new u.Texture(a,n.getScene(),!1,!1);t.props.propertyName?n[t.props.propertyName]=o:t.props.onTextureCreated&&t.props.onTextureCreated(o),t.forceUpdate()}),void 0,!0)},t.prototype.removeTexture=function(){var e=this.props.material;this.props.propertyName?e[this.props.propertyName]=null:this.props.onTextureRemoved&&this.props.onTextureRemoved(),this.forceUpdate()},t.prototype.render=function(){var e=this,t=this.props.texture;return t?l.createElement("div",{className:"textureLinkLine"},!t.isCube&&this.props.material&&l.createElement(l.Fragment,null,l.createElement("div",{className:this.state.isDebugSelected?"debug selected":"debug"},l.createElement("span",{className:"actionIcon",onClick:function(){return e.debugTexture()},title:"Render as main texture"},l.createElement(w,{icon:ye})),l.createElement("span",{className:"actionIcon",onClick:function(){return e.removeTexture()},title:"Remove texture"},l.createElement(w,{icon:be})))),l.createElement(Ee,{label:this.props.label,value:t.name,onLink:function(){return e.onLink()}})):this.props.propertyName||this.props.onTextureCreated?l.createElement(Pe,{label:"Add "+this.props.label+" texture",onClick:function(t){return e.updateTexture(t)},accept:".jpg, .png, .tga, .dds, .env"}):null},t}(l.Component),On=function(e){function t(t){var n=e.call(this,t)||this;return n._onDebugSelectionChangeObservable=new u.Observable,n}return a(t,e),t.prototype.renderTextures=function(){var e=this.props.material,t=this._onDebugSelectionChangeObservable;return l.createElement(Oe,{title:"TEXTURES",selection:this.props.globalState},l.createElement(xn,{label:"Diffuse",texture:e.diffuseTexture,propertyName:"diffuseTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Specular",texture:e.specularTexture,propertyName:"specularTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Reflection",texture:e.reflectionTexture,propertyName:"reflectionTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Refraction",texture:e.refractionTexture,propertyName:"refractionTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Emissive",texture:e.emissiveTexture,propertyName:"emissiveTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Bump",texture:e.bumpTexture,propertyName:"bumpTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Opacity",texture:e.opacityTexture,propertyName:"opacityTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Ambient",texture:e.ambientTexture,propertyName:"ambientTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Lightmap",texture:e.lightmapTexture,propertyName:"lightmapTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Detailmap",texture:e.detailMap.texture,material:e,onTextureCreated:function(t){return e.detailMap.texture=t},onTextureRemoved:function(){return e.detailMap.texture=null},onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(Le,{label:"Use lightmap as shadowmap",target:e,propertyName:"useLightmapAsShadowmap",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use detailmap",target:e.detailMap,propertyName:"isEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t.prototype.render=function(){var e=this.props.material;return l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),this.renderTextures(),l.createElement(Oe,{title:"LIGHTING & COLORS",selection:this.props.globalState},l.createElement(Qe,{label:"Diffuse",target:e,propertyName:"diffuseColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Specular",target:e,propertyName:"specularColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Specular power",target:e,propertyName:"specularPower",minimum:0,maximum:128,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Emissive",target:e,propertyName:"emissiveColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Ambient",target:e,propertyName:"ambientColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use specular over alpha",target:e,propertyName:"useSpecularOverAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"LEVELS",closed:!0,selection:this.props.globalState},e.diffuseTexture&&l.createElement(We,{label:"Diffuse level",target:e.diffuseTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.specularTexture&&l.createElement(We,{label:"Specular level",target:e.specularTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.reflectionTexture&&l.createElement(We,{label:"Reflection level",target:e.reflectionTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.refractionTexture&&l.createElement(We,{label:"Refraction level",target:e.refractionTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.emissiveTexture&&l.createElement(We,{label:"Emissive level",target:e.emissiveTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.bumpTexture&&l.createElement(We,{label:"Bump level",target:e.bumpTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.opacityTexture&&l.createElement(We,{label:"Opacity level",target:e.opacityTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.ambientTexture&&l.createElement(We,{label:"Ambient level",target:e.ambientTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.lightmapTexture&&l.createElement(We,{label:"Lightmap level",target:e.lightmapTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),e.detailMap.isEnabled&&l.createElement(l.Fragment,null,l.createElement(We,{label:"Detailmap diffuse",target:e.detailMap,propertyName:"diffuseBlendLevel",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Detailmap bump",target:e.detailMap,propertyName:"bumpLevel",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"NORMAL MAP",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Invert X axis",target:e,propertyName:"invertNormalMapX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Invert Y axis",target:e,propertyName:"invertNormalMapY",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Sn="\n#extension GL_EXT_shader_texture_lod : enable\n\nprecision highp float;\n\nvarying vec2 vUV;\nuniform sampler2D textureSampler;\nuniform float lod;\nuniform vec2 texSize;\nvoid main(void)\n{\n    gl_FragColor = textureLod(textureSampler,vUV,lod);\n}";u.Effect.ShadersStore.lodPixelShader=Sn;var _n="\nprecision highp float;\n\nvarying vec2 vUV;\nuniform samplerCube textureSampler;\nuniform float lod;\nvoid main(void)\n{\n    vec2 uv=vUV*2.0-1.0;\n    #ifdef POSITIVEX\n    gl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x),lod);\n    #endif\n    #ifdef NEGATIVEX\n    gl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x),lod);\n    #endif\n    #ifdef POSITIVEY\n    gl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x),lod);\n    #endif\n    #ifdef NEGATIVEY\n    gl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x),lod);\n    #endif\n    #ifdef POSITIVEZ\n    gl_FragColor=textureCube(textureSampler,vec3(uv,1.001),lod);\n    #endif\n    #ifdef NEGATIVEZ\n    gl_FragColor=textureCube(textureSampler,vec3(uv,-1.001),lod);\n    #endif\n}";u.Effect.ShadersStore.lodCubePixelShader=_n;var wn=function(){function e(){}return e._ProcessAsync=function(e,t,n,r,a,o,l,p,c){return i(this,void 0,void 0,(function(){var i,d,h,m,b,g,f,v,y,C,E,x,O,S,_,w,P,T,k,N,M=this;return s(this,(function(s){switch(s.label){case 0:return i=e.getScene(),d=i.getEngine(),e.isCube?(m=["#define POSITIVEX","#define NEGATIVEX","#define POSITIVEY","#define NEGATIVEY","#define POSITIVEZ","#define NEGATIVEZ"],h=new u.PostProcess("lodCube","lodCube",["lod"],null,1,null,u.Texture.NEAREST_NEAREST_MIPNEAREST,d,!1,m[r])):h=new u.PostProcess("lod","lod",["lod"],null,1,null,u.Texture.NEAREST_NEAREST_MIPNEAREST,d),h.getEffect().isReady()?(l&&(l.blockMutationUpdates=!0),b=new u.RenderTargetTexture("temp",{width:t,height:n},i,!1),h.onApply=function(t){t.setTexture("textureSampler",e),t.setFloat("lod",o)},g=e.getInternalTexture(),b.renderTarget&&g?(f=g.samplingMode,e.updateSamplingMode(u.Texture.NEAREST_NEAREST_MIPNEAREST),i.postProcessManager.directRender([h],b.renderTarget,!0),e.updateSamplingMode(f),v=4*t,y=n/2,[4,d.readPixels(0,0,t,n)]):[3,2]):(h.dispose(),setTimeout((function(){M._ProcessAsync(e,t,n,r,a,o,l,p,c)}),250),[2]);case 1:if(C=s.sent(),E=new Uint8Array(C.buffer,0,C.byteLength),!(a.R&&a.G&&a.B&&a.A))for(w=0;w<t*n*4;w+=4)!a.A||a.R||a.G||a.B?(x=E[w],O=E[w+1],S=E[w+2],_=E[w+3],a.A||(_=255),a.R||(x=a.G&&!a.B?O:a.B&&!a.G?S:0),a.G||(O=a.R&&!a.B?x:a.B&&!a.R?S:0),a.B||(S=a.R&&!a.G?x:a.G&&!a.R?O:0),E[w]=x,E[w+1]=O,E[w+2]=S,E[w+3]=_):(E[w]=E[w+3],E[w+1]=E[w+3],E[w+2]=E[w+3],E[w+3]=255);if(e.invertY||e.isCube)for(w=0;w<y;w++)for(P=0;P<v;P++)k=P+(n-w-1)*v,N=E[T=P+w*v],E[T]=E[k],E[k]=N;return p(E),d.unBindFramebuffer(b.renderTarget),[3,3];case 2:c(),s.label=3;case 3:return b.dispose(),h.dispose(),l&&(l.blockMutationUpdates=!1),[2]}}))}))},e.GetTextureDataAsync=function(e,t,n,r,a,o,i){var s=this;return void 0===i&&(i=0),new Promise((function(l,p){e.isReady()||!e._texture?s._ProcessAsync(e,t,n,r,a,i,o||null,l,p):e._texture.onLoadedObservable.addOnce((function(){s._ProcessAsync(e,t,n,r,a,i,o||null,l,p)}))}))},e}(),Pn=function(e){function t(n){var r=e.call(this,n)||this;return r.state={channels:t.TextureChannelStates.ALL,face:0},r.canvasRef=l.createRef(),r}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){return e.texture!==this.props.texture||t.channels!==this.state.channels||t.face!==this.state.face},t.prototype.componentDidMount=function(){this.updatePreview()},t.prototype.componentDidUpdate=function(){this.updatePreview()},t.prototype.updatePreview=function(){return i(this,void 0,void 0,(function(){var e,t,n,r,a,o,i,l,p;return s(this,(function(s){switch(s.label){case 0:e=this.canvasRef.current,t=this.props.texture,n=t.getSize(),r=n.width/n.height,a=this.props.width,o=a/r|1,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,wn.GetTextureDataAsync(t,a,o,this.state.face,this.state.channels,this.props.globalState)];case 2:return i=s.sent(),e.width=a,e.height=o,(l=e.getContext("2d"))&&(p=l.createImageData(a,o),p.data.set(i),l.putImageData(p,0,0)),e.style.height=o+"px",[3,4];case 3:return s.sent(),e.width=a,e.height=o,e.style.height=o+"px",[3,4];case 4:return[2]}}))}))},t.prototype.render=function(){var e=this,n=this.props.texture;return l.createElement(l.Fragment,null,l.createElement("div",{className:"textureLine"},!this.props.hideChannelSelect&&n.isCube&&l.createElement("div",{className:"control3D"},l.createElement("button",{className:0===this.state.face?"px command selected":"px command",onClick:function(){return e.setState({face:0})}},"+X"),l.createElement("button",{className:1===this.state.face?"nx command selected":"nx command",onClick:function(){return e.setState({face:1})}},"-X"),l.createElement("button",{className:2===this.state.face?"py command selected":"py command",onClick:function(){return e.setState({face:2})}},"+Y"),l.createElement("button",{className:3===this.state.face?"ny command selected":"ny command",onClick:function(){return e.setState({face:3})}},"-Y"),l.createElement("button",{className:4===this.state.face?"pz command selected":"pz command",onClick:function(){return e.setState({face:4})}},"+Z"),l.createElement("button",{className:5===this.state.face?"nz command selected":"nz command",onClick:function(){return e.setState({face:5})}},"-Z")),!this.props.hideChannelSelect&&!n.isCube&&l.createElement("div",{className:"control"},l.createElement("button",{className:this.state.channels===t.TextureChannelStates.R?"red command selected":"red command",onClick:function(){return e.setState({channels:t.TextureChannelStates.R})}},"R"),l.createElement("button",{className:this.state.channels===t.TextureChannelStates.G?"green command selected":"green command",onClick:function(){return e.setState({channels:t.TextureChannelStates.G})}},"G"),l.createElement("button",{className:this.state.channels===t.TextureChannelStates.B?"blue command selected":"blue command",onClick:function(){return e.setState({channels:t.TextureChannelStates.B})}},"B"),l.createElement("button",{className:this.state.channels===t.TextureChannelStates.A?"alpha command selected":"alpha command",onClick:function(){return e.setState({channels:t.TextureChannelStates.A})}},"A"),l.createElement("button",{className:this.state.channels===t.TextureChannelStates.ALL?"all command selected":"all command",onClick:function(){return e.setState({channels:t.TextureChannelStates.ALL})}},"ALL")),l.createElement("canvas",{ref:this.canvasRef,className:"preview"})),n.isRenderTarget&&l.createElement(we,{label:"Refresh",onClick:function(){e.updatePreview()}}))},t.TextureChannelStates={R:{R:!0,G:!1,B:!1,A:!1},G:{R:!1,G:!0,B:!1,A:!1},B:{R:!1,G:!1,B:!0,A:!1},A:{R:!1,G:!1,B:!1,A:!0},ALL:{R:!0,G:!0,B:!0,A:!0}},t}(l.Component),Tn=n(3),kn={vertexSource:"\n            precision highp float;\n\n            attribute vec3 position;\n            attribute vec2 uv;\n\n            uniform mat4 worldViewProjection;\n\n            varying vec2 vUV;\n\n            void main(void) {\n                gl_Position = worldViewProjection * vec4(position, 1.0);\n                vUV = uv;\n            }\n        ",fragmentSource:"\n            precision highp float;\n    \n            uniform sampler2D textureSampler;\n    \n            uniform bool r;\n            uniform bool g;\n            uniform bool b;\n            uniform bool a;\n\n            uniform int x1;\n            uniform int y1;\n            uniform int x2;\n            uniform int y2;\n            uniform int w;\n            uniform int h;\n\n            uniform int time;\n            uniform bool showGrid;\n    \n            varying vec2 vUV;\n\n            float scl = 200.0;\n            float speed = 10.0 / 1000.0;\n            float smoothing = 0.2;\n    \n            void main(void) {\n                vec2 pos2 = vec2(gl_FragCoord.x, gl_FragCoord.y);\n                vec2 pos = floor(pos2 * 0.05);\n                float pattern = mod(pos.x + pos.y, 2.0); \n                if (pattern == 0.0) {\n                    pattern = 0.7;\n                }\n                vec4 bg = vec4(pattern, pattern, pattern, 1.0);\n                vec4 col = texture(textureSampler, vUV);\n                if (!r && !g && !b) {\n                    if (a) {\n                        col = vec4(col.a, col.a, col.a, 1.0);\n                    } else {\n                        col = vec4(0.0,0.0,0.0,0.0);\n                    }\n                } else {\n                    if (!r) {\n                        col.r = 0.0;\n                        if (!b) {\n                            col.r = col.g;\n                        }\n                        else if (!g) {\n                            col.r = col.b;\n                        }\n                    }\n                    if (!g) {\n                        col.g = 0.0;\n                        if (!b) {\n                            col.g = col.r;\n                        }\n                        else if (!r) {\n                            col.g = col.b;\n                        }\n                    }\n                    if (!b) {\n                        col.b = 0.0;\n                        if (!r) {\n                            col.b = col.g;\n                        } else if (!g) {\n                            col.b = col.r;\n                        }\n                    }\n                    if (!a) {\n                        col.a = 1.0;\n                    }\n                }\n                gl_FragColor = col * (col.a) + bg * (1.0 - col.a);\n                float wF = float(w);\n                float hF = float(h);\n                int xPixel = int(floor(vUV.x * wF));\n                int yPixel = int(floor((1.0 - vUV.y) * hF));\n                int xDis = min(abs(xPixel - x1), abs(xPixel - x2));\n                int yDis = min(abs(yPixel - y1), abs(yPixel - y2));\n                if (showGrid) {\n                    vec2 frac = fract(vUV * vec2(wF,hF));\n                    float thickness = 0.1;\n                    if (abs(frac.x) < thickness || abs (frac.y) < thickness) {\n                        gl_FragColor = vec4(0.75,0.75,0.75,1.0);\n                    }\n                }\n                if (xPixel >= x1 && yPixel >= y1 && xPixel <= x2 && yPixel <= y2) {\n                    if (xDis <= 4 || yDis <= 4) {\n                        float c = sin(vUV.x * scl + vUV.y * scl + float(time) * speed);\n                        c = smoothstep(-smoothing,smoothing,c);\n                        float val = 1.0 - c;\n                        gl_FragColor = vec4(val, val, val, 1.0) * 0.7 + gl_FragColor * 0.3;\n                    }\n                }\n            }"},Nn={attributes:["position","uv"],uniforms:["worldViewProjection","textureSampler","r","g","b","a","x1","y1","x2","y2","w","h","time","showGrid"]},Mn=function(){function e(e,t,n,r,a,o,i,s,l,p){var c,d=this;this._isPanning=!1,this._channels=[],this._face=0,this._mipLevel=0,this._didEdit=!1,this._keyMap={},this._buttonsPressed=0,this.ZOOM_MOUSE_SPEED=.001,this.ZOOM_KEYBOARD_SPEED=.4,this.ZOOM_IN_KEY="+",this.ZOOM_OUT_KEY="-",this.PAN_SPEED=.003,this.PAN_KEY="Space",this.MIN_SCALE=.01,this.GRID_SCALE=.047,this.MAX_SCALE=10,this.SELECT_ALL_KEY="KeyA",this.SAVE_KEY="KeyS",this.RESET_KEY="KeyR",this.DESELECT_KEY="Escape",this.PUSH_FREQUENCY=32,this._editing3D=!1,this._canPush=!0,this._shouldPush=!1,this._window=t,this._UICanvas=n,this._2DCanvas=r,this._3DCanvas=a,this._paintCanvas=document.createElement("canvas"),this._setPixelData=o,this._metadata=i,this._onUpdate=s,this._setMetadata=l,this._setMipLevel=p,this._originalTexture=e,this._originalTextureProperties={_texture:this._originalTexture._texture,url:this._originalTexture.url,_forceSerialize:this._originalTexture._forceSerialize},this._engine=new u.Engine(this._UICanvas,!0),this._scene=new u.Scene(this._engine,{virtual:!0}),this._scene.clearColor=new u.Color4(.11,.11,.11,1),this._camera=new u.FreeCamera("camera",new u.Vector3(0,0,-1),this._scene),this._camera.mode=u.Camera.ORTHOGRAPHIC_CAMERA,this._cameraPos=new u.Vector2,this.setSize(e.getSize()),this._channelsTexture=new u.HtmlElementTexture("ct",this._2DCanvas,{engine:this._engine,scene:null,samplingMode:u.Texture.NEAREST_SAMPLINGMODE,generateMipMaps:!0}),this._3DEngine=new u.Engine(this._3DCanvas),this._3DScene=new u.Scene(this._3DEngine,{virtual:!0}),this._3DScene.clearColor=new u.Color4(0,0,0,0),this._3DCanvasTexture=new u.HtmlElementTexture("canvas",this._2DCanvas,{engine:this._3DEngine,scene:this._3DScene}),this._3DCanvasTexture.hasAlpha=!0;var h=new u.FreeCamera("camera",new u.Vector3(0,0,-1),this._3DScene);h.mode=u.Camera.ORTHOGRAPHIC_CAMERA,c=[-.5,-.5,.5,.5],h.orthoBottom=c[0],h.orthoLeft=c[1],h.orthoTop=c[2],h.orthoRight=c[3],this._3DPlane=Object(u.CreatePlane)("texture",{width:1,height:1},this._3DScene),this._3DPlane.hasVertexAlpha=!0;var m=new u.StandardMaterial("material",this._3DScene);m.diffuseTexture=this._3DCanvasTexture,m.useAlphaFromDiffuseTexture=!0,m.disableLighting=!0,m.emissiveColor=u.Color3.White(),this._3DPlane.material=m,this._planeMaterial=new u.ShaderMaterial("canvasShader",this._scene,kn,Nn),this.grabOriginalTexture(),this._planeMaterial.setTexture("textureSampler",this._channelsTexture),this._planeMaterial.setFloat("r",1),this._planeMaterial.setFloat("g",1),this._planeMaterial.setFloat("b",1),this._planeMaterial.setFloat("a",1),this._planeMaterial.setInt("x1",-1),this._planeMaterial.setInt("y1",-1),this._planeMaterial.setInt("x2",-1),this._planeMaterial.setInt("y2",-1),this._planeMaterial.setInt("w",this._size.width),this._planeMaterial.setInt("h",this._size.height),this._planeMaterial.setInt("time",0),this._planeMaterial.setFloat("showGrid",0),this._plane.material=this._planeMaterial,this._window.addEventListener("keydown",(function(e){d._keyMap[e.code]=!0,e.code===d.SELECT_ALL_KEY&&e.ctrlKey&&(d._setMetadata({select:{x1:0,y1:0,x2:d._size.width,y2:d._size.height}}),e.preventDefault()),e.code===d.SAVE_KEY&&e.ctrlKey&&(d.saveTexture(),e.preventDefault()),e.code===d.RESET_KEY&&e.ctrlKey&&(d.reset(),e.preventDefault()),e.code===d.DESELECT_KEY&&d._setMetadata({select:{x1:-1,y1:-1,x2:-1,y2:-1}})})),this._window.addEventListener("keyup",(function(e){d._keyMap[e.code]=!1})),this._engine.runRenderLoop((function(){d._engine.resize(),d._scene.render(),d._planeMaterial.setInt("time",(new Date).getTime())})),this._scale=1.5/Math.max(this._size.width,this._size.height),this._isPanning=!1,this._scene.onBeforeRenderObservable.add((function(){var e,t;d._scale=Math.min(Math.max(d._scale,d.MIN_SCALE/Math.log2(Math.min(d._size.width,d._size.height))),d.MAX_SCALE),d._scale>d.GRID_SCALE?d._planeMaterial.setFloat("showGrid",1):d._planeMaterial.setFloat("showGrid",0);var n=(null===(e=d._UICanvas)||void 0===e?void 0:e.width)/(null===(t=d._UICanvas)||void 0===t?void 0:t.height),r=d._cameraPos,a=r.x,o=r.y;d._camera.orthoBottom=o-1/d._scale,d._camera.orthoTop=o+1/d._scale,d._camera.orthoLeft=a-n/d._scale,d._camera.orthoRight=a+n/d._scale})),this._scene.onPointerObservable.add((function(e){var t,n=1&e.event.buttons,r=4&e.event.buttons;switch(d._isPanning?n&&d._keyMap[d.PAN_KEY]||r||(d._isPanning=!1):((n&&!(1&d._buttonsPressed)&&d._keyMap[d.PAN_KEY]||r)&&(d._isPanning=!0,d._mouseX=e.event.x,d._mouseY=e.event.y),r&&(d._isPanning=!0)),e.type){case u.PointerEventTypes.POINTERWHEEL:var a=e.event;d._scale-=a.deltaY*d.ZOOM_MOUSE_SPEED*d._scale;break;case u.PointerEventTypes.POINTERMOVE:if(d._isPanning&&(d._cameraPos.x-=(e.event.x-d._mouseX)*d.PAN_SPEED/d._scale,d._cameraPos.y+=(e.event.y-d._mouseY)*d.PAN_SPEED/d._scale,d._mouseX=e.event.x,d._mouseY=e.event.y),null===(t=e.pickInfo)||void 0===t?void 0:t.hit){var o=d.getMouseCoordinates(e),i=4*(o.x+o.y*d._size.width);d._setPixelData({x:o.x,y:o.y,r:d._imageData[i],g:d._imageData[i+1],b:d._imageData[i+2],a:d._imageData[i+3]})}else d._setPixelData({})}d._buttonsPressed=e.event.buttons})),this._scene.onKeyboardObservable.add((function(e){switch(e.type){case u.KeyboardEventTypes.KEYDOWN:switch(d._keyMap[e.event.key]=!0,e.event.key){case d.ZOOM_IN_KEY:d._scale+=d.ZOOM_KEYBOARD_SPEED*d._scale;break;case d.ZOOM_OUT_KEY:d._scale-=d.ZOOM_KEYBOARD_SPEED*d._scale}break;case u.KeyboardEventTypes.KEYUP:d._keyMap[e.event.key]=!1}}))}return e.prototype.updateTexture=function(){var e,t;return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return 0===this._mipLevel?[3,2]:[4,this._setMipLevel(0)];case 1:r.sent(),r.label=2;case 2:return this._didEdit=!0,n=this._editing3D?this._3DCanvas:this._2DCanvas,this._editing3D&&(this._3DCanvasTexture.update(),this._3DScene.render()),this._originalTexture.isCube||(this._target?this._target.element=n:this._target=new u.HtmlElementTexture("editor",n,{engine:null===(e=this._originalTexture.getScene())||void 0===e?void 0:e.getEngine(),scene:null,samplingMode:this._originalTexture.samplingMode,generateMipMaps:null===(t=this._originalTextureProperties._texture)||void 0===t?void 0:t.generateMipMaps}),this.pushTexture()),this._originalTexture._texture=this._target._texture,this._originalTexture.url=null,this._originalTexture._forceSerialize=!0,this._channelsTexture.element=n,this.updateDisplay(),this._onUpdate(),[2]}}))}))},e.prototype.pushTexture=function(){var e;return i(this,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(a){switch(a.label){case 0:return this._canPush?(t=this._target.constructor.name!==u.HtmlElementTexture.name&&this._originalTexture.invertY,this._target.update(t),null===(e=this._target._texture)||void 0===e||e.updateSize(this._size.width,this._size.height),this._editing3D?[4,this._3DEngine.readPixels(0,0,this._size.width,this._size.height)]:[3,2]):[3,4];case 1:return n=a.sent(),this._imageData=new Uint8Array(n.buffer,0,n.byteLength),[3,3];case 2:this._imageData=this._2DCanvas.getContext("2d").getImageData(0,0,this._size.width,this._size.height).data,a.label=3;case 3:return this._canPush=!1,this._shouldPush=!1,setTimeout((function(){r._canPush=!0,r._shouldPush&&r.pushTexture()}),this.PUSH_FREQUENCY),[3,5];case 4:this._shouldPush=!0,a.label=5;case 5:return[2]}}))}))},e.prototype.startPainting=function(){return i(this,void 0,void 0,(function(){var e,t,n,r,a;return s(this,(function(o){switch(o.label){case 0:return 0==this._mipLevel?[3,2]:[4,this._setMipLevel(0)];case 1:o.sent(),o.label=2;case 2:return e=0,t=0,n=this._size.width,r=this._size.height,-1!=this._metadata.select.x1&&(e=this._metadata.select.x1,t=this._metadata.select.y1,n=this._metadata.select.x2-this._metadata.select.x1,r=this._metadata.select.y2-this._metadata.select.y1),this._paintCanvas.width=n,this._paintCanvas.height=r,(a=this._paintCanvas.getContext("2d")).imageSmoothingEnabled=!1,a.drawImage(this._2DCanvas,e,t,n,r,0,0,n,r),[2,a]}}))}))},e.prototype.updatePainting=function(){var e=0,t=0,n=this._size.width,r=this._size.height;-1!=this._metadata.select.x1&&(e=this._metadata.select.x1,t=this._metadata.select.y1,n=this._metadata.select.x2-this._metadata.select.x1,r=this._metadata.select.y2-this._metadata.select.y1);var a,o=!0;this._channels.forEach((function(e){e.editable||(o=!1)})),o||(a=this._2DCanvas.getContext("2d").getImageData(e,t,n,r).data);var i=this._paintCanvas.getContext("2d"),s=this.canvas2D.getContext("2d");if(s.globalAlpha=1,s.globalCompositeOperation="destination-out",s.fillStyle="white",s.fillRect(e,t,n,r),s.imageSmoothingEnabled=!1,o)s.globalCompositeOperation="source-over",s.globalAlpha=1,s.drawImage(i.canvas,e,t);else{var l=i.getImageData(0,0,n,r),p=l.data;this._channels.forEach((function(e,t){if(!e.editable)for(var o=t;o<n*r*4;o+=4)p[o]=a[o]})),s.globalCompositeOperation="source-over",s.globalAlpha=1,s.putImageData(l,e,t)}this.updateTexture()},e.prototype.stopPainting=function(){this._paintCanvas.getContext("2d").clearRect(0,0,this._paintCanvas.width,this._paintCanvas.height)},e.prototype.updateDisplay=function(){this._3DScene.render(),this._channelsTexture.update(!0)},Object.defineProperty(e.prototype,"channels",{set:function(e){var t=this,n=!1;e.length!==this._channels.length?n=!0:e.forEach((function(e,r){e.visible!==t._channels[r].visible&&(n=!0,t._planeMaterial.setFloat(e.id.toLowerCase(),e.visible?1:0))})),this._channels=e,n&&this.updateDisplay()},enumerable:!1,configurable:!0}),e.prototype.paintPixelsOnCanvas=function(e,t){var n=t.getContext("2d"),r=n.createImageData(t.width,t.height);r.data.set(e),n.putImageData(r,0,0)},e.prototype.grabOriginalTexture=function(){return i(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return this.setSize(this._originalTexture.getSize()),[4,wn.GetTextureDataAsync(this._originalTexture,this._size.width,this._size.height,this._face,{R:!0,G:!0,B:!0,A:!0},void 0,this._mipLevel)];case 1:return e=t.sent(),this._imageData=e,this.paintPixelsOnCanvas(e,this._2DCanvas),this._3DCanvasTexture.update(),this.updateDisplay(),[2,e]}}))}))},e.prototype.getMouseCoordinates=function(e){var t;if(null===(t=e.pickInfo)||void 0===t?void 0:t.hit){var n=Math.floor(e.pickInfo.getTextureCoordinates().x*this._size.width),r=Math.floor((1-e.pickInfo.getTextureCoordinates().y)*this._size.height);return new u.Vector2(n,r)}return new u.Vector2},Object.defineProperty(e.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canvas2D",{get:function(){return this._2DCanvas},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tool",{get:function(){return this._tool},set:function(e){var t;this._tool&&this._tool.instance.cleanup(),this._tool=e,this._tool&&(this._tool.instance.setup(),this._editing3D&&!this._tool.is3D?(this._editing3D=!1,null===(t=this._2DCanvas.getContext("2d"))||void 0===t||t.drawImage(this._3DCanvas,0,0)):!this._editing3D&&this._tool.is3D&&(this._editing3D=!0,this.updateTexture()))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"face",{set:function(e){this._face!==e&&(this._face=e,this.grabOriginalTexture(),this.updateDisplay())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipLevel",{set:function(e){this._mipLevel!==e&&(this._mipLevel=e,this.grabOriginalTexture())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scene3D",{get:function(){return this._3DScene},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{set:function(e){this._metadata=e;var t=e.select,n=t.x1,r=t.y1,a=t.x2,o=t.y2;this._planeMaterial.setInt("x1",n),this._planeMaterial.setInt("y1",r),this._planeMaterial.setInt("x2",a),this._planeMaterial.setInt("y2",o)},enumerable:!1,configurable:!0}),e.prototype.makePlane=function(){this._plane&&this._plane.dispose(),this._plane=Object(u.CreatePlane)("plane",{width:this._size.width,height:this._size.height},this._scene),this._plane.enableEdgesRendering(),this._plane.edgesWidth=4,this._plane.edgesColor=new u.Color4(1,1,1,1),this._plane.enablePointerMoveEvents=!0,this._plane.material=this._planeMaterial},e.prototype.reset=function(){this._tool&&this._tool.instance.onReset&&this._tool.instance.onReset(),this._originalTexture._texture=this._originalTextureProperties._texture,this._originalTexture.url=this._originalTextureProperties.url,this._originalTexture._forceSerialize=this._originalTextureProperties._forceSerialize,this.grabOriginalTexture(),this.makePlane(),this._didEdit=!1,this._onUpdate()},e.prototype.resize=function(e){return i(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return[4,wn.GetTextureDataAsync(this._originalTexture,e.width,e.height,this._face,{R:!0,G:!0,B:!0,A:!0})];case 1:return t=n.sent(),this.setSize(e),this.paintPixelsOnCanvas(t,this._2DCanvas),this.updateTexture(),this._didEdit=!0,[2]}}))}))},e.prototype.setSize=function(e){var t=this._size;this._size=e,this._2DCanvas.width=this._size.width,this._2DCanvas.height=this._size.height,this._3DCanvas.width=this._size.width,this._3DCanvas.height=this._size.height,this._planeMaterial&&(this._planeMaterial.setInt("w",this._size.width),this._planeMaterial.setInt("h",this._size.height)),t&&t.width==e.width&&t.height==e.height||(this._cameraPos.x=0,this._cameraPos.y=0,this._scale=1.5/Math.max(this._size.width,this._size.height)),this.makePlane()},e.prototype.upload=function(e){var t=this;u.Tools.ReadFile(e,(function(n){var r=new Blob([n],{type:"octet/stream"}),a=void 0;e.name.toLowerCase().indexOf(".dds")>0?a=".dds":e.name.toLowerCase().indexOf(".env")>0&&(a=".env");var o=new FileReader;o.readAsDataURL(r),o.onloadend=function(){var e=o.result;if(".dds"===a||".env"===a)t._originalTexture.updateURL(e,a,(function(){return t.grabOriginalTexture()}));else var n=new u.Texture(e,t._scene,t._originalTexture.noMipmap,!1,u.Texture.NEAREST_SAMPLINGMODE,(function(){wn.GetTextureDataAsync(n,n.getSize().width,n.getSize().height,0,{R:!0,G:!0,B:!0,A:!0}).then((function(e){return i(t,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return this._tool&&this._tool.instance.onReset&&this._tool.instance.onReset(),n.dispose(),this.setSize(n.getSize()),this.paintPixelsOnCanvas(e,this._2DCanvas),[4,this.updateTexture()];case 1:return t.sent(),this._setMipLevel(0),[2]}}))}))}))}))}}),void 0,!0)},e.prototype.saveTexture=function(){var e=this,t=this._editing3D?this._3DCanvas:this._2DCanvas;u.Tools.ToBlob(t,(function(t){u.Tools.Download(t,e._originalTexture.name)}))},e.prototype.toolInteractionEnabled=function(){return!(this._keyMap[this.PAN_KEY]||this._isPanning)},e.prototype.dispose=function(){var e,t;this._didEdit&&(null===(e=this._originalTextureProperties._texture)||void 0===e||e.dispose()),this._tool&&this._tool.instance.cleanup(),null===(t=this._paintCanvas.parentNode)||void 0===t||t.removeChild(this._paintCanvas),this._3DPlane.dispose(),this._3DCanvasTexture.dispose(),this._3DScene.dispose(),this._3DEngine.dispose(),this._plane.dispose(),this._channelsTexture.dispose(),this._planeMaterial.dispose(),this._camera.dispose(),this._scene.dispose(),this._engine.dispose()},e}(),An=function(e){function t(t){var n=e.call(this,t)||this;return n.state={toolURL:"",addOpen:!1},n}return a(t,e),t.prototype.computeRGBAColor=function(){var e=Math.floor(255*this.props.metadata.alpha).toString(16).padStart(2,"0");return u.Color4.FromHexString(""+this.props.metadata.color+e)},t.prototype.shouldComponentUpdate=function(e){return e.tools!=this.props.tools||e.activeToolIndex!==this.props.activeToolIndex||e.metadata!=this.props.metadata||e.pickerOpen!=this.props.pickerOpen},t.prototype.render=function(){var e=this;return l.createElement("div",{id:"toolbar"},l.createElement("div",{id:"tools"},this.props.tools.map((function(t,n){return l.createElement("img",{src:"data:image/svg+xml;base64,"+t.icon,className:n===e.props.activeToolIndex?"icon button active":"icon button",alt:t.name,title:t.name,onClick:function(t){0===t.button&&e.props.changeTool(n)},key:n})}))),l.createElement("div",{id:"color",onClick:function(){e.props.pickerOpen||e.props.setPickerOpen(!0)},title:"Color",className:"icon button"+(this.props.pickerOpen?" active":"")},l.createElement("div",{id:"active-color-bg"},l.createElement("div",{id:"active-color",style:{backgroundColor:this.props.metadata.color,opacity:this.props.metadata.alpha}}))),this.props.pickerOpen&&l.createElement("div",{id:"color-picker",ref:this.props.pickerRef},l.createElement(Me,{color:this.computeRGBAColor(),onColorChanged:function(t){var n={color:t.toHexString(!0),alpha:t.a};n.color===e.props.metadata.color&&n.alpha===e.props.metadata.alpha||e.props.setMetadata(n)}})))},t}(l.Component),Ln=function(e){function t(t){var r=e.call(this,t)||this;return r._resetButton=n(80),r._uploadButton=n(81),r._saveButton=n(82),r._babylonLogo=n(83),r._resizeButton=n(84),r._mipUp=n(85),r._mipDown=n(86),r._faces=[n(87),n(88),n(89),n(90),n(91),n(92)],r.state={width:t.size.width,height:t.size.height},r}return a(t,e),t.prototype.pixelData=function(e){return l.createElement("span",{className:"pixel-data"},e.name,": ",l.createElement("span",{className:"value"},void 0!==e.data?e.data:"-"))},t.prototype.getNewDimension=function(e,t){return!isNaN(t)&&parseInt(t)>0&&Number.isInteger(parseInt(t))?parseInt(t):e},t.prototype.componentWillUpdate=function(e){e.size.width==this.props.size.width&&e.size.height==this.props.size.height||this.setState({width:e.size.width,height:e.size.height})},t.prototype.render=function(){var e=this,t=this.props,n=t.mipLevel,r=t.setMipLevel,a=t.pixelData,o=t.resizeTexture,i=t.texture,s=t.face,p=t.setFace,c=t.saveTexture,u=t.resetTexture,d=t.uploadTexture,h=Math.floor(Math.log2(Math.max(i.getSize().width,i.getSize().height))),m=i.getScene().getEngine(),b=!i.noMipmap&&m.getCaps().textureLOD;return l.createElement("div",{id:"properties"},l.createElement("div",{className:"tab",id:"logo-tab"},l.createElement("img",{className:"icon",src:this._babylonLogo})),l.createElement("div",{id:"left"},l.createElement("div",{className:"tab",id:"dimensions-tab"},l.createElement("form",{onSubmit:function(t){e.props.resizeTexture(e.state.width,e.state.height),t.preventDefault()}},l.createElement("label",{className:"dimensions"},"W:"," ",l.createElement("input",{type:"text",value:this.state.width,readOnly:i.isCube,onChange:function(t){return e.setState({width:e.getNewDimension(e.state.width,t.target.value)})}})),l.createElement("label",{className:"dimensions"},"H:"," ",l.createElement("input",{type:"text",value:this.state.height,readOnly:i.isCube,onChange:function(t){return e.setState({height:e.getNewDimension(e.state.height,t.target.value)})}})),!i.isCube&&l.createElement("img",{id:"resize",className:"icon button",title:"Resize",alt:"Resize",src:this._resizeButton,onClick:function(){return o(e.state.width,e.state.height)}}))),l.createElement("div",{className:"tab",id:"pixel-coords-tab"},l.createElement(this.pixelData,{name:"X",data:a.x}),l.createElement(this.pixelData,{name:"Y",data:a.y})),l.createElement("div",{className:"tab",id:"pixel-color-tab"},l.createElement(this.pixelData,{name:"R",data:a.r}),l.createElement(this.pixelData,{name:"G",data:a.g}),l.createElement(this.pixelData,{name:"B",data:a.b}),l.createElement(this.pixelData,{name:"A",data:a.a})),i.isCube&&l.createElement("div",{className:"tab",id:"face-tab"},this._faces.map((function(e,t){return l.createElement("img",{key:t,className:s==t?"icon face button active":"icon face button",src:e,onClick:function(){return p(t)}})}))),b&&l.createElement("div",{className:"tab",id:"mip-tab"},l.createElement("img",{title:"Mip Preview Up",className:"icon button",src:this._mipUp,onClick:function(){return n>0&&r(n-1)}}),l.createElement("img",{title:"Mip Preview Down",className:"icon button",src:this._mipDown,onClick:function(){return n<h&&r(n+1)}}))),l.createElement("div",{className:"tab",id:"right-tab"},l.createElement("img",{title:"Reset",className:"icon button",src:this._resetButton,onClick:function(){return u()}}),l.createElement("label",null,l.createElement("input",{accept:".jpg, .png, .tga, .dds, .env",type:"file",onChange:function(e){var t=e.target.files;t&&t.length&&d(t[0]),e.target.value=""}}),l.createElement("img",{title:"Upload",className:"icon button",src:this._uploadButton})),l.createElement("img",{title:"Save",className:"icon button",src:this._saveButton,onClick:function(){return c()}})))},t}(l.PureComponent),Rn=n(93),In=n(94),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{id:"channels-bar"},this.props.channels.map((function(t,n){var r=t.visible?"Hide":"Show",a=t.editable?"Lock":"Unlock";return l.createElement("div",{key:t.name,className:t.editable?"channel":"channel uneditable"},l.createElement("img",{className:t.visible?"icon channel-visibility visible":"icon channel-visibility",onClick:function(){var t=e.props.channels;t[n].visible=!t[n].visible,e.props.setChannels(t)},src:t.visible?Rn:In,title:r+" "+t.name}),l.createElement("img",{className:"icon channel-name",onClick:function(){var t=e.props.channels;t[n].editable=!t[n].editable,e.props.setChannels(t)},src:t.icon,title:a+" "+t.name}))})))},t}(l.PureComponent),jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=Math.pow(2,this.props.mipLevel),t=Math.ceil(this.props.texture.getSize().width/e),n=Math.ceil(this.props.texture.getSize().height/e);return l.createElement("div",{id:"bottom-bar"},l.createElement("span",{id:"file-url"},this.props.texture.name),!this.props.texture.noMipmap&&l.createElement("span",{id:"mip-level"},"MIP Preview: ",this.props.mipLevel," ",t,"x",n))},t}(l.PureComponent),zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return l.createElement("div",null,l.createElement("canvas",{id:"canvas-ui",ref:this.props.canvasUI,tabIndex:1}),l.createElement("canvas",{id:"canvas-2D",ref:this.props.canvas2D,hidden:!0}),l.createElement("canvas",{id:"canvas-3D",ref:this.props.canvas3D,hidden:!0}))},t}(l.Component),Fn={name:"Paintbrush",type:function(){function e(e){this.width=15,this.mousePos=null,this.getParameters=e}return e.prototype.paint=function(e){var t=this.getParameters(),n=t.getMouseCoordinates,r=t.metadata,a=t.updatePainting,o=n(e),i=o.x,s=o.y;-1!=r.select.x1&&(i-=r.select.x1,s-=r.select.y1);var l,p,c=this.ctx;if(p=new u.Vector2,null==this.mousePos)this.mousePos=new u.Vector2(i,s),l=1;else{var d=this.width/4,h=new u.Vector2(i-this.mousePos.x,s-this.mousePos.y);l=Math.ceil(h.length()/d);var m=h.length()/l;p=h.normalize().multiplyByFloats(m,m)}for(var b=this.mousePos.clone(),g=0;g<l;g++)c.globalAlpha=1,c.globalCompositeOperation="destination-out",c.drawImage(this.circleCanvas,Math.ceil(b.x-this.width/2),Math.ceil(b.y-this.width/2)),c.globalAlpha=r.alpha,c.globalCompositeOperation="source-over",c.drawImage(this.circleCanvas,Math.ceil(b.x-this.width/2),Math.ceil(b.y-this.width/2)),b.addInPlace(p);a(),this.mousePos=new u.Vector2(i,s)},e.prototype.setBrushWidth=function(e){this.width=e},e.prototype.setup=function(){var e=this,t=this.getParameters().scene;this.pointerObserver=t.onPointerObservable.add((function(t){return i(e,void 0,void 0,(function(){var e,n,r,a,o,i,l,p,c,d,h,m,b,g,f,v,y,C,E,x,O,S,_;return s(this,(function(s){switch(s.label){case 0:if(e=this.getParameters(),n=e.startPainting,r=e.stopPainting,a=e.metadata,this.isPainting)return[3,3];if(t.type!==u.PointerEventTypes.POINTERDOWN||1!==t.event.buttons||!this.getParameters().interactionEnabled()||!(null===(O=t.pickInfo)||void 0===O?void 0:O.hit))return[3,2];for(this.isPainting=!0,(o=document.createElement("canvas")).width=this.width,o.height=this.width,(i=o.getContext("2d")).imageSmoothingEnabled=!1,l=new Array(4*this.width*this.width),p=this.width*this.width/4,c=u.Color3.FromHexString(a.color),d=Math.floor(255*c.r),h=Math.floor(255*c.g),m=Math.floor(255*c.b),b=0,g=-Math.floor(this.width/2),f=Math.ceil(this.width/2),v=-Math.floor(this.width/2),y=Math.ceil(this.width/2),C=v;C<y;C++)for(E=g;E<f;E++)l[b++]=d,l[b++]=h,l[b++]=m,l[b++]=E*E+C*C<=p?255:0;return i.putImageData(new ImageData(Uint8ClampedArray.from(l),this.width,this.width),0,0),this.circleCanvas=o,x=this,[4,n()];case 1:x.ctx=s.sent(),this.paint(t),s.label=2;case 2:return[3,4];case 3:1===t.event.buttons&&this.getParameters().interactionEnabled()?(null===(_=t.pickInfo)||void 0===_?void 0:_.hit)&&t.type===u.PointerEventTypes.POINTERMOVE&&this.paint(t):(this.isPainting=!1,null===(S=this.circleCanvas.parentNode)||void 0===S||S.removeChild(this.circleCanvas),r(),this.mousePos=null),s.label=4;case 4:return[2]}}))}))})),this.isPainting=!1},e.prototype.cleanup=function(){this.isPainting=!1,this.pointerObserver&&this.getParameters().scene.onPointerObservable.remove(this.pointerObserver)},e}(),settingsComponent:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.instance;return l.createElement("div",null,l.createElement("label",{className:"tool-slider-input"},l.createElement("span",null,"Size: ",t.width),l.createElement("input",{id:"contrast-slider",type:"range",min:1,max:100,value:t.width,onChange:function(n){t.setBrushWidth(n.target.valueAsNumber),e.forceUpdate()}})))},t}(l.Component),icon:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cmVjdCB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHN0eWxlPSJmaWxsOm5vbmUiLz48cGF0aCBkPSJNMjksMTFhMy41NywzLjU3LDAsMCwxLDAsNS4wNkwxNywyOGEyLjM0LDIuMzQsMCwwLDEtMSwuNThMMTAuOTEsMzBhLjc1Ljc1LDAsMCwxLS45Mi0uOTJMMTEuMzgsMjRBMi4zNCwyLjM0LDAsMCwxLDEyLDIzbDEyLTEyQTMuNTcsMy41NywwLDAsMSwyOSwxMVpNMjMsMTQuMSwxMywyNGEuNjkuNjksMCwwLDAtLjE5LjMzbC0xLjA1LDMuODUsMy44NS0xQS42OS42OSwwLDAsMCwxNiwyN0wyNS45LDE3Wm0yLTItMSwxTDI3LDE2bDEtMUEyLjA4LDIuMDgsMCwxLDAsMjUsMTIuMDdaIiBzdHlsZT0iZmlsbDojZmZmIi8+PC9zdmc+",cursor:"iVBORw0KGgoAAAANSUhEUgAAABUAAAAVAgMAAADUeU0FAAAACVBMVEUAAAAAAAD///+D3c/SAAAAAXRSTlMAQObYZgAAAAFiS0dEAmYLfGQAAAA3SURBVAjXY2CAgVUNYGoqhFJjwE2BgQYDBwMXUGiFGtcyBgbVkKmtYXAeVA4O8BkGtQ9qOwgAAEPfC1QJPmWqAAAAAElFTkSuQmCC"},Vn={name:"Eyedropper",type:function(){function e(e){this.getParameters=e}return e.prototype.pick=function(e){var t=this.getParameters(),n=t.canvas2D,r=t.setMetadata,a=t.getMouseCoordinates,o=n.getContext("2d"),i=a(e),s=i.x,l=i.y,p=o.getImageData(s,l,1,1).data;r({color:u.Color3.FromInts(p[0],p[1],p[2]).toHexString(),alpha:p[3]/255})},e.prototype.setup=function(){var e=this;this.pointerObserver=this.getParameters().scene.onPointerObservable.add((function(t){var n;(null===(n=t.pickInfo)||void 0===n?void 0:n.hit)&&(t.type===u.PointerEventTypes.POINTERDOWN&&1===t.event.buttons&&e.getParameters().interactionEnabled()&&(e.isPicking=!0,e.pick(t)),e.isPicking&&(1===t.event.buttons&&e.getParameters().interactionEnabled()?e.pick(t):e.isPicking=!1))})),this.isPicking=!1},e.prototype.cleanup=function(){this.pointerObserver&&this.getParameters().scene.onPointerObservable.remove(this.pointerObserver)},e}(),icon:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cmVjdCB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHN0eWxlPSJmaWxsOm5vbmUiLz48cGF0aCBkPSJNMjkuMzIsMTAu\n    NjhjLTEuNjYtMS42Ni00LjA2LTEtNS41Ni41YTExLjg5LDExLjg5LDAsMCwwLTEuNjYsMi4zMUwyMiwxMy40MWExLjg5LDEuODksMCwwLDAtMi42NiwwbC0uOS45YTEuODksMS44OSwwLDAsMC0uMjIsMi4zOWwtNi4wOSw2LjA5YTIuNzUsMi43NSwwLDAsMC0uNzMs\n    MS4yOGwtLjgxLDMuMjYtLjU2LjU2YTEuMTYsMS4xNiwwLDAsMCwwLDEuNjVsLjQxLjQxYTEuMTcsMS4xNywwLDAsMCwxLjY1LDBsLjU2LS41NiwzLjI2LS44MWEyLjc1LDIuNzUsMCwwLDAsMS4yOC0uNzNsNi4xNC02LjE0YTEuODcsMS44NywwLDAsMCwuODQuMjEs\n    MS44MywxLjgzLDAsMCwwLDEuMzMtLjU1bC45LS45YTEuODcsMS44NywwLDAsMCwuMDgtMi41NywxMS41NCwxMS41NCwwLDAsMCwyLjMyLTEuNjZDMzAuMzIsMTQuNzQsMzEsMTIuMzUsMjkuMzIsMTAuNjhaTTE2LjE1LDI2Ljc5YTEuMjEsMS4yMSwwLDAsMS0uNTgu\n    MzNMMTIsMjhsLjktMy41OWExLjIxLDEuMjEsMCwwLDEsLjMzLS41OGw2LjA3LTYuMDcsMi45NCwyLjk0Wm05LjIxLTcuMzgtLjkuOWMtLjE5LjItLjM0LjItLjU0LDBsLTQuNC00LjRhLjQuNCwwLDAsMSwwLS41NGwuOS0uOWEuNDMuNDMsMCwwLDEsLjI3LS4xMS4z\n    OS4zOSwwLDAsMSwuMjcuMTFsNC40LDQuNEEuMzguMzgsMCwwLDEsMjUuMzYsMTkuNDFabTMuMzgtNS45M2EzLjcsMy43LDAsMCwxLTEsMS43LDExLjY3LDExLjY3LDAsMCwxLTIuMzUsMS42MkwyMy4yLDE0LjU5YTExLjY3LDExLjY3LDAsMCwxLDEuNjItMi4zNSwz\n    LjcsMy43LDAsMCwxLDEuNy0xLDEuODMsMS44MywwLDAsMSwyLjIyLDIuMjJaIiBzdHlsZT0iZmlsbDojZmZmIi8+PC9zdmc+",cursor:"iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAABmJLR0QA/wD/AP+gvaeTAAAByklEQVQ4jbWUv4saQRTHd+4s/BuCYRH1n7BQEhCRuyJ3RQgpRVt/tFvYSAjLxMPiWIJ1OA6OKwKBdCGBkIS4pFs76xgXhOlyyconzSrrojub4l618+a9z/u+mTdrGPdgIk0QwDZBCG3OUerqepYeCgigAbyJ+a+AEyB9lTDxAfBhPp9jWRZh+wB0u11msxnAJyCXSmkI/DIejx9Vq1Ujm83u7OdyOaPRaBi2bVeAr8BDnUIBfJRSUi6XWSwWa+B1VClw6ft+UKlUsG0b4DNw+G6AU8/zME2T5XIZAE9C/xYark983/9rmubmKM6SoNedTofRaARwqenqQkpJr9cDuI3uiYiSvbaZS4Dod1J8JrJIUoUQYgs+FLuplYk79lQ2hBAipvSggH2Vbvr9PlJKgFea2JeO49BqtQDeJgWee55HPp9ntVr9AR6H/vjtV5VSd8Vikel0CvA0CXoEfBsOh9RqNZRSd8CL2JwOlVK/6/X65rVNgWPdEeTX6/XPwWBAqVRiMpnsPFPHcSgUCliWRRAEv4BCIjAKBr67rkuz2dyBttttXNcF+AEUUwEj4GPgGfAu1v574DmQ0UI0BXYuSmepf9L/NZv3Yf8AKtG4imEra4UAAAAASUVORK5CYII="},Un={name:"Floodfill",type:function(){function e(e){this.getParameters=e}return e.prototype.fill=function(){return i(this,void 0,void 0,(function(){var e,t,n,r,a,o;return s(this,(function(i){switch(i.label){case 0:return e=this.getParameters(),t=e.metadata,n=e.startPainting,r=e.updatePainting,a=e.stopPainting,[4,n()];case 1:return(o=i.sent()).fillStyle=t.color,o.globalAlpha=t.alpha,o.globalCompositeOperation="copy",o.fillRect(0,0,o.canvas.width,o.canvas.height),r(),a(),[2]}}))}))},e.prototype.setup=function(){var e=this;this.pointerObserver=this.getParameters().scene.onPointerObservable.add((function(t){var n;t.type===u.PointerEventTypes.POINTERDOWN&&1===t.event.buttons&&e.getParameters().interactionEnabled()&&(null===(n=t.pickInfo)||void 0===n?void 0:n.hit)&&e.fill()}))},e.prototype.cleanup=function(){this.pointerObserver&&this.getParameters().scene.onPointerObservable.remove(this.pointerObserver)},e}(),icon:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cmVjdCB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHN0eWxlPSJmaWxsOm5vbmUiLz48cGF0aCBkPSJNMjAsMTAuNWEu\n    NzUuNzUsMCwwLDAtMS41LDB2MS4yNWEyLjE0LDIuMTQsMCwwLDAtLjg0LjUzbC02Ljg4LDYuODhhMi4yNSwyLjI1LDAsMCwwLDAsMy4xOGw0Ljg4LDQuODhhMi4yNSwyLjI1LDAsMCwwLDMuMTgsMGw2Ljg4LTYuODhhMi4yNSwyLjI1LDAsMCwwLDAtMy4xOGwtNC44\n    OC00Ljg4YTIuMjksMi4yOSwwLDAsMC0uODQtLjUzWm0tOC4xNiw5LjcyLDYuNjYtNi42NlYxNUEuNzUuNzUsMCwwLDAsMjAsMTVWMTMuNTZsNC42Niw0LjY2YS43NS43NSwwLDAsMSwwLDEuMDZsLTEsMUgxMS44Wm0uNDcsMS41M2g5Ljg4bC00LjQxLDQuNDFhLjc1\n    Ljc1LDAsMCwxLTEuMDYsMFoiIHN0eWxlPSJmaWxsOiNmZmYiLz48cGF0aCBkPSJNMjcuNTEsMjEuODVhLjg4Ljg4LDAsMCwwLTEuNTQsMGwtMiwzLjc3YTMuMTUsMy4xNSwwLDEsMCw1LjU2LDBabS0yLjIzLDQuNDcsMS40Ni0yLjczLDEuNDUsMi43M2ExLjY1LDEu\n    NjUsMCwxLDEtMi45MSwwWiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjwvc3ZnPg=="},Gn=[{name:"Rectangle Select",type:function(){function e(e){this.isSelecting=!1,this.xStart=-1,this.yStart=-1,this.getParameters=e}return e.prototype.setup=function(){var e=this,t=this.getParameters().scene;this.pointerObserver=t.onPointerObservable.add((function(t){var n,r,a,o=e.getParameters(),i=o.getMouseCoordinates,s=o.setMetadata,l=o.metadata;if(e.isSelecting)if(1===t.event.buttons&&e.getParameters().interactionEnabled()){if((null===(a=t.pickInfo)||void 0===a?void 0:a.hit)&&t.type===u.PointerEventTypes.POINTERMOVE&&t.type===u.PointerEventTypes.POINTERMOVE&&e.isSelecting){var p=i(t);c=p.x,d=p.y;s({select:{x1:Math.min(c,e.xStart),y1:Math.min(d,e.yStart),x2:Math.max(c,e.xStart),y2:Math.max(d,e.yStart)}})}}else e.isSelecting=!1,l.select.x1!==l.select.x2&&l.select.y1!==l.select.y2||s({select:{x1:-1,y1:-1,x2:-1,y2:-1}});else if(t.type==u.PointerEventTypes.POINTERDOWN&&t&&1===t.event.buttons&&e.getParameters().interactionEnabled()&&(null===(r=t.pickInfo)||void 0===r?void 0:r.hit)){e.isSelecting=!0;var c,d,h=(n=i(t),e.xStart=n.x,e.yStart=n.y,n);s({select:{x1:c=h.x,y1:d=h.y,x2:c,y2:d}})}}))},e.prototype.cleanup=function(){this.isSelecting=!1,this.pointerObserver&&this.getParameters().scene.onPointerObservable.remove(this.pointerObserver)},e}(),icon:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cmVjdCB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHN0eWxlPSJmaWxsOm5vbmUiLz48cGF0aCBkPSJNMTEuNjMsMTUuNjNIMTAuMzh2LTMuN2ExLjU0LDEuNTQsMCwwLDEsMS41NS0xLjU1aDMuN3YxLjI1SDEyLjI1YS42Mi42MiwwLDAsMC0uNjIuNjJaIiBzdHlsZT0iZmlsbDojZmZmIi8+PHBhdGggZD0iTTExLjYzLDIyLjYzSDEwLjM4VjE3LjM4aDEuMjVaIiBzdHlsZT0iZmlsbDojZmZmIi8+PHBhdGggZD0iTTI5LjYzLDIyLjYzSDI4LjM4VjE3LjM4aDEuMjVaIiBzdHlsZT0iZmlsbDojZmZmIi8+PHBhdGggZD0iTTE1LjYzLDI5LjYzaC0zLjdhMS41NSwxLjU1LDAsMCwxLTEuNTUtMS41NlYyNC4zOGgxLjI1djMuMzdhLjYzLjYzLDAsMCwwLC42Mi42M2gzLjM4WiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjxwYXRoIGQ9Ik0yOC4wNywyOS42M0gyNC4zOFYyOC4zOGgzLjM3YS42NC42NCwwLDAsMCwuNjMtLjYzVjI0LjM4aDEuMjV2My42OUExLjU2LDEuNTYsMCwwLDEsMjguMDcsMjkuNjNaIiBzdHlsZT0iZmlsbDojZmZmIi8+PHBhdGggZD0iTTIyLjYzLDExLjYzSDE3LjM4VjEwLjM4aDUuMjVaIiBzdHlsZT0iZmlsbDojZmZmIi8+PHBhdGggZD0iTTI5LjYzLDE1LjYzSDI4LjM4VjEyLjI1YS42My42MywwLDAsMC0uNjMtLjYySDI0LjM4VjEwLjM4aDMuNjlhMS41NSwxLjU1LDAsMCwxLDEuNTYsMS41NVoiIHN0eWxlPSJmaWxsOiNmZmYiLz48cGF0aCBkPSJNMjIuNjMsMjkuNjNIMTcuMzhWMjguMzhoNS4yNVoiIHN0eWxlPSJmaWxsOiNmZmYiLz48L3N2Zz4=",cursor:"iVBORw0KGgoAAAANSUhEUgAAABUAAAAVAgMAAADUeU0FAAAACVBMVEUAAAAAAAD///+D3c/SAAAAAXRSTlMAQObYZgAAAAFiS0dEAmYLfGQAAAAnSURBVAjXY2CAAS0IpUY0BdG1ikNrFQODaqiaaBicBwfEG6aF0AQA4oYGiJg4woEAAAAASUVORK5CYII="},Fn,Vn,Un],Bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return this.props.tool&&this.props.tool.settingsComponent?l.createElement("div",{id:"tool-ui"},l.createElement(this.props.tool.settingsComponent,{instance:this.props.tool.instance})):l.createElement(l.Fragment,null)},t}(l.Component);n(95);var Hn=function(e){function t(t){var r=e.call(this,t)||this;r._UICanvas=l.createRef(),r._2DCanvas=l.createRef(),r._3DCanvas=l.createRef(),r._pickerRef=l.createRef();var a=[{name:"Red",visible:!0,editable:!0,id:"R",icon:n(97)},{name:"Green",visible:!0,editable:!0,id:"G",icon:n(98)},{name:"Blue",visible:!0,editable:!0,id:"B",icon:n(99)}];return r.props.texture.isCube?a.push({name:"Display",visible:!0,editable:!0,id:"A",icon:n(100)}):a.push({name:"Alpha",visible:!0,editable:!0,id:"A",icon:n(101)}),r.state={tools:[],activeToolIndex:-1,metadata:{color:"#ffffff",alpha:1,select:{x1:-1,y1:-1,x2:-1,y2:-1}},channels:a,pixelData:{},face:0,mipLevel:0,pickerOpen:!1},r.loadToolFromURL=r.loadToolFromURL.bind(r),r.changeTool=r.changeTool.bind(r),r.setMetadata=r.setMetadata.bind(r),r.saveTexture=r.saveTexture.bind(r),r.resetTexture=r.resetTexture.bind(r),r.resizeTexture=r.resizeTexture.bind(r),r.uploadTexture=r.uploadTexture.bind(r),r.setPickerOpen=r.setPickerOpen.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r}return a(t,e),t.prototype.componentDidMount=function(){var e=this;this._textureCanvasManager=new Mn(this.props.texture,this.props.window.current.getWindow(),this._UICanvas.current,this._2DCanvas.current,this._3DCanvas.current,(function(t){e.setState({pixelData:t})}),this.state.metadata,(function(){return e.textureDidUpdate()}),(function(t){return e.setMetadata(t)}),(function(t){return e.setState({mipLevel:t})})),this.addTools(Gn)},t.prototype.componentDidUpdate=function(){var e=[];this.state.channels.forEach((function(t){return e.push(o({},t))})),this._textureCanvasManager.channels=e,this._textureCanvasManager.face=this.state.face,this._textureCanvasManager.mipLevel=this.state.mipLevel},t.prototype.componentWillUnmount=function(){this._textureCanvasManager.dispose()},t.prototype.textureDidUpdate=function(){var e=this;null!=this._timer&&clearTimeout(this._timer),this._timer=window.setTimeout((function(){e.props.onUpdate(),e._timer=null}),t.PREVIEW_UPDATE_DELAY_MS)},t.prototype.loadToolFromURL=function(e){var t=this;u.Tools.LoadScript(e,(function(){t.addTools([_TOOL_DATA_])}))},t.prototype.addTools=function(e){var t=this,n=[];e.forEach((function(e){var r=o(o({},e),{instance:new e.type((function(){return t.getToolParameters()}))});n=n.concat(r)})),n=this.state.tools.concat(n),this.setState({tools:n})},t.prototype.getToolParameters=function(){var e=this;return{scene:this._textureCanvasManager.scene,canvas2D:this._textureCanvasManager.canvas2D,scene3D:this._textureCanvasManager.scene3D,size:this._textureCanvasManager.size,updateTexture:function(){return e._textureCanvasManager.updateTexture()},startPainting:function(){return e._textureCanvasManager.startPainting()},stopPainting:function(){return e._textureCanvasManager.stopPainting()},updatePainting:function(){return e._textureCanvasManager.updatePainting()},metadata:this.state.metadata,setMetadata:function(t){return e.setMetadata(t)},getMouseCoordinates:function(t){return e._textureCanvasManager.getMouseCoordinates(t)},interactionEnabled:function(){return e._textureCanvasManager.toolInteractionEnabled()},BABYLON:BABYLON}},t.prototype.changeTool=function(e){this._textureCanvasManager.tool=-1!=e?this.state.tools[e]:null,this.setState({activeToolIndex:e})},t.prototype.setMetadata=function(e){var t=o(o({},this.state.metadata),e);this.setState({metadata:t}),this._textureCanvasManager.metadata=t},t.prototype.setPickerOpen=function(e){this.setState({pickerOpen:e})},t.prototype.onPointerDown=function(e){var t;(null===(t=this._pickerRef.current)||void 0===t?void 0:t.contains(e.target))||this.setPickerOpen(!1)},t.prototype.saveTexture=function(){this._textureCanvasManager.saveTexture()},t.prototype.resetTexture=function(){this._textureCanvasManager.reset()},t.prototype.resizeTexture=function(e,t){this._textureCanvasManager.resize({width:e,height:t})},t.prototype.uploadTexture=function(e){this._textureCanvasManager.upload(e)},t.prototype.render=function(){var e,t,n=this,r=this.state.tools[this.state.activeToolIndex],a="initial";return(null===(e=this._textureCanvasManager)||void 0===e?void 0:e.toolInteractionEnabled())?r&&r.cursor&&(a="url(data:image/png;base64,"+r.cursor+") 10 10, auto"):a="pointer",l.createElement("div",{id:"texture-editor",onPointerDown:this.onPointerDown,style:{cursor:a}},l.createElement(Ln,{texture:this.props.texture,saveTexture:this.saveTexture,pixelData:this.state.pixelData,face:this.state.face,setFace:function(e){return n.setState({face:e})},resetTexture:this.resetTexture,resizeTexture:this.resizeTexture,uploadTexture:this.uploadTexture,mipLevel:this.state.mipLevel,setMipLevel:function(e){return n.setState({mipLevel:e})},size:(null===(t=this._textureCanvasManager)||void 0===t?void 0:t.size)||this.props.texture.getSize()}),!this.props.texture.isCube&&l.createElement(An,{tools:this.state.tools,activeToolIndex:this.state.activeToolIndex,addTool:this.loadToolFromURL,changeTool:this.changeTool,metadata:this.state.metadata,setMetadata:this.setMetadata,pickerOpen:this.state.pickerOpen,setPickerOpen:this.setPickerOpen,pickerRef:this._pickerRef,hasAlpha:-1===this.props.texture.textureFormat||this.props.texture.textureFormat===u.Constants.TEXTUREFORMAT_RGBA}),l.createElement(Dn,{channels:this.state.channels,setChannels:function(e){n.setState({channels:e})}}),l.createElement(zn,{canvas2D:this._2DCanvas,canvas3D:this._3DCanvas,canvasUI:this._UICanvas,texture:this.props.texture}),l.createElement(Bn,{tool:r}),l.createElement(jn,{texture:this.props.texture,mipLevel:this.state.mipLevel}))},t.PREVIEW_UPDATE_DELAY_MS=160,t}(l.Component),Wn="https://unpkg.com/babylonjs-gui-editor@"+u.Engine.Version+"/babylon.guiEditor.js",Kn=null;function Yn(){return"undefined"!=typeof GUIEDITOR?GUIEDITOR:"undefined"!=typeof BABYLON&&void 0!==BABYLON.GUIEditor?BABYLON:void 0}function Xn(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:if(Kn)return[3,6];if("undefined"==typeof BABYLON)return[3,5];if(void 0!==(Kn=Kn||Yn()))return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,u.Tools.LoadScriptAsync(Wn)];case 2:return t.sent(),Kn=Kn||Yn(),[3,4];case 3:throw t.sent(),"Failed to load GUI editor from "+Wn;case 4:return[3,6];case 5:throw'Tried to call EditAdvancedDynamicTexture without first injecting the GUI editor. You need to call InjectGUIEditor() with a reference to @babylonjs/gui-editor. It can be imported at runtime using await import("@babylonjs/gui-editor").';case 6:return Kn.GUIEditor.Show({liveGuiTexture:e}),[2]}}))}))}var Zn,qn=[{label:"Alpha",normalizable:0,value:u.Constants.TEXTUREFORMAT_ALPHA},{label:"Luminance",normalizable:0,value:u.Constants.TEXTUREFORMAT_LUMINANCE},{label:"Luminance/Alpha",normalizable:0,value:u.Constants.TEXTUREFORMAT_LUMINANCE_ALPHA},{label:"RGB",normalizable:1,value:u.Constants.TEXTUREFORMAT_RGB},{label:"RGBA",normalizable:1,value:u.Constants.TEXTUREFORMAT_RGBA},{label:"R (red)",normalizable:1,value:u.Constants.TEXTUREFORMAT_RED},{label:"RG (red/green)",normalizable:1,value:u.Constants.TEXTUREFORMAT_RG},{label:"R (red) integer",normalizable:0,value:u.Constants.TEXTUREFORMAT_RED_INTEGER},{label:"RG (red/green) integer",normalizable:0,value:u.Constants.TEXTUREFORMAT_RG_INTEGER},{label:"RGB integer",normalizable:0,value:u.Constants.TEXTUREFORMAT_RGB_INTEGER},{label:"RGBA integer",normalizable:0,value:u.Constants.TEXTUREFORMAT_RGBA_INTEGER},{label:"BGRA",normalizable:1,value:u.Constants.TEXTUREFORMAT_BGRA},{label:"Depth24/Stencil8",normalizable:0,hideType:!0,value:u.Constants.TEXTUREFORMAT_DEPTH24_STENCIL8},{label:"Depth32 float",normalizable:0,hideType:!0,value:u.Constants.TEXTUREFORMAT_DEPTH32_FLOAT},{label:"Depth16",normalizable:0,value:u.Constants.TEXTUREFORMAT_DEPTH16},{label:"Depth24",normalizable:0,value:u.Constants.TEXTUREFORMAT_DEPTH24},{label:"RGBA BPTC UNorm",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM},{label:"RGB BPTC UFloat",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT},{label:"RGB BPTC SFloat",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT},{label:"RGBA S3TC DXT5",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5},{label:"RGBA S3TC DXT3",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3},{label:"RGBA S3TC DXT1",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1},{label:"RGB S3TC DXT1",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1},{label:"RGBA ASTC 4x4",normalizable:0,compressed:!0,value:u.Constants.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4}],Qn=[{label:"unsigned byte",normalizable:1,value:u.Constants.TEXTURETYPE_UNSIGNED_BYTE},{label:"32-bit float",normalizable:0,value:u.Constants.TEXTURETYPE_FLOAT},{label:"16-bit float",normalizable:0,value:u.Constants.TEXTURETYPE_HALF_FLOAT},{label:"signed byte",normalizable:1,value:u.Constants.TEXTURETYPE_BYTE},{label:"signed short",normalizable:0,value:u.Constants.TEXTURETYPE_SHORT},{label:"unsigned short",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_SHORT},{label:"signed int",normalizable:0,value:u.Constants.TEXTURETYPE_INT},{label:"unsigned int",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_INTEGER},{label:"unsigned 4/4/4/4 short",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4},{label:"unsigned 5/5/5/1 short",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1},{label:"unsigned 5/6/5 short",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5},{label:"unsigned 2/10/10/10 int",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV},{label:"unsigned 24/8 int",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_INT_24_8},{label:"unsigned 10f/11f/11f int",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV},{label:"unsigned 5/9/9/9 int",normalizable:0,value:u.Constants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV},{label:"32-bits with only 8-bit used (stencil)",normalizable:0,value:u.Constants.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV}],Jn=function(e){function t(t){var n=e.call(this,t)||this;n._textureInspectorSize={width:1024,height:490},n.state={isTextureEditorOpen:!1,textureEditing:null};var r=n.props.texture;if(n.textureLineRef=l.createRef(),n.popoutWindowRef=l.createRef(),!r||!r.rootContainer)return n;var a=r;return n._adtInstrumentation=new Tn.AdvancedDynamicTextureInstrumentation(a),n._adtInstrumentation.captureRenderTime=!0,n._adtInstrumentation.captureLayoutTime=!0,n.onOpenTextureEditor.bind(n),n.onCloseTextureEditor.bind(n),n.openTextureEditor.bind(n),n}return a(t,e),t.prototype.componentWillUnmount=function(){this._adtInstrumentation&&(this._adtInstrumentation.dispose(),this._adtInstrumentation=null)},t.prototype.updateTexture=function(e){var t=this,n=this.props.texture;u.Tools.ReadFile(e,(function(r){var a=new Blob([r],{type:"octet/stream"}),o=new FileReader;o.readAsDataURL(a),o.onloadend=function(){var r=o.result;if(n.isCube){var a=void 0;e.name.toLowerCase().indexOf(".dds")>0?a=".dds":e.name.toLowerCase().indexOf(".env")>0&&(a=".env"),n.updateURL(r,a,(function(){return t.forceRefresh()}))}else n.updateURL(r,null,(function(){return t.forceRefresh()}))}}),void 0,!0)},t.prototype.openTextureEditor=function(){var e=this;this.state.isTextureEditorOpen?this.onCloseTextureEditor((function(){return e.openTextureEditor()})):this.setState({isTextureEditorOpen:!0,textureEditing:this.props.texture})},t.prototype.onOpenTextureEditor=function(e){},t.prototype.onCloseTextureEditor=function(e){this.setState({isTextureEditorOpen:!1,textureEditing:null},e)},t.prototype.forceRefresh=function(){this.forceUpdate(),this.textureLineRef.current.updatePreview()},t.prototype.findTextureFormat=function(e){for(var t=0;t<qn.length;++t)if(qn[t].value===e)return qn[t];return null},t.prototype.findTextureType=function(e){for(var t=0;t<Qn.length;++t)if(Qn[t].value===e)return Qn[t];return null},t.prototype.render=function(){var e,t,n,r,a,o,i,s,p=this,c=this.props.texture,d=[{label:"Nearest",value:u.Texture.NEAREST_NEAREST},{label:"Linear",value:u.Texture.LINEAR_LINEAR},{label:"Linear & linear mip",value:u.Texture.LINEAR_LINEAR_MIPLINEAR},{label:"Linear & nearest mip",value:u.Texture.LINEAR_LINEAR_MIPNEAREST},{label:"Nearest & linear mip",value:u.Texture.NEAREST_NEAREST_MIPLINEAR},{label:"Nearest & nearest mip",value:u.Texture.NEAREST_NEAREST_MIPNEAREST},{label:"Nearest/Linear",value:u.Texture.NEAREST_LINEAR},{label:"Nearest/Linear & linear mip",value:u.Texture.NEAREST_LINEAR_MIPLINEAR},{label:"Nearest/Linear & nearest mip",value:u.Texture.NEAREST_LINEAR_MIPNEAREST},{label:"Linear/Nearest",value:u.Texture.LINEAR_NEAREST},{label:"Linear/Nearest & linear mip",value:u.Texture.LINEAR_NEAREST_MIPLINEAR},{label:"Linear/Nearest & nearest mip",value:u.Texture.LINEAR_NEAREST_MIPNEAREST}],h=[{label:"Explicit",value:u.Texture.EXPLICIT_MODE},{label:"Cubic",value:u.Texture.CUBIC_MODE},{label:"Inverse cubic",value:u.Texture.INVCUBIC_MODE},{label:"Equirectangular",value:u.Texture.EQUIRECTANGULAR_MODE},{label:"Fixed equirectangular",value:u.Texture.FIXED_EQUIRECTANGULAR_MODE},{label:"Fixed equirectangular mirrored",value:u.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE},{label:"Planar",value:u.Texture.PLANAR_MODE},{label:"Projection",value:u.Texture.PROJECTION_MODE},{label:"Skybox",value:u.Texture.SKYBOX_MODE},{label:"Spherical",value:u.Texture.SPHERICAL_MODE}],m=null!==(t=null===(e=c._texture)||void 0===e?void 0:e.format)&&void 0!==t?t:-2,b=null!==(r=null===(n=c._texture)||void 0===n?void 0:n.type)&&void 0!==r?r:-2,g=this.findTextureFormat(-1===m?u.Constants.TEXTUREFORMAT_RGBA:m),f=this.findTextureType(-1===b?u.Constants.TEXTURETYPE_UNSIGNED_BYTE:b),v=c instanceof u.MultiRenderTarget?"MultiRenderTarget":c instanceof u.RenderTargetTexture?"RenderTargetTexture":c.getClassName(),y=c instanceof u.MultiRenderTarget?c.count:-1,C="",E=c.url,x=E&&"data"!==E.substring(0,4)&&"blob"!==E.substring(0,4)?E:"";if(x)for(var O=x.length-1;O>=0&&"."!==x[O];O--)C=x[O]+C;return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"PREVIEW",selection:this.props.globalState},l.createElement(Pn,{ref:this.textureLineRef,texture:c,width:256,height:256,globalState:this.props.globalState}),l.createElement(Pe,{label:"Load texture from file",onClick:function(e){return p.updateTexture(e)},accept:".jpg, .png, .tga, .dds, .env"}),l.createElement(we,{label:"Edit",onClick:function(){p.props.texture instanceof Tn.AdvancedDynamicTexture?Xn(p.props.texture):p.openTextureEditor()}}),l.createElement(Ze,{label:"URL",value:x,lockObject:this.props.lockObject,onChange:function(e){c.updateURL(e),p.forceRefresh()}})),this.state.isTextureEditorOpen&&l.createElement(tt,{id:"texture-editor",title:"Texture Inspector",size:this._textureInspectorSize,onOpen:this.onOpenTextureEditor,onClose:function(){return p.onCloseTextureEditor},ref:this.popoutWindowRef},l.createElement(Hn,{texture:this.props.texture,url:x,window:this.popoutWindowRef,onUpdate:function(){return p.forceRefresh()}})),l.createElement(et,{globalState:this.props.globalState,target:c,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"Width",value:c.getSize().width.toString()}),l.createElement(Ee,{label:"Height",value:c.getSize().height.toString()}),c.isRenderTarget&&l.createElement(we,{label:"Scale up",onClick:function(){var e=c.getScene();c.scale(2),setTimeout((function(){p.props.globalState.onSelectionChangedObservable.notifyObservers(e.getTextureByUniqueId(c.uniqueId))}))}}),c.isRenderTarget&&l.createElement(we,{label:"Scale down",onClick:function(){var e=c.getScene();c.scale(.5),setTimeout((function(){p.props.globalState.onSelectionChangedObservable.notifyObservers(e.getTextureByUniqueId(c.uniqueId))}))}}),l.createElement(Ee,{label:"Format",value:null!==(a=null==g?void 0:g.label)&&void 0!==a?a:"unknown"}),!(null==g?void 0:g.hideType)&&!(null==g?void 0:g.compressed)&&l.createElement(Ee,{label:"Type",value:null!==(o=null==f?void 0:f.label)&&void 0!==o?o:"unknown"}),!!(null==g?void 0:g.normalizable)&&!(null==g?void 0:g.compressed)&&!!(null==f?void 0:f.normalizable)&&l.createElement(Ee,{label:"Normalized",value:f.normalizable?"Yes":"No"}),l.createElement(Ee,{label:"Is compressed",value:(null==g?void 0:g.compressed)?"Yes":"No"}),l.createElement(Ee,{label:"Use sRGB buffers",value:(null===(i=c._texture)||void 0===i?void 0:i._useSRGBBuffer)?"Yes":"No"}),C&&l.createElement(Ee,{label:"File format",value:C}),l.createElement(Ee,{label:"Unique ID",value:c.uniqueId.toString()}),l.createElement(Ee,{label:"Internal Unique ID",value:null===(s=c._texture)||void 0===s?void 0:s.uniqueId.toString()}),l.createElement(Ee,{label:"Class",value:v}),y>=0&&l.createElement(Ee,{label:"Number of textures",value:y.toString()}),l.createElement(Ee,{label:"Has alpha",value:c.hasAlpha?"Yes":"No"}),l.createElement(Ee,{label:"Is 3D",value:c.is3D?"Yes":"No"}),l.createElement(Ee,{label:"Is 2D array",value:c.is2DArray?"Yes":"No"}),l.createElement(Ee,{label:"Is cube",value:c.isCube?"Yes":"No"}),l.createElement(Ee,{label:"Is render target",value:c.isRenderTarget?"Yes":"No"}),c instanceof u.Texture&&l.createElement(Ee,{label:"Stored as inverted on Y",value:c.invertY?"Yes":"No"}),l.createElement(Ee,{label:"Has mipmaps",value:c.noMipmap?"No":"Yes"}),l.createElement(We,{label:"UV set",target:c,propertyName:"coordinatesIndex",minimum:0,maximum:3,step:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable,decimalCount:0}),l.createElement(Ye,{label:"Mode",options:h,target:c,propertyName:"coordinatesMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return c.coordinatesMode=e}}),l.createElement(We,{label:"Level",target:c,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),c.updateSamplingMode&&l.createElement(Ye,{label:"Sampling",options:d,target:c,noDirectUpdate:!0,propertyName:"samplingMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(e){return c.updateSamplingMode(e)}})),c.getScene()&&l.createElement(vn,{globalState:this.props.globalState,animatable:c,scene:c.getScene(),lockObject:this.props.lockObject}),c.rootContainer&&this._adtInstrumentation&&l.createElement(Oe,{title:"ADVANCED TEXTURE PROPERTIES",selection:this.props.globalState},l.createElement(Se,{label:"Last layout time",value:this._adtInstrumentation.renderTimeCounter.current,units:"ms"}),l.createElement(Se,{label:"Last render time",value:this._adtInstrumentation.layoutTimeCounter.current,units:"ms"}),l.createElement(We,{label:"Render scale",minimum:.1,maximum:5,step:.1,target:c,propertyName:"renderScale",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Premultiply alpha",target:c,propertyName:"premulAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Ideal width",target:c,propertyName:"idealWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Ideal height",target:c,propertyName:"idealHeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use smallest ideal",target:c,propertyName:"useSmallestIdeal",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Render at ideal size",target:c,propertyName:"renderAtIdealSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Invalidate Rect optimization",target:c,propertyName:"useInvalidateRectOptimization",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"TRANSFORM",selection:this.props.globalState},!c.isCube&&l.createElement("div",null,l.createElement(He,{lockObject:this.props.lockObject,label:"U offset",target:c,propertyName:"uOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"V offset",target:c,propertyName:"vOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"U scale",target:c,propertyName:"uScale",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"V scale",target:c,propertyName:"vScale",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"U angle",useEuler:this.props.globalState.onlyUseEulers,target:c,propertyName:"uAng",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"V angle",useEuler:this.props.globalState.onlyUseEulers,target:c,propertyName:"vAng",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"W angle",useEuler:this.props.globalState.onlyUseEulers,target:c,propertyName:"wAng",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Clamp U",isSelected:function(){return c.wrapU===u.Texture.CLAMP_ADDRESSMODE},onSelect:function(e){return c.wrapU=e?u.Texture.CLAMP_ADDRESSMODE:u.Texture.WRAP_ADDRESSMODE}}),l.createElement(Le,{label:"Clamp V",isSelected:function(){return c.wrapV===u.Texture.CLAMP_ADDRESSMODE},onSelect:function(e){return c.wrapV=e?u.Texture.CLAMP_ADDRESSMODE:u.Texture.WRAP_ADDRESSMODE}})),c.isCube&&l.createElement("div",null,l.createElement(We,{label:"Rotation Y",useEuler:this.props.globalState.onlyUseEulers,minimum:0,maximum:2*Math.PI,step:.1,target:c,propertyName:"rotationY"}))))},t}(l.Component),$n=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,value:n.props.target[n.props.propertyName].clone()},n}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=e.target[e.propertyName];return!(n.equals(t.value)&&!this._localChange)&&(t.value=n.clone(),this._localChange=!1,!0)},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onChange&&this.props.onChange(this.state.value),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.value,initialValue:e})},t.prototype.updateStateX=function(e){this._localChange=!0;var t=this.state.value.clone();this.props.target[this.props.propertyName].x=e,this.state.value.x=e,this.setState({value:this.state.value}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateY=function(e){this._localChange=!0;var t=this.state.value.clone();this.props.target[this.props.propertyName].y=e,this.state.value.y=e,this.setState({value:this.state.value}),this.raiseOnPropertyChanged(t)},t.prototype.render=function(){var e=this,t=this.state.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se});return l.createElement("div",{className:"vector3Line"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"firstLine",title:this.props.label},l.createElement("div",{className:"label"},this.props.label),l.createElement("div",{className:"vector"},"X: "+this.state.value.x.toFixed(2)+", Y: "+this.state.value.y.toFixed(2)),l.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),l.createElement(Xe,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}})))},t.defaultProps={step:.001},t}(l.Component),er=function(e){function t(t){var n=e.call(this,t)||this;return n._onDebugSelectionChangeObservable=new u.Observable,n}return a(t,e),t.prototype.switchAmbientMode=function(e){this.props.material.debugMode=e?21:0},t.prototype.renderTextures=function(e){var t=this,n=this.props.material;return l.createElement(Oe,{title:"CHANNELS",selection:this.props.globalState},l.createElement(xn,{label:"Albedo",texture:n.albedoTexture,propertyName:"albedoTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Metallic Roughness",texture:n.metallicTexture,propertyName:"metallicTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Reflection",texture:n.reflectionTexture,propertyName:"reflectionTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Refraction",texture:n.refractionTexture,propertyName:"refractionTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Reflectivity",texture:n.reflectivityTexture,propertyName:"reflectivityTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Micro-surface",texture:n.microSurfaceTexture,propertyName:"microSurfaceTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Bump",texture:n.bumpTexture,propertyName:"bumpTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Emissive",texture:n.emissiveTexture,propertyName:"emissiveTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Opacity",texture:n.opacityTexture,propertyName:"opacityTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{customDebugAction:function(e){return t.switchAmbientMode(e)},label:"Ambient",texture:n.ambientTexture,propertyName:"ambientTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Lightmap",texture:n.lightmapTexture,propertyName:"lightmapTexture",material:n,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(xn,{label:"Detailmap",texture:n.detailMap.texture,material:n,onTextureCreated:function(e){return n.detailMap.texture=e},onTextureRemoved:function(){return n.detailMap.texture=null},onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:e}),l.createElement(Le,{label:"Use lightmap as shadowmap",target:n,propertyName:"useLightmapAsShadowmap",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use detailmap",target:n.detailMap,propertyName:"isEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t.prototype.render=function(){var e,t,n,r=this,a=this.props.material,o=[{label:"Low",value:u.Constants.TEXTURE_FILTERING_QUALITY_LOW},{label:"Medium",value:u.Constants.TEXTURE_FILTERING_QUALITY_MEDIUM},{label:"High",value:u.Constants.TEXTURE_FILTERING_QUALITY_HIGH}];return a.sheen._useRoughness=null!==(e=a.sheen._useRoughness)&&void 0!==e?e:null!==a.sheen.roughness,a.sheen.roughness=null!==(n=null!==(t=a.sheen.roughness)&&void 0!==t?t:a.sheen._saveRoughness)&&void 0!==n?n:0,a.sheen._useRoughness||(a.sheen._saveRoughness=a.sheen.roughness,a.sheen.roughness=null),l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:a,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),this.renderTextures(this._onDebugSelectionChangeObservable),l.createElement(Oe,{title:"LIGHTING & COLORS",selection:this.props.globalState},l.createElement(Qe,{label:"Albedo",target:a,propertyName:"albedoColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Qe,{label:"Reflectivity",target:a,propertyName:"reflectivityColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(We,{label:"Micro-surface",target:a,propertyName:"microSurface",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Emissive",target:a,propertyName:"emissiveColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Qe,{label:"Ambient",target:a,propertyName:"ambientColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Le,{label:"Use physical light falloff",target:a,propertyName:"usePhysicalLightFalloff",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"METALLIC WORKFLOW",selection:this.props.globalState},l.createElement(We,{label:"Metallic",target:a,propertyName:"metallic",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Roughness",target:a,propertyName:"roughness",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Index of Refraction",target:a,propertyName:"indexOfRefraction",minimum:1,maximum:3,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"F0 Factor",target:a,propertyName:"metallicF0Factor",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Reflectance Color",target:a,propertyName:"metallicReflectanceColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Le,{label:"Use only metallic from MetallicReflectance texture",target:a,propertyName:"useOnlyMetallicFromMetallicReflectanceTexture",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(xn,{label:"MetallicReflectance Texture",texture:a.metallicReflectanceTexture,onTextureCreated:function(e){return a.metallicReflectanceTexture=e},onTextureRemoved:function(){return a.metallicReflectanceTexture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),l.createElement(xn,{label:"Reflectance Texture",texture:a.reflectanceTexture,onTextureCreated:function(e){return a.reflectanceTexture=e},onTextureRemoved:function(){return a.reflectanceTexture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable})),l.createElement(Oe,{title:"CLEAR COAT",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:a.clearCoat,propertyName:"isEnabled",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.clearCoat.isEnabled&&l.createElement("div",{className:"fragment"},l.createElement(We,{label:"Intensity",target:a.clearCoat,propertyName:"intensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Roughness",target:a.clearCoat,propertyName:"roughness",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"IOR",target:a.clearCoat,propertyName:"indexOfRefraction",minimum:1,maximum:3,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Remap F0",target:a.clearCoat,propertyName:"remapF0OnInterfaceChange",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(xn,{label:"Clear coat",texture:a.clearCoat.texture,onTextureCreated:function(e){return a.clearCoat.texture=e},onTextureRemoved:function(){return a.clearCoat.texture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),l.createElement(xn,{label:"Roughness",texture:a.clearCoat.textureRoughness,onTextureCreated:function(e){return a.clearCoat.textureRoughness=e},onTextureRemoved:function(){return a.clearCoat.textureRoughness=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),l.createElement(xn,{label:"Bump",texture:a.clearCoat.bumpTexture,onTextureCreated:function(e){return a.clearCoat.bumpTexture=e},onTextureRemoved:function(){return a.clearCoat.bumpTexture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),a.clearCoat.bumpTexture&&l.createElement(We,{label:"Bump strength",target:a.clearCoat.bumpTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use roughness from main texture",target:a.clearCoat,propertyName:"useRoughnessFromMainTexture",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Tint",target:a.clearCoat,propertyName:"isTintEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.clearCoat.isEnabled&&a.clearCoat.isTintEnabled&&l.createElement(Qe,{label:"Tint Color",target:a.clearCoat,propertyName:"tintColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),a.clearCoat.isEnabled&&a.clearCoat.isTintEnabled&&l.createElement(We,{label:"At Distance",target:a.clearCoat,propertyName:"tintColorAtDistance",minimum:0,maximum:20,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.clearCoat.isEnabled&&a.clearCoat.isTintEnabled&&l.createElement(We,{label:"Tint Thickness",target:a.clearCoat,propertyName:"tintThickness",minimum:0,maximum:20,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.clearCoat.isEnabled&&a.clearCoat.isTintEnabled&&l.createElement(xn,{label:"Tint",texture:a.clearCoat.tintTexture,onTextureCreated:function(e){return a.clearCoat.tintTexture=e},onTextureRemoved:function(){return a.clearCoat.tintTexture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}))),l.createElement(Oe,{title:"ANISOTROPIC",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:a.anisotropy,propertyName:"isEnabled",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.anisotropy.isEnabled&&l.createElement("div",{className:"fragment"},l.createElement(We,{label:"Intensity",target:a.anisotropy,propertyName:"intensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement($n,{label:"Direction",target:a.anisotropy,propertyName:"direction",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(xn,{label:"Anisotropic",texture:a.anisotropy.texture,onTextureCreated:function(e){return a.anisotropy.texture=e},onTextureRemoved:function(){return a.anisotropy.texture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}))),l.createElement(Oe,{title:"SHEEN",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:a.sheen,propertyName:"isEnabled",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.sheen.isEnabled&&l.createElement("div",{className:"fragment"},l.createElement(Le,{label:"Link to Albedo",target:a.sheen,propertyName:"linkSheenWithAlbedo",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Intensity",target:a.sheen,propertyName:"intensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Color",target:a.sheen,propertyName:"color",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(xn,{label:"Sheen",texture:a.sheen.texture,onTextureCreated:function(e){return a.sheen.texture=e},onTextureRemoved:function(){return a.sheen.texture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),l.createElement(xn,{label:"Roughness",texture:a.sheen.textureRoughness,onTextureCreated:function(e){return a.sheen.textureRoughness=e},onTextureRemoved:function(){return a.sheen.textureRoughness=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),l.createElement(Le,{label:"Use roughness",target:a.sheen,propertyName:"_useRoughness"}),a.sheen._useRoughness&&l.createElement(We,{label:"Roughness",target:a.sheen,propertyName:"roughness",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use roughness from main texture",target:a.sheen,propertyName:"useRoughnessFromMainTexture",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Albedo scaling",target:a.sheen,propertyName:"albedoScaling",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"SUBSURFACE",selection:this.props.globalState},l.createElement(xn,{label:"Thickness",texture:a.subSurface.thicknessTexture,onTextureCreated:function(e){return a.subSurface.thicknessTexture=e},onTextureRemoved:function(){return a.subSurface.thicknessTexture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),l.createElement(We,{label:"Min Thickness",target:a.subSurface,propertyName:"minimumThickness",minimum:0,maximum:10,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Max Thickness",target:a.subSurface,propertyName:"maximumThickness",minimum:0,maximum:10,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Mask From Thickness",target:a.subSurface,propertyName:"useMaskFromThicknessTexture",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"glTF-Style Textures",target:a.subSurface,propertyName:"useGltfStyleTextures",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use Thickness as Depth",target:a.subSurface,propertyName:"useThicknessAsDepth",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Tint Color",target:a.subSurface,propertyName:"tintColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Le,{label:"Scattering Enabled",target:a.subSurface,propertyName:"isScatteringEnabled",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.subSurface.isScatteringEnabled&&a.getScene().prePassRenderer&&a.getScene().subSurfaceConfiguration&&l.createElement("div",{className:"fragment"},l.createElement(We,{label:"Meters per unit",target:a.getScene().subSurfaceConfiguration,propertyName:"metersPerUnit",minimum:.01,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Le,{label:"Refraction Enabled",target:a.subSurface,propertyName:"isRefractionEnabled",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.subSurface.isRefractionEnabled&&l.createElement("div",{className:"fragment"},l.createElement(We,{label:"Intensity",target:a.subSurface,propertyName:"refractionIntensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(xn,{label:"Refraction",texture:a.subSurface.refractionTexture,onTextureCreated:function(e){return a.subSurface.refractionTexture=e},onTextureRemoved:function(){return a.subSurface.refractionTexture=null},material:a,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:this._onDebugSelectionChangeObservable}),l.createElement(We,{label:"Volume Index of Refraction",target:a.subSurface,propertyName:"volumeIndexOfRefraction",minimum:1,maximum:3,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Tint at Distance",target:a.subSurface,propertyName:"tintColorAtDistance",minimum:0,maximum:10,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Link refraction with transparency",target:a.subSurface,propertyName:"linkRefractionWithTransparency",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use albedo to tint surface transparency",target:a.subSurface,propertyName:"useAlbedoToTintRefraction",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Le,{label:"Translucency Enabled",target:a.subSurface,propertyName:"isTranslucencyEnabled",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.subSurface.isTranslucencyEnabled&&l.createElement("div",{className:"fragment"},l.createElement(We,{label:"Intensity",target:a.subSurface,propertyName:"translucencyIntensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Diffusion Distance",target:a.subSurface,propertyName:"diffusionDistance",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Le,{label:"Use albedo to tint surface translucency",target:a.subSurface,propertyName:"useAlbedoToTintTranslucency",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"LEVELS",closed:!0,selection:this.props.globalState},l.createElement(We,{label:"Environment",target:a,propertyName:"environmentIntensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Specular",target:a,propertyName:"specularIntensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Emissive",target:a,propertyName:"emissiveIntensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Direct",target:a,propertyName:"directIntensity",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.bumpTexture&&l.createElement(We,{label:"Bump strength",target:a.bumpTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.ambientTexture&&l.createElement(We,{label:"Ambient strength",target:a,propertyName:"ambientTextureStrength",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.reflectionTexture&&l.createElement(We,{label:"Reflection strength",target:a.reflectionTexture,propertyName:"level",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.clearCoat.texture&&l.createElement(We,{label:"Clear coat",target:a.clearCoat.texture,propertyName:"level",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.clearCoat.bumpTexture&&l.createElement(We,{label:"Clear coat bump",target:a.clearCoat.bumpTexture,propertyName:"level",minimum:0,maximum:2,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.clearCoat.tintTexture&&!1,a.anisotropy.texture&&l.createElement(We,{label:"Anisotropic",target:a.anisotropy.texture,propertyName:"level",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.sheen.texture&&l.createElement(We,{label:"Sheen",target:a.sheen.texture,propertyName:"level",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.subSurface.thicknessTexture&&l.createElement(We,{label:"Thickness",target:a.subSurface.thicknessTexture,propertyName:"level",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.subSurface.refractionTexture&&l.createElement(We,{label:"Refraction",target:a.subSurface.refractionTexture,propertyName:"level",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a.detailMap.isEnabled&&l.createElement(l.Fragment,null,l.createElement(We,{label:"Detailmap diffuse",target:a.detailMap,propertyName:"diffuseBlendLevel",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Detailmap bump",target:a.detailMap,propertyName:"bumpLevel",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Detailmap roughness",target:a.detailMap,propertyName:"roughnessBlendLevel",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"RENDERING",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Alpha from albedo",target:a,propertyName:"useAlphaFromAlbedoTexture",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Ambient in grayscale",target:a,propertyName:"useAmbientInGrayScale",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Radiance over alpha",target:a,propertyName:"useRadianceOverAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Micro-surface from ref. map alpha",target:a,propertyName:"useMicroSurfaceFromReflectivityMapAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Specular over alpha",target:a,propertyName:"useSpecularOverAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Specular anti-aliasing",target:a,propertyName:"enableSpecularAntiAliasing",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Realtime Filtering",target:a,propertyName:"realTimeFiltering",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{allowNullValue:!0,label:"Realtime Filtering quality",options:o,target:a,propertyName:"realTimeFilteringQuality",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"NORMAL MAP",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Invert X axis",target:a,propertyName:"invertNormalMapX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Invert Y axis",target:a,propertyName:"invertNormalMapY",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"ADVANCED",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Energy Conservation",target:a.brdf,propertyName:"useEnergyConservation",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Spherical Harmonics",target:a.brdf,propertyName:"useSphericalHarmonics",onValueChanged:function(){return r.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Radiance occlusion",target:a,propertyName:"useRadianceOcclusion",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Horizon occlusion ",target:a,propertyName:"useHorizonOcclusion",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Unlit",target:a,propertyName:"unlit",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"DEBUG",closed:!0,selection:this.props.globalState},l.createElement(Ye,{label:"Debug mode",options:[{label:"None",value:0},{label:"Normalized position",value:1},{label:"Normals",value:2},{label:"Tangents",value:3},{label:"Bitangents",value:4},{label:"Bump Normals",value:5},{label:"UV1",value:6},{label:"UV2",value:7},{label:"ClearCoat Normals",value:8},{label:"ClearCoat Tangents",value:9},{label:"ClearCoat Bitangents",value:10},{label:"Anisotropic Normals",value:11},{label:"Anisotropic Tangents",value:12},{label:"Anisotropic Bitangents",value:13},{label:"Albdeo Map",value:20},{label:"Ambient Map",value:21},{label:"Opacity Map",value:22},{label:"Emissive Map",value:23},{label:"Light Map",value:24},{label:"Metallic Map",value:25},{label:"Reflectivity Map",value:26},{label:"ClearCoat Map",value:27},{label:"ClearCoat Tint Map",value:28},{label:"Sheen Map",value:29},{label:"Anisotropic Map",value:30},{label:"Thickness Map",value:31},{label:"Env Refraction",value:40},{label:"Env Reflection",value:41},{label:"Env Clear Coat",value:42},{label:"Direct Diffuse",value:50},{label:"Direct Specular",value:51},{label:"Direct Clear Coat",value:52},{label:"Direct Sheen",value:53},{label:"Env Irradiance",value:54},{label:"Surface Albedo",value:60},{label:"Reflectance 0",value:61},{label:"Metallic",value:62},{label:"Metallic F0",value:71},{label:"Roughness",value:63},{label:"AlphaG",value:64},{label:"NdotV",value:65},{label:"ClearCoat Color",value:66},{label:"ClearCoat Roughness",value:67},{label:"ClearCoat NdotV",value:68},{label:"Transmittance",value:69},{label:"Refraction Transmittance",value:70},{label:"SEO",value:80},{label:"EHO",value:81},{label:"Energy Factor",value:82},{label:"Specular Reflectance",value:83},{label:"Clear Coat Reflectance",value:84},{label:"Sheen Reflectance",value:85},{label:"Luminance Over Alpha",value:86},{label:"Alpha",value:87}],target:a,propertyName:"debugMode"}),l.createElement(We,{label:"Split position",target:a,propertyName:"debugLimit",minimum:-1,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Output factor",target:a,propertyName:"debugFactor",minimum:0,maximum:5,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),tr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isSelected:n.props.isSelected()},n}return a(t,e),t.prototype.componentDidMount=function(){var e=this;this._onSelectionChangedObserver=this.props.onSelectionChangedObservable.add((function(t){e.setState({isSelected:t===e})}))},t.prototype.componentWillUnmount=function(){this._onSelectionChangedObserver&&(this.props.onSelectionChangedObservable.remove(this._onSelectionChangedObserver),this._onSelectionChangedObserver=null)},t.prototype.onChange=function(){this.props.onSelect(),this.props.onSelectionChangedObservable.notifyObservers(this)},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"radioLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"radioContainer"},l.createElement("input",{id:this.props.label,className:"radio",type:"radio",checked:this.state.isSelected,onChange:function(){return e.onChange()}}),l.createElement("label",{htmlFor:this.props.label,className:"labelForRadio"})))},t}(l.Component),nr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={mode:n.props.scene.fogMode},n}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.scene,n=[{label:"None",value:u.Scene.FOGMODE_NONE},{label:"Linear",value:u.Scene.FOGMODE_LINEAR},{label:"Exp",value:u.Scene.FOGMODE_EXP},{label:"Exp2",value:u.Scene.FOGMODE_EXP2}];return l.createElement("div",null,l.createElement(Ye,{label:"Fog mode",options:n,target:t,propertyName:"fogMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({mode:t})}}),this.state.mode!==u.Scene.FOGMODE_NONE&&l.createElement(Qe,{label:"Fog color",target:t,propertyName:"fogColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),(this.state.mode===u.Scene.FOGMODE_EXP||this.state.mode===u.Scene.FOGMODE_EXP2)&&l.createElement(He,{lockObject:this.props.lockObject,label:"Fog density",target:t,propertyName:"fogDensity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),this.state.mode===u.Scene.FOGMODE_LINEAR&&l.createElement(He,{lockObject:this.props.lockObject,label:"Fog start",target:t,propertyName:"fogStart",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),this.state.mode===u.Scene.FOGMODE_LINEAR&&l.createElement(He,{lockObject:this.props.lockObject,label:"Fog end",target:t,propertyName:"fogEnd",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),rr=function(e){function t(t){var n=e.call(this,t)||this;return n._renderingModeGroupObservable=new u.Observable,n}return a(t,e),t.prototype.setRenderingModes=function(e,t){var n=this.props.scene;n.forcePointsCloud=e,n.forceWireframe=t},t.prototype.switchIBL=function(){var e=this.props.scene;e.environmentTexture?(this._storedEnvironmentTexture=e.environmentTexture,e.environmentTexture=null):(e.environmentTexture=this._storedEnvironmentTexture,this._storedEnvironmentTexture=null)},t.prototype.updateEnvironmentTexture=function(e){var t=e.name.toLowerCase().indexOf(".dds")>0,n=e.name.toLowerCase().indexOf(".env")>0;if(t||n){var r=this.props.scene;u.Tools.ReadFile(e,(function(e){var n=new Blob([e],{type:"octet/stream"}),a=URL.createObjectURL(n);r.environmentTexture=t?u.CubeTexture.CreateFromPrefilteredData(a,r,".dds"):new u.CubeTexture(a,r,void 0,void 0,void 0,(function(){}),(function(e){e&&console.error(e)}),void 0,void 0,".env")}),void 0,!0)}else console.error("Unable to update environment texture. Please select a dds or env file.")},t.prototype.updateGravity=function(e){this.props.scene.getPhysicsEngine().setGravity(e)},t.prototype.updateTimeStep=function(e){this.props.scene.getPhysicsEngine().setTimeStep(e)},t.prototype.normalizeScene=function(){this.props.scene.meshes.forEach((function(e){e.normalizeToUnitCube(!0),e.computeWorldMatrix(!0)}))},t.prototype.render=function(){var e=this,t=this.props.scene,n=t.getPhysicsEngine(),r=null;n&&(r={gravity:n.gravity,timeStep:n.getTimeStep()});var a=t.imageProcessingConfiguration,o=[{label:"Standard",value:u.ImageProcessingConfiguration.TONEMAPPING_STANDARD},{label:"ACES",value:u.ImageProcessingConfiguration.TONEMAPPING_ACES}],i=[{label:"Multiply",value:u.ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY},{label:"Opaque",value:u.ImageProcessingConfiguration.VIGNETTEMODE_OPAQUE}];return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"RENDERING MODE",selection:this.props.globalState},l.createElement(tr,{onSelectionChangedObservable:this._renderingModeGroupObservable,label:"Point",isSelected:function(){return t.forcePointsCloud},onSelect:function(){return e.setRenderingModes(!0,!1)}}),l.createElement(tr,{onSelectionChangedObservable:this._renderingModeGroupObservable,label:"Wireframe",isSelected:function(){return t.forceWireframe},onSelect:function(){return e.setRenderingModes(!1,!0)}}),l.createElement(tr,{onSelectionChangedObservable:this._renderingModeGroupObservable,label:"Solid",isSelected:function(){return!t.forcePointsCloud&&!t.forceWireframe},onSelect:function(){return e.setRenderingModes(!1,!1)}})),l.createElement(Oe,{title:"ENVIRONMENT",selection:this.props.globalState},l.createElement(Qe,{label:"Clear color",target:t,propertyName:"clearColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Clear color enabled",target:t,propertyName:"autoClear",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Ambient color",target:t,propertyName:"ambientColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Environment texture (IBL)",isSelected:function(){return null!=t.environmentTexture},onSelect:function(){return e.switchIBL()}}),t.environmentTexture&&l.createElement(xn,{label:"Env. texture",texture:t.environmentTexture,onSelectionChangedObservable:this.props.onSelectionChangedObservable}),l.createElement(Pe,{label:"Update environment texture",onClick:function(t){return e.updateEnvironmentTexture(t)},accept:".dds, .env"}),l.createElement(We,{minimum:0,maximum:2,step:.01,label:"IBL Intensity",target:t,propertyName:"environmentIntensity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(nr,{globalState:this.props.globalState,lockObject:this.props.lockObject,scene:t,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(vn,{globalState:this.props.globalState,animatable:t,scene:t,lockObject:this.props.lockObject}),l.createElement(Oe,{title:"MATERIAL IMAGE PROCESSING",selection:this.props.globalState},l.createElement(We,{minimum:0,maximum:4,step:.1,label:"Contrast",target:a,propertyName:"contrast",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:4,step:.1,label:"Exposure",target:a,propertyName:"exposure",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Tone mapping",target:a,propertyName:"toneMappingEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Tone mapping type",options:o,target:a,propertyName:"toneMappingType",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({mode:t})}}),l.createElement(Le,{label:"Vignette",target:a,propertyName:"vignetteEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:4,step:.1,label:"Vignette weight",target:a,propertyName:"vignetteWeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:1,step:.1,label:"Vignette stretch",target:a,propertyName:"vignetteStretch",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:Math.PI,step:.1,label:"Vignette FOV",target:a,propertyName:"vignetteCameraFov",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:1,step:.1,label:"Vignette center X",target:a,propertyName:"vignetteCentreX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:1,step:.1,label:"Vignette center Y",target:a,propertyName:"vignetteCentreY",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Vignette color",target:a,propertyName:"vignetteColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Vignette blend mode",options:i,target:a,propertyName:"vignetteBlendMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({mode:t})}})),null!==r&&l.createElement(Oe,{title:"PHYSICS",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Time step",target:r,propertyName:"timeStep",onChange:function(t){return e.updateTimeStep(t)},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Gravity",target:r,propertyName:"gravity",onChange:function(t){return e.updateGravity(t)},onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"COLLISIONS",closed:!0,selection:this.props.globalState},l.createElement(Je,{label:"Gravity",target:t,propertyName:"gravity",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"SHADOWS",closed:!0,selection:this.props.globalState},l.createElement(we,{label:"Normalize scene",onClick:function(){return e.normalizeScene()}})))},t}(l.Component),ar=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.light;return l.createElement("div",null,l.createElement(et,{globalState:this.props.globalState,target:t,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"ID",value:t.id}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:t.uniqueId.toString()}),l.createElement(Ee,{label:"Class",value:t.getClassName()}),l.createElement(He,{lockObject:this.props.lockObject,label:"Intensity",target:t,propertyName:"intensity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:"Dispose",onClick:function(){t.dispose(),e.props.globalState.onSelectionChangedObservable.notifyObservers(null)}})),l.createElement(vn,{globalState:this.props.globalState,animatable:t,scene:t.getScene(),lockObject:this.props.lockObject}))},t}(l.Component),or=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.light;return l.createElement("div",{className:"pane"},l.createElement(ar,{globalState:this.props.globalState,lockObject:this.props.lockObject,light:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"SETUP",selection:this.props.globalState},l.createElement(Qe,{label:"Diffuse",target:e,propertyName:"diffuse",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Ground",target:e,propertyName:"groundColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Direction",target:e,propertyName:"direction",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),ir=function(e){function t(t){var n=e.call(this,t)||this;return n._internals={generatorType:0,mapSize:1024},n}return a(t,e),t.prototype.createShadowGenerator=function(){var e=this.props.light,t=e.getScene(),n=this._internals,r=0===n.generatorType?new u.ShadowGenerator(n.mapSize,e):new u.CascadedShadowGenerator(n.mapSize,e);t.meshes.forEach((function(e){e.infiniteDistance||(r.addShadowCaster(e),e.isAnInstance||(e.receiveShadows=!0))})),this.forceUpdate()},t.prototype.disposeShadowGenerator=function(){var e;null===(e=this.props.light.getShadowGenerator())||void 0===e||e.dispose(),this.forceUpdate()},t.prototype.render=function(){var e=this,t=this.props.light,n=this._internals,r=t.getShadowGenerator()||null,a=r instanceof u.CascadedShadowGenerator,o=t.getScene().activeCamera,i=[{label:"Shadow Generator",value:0}];t instanceof u.DirectionalLight&&i.push({label:"Cascaded Shadow Generator",value:1});var s;s=r instanceof u.CascadedShadowGenerator?[{label:"None",value:u.ShadowGenerator.FILTER_NONE},{label:"PCF",value:u.ShadowGenerator.FILTER_PCF},{label:"PCSS",value:u.ShadowGenerator.FILTER_PCSS}]:[{label:"None",value:u.ShadowGenerator.FILTER_NONE},{label:"PCF",value:u.ShadowGenerator.FILTER_PCF},{label:"PCSS",value:u.ShadowGenerator.FILTER_PCSS},{label:"Poisson",value:u.ShadowGenerator.FILTER_POISSONSAMPLING},{label:"Exponential",value:u.ShadowGenerator.FILTER_EXPONENTIALSHADOWMAP},{label:"Blurred exponential",value:u.ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP},{label:"Close exponential",value:u.ShadowGenerator.FILTER_CLOSEEXPONENTIALSHADOWMAP},{label:"Blurred close exponential",value:u.ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP}];var p=[{label:"Low",value:u.ShadowGenerator.QUALITY_LOW},{label:"Medium",value:u.ShadowGenerator.QUALITY_MEDIUM},{label:"High",value:u.ShadowGenerator.QUALITY_HIGH}],c=o?o.minZ:0,d=o?o.maxZ:0,h=r?r.filter:0;return l.createElement("div",null,l.createElement(Oe,{title:"SHADOWS",selection:this.props.globalState},l.createElement(Le,{label:"Shadows enabled",target:t,propertyName:"shadowEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!a&&l.createElement(l.Fragment,null,l.createElement(He,{lockObject:this.props.lockObject,label:"Shadows near plane",target:t,propertyName:"shadowMinZ",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Shadows far plane",target:t,propertyName:"shadowMaxZ",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),null==r&&l.createElement(Oe,{title:"SHADOW GENERATOR",selection:this.props.globalState},l.createElement(Ye,{label:"Type",options:i,target:n,propertyName:"generatorType"}),l.createElement(Ye,{label:"Map size",options:[{label:"2048x2048",value:2048},{label:"1024x1024",value:1024},{label:"512x512",value:512},{label:"256x256",value:256}],target:n,propertyName:"mapSize"}),l.createElement(we,{label:"Create generator",onClick:function(){return e.createShadowGenerator()}})),null!==r&&l.createElement(Oe,{title:"SHADOW GENERATOR",selection:this.props.globalState},l.createElement(we,{label:"Dispose generator",onClick:function(){return e.disposeShadowGenerator()}}),a&&l.createElement(l.Fragment,null,l.createElement(Ye,{label:"Num cascades",options:[{label:"2",value:2},{label:"3",value:3},{label:"4",value:4}],target:r,propertyName:"numCascades",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Debug mode",target:r,propertyName:"debug",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Stabilize cascades",target:r,propertyName:"stabilizeCascades",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Lambda",minimum:0,maximum:1,step:.01,target:r,propertyName:"lambda",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Cascade blend",minimum:0,maximum:1,step:.01,target:r,propertyName:"cascadeBlendPercentage",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Depth clamp",target:r,propertyName:"depthClamp",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Auto-Calc depth bounds",target:r,propertyName:"autoCalcDepthBounds",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Shadow MaxZ",minimum:c,maximum:d,step:.5,target:r,propertyName:"shadowMaxZ",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(He,{lockObject:this.props.lockObject,digits:4,step:"0.0001",label:"Bias",target:r,propertyName:"bias",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Normal bias",target:r,propertyName:"normalBias",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Darkness",target:r,minimum:0,maximum:1,step:.01,propertyName:"darkness",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Allow transparent shadows",target:r,propertyName:"transparencyShadow",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Filter",options:s,onSelect:function(){e.forceUpdate()},target:r,propertyName:"filter",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),(h===u.ShadowGenerator.FILTER_PCF||h===u.ShadowGenerator.FILTER_PCSS)&&l.createElement(Ye,{label:"Filtering quality",options:p,onSelect:function(){e.forceUpdate()},target:r,propertyName:"filteringQuality",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),h===u.ShadowGenerator.FILTER_PCSS&&l.createElement(We,{label:"Penumbra ratio",minimum:0,maximum:.5,step:.001,target:r,propertyName:"contactHardeningLightSizeUVRatio",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!a&&(h===u.ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP||h===u.ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&l.createElement(Le,{label:"Use kernel blur",target:r,propertyName:"useKernelBlur",onValueChanged:function(){return e.forceUpdate()},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r instanceof u.ShadowGenerator&&(h===u.ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP||h===u.ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&!r.useKernelBlur&&l.createElement(We,{label:"Blur box offset",target:r,propertyName:"blurBoxOffset",minimum:1,maximum:64,step:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r instanceof u.ShadowGenerator&&(h===u.ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP||h===u.ShadowGenerator.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&r.useKernelBlur&&l.createElement(We,{label:"Blur kernel",target:r,propertyName:"blurKernel",minimum:1,maximum:64,step:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r instanceof u.ShadowGenerator&&(h===u.ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP||h===u.ShadowGenerator.FILTER_EXPONENTIALSHADOWMAP)&&l.createElement(He,{lockObject:this.props.lockObject,label:"Depth scale",target:r,propertyName:"depthScale",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r instanceof u.ShadowGenerator&&(h===u.ShadowGenerator.FILTER_BLUREXPONENTIALSHADOWMAP||h===u.ShadowGenerator.FILTER_EXPONENTIALSHADOWMAP)&&l.createElement(We,{label:"Blur scale",target:r,propertyName:"blurScale",minimum:1,maximum:4,step:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),a&&h===u.ShadowGenerator.FILTER_PCSS&&l.createElement(We,{label:"Penumbra darkness",minimum:0,maximum:1,step:.01,target:r,propertyName:"penumbraDarkness",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),sr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.light;return l.createElement("div",{className:"pane"},l.createElement(ar,{globalState:this.props.globalState,lockObject:this.props.lockObject,light:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"SETUP",selection:this.props.globalState},l.createElement(Qe,{label:"Diffuse",target:e,propertyName:"diffuse",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Specular",target:e,propertyName:"specular",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Position",target:e,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(ir,{globalState:this.props.globalState,lockObject:this.props.lockObject,light:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),lr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={mode:n.props.camera.mode},n}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.camera,n=[{label:"Perspective",value:u.Camera.PERSPECTIVE_CAMERA},{label:"Orthographic",value:u.Camera.ORTHOGRAPHIC_CAMERA}];return l.createElement("div",null,l.createElement(et,{globalState:this.props.globalState,target:t,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"ID",value:t.id}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:t.uniqueId.toString()}),l.createElement(Ee,{label:"Class",value:t.getClassName()}),l.createElement(He,{lockObject:this.props.lockObject,label:"Near plane",target:t,propertyName:"minZ",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Far plane",target:t,propertyName:"maxZ",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Inertia",target:t,propertyName:"inertia",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(yn,{isInteger:!0,lockObject:this.props.lockObject,label:"Layer mask",target:t,propertyName:"layerMask",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Mode",options:n,target:t,propertyName:"mode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({mode:t})}}),t.mode===u.Camera.PERSPECTIVE_CAMERA&&l.createElement(We,{label:"Field of view",target:t,useEuler:this.props.globalState.onlyUseEulers,propertyName:"fov",minimum:.1,maximum:Math.PI,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.mode===u.Camera.ORTHOGRAPHIC_CAMERA&&l.createElement(He,{lockObject:this.props.lockObject,label:"Left",target:t,propertyName:"orthoLeft",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.mode===u.Camera.ORTHOGRAPHIC_CAMERA&&l.createElement(He,{lockObject:this.props.lockObject,label:"Top",target:t,propertyName:"orthoTop",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.mode===u.Camera.ORTHOGRAPHIC_CAMERA&&l.createElement(He,{lockObject:this.props.lockObject,label:"Right",target:t,propertyName:"orthoRight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.mode===u.Camera.ORTHOGRAPHIC_CAMERA&&l.createElement(He,{lockObject:this.props.lockObject,label:"Bottom",target:t,propertyName:"orthoBottom",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:"Dispose",onClick:function(){t.dispose(),e.props.globalState.onSelectionChangedObservable.notifyObservers(null)}})),l.createElement(vn,{globalState:this.props.globalState,animatable:t,scene:t.getScene(),lockObject:this.props.lockObject}))},t}(l.Component),pr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.camera;return l.createElement("div",{className:"pane"},l.createElement(lr,{globalState:this.props.globalState,lockObject:this.props.lockObject,camera:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"TRANSFORMS",selection:this.props.globalState},l.createElement(Je,{label:"Target",target:e,propertyName:"target",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Position",target:e,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Rotation",noSlider:!0,useEuler:this.props.globalState.onlyUseEulers,target:e,propertyName:"rotation",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"CONTROLS",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Angular sensitivity",target:e,propertyName:"angularSensibility",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Speed",target:e,propertyName:"speed",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"COLLISIONS",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Check collisions",target:e,propertyName:"checkCollisions",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Apply gravity",target:e,propertyName:"applyGravity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Ellipsoid",target:e,propertyName:"ellipsoid",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Ellipsoid offset",target:e,propertyName:"ellipsoidOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),cr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.camera;return l.createElement("div",{className:"pane"},l.createElement(lr,{globalState:this.props.globalState,lockObject:this.props.lockObject,camera:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"TRANSFORMS",selection:this.props.globalState},l.createElement(Je,{label:"Target",target:e,propertyName:"target",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Alpha",useEuler:this.props.globalState.onlyUseEulers,target:e,propertyName:"alpha",minimum:e.lowerAlphaLimit||0,maximum:e.upperAlphaLimit||2*Math.PI,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Beta",useEuler:this.props.globalState.onlyUseEulers,target:e,propertyName:"beta",minimum:e.lowerAlphaLimit||0,maximum:e.upperBetaLimit||2*Math.PI,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Radius",target:e,propertyName:"radius",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"CONTROLS",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Angular sensitivity X",target:e,propertyName:"angularSensibilityX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Angular sensitivity Y",target:e,propertyName:"angularSensibilityY",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Panning sensitivity",target:e,propertyName:"panningSensibility",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Pinch delta percentage",target:e,propertyName:"pinchDeltaPercentage",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Wheel delta percentage",target:e,propertyName:"wheelDeltaPercentage",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Speed",target:e,propertyName:"speed",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"COLLISIONS",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Check collisions",target:e,propertyName:"checkCollisions",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Collision radius",target:e,propertyName:"collisionRadius",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"LIMITS",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Lower alpha limit",target:e,propertyName:"lowerAlphaLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Upper alpha limit",target:e,propertyName:"upperAlphaLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Lower beta limit",target:e,propertyName:"lowerBetaLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Upper beta limit",target:e,propertyName:"upperBetaLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Lower radius limit",target:e,propertyName:"lowerRadiusLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Upper radius limit",target:e,propertyName:"upperRadiusLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"BEHAVIORS",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Auto rotation",target:e,propertyName:"useAutoRotationBehavior",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Bouncing",target:e,propertyName:"useBouncingBehavior",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Framing",target:e,propertyName:"useFramingBehavior",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),ur=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onLink=function(){this.props.url?window.open(this.props.url,"_blank"):this.props.onLink&&this.props.onLink()},t.prototype.renderContent=function(){var e=this;return this.props.onLink||this.props.url?l.createElement("div",{className:"link-value",title:this.props.value,onClick:function(){return e.onLink()}},this.props.url?"doc":this.props.value||"no name"):l.createElement("div",{className:"value",title:this.props.value,style:{color:this.props.color?this.props.color:""}},this.props.value||"no name")},t.prototype.render=function(){return l.createElement("div",{className:"indented "+(this.props.underline?"textLine underline":"textLine"+(this.props.additionalClass?" "+this.props.additionalClass:""))},this.renderContent())},t}(l.Component),dr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.renderLevel=function(e){var t=[];for(var n in e){var r=e[n];switch(Object.prototype.toString.call(r)){case"[object String]":t.push(l.createElement(Ee,{key:n,label:n,ignoreValue:!0})),t.push(l.createElement(ur,{key:n+r,value:r}));break;case"[object Array]":t.push(l.createElement(Ee,{key:n,label:n,ignoreValue:!0}));for(var a=0,o=r;a<o.length;a++){var i=o[a];t.push(l.createElement(ur,{key:n+i,value:i}))}break;case"[object Object]":for(var s in t.push(l.createElement(Ee,{key:n,label:n,ignoreValue:!0})),r)t.push(l.createElement(Ee,{key:n+i,label:s,value:r[s],additionalClass:"reduced-opacity"}))}}return t},t.prototype.render=function(){return this.props.host.metadata&&this.props.host.metadata.xmp?l.createElement("div",null,l.createElement(Oe,{title:"XMP METADATA",selection:this.props.globalState},this.renderLevel(this.props.host.metadata.xmp))):null},t}(l.Component),hr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype._getVariantsExtension=function(){var e;return null===(e=this.props.globalState)||void 0===e?void 0:e.glTFLoaderExtensions.KHR_materials_variants},t.prototype.render=function(){var e=this,t=this._getVariantsExtension();if(!t)return null;var n=t.getAvailableVariants(this.props.host);if(!n||0===n.length)return null;var r=n.sort().map((function(e,t){return{label:e,value:t+1}}));return r.splice(0,0,{label:"Original",value:0}),l.createElement("div",null,l.createElement(Oe,{title:"VARIANTS",selection:this.props.globalState},l.createElement(Ye,{label:"Active variant",options:r,noDirectUpdate:!0,target:this.props.host,propertyName:"",onSelect:function(r){0===r?t.reset(e.props.host):t.selectVariant(e.props.host,n[r-1]),e.forceUpdate()},extractValue:function(){var r=t.getLastSelectedVariant(e.props.host)||0,a=0;return r&&"[object String]"===Object.prototype.toString.call(r)&&(a=n.indexOf(r))>-1&&(a+=1),a}})))},t}(l.Component),mr=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.mesh;return n.state={displayNormals:!1,displayVertexColors:!1,displayBoneWeights:!(!r.material||"BoneWeightShader"!==r.material.getClassName()),displayBoneIndex:0,displaySkeletonMap:!1},n}return a(t,e),t.prototype.renderWireframeOver=function(){var e=this.props.mesh,t=e.getScene();if(e.reservedDataStore&&e.reservedDataStore.wireframeOver)return e.reservedDataStore.wireframeOver.dispose(!1,!0),e.reservedDataStore.wireframeOver=null,void this.forceUpdate();var n=e.clone(e.name+"_wireframeover",null,!0);n.reservedDataStore={hidden:!0},n.parent=e,n.position=u.Vector3.Zero(),n.scaling=new u.Vector3(1,1,1),n.rotation=u.Vector3.Zero(),n.rotationQuaternion=null;var r=new u.StandardMaterial("wireframeOver",t);r.reservedDataStore={hidden:!0},n.material=r,r.zOffset=1,r.disableLighting=!0,r.backFaceCulling=!1,r.emissiveColor=u.Color3.White(),r.wireframe=!0,e.reservedDataStore||(e.reservedDataStore={}),e.reservedDataStore.wireframeOver=n,this.forceUpdate()},t.prototype.renderNormalVectors=function(){var e=this.props.mesh,t=e.getScene();if(e.reservedDataStore&&e.reservedDataStore.normalLines)return e.reservedDataStore.normalLines.dispose(),e.reservedDataStore.normalLines=null,void this.forceUpdate();for(var n=e.getVerticesData(u.VertexBuffer.NormalKind),r=e.getVerticesData(u.VertexBuffer.PositionKind),a=u.Color3.White(),o=e.getBoundingInfo(),i=.05*o.maximum.subtractToRef(o.minimum,u.TmpVectors.Vector3[0]).length(),s=[],l=0;l<n.length;l+=3){var p=u.Vector3.FromArray(r,l),c=p.add(u.Vector3.FromArray(n,l).scaleInPlace(i));s.push([p,c])}var d=Object(u.CreateLineSystem)("normalLines",{lines:s},t);d.color=a,d.parent=e,d.reservedDataStore={hidden:!0},e.reservedDataStore||(e.reservedDataStore={}),e.reservedDataStore.normalLines=d,this.forceUpdate()},t.prototype.displayNormals=function(){var e=this,t=this.props.mesh,n=t.getScene();if(t.material&&"NormalMaterial"===t.material.getClassName())t.material.dispose(),t.material=t.reservedDataStore.originalMaterial,t.reservedDataStore.originalMaterial=null,this.setState({displayNormals:!1});else{if(!BABYLON.NormalMaterial)return this.setState({displayNormals:!0}),void u.Tools.LoadScript("https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.js",(function(){e.displayNormals()}));t.reservedDataStore||(t.reservedDataStore={}),t.reservedDataStore.originalMaterial||(t.reservedDataStore.originalMaterial=t.material);var r=new BABYLON.NormalMaterial("normalMaterial",n);r.disableLighting=!0,t.material&&(r.sideOrientation=t.material.sideOrientation),r.reservedDataStore={hidden:!0},t.material=r,this.setState({displayNormals:!0})}},t.prototype.displayVertexColors=function(){var e=this.props.mesh,t=e.getScene();if(e.material&&e.material.reservedDataStore&&e.material.reservedDataStore.isVertexColorMaterial)e.material.dispose(),e.material=e.reservedDataStore.originalMaterial,e.reservedDataStore.originalMaterial=null,this.setState({displayVertexColors:!1});else{e.reservedDataStore||(e.reservedDataStore={}),e.reservedDataStore.originalMaterial||(e.reservedDataStore.originalMaterial=e.material);var n=new u.StandardMaterial("vertex colors",t);n.disableLighting=!0,n.emissiveColor=u.Color3.White(),e.material&&(n.sideOrientation=e.material.sideOrientation),n.reservedDataStore={hidden:!0,isVertexColorMaterial:!0},e.useVertexColors=!0,e.material=n,this.setState({displayVertexColors:!0})}},t.prototype.displayBoneWeights=function(){var e=this.props.mesh,t=e.getScene();if(e.material&&"BoneWeightShader"===e.material.getClassName())e.material.dispose(),e.material=e.reservedDataStore.originalMaterial,e.reservedDataStore.originalMaterial=null,this.setState({displayBoneWeights:!1});else if(e.reservedDataStore||(e.reservedDataStore={}),e.reservedDataStore.originalMaterial||(e.reservedDataStore.originalMaterial=e.material),e.reservedDataStore.displayBoneIndex||(e.reservedDataStore.displayBoneIndex=this.state.displayBoneIndex),e.skeleton){var n=u.SkeletonViewer.CreateBoneWeightShader({skeleton:e.skeleton},t);n.reservedDataStore={hidden:!0},e.material=n,this.setState({displayBoneWeights:!0})}},t.prototype.displaySkeletonMap=function(){var e=this.props.mesh,t=e.getScene();if(e.material&&"SkeletonMapShader"===e.material.getClassName())e.material.dispose(),e.material=e.reservedDataStore.originalMaterial,e.reservedDataStore.originalMaterial=null,this.setState({displaySkeletonMap:!1});else if(e.reservedDataStore||(e.reservedDataStore={}),e.reservedDataStore.originalMaterial||(e.reservedDataStore.originalMaterial=e.material),e.skeleton){var n=u.SkeletonViewer.CreateSkeletonMapShader({skeleton:e.skeleton},t);n.reservedDataStore={hidden:!0},e.material=n,this.setState({displaySkeletonMap:!0})}},t.prototype.onBoneDisplayIndexChange=function(e){var t=this.props.mesh;t.reservedDataStore.displayBoneIndex=e,this.setState({displayBoneIndex:e}),t.material&&"BoneWeightShader"===t.material.getClassName()&&t.material.setFloat("targetBoneIndex",e)},t.prototype.onMaterialLink=function(){if(this.props.onSelectionChangedObservable){var e=this.props.mesh;this.props.onSelectionChangedObservable.notifyObservers(e.material)}},t.prototype.onSourceMeshLink=function(){if(this.props.onSelectionChangedObservable){var e=this.props.mesh;this.props.onSelectionChangedObservable.notifyObservers(e.sourceMesh)}},t.prototype.onSkeletonLink=function(){if(this.props.onSelectionChangedObservable){var e=this.props.mesh;this.props.onSelectionChangedObservable.notifyObservers(e.skeleton)}},t.prototype.convertPhysicsTypeToString=function(){switch(this.props.mesh.physicsImpostor.type){case u.PhysicsImpostor.NoImpostor:return"No impostor";case u.PhysicsImpostor.SphereImpostor:return"Sphere";case u.PhysicsImpostor.BoxImpostor:return"Box";case u.PhysicsImpostor.PlaneImpostor:return"Plane";case u.PhysicsImpostor.MeshImpostor:return"Mesh";case u.PhysicsImpostor.CylinderImpostor:return"Cylinder";case u.PhysicsImpostor.ParticleImpostor:return"Particle";case u.PhysicsImpostor.HeightmapImpostor:return"Heightmap";case u.PhysicsImpostor.ConvexHullImpostor:return"Convex hull";case u.PhysicsImpostor.RopeImpostor:return"Rope";case u.PhysicsImpostor.SoftbodyImpostor:return"Soft body"}return"Unknown"},t.prototype.render=function(){var e,t=this,n=this.props.mesh,r=n.getScene(),a=null!=n.material&&"NormalMaterial"===n.material.getClassName(),o=!(null==n.material||!n.material.reservedDataStore||!n.material.reservedDataStore.isVertexColorMaterial),i=!(!n.reservedDataStore||!n.reservedDataStore.normalLines),s=!(!n.reservedDataStore||!n.reservedDataStore.wireframeOver),p=null!=n.material&&"BoneWeightShader"===n.material.getClassName(),c=null!=n.material&&"SkeletonMapShader"===n.material.getClassName(),d=[];if(n.morphTargetManager)for(var h=0;h<n.morphTargetManager.numTargets;h++)d.push(n.morphTargetManager.getTarget(h));var m=[{label:"Accurate",value:u.AbstractMesh.OCCLUSION_ALGORITHM_TYPE_ACCURATE},{label:"Conservative",value:u.AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE}],b=[{label:"None",value:u.AbstractMesh.OCCLUSION_TYPE_NONE},{label:"Optimistic",value:u.AbstractMesh.OCCLUSION_TYPE_OPTIMISTIC},{label:"Strict",value:u.AbstractMesh.OCCLUSION_TYPE_STRICT}],g=r.materials.slice(0).sort((function(e,t){return(e.name||"no name").localeCompare(t.name||"no name")})),f=g.map((function(e,t){return{label:e.name||"no name",value:t}}));f.splice(0,0,{label:"None (Default Fallback)",value:-1});var v=n.skeleton?n.skeleton.bones.filter((function(e){return e.getIndex()>=0})).sort((function(e,t){return e.getIndex()-t.getIndex()})).map((function(e,t){return{label:e.name,value:e.getIndex()}})):[];return l.createElement("div",{className:"pane"},l.createElement(et,{globalState:this.props.globalState,target:n,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"ID",value:n.id}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:n,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:n.uniqueId.toString()}),l.createElement(Ee,{label:"Class",value:n.getClassName()}),l.createElement(Ee,{label:"Vertices",value:n.getTotalVertices().toString()}),l.createElement(Ee,{label:"Faces",value:(n.getTotalIndices()/3).toFixed(0)}),l.createElement(Ee,{label:"Sub-meshes",value:n.subMeshes?n.subMeshes.length.toString():"0"}),n.parent&&l.createElement(Ee,{label:"Parent",value:n.parent.name,onLink:function(){return t.props.globalState.onSelectionChangedObservable.notifyObservers(n.parent)}}),n.skeleton&&l.createElement(Ee,{label:"Skeleton",value:n.skeleton.name,onLink:function(){return t.onSkeletonLink()}}),l.createElement(Le,{label:"Is enabled",isSelected:function(){return n.isEnabled()},onSelect:function(e){return n.setEnabled(e)}}),l.createElement(Le,{label:"Is pickable",target:n,propertyName:"isPickable",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),n.material&&(!n.material.reservedDataStore||!n.material.reservedDataStore.hidden)&&l.createElement(Ee,{label:"Link to material",value:n.material.name,onLink:function(){return t.onMaterialLink()}}),!n.isAnInstance&&l.createElement(Ye,{label:"Active material",options:f,target:n,propertyName:"material",noDirectUpdate:!0,onSelect:function(e){n.material=e<0?null:g[e],t.forceUpdate()},extractValue:function(){return n.material?g.indexOf(n.material):-1},onPropertyChangedObservable:this.props.onPropertyChangedObservable}),n.isAnInstance&&l.createElement(Ee,{label:"Source",value:n.sourceMesh.name,onLink:function(){return t.onSourceMeshLink()}}),l.createElement(we,{label:"Dispose",onClick:function(){n.dispose(),t.props.globalState.onSelectionChangedObservable.notifyObservers(null)}})),l.createElement(dr,{host:n,lockObject:this.props.lockObject,globalState:this.props.globalState}),l.createElement(hr,{host:n,lockObject:this.props.lockObject,globalState:this.props.globalState}),l.createElement(Oe,{title:"TRANSFORMS",selection:this.props.globalState},l.createElement(Je,{label:"Position",target:n,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!n.rotationQuaternion&&l.createElement(Je,{label:"Rotation",useEuler:this.props.globalState.onlyUseEulers,target:n,propertyName:"rotation",step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),n.rotationQuaternion&&l.createElement($e,{label:"Rotation",useEuler:this.props.globalState.onlyUseEulers,target:n,propertyName:"rotationQuaternion",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Scaling",target:n,propertyName:"scaling",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"DISPLAY",closed:!0,selection:this.props.globalState},!n.isAnInstance&&l.createElement(We,{label:"Visibility",target:n,propertyName:"visibility",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Alpha index",target:n,propertyName:"alphaIndex",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Receive shadows",target:n,propertyName:"receiveShadows",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),n.isVerticesDataPresent(u.VertexBuffer.ColorKind)&&l.createElement(Le,{label:"Use vertex colors",target:n,propertyName:"useVertexColors",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),n.isVerticesDataPresent(u.VertexBuffer.ColorKind)&&l.createElement(Le,{label:"Has vertex alpha",target:n,propertyName:"hasVertexAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r.fogMode!==u.Scene.FOGMODE_NONE&&l.createElement(Le,{label:"Apply fog",target:n,propertyName:"applyFog",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!n.parent&&l.createElement(Le,{label:"Infinite distance",target:n,propertyName:"infiniteDistance",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Rendering group ID",decimalCount:0,target:n,propertyName:"renderingGroupId",minimum:u.RenderingManager.MIN_RENDERINGGROUPS,maximum:u.RenderingManager.MAX_RENDERINGGROUPS-1,step:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(yn,{isInteger:!0,lockObject:this.props.lockObject,label:"Layer mask",target:n,propertyName:"layerMask",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),null!=n.morphTargetManager&&l.createElement(Oe,{title:"MORPH TARGETS",closed:!0,selection:this.props.globalState},d.map((function(e,n){return l.createElement(We,{key:n,label:e.name,target:e,propertyName:"influence",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:t.props.onPropertyChangedObservable})}))),l.createElement(vn,{globalState:this.props.globalState,animatable:n,scene:n.getScene(),lockObject:this.props.lockObject}),l.createElement(Oe,{title:"ADVANCED",closed:!0,selection:this.props.globalState},n.useBones&&l.createElement(Le,{label:"Compute bones using shaders",target:n,propertyName:"computeBonesUsingShaders",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Collisions",target:n,propertyName:"checkCollisions",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Geometry ID",value:null===(e=n.geometry)||void 0===e?void 0:e.uniqueId.toString()}),l.createElement(Ee,{label:"Has normals",value:n.isVerticesDataPresent(u.VertexBuffer.NormalKind)?"Yes":"No"}),l.createElement(Ee,{label:"Has vertex colors",value:n.isVerticesDataPresent(u.VertexBuffer.ColorKind)?"Yes":"No"}),l.createElement(Ee,{label:"Has UV set 0",value:n.isVerticesDataPresent(u.VertexBuffer.UVKind)?"Yes":"No"}),l.createElement(Ee,{label:"Has UV set 1",value:n.isVerticesDataPresent(u.VertexBuffer.UV2Kind)?"Yes":"No"}),l.createElement(Ee,{label:"Has UV set 2",value:n.isVerticesDataPresent(u.VertexBuffer.UV3Kind)?"Yes":"No"}),l.createElement(Ee,{label:"Has UV set 3",value:n.isVerticesDataPresent(u.VertexBuffer.UV4Kind)?"Yes":"No"}),l.createElement(Ee,{label:"Has tangents",value:n.isVerticesDataPresent(u.VertexBuffer.TangentKind)?"Yes":"No"}),l.createElement(Ee,{label:"Has matrix weights",value:n.isVerticesDataPresent(u.VertexBuffer.MatricesWeightsKind)?"Yes":"No"}),l.createElement(Ee,{label:"Has matrix indices",value:n.isVerticesDataPresent(u.VertexBuffer.MatricesIndicesKind)?"Yes":"No"})),null!=n.physicsImpostor&&l.createElement(Oe,{title:"PHYSICS",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Mass",target:n.physicsImpostor,propertyName:"mass",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Friction",target:n.physicsImpostor,propertyName:"friction",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Restitution",target:n.physicsImpostor,propertyName:"restitution",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Type",value:this.convertPhysicsTypeToString()})),l.createElement(Oe,{title:"OCCLUSIONS",closed:!0,selection:this.props.globalState},l.createElement(Ye,{label:"Type",options:b,target:n,propertyName:"occlusionType",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Retry count",minimum:-1,maximum:10,decimalCount:0,step:1,target:n,propertyName:"occlusionRetryCount",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Algorithm",options:m,target:n,propertyName:"occlusionQueryAlgorithmType",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"EDGE RENDERING",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Enable",target:n,isSelected:function(){return null!=n.edgesRenderer},onSelect:function(e){e?n.enableEdgesRendering():n.disableEdgesRendering()}}),l.createElement(We,{label:"Edge width",minimum:0,maximum:10,step:.1,target:n,propertyName:"edgesWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Edge color",target:n,propertyName:"edgesColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),!n.isAnInstance&&l.createElement(Oe,{title:"OUTLINE & OVERLAY",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Render overlay",target:n,propertyName:"renderOverlay",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Overlay color",target:n,propertyName:"overlayColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Render outline",target:n,propertyName:"renderOutline",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Outline color",target:n,propertyName:"outlineColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"DEBUG",closed:!0,selection:this.props.globalState},!n.isAnInstance&&l.createElement(Le,{label:"Display normals",isSelected:function(){return a},onSelect:function(){return t.displayNormals()}}),!n.isAnInstance&&l.createElement(Le,{label:"Display vertex colors",isSelected:function(){return o},onSelect:function(){return t.displayVertexColors()}}),n.isVerticesDataPresent(u.VertexBuffer.NormalKind)&&l.createElement(Le,{label:"Render vertex normals",isSelected:function(){return i},onSelect:function(){return t.renderNormalVectors()}}),!n.isAnInstance&&l.createElement(Le,{label:"Render wireframe over mesh",isSelected:function(){return s},onSelect:function(){return t.renderWireframeOver()}}),!n.isAnInstance&&n.skeleton&&l.createElement(Le,{label:"Display BoneWeights",isSelected:function(){return p},onSelect:function(){return t.displayBoneWeights()}}),!n.isAnInstance&&this.state.displayBoneWeights&&n.skeleton&&l.createElement(Ye,{label:"Target Bone Name",options:v,target:n.reservedDataStore,propertyName:"displayBoneIndex",noDirectUpdate:!0,onSelect:function(e){t.onBoneDisplayIndexChange(e),t.forceUpdate()}}),!n.isAnInstance&&this.state.displayBoneWeights&&n.skeleton&&l.createElement(We,{label:"Target Bone",decimalCount:0,target:n.reservedDataStore,propertyName:"displayBoneIndex",minimum:0,maximum:v.length-1||0,step:1,onChange:function(e){t.onBoneDisplayIndexChange(e),t.forceUpdate()}}),!n.isAnInstance&&n.skeleton&&l.createElement(Le,{label:"Display SkeletonMap",isSelected:function(){return c},onSelect:function(){return t.displaySkeletonMap()}})))},t}(l.Component),br=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.transformNode;return l.createElement("div",{className:"pane"},l.createElement(et,{globalState:this.props.globalState,target:t,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"ID",value:t.id}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:t.uniqueId.toString()}),l.createElement(Ee,{label:"Class",value:t.getClassName()}),l.createElement(Le,{label:"IsEnabled",isSelected:function(){return t.isEnabled()},onSelect:function(e){return t.setEnabled(e)}}),t.parent&&l.createElement(Ee,{label:"Parent",value:t.parent.name,onLink:function(){return e.props.globalState.onSelectionChangedObservable.notifyObservers(t.parent)}}),l.createElement(we,{label:"Dispose",onClick:function(){t.dispose(),e.props.globalState.onSelectionChangedObservable.notifyObservers(null)}})),l.createElement(dr,{host:t,lockObject:this.props.lockObject,globalState:this.props.globalState}),l.createElement(hr,{host:t,lockObject:this.props.lockObject,globalState:this.props.globalState}),l.createElement(Oe,{title:"TRANSFORMATIONS",selection:this.props.globalState},l.createElement(Je,{label:"Position",target:t,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!t.rotationQuaternion&&l.createElement(Je,{label:"Rotation",useEuler:this.props.globalState.onlyUseEulers,target:t,propertyName:"rotation",step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.rotationQuaternion&&l.createElement($e,{label:"Rotation",useEuler:this.props.globalState.onlyUseEulers,target:t,propertyName:"rotationQuaternion",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Scaling",target:t,propertyName:"scaling",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(vn,{globalState:this.props.globalState,animatable:t,scene:t.getScene(),lockObject:this.props.lockObject}))},t}(l.Component),gr=function(e){function t(t){var n=e.call(this,t)||this;return n._onDebugSelectionChangeObservable=new u.Observable,n}return a(t,e),t.prototype.renderTextures=function(){var e=this.props.material,t=this._onDebugSelectionChangeObservable;return l.createElement(Oe,{title:"TEXTURES",selection:this.props.globalState},l.createElement(xn,{label:"Diffuse",texture:e.diffuseTexture,material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Reflection",texture:e.reflectionTexture,material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),e.reflectionTexture&&l.createElement(We,{label:"Reflection blur",target:e,propertyName:"reflectionBlur",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t.prototype.render=function(){var e=this.props.material;return l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"LIGHTING & COLORS",selection:this.props.globalState},l.createElement(Qe,{label:"Primary",target:e,propertyName:"primaryColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Shadow level",target:e,propertyName:"primaryColorShadowLevel",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Highlight level",target:e,propertyName:"primaryColorHighlightLevel",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),this.renderTextures(),l.createElement(Oe,{title:"RENDERING",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Enable noise",target:e,propertyName:"enableNoise",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Opacity fresnel",target:e,propertyName:"opacityFresnel",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Reflection fresnel",target:e,propertyName:"reflectionFresnel",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Reflection amount",target:e,propertyName:"reflectionAmount",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),fr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.renderGridInformation=function(){var e=this.props.control;if(!e.parent)return null;var t=e.parent;if(void 0===t.rowCount)return null;var n=t.getChildCellInfo(e);if(void 0===n)return null;var r=n.split(":");return l.createElement(Oe,{title:"GRID"},l.createElement(Ee,{label:"Row",value:r[0]}),l.createElement(Ee,{label:"Column",value:r[1]}))},t.prototype.render=function(){var e=this.props.control,t=[{label:"Left",value:Tn.Control.HORIZONTAL_ALIGNMENT_LEFT},{label:"Right",value:Tn.Control.HORIZONTAL_ALIGNMENT_RIGHT},{label:"Center",value:Tn.Control.HORIZONTAL_ALIGNMENT_CENTER}],n=[{label:"Top",value:Tn.Control.VERTICAL_ALIGNMENT_TOP},{label:"Bottom",value:Tn.Control.VERTICAL_ALIGNMENT_BOTTOM},{label:"Center",value:Tn.Control.VERTICAL_ALIGNMENT_CENTER}];return l.createElement("div",null,l.createElement(Oe,{title:"GENERAL"},l.createElement(Ee,{label:"Class",value:e.getClassName()}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:e,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:e.uniqueId.toString()}),l.createElement(We,{label:"Alpha",target:e,propertyName:"alpha",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),void 0!==e.color&&l.createElement(Ze,{lockObject:this.props.lockObject,label:"Color",target:e,propertyName:"color",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),void 0!==e.background&&l.createElement(Ze,{lockObject:this.props.lockObject,label:"Background",target:e,propertyName:"background",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"ZIndex",target:e,propertyName:"zIndex",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),this.renderGridInformation(),l.createElement(Oe,{title:"ALIGNMENT"},l.createElement(Ye,{label:"Horizontal",options:t,target:e,propertyName:"horizontalAlignment",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Vertical",options:n,target:e,propertyName:"verticalAlignment",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"POSITION"},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Left",target:e,propertyName:"left",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Top",target:e,propertyName:"top",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Width",target:e,propertyName:"width",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Height",target:e,propertyName:"height",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Padding left",target:e,propertyName:"paddingLeft",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Padding top",target:e,propertyName:"paddingTop",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Padding right",target:e,propertyName:"paddingRight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Padding bottom",target:e,propertyName:"paddingBottom",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"TRANSFORMATION",closed:!0},l.createElement(He,{lockObject:this.props.lockObject,label:"ScaleX",target:e,propertyName:"scaleX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"ScaleY",target:e,propertyName:"scaleY",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Rotation",target:e,propertyName:"rotation",minimum:0,maximum:2*Math.PI,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Transform center X",target:e,propertyName:"transformCenterX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Transform center Y",target:e,propertyName:"transformCenterY",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"FONT",closed:!0},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Family",target:e,propertyName:"fontFamily",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Size",target:e,propertyName:"fontSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Weight",target:e,propertyName:"fontWeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Style",target:e,propertyName:"fontStyle",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"SHADOWS",closed:!0},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Color",target:e,propertyName:"shadowColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Offset X",target:e,propertyName:"shadowOffsetX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Offset Y",target:e,propertyName:"shadowOffsetY",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Blur",target:e,propertyName:"shadowBlur",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),vr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.control;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),yr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.textBlock,t=[{label:"Left",value:Tn.Control.HORIZONTAL_ALIGNMENT_LEFT},{label:"Right",value:Tn.Control.HORIZONTAL_ALIGNMENT_RIGHT},{label:"Center",value:Tn.Control.HORIZONTAL_ALIGNMENT_CENTER}],n=[{label:"Top",value:Tn.Control.VERTICAL_ALIGNMENT_TOP},{label:"Bottom",value:Tn.Control.VERTICAL_ALIGNMENT_BOTTOM},{label:"Center",value:Tn.Control.VERTICAL_ALIGNMENT_CENTER}],r=[{label:"Clip",value:Tn.TextWrapping.Clip},{label:"Ellipsis",value:Tn.TextWrapping.Ellipsis},{label:"Word wrap",value:Tn.TextWrapping.WordWrap}];return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"TEXTBLOCK"},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Text",target:e,propertyName:"text",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Horizontal text alignment",options:t,target:e,propertyName:"textHorizontalAlignment",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Vertical text alignment",options:n,target:e,propertyName:"textVerticalAlignment",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Resize to fit",target:e,propertyName:"resizeToFit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Wrapping",options:r,target:e,propertyName:"textWrapping",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Line spacing",target:e,propertyName:"lineSpacing",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"OUTLINE"},l.createElement(He,{lockObject:this.props.lockObject,label:"Outline width",target:e,propertyName:"outlineWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Outline color",target:e,propertyName:"outlineColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Cr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.inputText;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"INPUTTEXT"},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Text",target:e,propertyName:"text",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Prompt",target:e,propertyName:"promptMessage",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Max width",target:e,propertyName:"maxWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Highlight color",target:e,propertyName:"textHighlightColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Highligher opacity",minimum:0,maximum:1,step:.01,target:e,propertyName:"highligherOpacity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"On focus select all",target:e,propertyName:"onFocusSelectAll",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Focused background",target:e,propertyName:"focusedBackground",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Max width",target:e,propertyName:"maxWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Margin",target:e,propertyName:"margin",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Auto stretch width",target:e,propertyName:"autoStretchWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Thickness",target:e,propertyName:"thickness",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Placeholder text",target:e,propertyName:"placeholderText",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Placeholder color",target:e,propertyName:"placeholderColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Er=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.colorPicker;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"COLORPICKER"},l.createElement(Qe,{label:"Color",target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),xr=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.animationGroup;return n.state={playButtonText:r.isPlaying?"Pause":"Play",currentFrame:0},n.connect(n.props.animationGroup),n._onBeforeRenderObserver=n.props.scene.onBeforeRenderObservable.add((function(){n.updateCurrentFrame(n.props.animationGroup)})),n.timelineRef=l.createRef(),n}return a(t,e),t.prototype.disconnect=function(e){this._onAnimationGroupPlayObserver&&(e.onAnimationGroupPlayObservable.remove(this._onAnimationGroupPlayObserver),this._onAnimationGroupPlayObserver=null),this._onAnimationGroupPauseObserver&&(e.onAnimationGroupPauseObservable.remove(this._onAnimationGroupPauseObserver),this._onAnimationGroupPauseObserver=null)},t.prototype.connect=function(e){var t=this;this._onAnimationGroupPlayObserver=e.onAnimationGroupPlayObservable.add((function(){t.forceUpdate()})),this._onAnimationGroupPauseObserver=e.onAnimationGroupPauseObservable.add((function(){t.forceUpdate()})),this.updateCurrentFrame(e)},t.prototype.updateCurrentFrame=function(e){if(e.targetedAnimations.length>0){var t=e.targetedAnimations[0].animation.runtimeAnimations;t.length>0?this.setState({currentFrame:t[0].currentFrame}):this.setState({currentFrame:0})}},t.prototype.shouldComponentUpdate=function(e){return this.props.animationGroup!==e.animationGroup&&(this.disconnect(this.props.animationGroup),this.connect(e.animationGroup)),!0},t.prototype.componentWillUnmount=function(){this.disconnect(this.props.animationGroup),this._onBeforeRenderObserver&&(this.props.scene.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=null)},t.prototype.playOrPause=function(){var e=this.props.animationGroup;e.isPlaying?(this.setState({playButtonText:"Play"}),e.pause()):(this.setState({playButtonText:"Pause"}),this.props.scene.animationGroups.forEach((function(e){return e.pause()})),e.play(!0))},t.prototype.onCurrentFrameChange=function(e){var t=this.props.animationGroup;t.isPlaying?t.goToFrame(e):(t.play(!0),t.goToFrame(e),t.pause()),this.setState({currentFrame:e})},t.prototype.render=function(){var e=this,t=this.props.animationGroup,n=t.isPlaying?"Pause":"Play";return this._animationCurveEditorContext||(this._animationCurveEditorContext=new fn,this._animationCurveEditorContext.title=t.name||"",this._animationCurveEditorContext.animations=t.targetedAnimations,this._animationCurveEditorContext.scene=this.props.scene,this._animationCurveEditorContext.useTargetAnimations=!0,this._animationCurveEditorContext.rootAnimationGroup=t),l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"GENERAL"},l.createElement(Ee,{label:"Class",value:t.getClassName()}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"CONTROLS"},l.createElement(we,{label:n,onClick:function(){return e.playOrPause()}}),l.createElement(We,{label:"Speed ratio",minimum:0,maximum:10,step:.1,target:t,propertyName:"speedRatio",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{ref:this.timelineRef,label:"Current frame",minimum:t.from,maximum:t.to,step:(t.to-t.from)/1e3,directValue:this.state.currentFrame,onInput:function(t){return e.onCurrentFrameChange(t)}})),l.createElement(Oe,{title:"INFOS"},l.createElement(Ee,{label:"Animation count",value:t.targetedAnimations.length.toString()}),l.createElement(gn,{globalState:this.props.globalState,context:this._animationCurveEditorContext}),l.createElement(Ee,{label:"From",value:t.from.toFixed(2)}),l.createElement(Ee,{label:"To",value:t.to.toFixed(2)}),l.createElement(Ee,{label:"Unique ID",value:t.uniqueId.toString()})))},t}(l.Component),Or=function(){this.lock=!1},Sr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.image,n=[{label:"None",value:Tn.Image.STRETCH_NONE},{label:"Fill",value:Tn.Image.STRETCH_FILL},{label:"Uniform",value:Tn.Image.STRETCH_UNIFORM},{label:"Extend",value:Tn.Image.STRETCH_EXTEND},{label:"NinePatch",value:Tn.Image.STRETCH_NINE_PATCH}];return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:t,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"IMAGE"},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Source",target:t,propertyName:"source",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Source left",target:t,propertyName:"sourceLeft",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Source top",target:t,propertyName:"sourceTop",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Source width",target:t,propertyName:"sourceWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Source height",target:t,propertyName:"sourceHeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Autoscale",target:t,propertyName:"autoScale",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Stretch",options:n,target:t,propertyName:"stretch",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({mode:t})}})),l.createElement(Oe,{title:"ANIMATION SHEET"},l.createElement(He,{lockObject:this.props.lockObject,label:"Cell Id",isInteger:!0,target:t,propertyName:"cellId",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Cell width",target:t,propertyName:"cellWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Cell height",target:t,propertyName:"cellHeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),_r=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.slider;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"SLIDER"},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Border color",target:e,propertyName:"borderColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Display thumb",target:e,propertyName:"displayThumb",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Thumb circle",target:e,propertyName:"isThumbCircle",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Vertical",target:e,propertyName:"isVertical",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Thumb clamped",target:e,propertyName:"isThumbClamped",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Bar offset",target:e,propertyName:"barOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Thumb width",target:e,propertyName:"thumbWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Minimum",target:e,propertyName:"minimum",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Maximum",target:e,propertyName:"maximum",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Value",target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),wr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.imageBasedSlider;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"IMAGE BASED SLIDER"},l.createElement(Le,{label:"Display thumb",target:e,propertyName:"displayThumb",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Vertical",target:e,propertyName:"isVertical",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Thumb clamped",target:e,propertyName:"isThumbClamped",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Bar offset",target:e,propertyName:"barOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Thumb width",target:e,propertyName:"thumbWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Minimum",target:e,propertyName:"minimum",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Maximum",target:e,propertyName:"maximum",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Value",target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Pr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.rectangle;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"RECTANGLE"},l.createElement(Le,{label:"Clip children",target:e,propertyName:"clipChildren",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Thickness",target:e,propertyName:"thickness",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Corner radius",target:e,propertyName:"cornerRadius",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Tr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.ellipse;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"ELLIPSE"},l.createElement(Le,{label:"Clip children",target:e,propertyName:"clipChildren",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Thickness",target:e,propertyName:"thickness",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),kr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.checkbox;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"CHECKBOX"},l.createElement(He,{lockObject:this.props.lockObject,label:"Check size ratio",target:e,propertyName:"checkSizeRatio",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Checked",target:e,propertyName:"isChecked",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Nr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.radioButton;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"RADIO BUTTON"},l.createElement(He,{lockObject:this.props.lockObject,label:"Thickness",target:e,propertyName:"thickness",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Check size ratio",target:e,propertyName:"checkSizeRatio",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Group",target:e,propertyName:"group",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Checked",target:e,propertyName:"isChecked",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Mr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onDashChange=function(e){var t=this.props.line,n=e.split(",");t.dash=[],n.forEach((function(e){var n=parseInt(e);isNaN(n)||t.dash.push(n)}))},t.prototype.render=function(){var e=this,t=this.props.line;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:t,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"LINE"},l.createElement(He,{lockObject:this.props.lockObject,label:"Line width",target:t,propertyName:"lineWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"X1",target:t,propertyName:"x1",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Y1",target:t,propertyName:"y1",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"X2",target:t,propertyName:"x2",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Y2",target:t,propertyName:"y2",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Dash pattern",target:t,value:t.dash.join(","),onChange:function(t){return e.onDashChange(t)}})))},t}(l.Component),Ar=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.scrollViewer;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"RECTANGLE"},l.createElement(He,{lockObject:this.props.lockObject,label:"Thickness",target:e,propertyName:"thickness",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Corner radius",target:e,propertyName:"cornerRadius",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"SCROLLVIEWER"},l.createElement(He,{lockObject:this.props.lockObject,label:"Bar size",target:e,propertyName:"barSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Bar color",target:e,propertyName:"barColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Bar background",target:e,propertyName:"barBackground",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Wheel precision",target:e,propertyName:"wheelPrecision",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Lr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.renderRows=function(){for(var e=this.props.grid,t=[],n=0;n<e.rowCount;n++)t.push(e.getRowDefinition(n));return t.map((function(t,n){return l.createElement(Ee,{key:"r"+n,label:"Row "+n,value:t.toString(e.host,2),underline:n===e.rowCount-1})}))},t.prototype.renderColumns=function(){for(var e=this.props.grid,t=[],n=0;n<e.columnCount;n++)t.push(e.getColumnDefinition(n));return t.map((function(t,n){return l.createElement(Ee,{key:"c"+n,label:"Column "+n,value:t.toString(e.host,2)})}))},t.prototype.render=function(){for(var e=this.props.grid,t=[],n=0;n<e.rowCount;n++)t.push(e.getColumnDefinition(n));return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GRID"},this.renderRows(),this.renderColumns()))},t}(l.Component),Rr=function(e){function t(t){var n=e.call(this,t)||this;return n._onDebugSelectionChangeObservable=new u.Observable,n}return a(t,e),t.prototype.renderTextures=function(){var e=this.props.material,t=this._onDebugSelectionChangeObservable;return l.createElement(Oe,{title:"TEXTURES",selection:this.props.globalState},l.createElement(xn,{label:"Base",texture:e.baseTexture,propertyName:"baseTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Metallic roughness",texture:e.metallicRoughnessTexture,propertyName:"metallicRoughnessTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Normal",texture:e.normalTexture,propertyName:"normalTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Environment",texture:e.environmentTexture,propertyName:"environmentTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Emissive",texture:e.emissiveTexture,propertyName:"emissiveTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Lightmap",texture:e.lightmapTexture,propertyName:"lightmapTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}))},t.prototype.render=function(){var e=this.props.material;return l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),this.renderTextures(),l.createElement(Oe,{title:"LIGHTING & COLORS",selection:this.props.globalState},l.createElement(Qe,{label:"Base",target:e,propertyName:"baseColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Qe,{label:"Emissive",target:e,propertyName:"emissiveColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0})),l.createElement(Oe,{title:"LEVELS",closed:!0,selection:this.props.globalState},l.createElement(We,{label:"Metallic",target:e,propertyName:"metallic",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Roughness",target:e,propertyName:"roughness",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"NORMAL MAP",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Invert X axis",target:e,propertyName:"invertNormalMapX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Invert Y axis",target:e,propertyName:"invertNormalMapY",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Ir=function(e){function t(t){var n=e.call(this,t)||this;return n._onDebugSelectionChangeObservable=new u.Observable,n}return a(t,e),t.prototype.renderTextures=function(){var e=this.props.material,t=this._onDebugSelectionChangeObservable;return l.createElement(Oe,{title:"TEXTURES",selection:this.props.globalState},l.createElement(xn,{label:"Diffuse",texture:e.diffuseTexture,propertyName:"diffuseTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Specular glossiness",texture:e.specularGlossinessTexture,propertyName:"specularGlossinessTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Normal",texture:e.normalTexture,propertyName:"normalTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Environment",texture:e.environmentTexture,propertyName:"environmentTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Emissive",texture:e.emissiveTexture,propertyName:"emissiveTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}),l.createElement(xn,{label:"Lightmap",texture:e.lightmapTexture,propertyName:"lightmapTexture",material:e,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:t}))},t.prototype.render=function(){var e=this.props.material;return l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),this.renderTextures(),l.createElement(Oe,{title:"LIGHTING & COLORS",selection:this.props.globalState},l.createElement(Qe,{label:"Diffuse",target:e,propertyName:"diffuseColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0}),l.createElement(Qe,{label:"Specular",target:e,propertyName:"specularColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,isLinear:!0})),l.createElement(Oe,{title:"LEVELS",closed:!0,selection:this.props.globalState},l.createElement(We,{label:"Glossiness",target:e,propertyName:"glossiness",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"NORMAL MAP",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Invert X axis",target:e,propertyName:"invertNormalMapX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Invert Y axis",target:e,propertyName:"invertNormalMapY",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Dr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.stackPanel;return l.createElement("div",{className:"pane"},l.createElement(fr,{lockObject:this.props.lockObject,control:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"STACKPANEL"},l.createElement(Le,{label:"Clip children",target:e,propertyName:"clipChildren",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Vertical",target:e,propertyName:"isVertical",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),jr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.postProcess;return l.createElement("div",null,l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"Class",value:t.getClassName()}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.width&&l.createElement(Ee,{label:"Width",value:t.width.toString()}),t.height&&l.createElement(Ee,{label:"Height",value:t.height.toString()}),l.createElement(Le,{label:"Auto clear",target:t,propertyName:"autoClear",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.clearColor&&l.createElement(Qe,{label:"Clear color",target:t,propertyName:"clearColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Pixel perfect",target:t,propertyName:"enablePixelPerfectMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Fullscreen viewport",target:t,propertyName:"forceFullscreenViewport",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Samples",target:t,propertyName:"samples",minimum:1,maximum:8,step:1,decimalCount:0,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:"Dispose",onClick:function(){t.dispose(),e.props.globalState.onSelectionChangedObservable.notifyObservers(null)}})))},t}(l.Component),zr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.edit=function(){this.props.postProcess.nodeMaterialSource.edit()},t.prototype.render=function(){var e=this,t=this.props.postProcess;return l.createElement("div",{className:"pane"},l.createElement(jr,{globalState:this.props.globalState,lockObject:this.props.lockObject,postProcess:t,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.nodeMaterialSource&&l.createElement(Oe,{title:"CONFIGURATION",selection:this.props.globalState},l.createElement(we,{label:"Node Material Editor",onClick:function(){return e.edit()}})))},t}(l.Component),Fr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.renderPipeline,t=e;return l.createElement("div",null,l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"Name",value:e.name}),l.createElement(Ee,{label:"Class",value:e.getClassName()}),void 0!==t.samples&&l.createElement(We,{label:"Samples",minimum:1,maximum:8,step:1,decimalCount:0,target:e,propertyName:"samples",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Vr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.renderPipeline;return l.createElement("div",{className:"pane"},l.createElement(Fr,{globalState:this.props.globalState,lockObject:this.props.lockObject,renderPipeline:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),Ur=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.renderPipeline,n=t.scene.activeCamera,r=[{label:"Standard",value:u.ImageProcessingConfiguration.TONEMAPPING_STANDARD},{label:"ACES",value:u.ImageProcessingConfiguration.TONEMAPPING_ACES}],a=[{label:"Multiply",value:u.ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY},{label:"Opaque",value:u.ImageProcessingConfiguration.VIGNETTEMODE_OPAQUE}];return l.createElement("div",{className:"pane"},l.createElement(Fr,{globalState:this.props.globalState,lockObject:this.props.lockObject,renderPipeline:t,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"BLOOM",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,onValueChanged:function(){return e.forceUpdate()},propertyName:"bloomEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.bloomEnabled&&l.createElement("div",null,l.createElement(We,{label:"Threshold",minimum:0,maximum:1,step:.05,target:t,propertyName:"bloomThreshold",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Weight",minimum:0,maximum:1,step:.05,target:t,propertyName:"bloomWeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Kernel",minimum:0,maximum:128,step:1,target:t,propertyName:"bloomKernel",onPropertyChangedObservable:this.props.onPropertyChangedObservable,decimalCount:0}),l.createElement(We,{label:"Scale",minimum:0,maximum:1,step:.25,target:t,propertyName:"bloomScale",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"CHROMATIC ABERRATION",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,onValueChanged:function(){return e.forceUpdate()},propertyName:"chromaticAberrationEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.chromaticAberrationEnabled&&l.createElement("div",null,l.createElement(We,{label:"aberrationAmount",minimum:0,maximum:128,step:.1,target:t.chromaticAberration,propertyName:"aberrationAmount",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Radial intensity",minimum:0,maximum:1,step:.01,target:t.chromaticAberration,propertyName:"radialIntensity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement($n,{label:"Center",target:t.chromaticAberration,propertyName:"centerPosition",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement($n,{label:"Direction",target:t.chromaticAberration,propertyName:"direction",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"DEPTH OF FIELD",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,onValueChanged:function(){return e.forceUpdate()},propertyName:"depthOfFieldEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.depthOfFieldEnabled&&l.createElement("div",null,l.createElement(We,{label:"Focal length",minimum:0,maximum:n.maxZ,step:.1,target:t.depthOfField,propertyName:"focalLength",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"fStop",minimum:0,maximum:32,step:.1,target:t.depthOfField,propertyName:"fStop",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Distance",minimum:0,maximum:n.maxZ,step:.1,target:t.depthOfField,propertyName:"focusDistance",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Lens size",minimum:0,maximum:1e3,step:1,target:t.depthOfField,propertyName:"lensSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable,decimalCount:0}))),l.createElement(Oe,{title:"FXAA",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,propertyName:"fxaaEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"GLOW LAYER",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,propertyName:"glowLayerEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.glowLayerEnabled&&l.createElement("div",null,l.createElement(We,{label:"Blur kernel size",minimum:1,maximum:128,step:1,decimalCount:0,target:t.glowLayer,propertyName:"blurKernelSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Intensity",minimum:0,maximum:10,step:.1,target:t.glowLayer,propertyName:"intensity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"GRAIN",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,onValueChanged:function(){return e.forceUpdate()},propertyName:"grainEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.grainEnabled&&l.createElement("div",null,l.createElement(Le,{label:"Animated",target:t.grain,propertyName:"animated",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Intensity",minimum:0,maximum:50,step:.1,target:t.grain,propertyName:"intensity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))),l.createElement(Oe,{title:"IMAGE PROCESSING",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,onValueChanged:function(){return e.forceUpdate()},propertyName:"imageProcessingEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.imageProcessing&&l.createElement("div",null,l.createElement(we,{label:"Convert clear color to linear",onClick:function(){return t.scene.clearColor=t.scene.clearColor.toLinearSpace()}}),l.createElement(we,{label:"Convert clear color to gamma",onClick:function(){return t.scene.clearColor=t.scene.clearColor.toGammaSpace()}}),l.createElement(We,{minimum:0,maximum:4,step:.1,label:"Contrast",target:t.imageProcessing,propertyName:"contrast",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:4,step:.1,label:"Exposure",target:t.imageProcessing,propertyName:"exposure",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Tone mapping",target:t.imageProcessing,propertyName:"toneMappingEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Tone mapping type",options:r,target:t.imageProcessing,propertyName:"toneMappingType",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({mode:t})}}),l.createElement(Le,{label:"Vignette",target:t.imageProcessing,propertyName:"vignetteEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:4,step:.1,label:"Vignette weight",target:t.imageProcessing,propertyName:"vignetteWeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:1,step:.1,label:"Vignette stretch",target:t.imageProcessing,propertyName:"vignetteStretch",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:Math.PI,step:.1,label:"Vignette FOV",target:t.imageProcessing,propertyName:"vignetteCameraFov",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:1,step:.1,label:"Vignette center X",target:t.imageProcessing,propertyName:"vignetteCentreX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{minimum:0,maximum:1,step:.1,label:"Vignette center Y",target:t.imageProcessing,propertyName:"vignetteCentreY",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Vignette color",target:t.imageProcessing,propertyName:"vignetteColor",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Vignette blend mode",options:a,target:t.imageProcessing,propertyName:"vignetteBlendMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({mode:t})}}))),l.createElement(Oe,{title:"SHARPEN",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",target:t,onValueChanged:function(){return e.forceUpdate()},propertyName:"sharpenEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.sharpenEnabled&&l.createElement("div",null,l.createElement(We,{label:"Color amount",minimum:0,maximum:1,step:.05,target:t.sharpen,propertyName:"colorAmount",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Edge amount",minimum:0,maximum:5,step:.05,target:t.sharpen,propertyName:"edgeAmount",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))))},t}(l.Component),Gr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.renderPipeline;return l.createElement("div",{className:"pane"},l.createElement(Fr,{globalState:this.props.globalState,lockObject:this.props.lockObject,renderPipeline:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"SSAO",selection:this.props.globalState},l.createElement(We,{label:"Strength",minimum:0,maximum:2,step:.05,target:e,propertyName:"totalStrength",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Base",minimum:0,maximum:1,step:.05,target:e,propertyName:"base",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Radius",minimum:1e-4,maximum:.001,step:1e-4,target:e,propertyName:"radius",onPropertyChangedObservable:this.props.onPropertyChangedObservable,decimalCount:4}),l.createElement(We,{label:"Area",minimum:1e-4,maximum:.01,step:1e-4,target:e,propertyName:"area",onPropertyChangedObservable:this.props.onPropertyChangedObservable,decimalCount:4}),l.createElement(We,{label:"Falloff",minimum:0,maximum:1e-5,step:1e-6,target:e,propertyName:"fallOff",onPropertyChangedObservable:this.props.onPropertyChangedObservable,decimalCount:6})))},t}(l.Component),Br=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.renderPipeline,t=e.scene.activeCamera;return l.createElement("div",{className:"pane"},l.createElement(Fr,{globalState:this.props.globalState,lockObject:this.props.lockObject,renderPipeline:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"SSAO",selection:this.props.globalState},l.createElement(We,{label:"Strength",minimum:0,maximum:2,step:.05,target:e,propertyName:"totalStrength",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Base",minimum:0,maximum:1,step:.05,target:e,propertyName:"base",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Max Z",minimum:0,maximum:t.maxZ,step:1,target:e,propertyName:"maxZ",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Min Z aspect",minimum:0,maximum:.5,step:.01,target:e,propertyName:"minZAspect",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Radius",minimum:0,maximum:10,step:.05,target:e,propertyName:"radius",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Hr=function(e){function t(t){var n=e.call(this,t)||this;return n._skeletonViewersEnabled=!1,n._skeletonViewerDisplayOptions={displayMode:u.SkeletonViewer.DISPLAY_LINES,sphereBaseSize:.15,sphereScaleUnit:2,sphereFactor:.865,midStep:.235,midStepFactor:.155},n._skeletonViewers=new Array,n.checkSkeletonViewerState(n.props),n}return a(t,e),t.prototype.switchSkeletonViewers=function(){this._skeletonViewersEnabled=!this._skeletonViewersEnabled;var e=this.props.skeleton.getScene();if(this._skeletonViewersEnabled)for(var t=0,n=e.meshes;t<n.length;t++){var r=n[t];if(r.skeleton===this.props.skeleton){for(var a=!1,o=0;o<this._skeletonViewers.length;o++)if(this._skeletonViewers[o].skeleton===r.skeleton){a=!0;break}if(a)continue;var i=new u.SkeletonViewer(r.skeleton,r,e,!1,3,{displayMode:this._skeletonViewerDisplayOptions.displayMode,displayOptions:{sphereBaseSize:this._skeletonViewerDisplayOptions.sphereBaseSize,sphereScaleUnit:this._skeletonViewerDisplayOptions.sphereScaleUnit,sphereFactor:this._skeletonViewerDisplayOptions.sphereFactor,midStep:this._skeletonViewerDisplayOptions.midStep,midStepFactor:this._skeletonViewerDisplayOptions.midStepFactor}});i.isEnabled=!0,this._skeletonViewers.push(i),r.reservedDataStore||(r.reservedDataStore={}),r.reservedDataStore.skeletonViewer=i}}else{for(var s=0;s<this._skeletonViewers.length;s++)this._skeletonViewers[s].mesh.reservedDataStore.skeletonViewer=null,this._skeletonViewers[s].dispose();this._skeletonViewers=[]}},t.prototype.checkSkeletonViewerState=function(e){var t=e.skeleton.getScene();if(this._skeletonViewers=[],t){for(var n=!0,r=0,a=t.meshes;r<a.length;r++){var o=a[r];if(o.skeleton===e.skeleton&&o.reservedDataStore&&o.reservedDataStore.skeletonViewer&&(this._skeletonViewers.push(o.reservedDataStore.skeletonViewer),n))for(var i in n=!1,this._skeletonViewerDisplayOptions.displayMode=this._skeletonViewers[0].displayMode,this._skeletonViewers[0].options.displayOptions)i&&(this._skeletonViewerDisplayOptions[i]=this._skeletonViewers[0].options.displayOptions[i])}this._skeletonViewersEnabled=this._skeletonViewers.length>0}},t.prototype.changeDisplayMode=function(){if(this._skeletonViewersEnabled)for(var e=0;e<this._skeletonViewers.length;e++)this._skeletonViewers[e].changeDisplayMode(this._skeletonViewerDisplayOptions.displayMode||0)},t.prototype.changeDisplayOptions=function(e,t){if(this._skeletonViewersEnabled){for(var n=0;n<this._skeletonViewers.length;n++)this._skeletonViewers[n].changeDisplayOptions(e,t);void 0!==this._skeletonViewerDisplayOptions[e]&&(this._skeletonViewerDisplayOptions[e]=t)}},t.prototype.shouldComponentUpdate=function(e){return e.skeleton!==this.props.skeleton&&this.checkSkeletonViewerState(e),!0},t.prototype.onOverrideMeshLink=function(){if(this.props.globalState.onSelectionChangedObservable){var e=this.props.skeleton;this.props.globalState.onSelectionChangedObservable.notifyObservers(e.overrideMesh)}},t.prototype.render=function(){var e,t=this,n=this.props.skeleton,r=[{label:"Lines",value:u.SkeletonViewer.DISPLAY_LINES},{label:"Spheres",value:u.SkeletonViewer.DISPLAY_SPHERES},{label:"Sphere and Spurs",value:u.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS}];return e=this._skeletonViewerDisplayOptions.displayMode>u.SkeletonViewer.DISPLAY_LINES?l.createElement(Oe,{title:"DISPLAY OPTIONS",selection:this.props.globalState},l.createElement(He,{label:"sphereBaseSize",target:this._skeletonViewerDisplayOptions,propertyName:"sphereBaseSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onChange:function(e){t.changeDisplayOptions("sphereBaseSize",e)}}),l.createElement(He,{label:"sphereScaleUnit",target:this._skeletonViewerDisplayOptions,propertyName:"sphereScaleUnit",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onChange:function(e){t.changeDisplayOptions("sphereScaleUnit",e)}}),l.createElement(He,{label:"sphereFactor",target:this._skeletonViewerDisplayOptions,propertyName:"sphereFactor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onChange:function(e){t.changeDisplayOptions("sphereFactor",e)}}),l.createElement(He,{label:"midStep",target:this._skeletonViewerDisplayOptions,propertyName:"midStep",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onChange:function(e){t.changeDisplayOptions("midStep",e)}}),l.createElement(He,{label:"midStepFactor",target:this._skeletonViewerDisplayOptions,propertyName:"midStepFactor",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onChange:function(e){t.changeDisplayOptions("midStepFactor",e)}})):null,l.createElement("div",{className:"pane"},l.createElement(et,{globalState:this.props.globalState,target:n,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"ID",value:n.id}),l.createElement(Ee,{label:"Bone count",value:n.bones.length.toString()}),n.overrideMesh&&l.createElement(Ee,{label:"Override mesh",value:n.overrideMesh.name,onLink:function(){return t.onOverrideMeshLink()}}),l.createElement(Le,{label:"Use texture to store matrices",target:n,propertyName:"useTextureToStoreBoneMatrices",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:"Return to rest",onClick:function(){return n.returnToRest()}})),l.createElement(Oe,{title:"DEBUG",selection:this.props.globalState},l.createElement(Le,{label:"Enabled",isSelected:function(){return t._skeletonViewersEnabled},onSelect:function(){return t.switchSkeletonViewers()}}),l.createElement(Ye,{label:"displayMode",options:r,target:this._skeletonViewerDisplayOptions,propertyName:"displayMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(){return t.changeDisplayMode()}}),e),l.createElement(vn,{globalState:this.props.globalState,animatable:n,scene:n.getScene(),lockObject:this.props.lockObject}))},t}(l.Component),Wr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onTransformNodeLink=function(){if(this.props.globalState.onSelectionChangedObservable){var e=this.props.bone.getTransformNode();this.props.globalState.onSelectionChangedObservable.notifyObservers(e)}},t.prototype.render=function(){var e=this,t=this.props.bone;return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"Name",value:t.name}),l.createElement(Ee,{label:"Index",value:t.getIndex().toString()}),l.createElement(Ee,{label:"Unique ID",value:t.uniqueId.toString()}),t.getParent()&&l.createElement(Ee,{label:"Parent",value:t.getParent().name,onLink:function(){return e.props.globalState.onSelectionChangedObservable.notifyObservers(t.getParent())}}),t.getTransformNode()&&l.createElement(Ee,{label:"Linked node",value:t.getTransformNode().name,onLink:function(){return e.onTransformNodeLink()}})),l.createElement(Oe,{title:"TRANSFORMATIONS",selection:this.props.globalState},l.createElement(Je,{label:"Position",target:t,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!t.rotationQuaternion&&l.createElement(Je,{label:"Rotation",useEuler:this.props.globalState.onlyUseEulers,target:t,propertyName:"rotation",step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.rotationQuaternion&&l.createElement($e,{label:"Rotation",useEuler:this.props.globalState.onlyUseEulers,target:t,propertyName:"rotationQuaternion",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Scaling",target:t,propertyName:"scaling",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Kr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.displayFrustum=function(){var e=this.props.light,t=e.getScene().activeCamera,n=e._displayFrustum=!e._displayFrustum;if(e._displayFrustumObservable&&(e.getScene().onAfterRenderObservable.remove(e._displayFrustumObservable),e._displayFrustumDLH.dispose()),n&&t){var r=e._displayFrustumDLH=new u.DirectionalLightFrustumViewer(e,t);e._displayFrustumObservable=e.getScene().onAfterRenderObservable.add((function(){r.update()}))}},t.prototype.render=function(){var e,t=this,n=this.props.light,r=(n.getShadowGenerator()||null)instanceof u.CascadedShadowGenerator,a=null!==(e=n._displayFrustum)&&void 0!==e&&e;return l.createElement("div",{className:"pane"},l.createElement(ar,{globalState:this.props.globalState,lockObject:this.props.lockObject,light:n,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"SETUP",selection:this.props.globalState},l.createElement(Qe,{label:"Diffuse",target:n,propertyName:"diffuse",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Specular",target:n,propertyName:"specular",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Position",target:n,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Direction",target:n,propertyName:"direction",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!r&&l.createElement(Le,{label:"Auto Calc Shadow ZBounds",target:n,propertyName:"autoCalcShadowZBounds",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(ir,{globalState:this.props.globalState,lockObject:this.props.lockObject,light:n,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"DEBUG",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Display frustum",isSelected:function(){return a},onSelect:function(){return t.displayFrustum()}})))},t}(l.Component),Yr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.light;return l.createElement("div",{className:"pane"},l.createElement(ar,{globalState:this.props.globalState,lockObject:this.props.lockObject,light:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"SETUP",selection:this.props.globalState},l.createElement(Qe,{label:"Diffuse",target:e,propertyName:"diffuse",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Qe,{label:"Specular",target:e,propertyName:"specular",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Position",target:e,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Direction",target:e,propertyName:"direction",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,useEuler:this.props.globalState.onlyUseEulers,label:"Angle",target:e,propertyName:"angle",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,useEuler:this.props.globalState.onlyUseEulers,label:"Inner angle",target:e,propertyName:"innerAngle",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Exponent",target:e,propertyName:"exponent",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(ir,{globalState:this.props.globalState,lockObject:this.props.lockObject,light:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),Xr=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.renderPipeline;return l.createElement("div",{className:"pane"},l.createElement(Fr,{globalState:this.props.globalState,lockObject:this.props.lockObject,renderPipeline:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"OPTIONS",selection:this.props.globalState},l.createElement(We,{label:"Edge blur",minimum:0,maximum:5,step:.1,target:e,propertyName:"edgeBlur",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Edge distortion",minimum:0,maximum:5,step:.1,target:e,propertyName:"edgeDistortion",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Grain amount",minimum:0,maximum:1,step:.1,target:e,propertyName:"grainAmount",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Chromatic aberration",minimum:0,maximum:5,step:.1,target:e,propertyName:"chromaticAberration",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Darken out of focus",minimum:0,maximum:5,step:.1,target:e,propertyName:"darkenOutOfFocus",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Blur noise",target:e,propertyName:"blurNoise",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"DEPTH OF FIELD",selection:this.props.globalState},l.createElement(We,{label:"Aperture",minimum:0,maximum:10,step:.1,target:e,propertyName:"dofAperture",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Distortion",minimum:0,maximum:1e3,step:.1,target:e,propertyName:"dofDistortion",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Pentagon bokeh",target:e,propertyName:"pentagonBokeh",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Highlight gain",minimum:0,maximum:5,step:.1,target:e,propertyName:"highlightsGain",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Highlight threshold",minimum:0,maximum:5,step:.1,target:e,propertyName:"highlightsThreshold",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Zr=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,value:n.getCurrentValue().clone()},n}return a(t,e),t.prototype.getCurrentValue=function(){return this.props.target[this.props.propertyName]},t.prototype.shouldComponentUpdate=function(e,t){var n=this.getCurrentValue();return!(n.equals(t.value)&&!this._localChange)&&(t.value=n.clone(),this._localChange=!1,!0)},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onChange&&this.props.onChange(this.state.value),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.value,initialValue:e})},t.prototype.updateVector4=function(){var e=this.props.target[this.props.propertyName].clone();this.props.target[this.props.propertyName]=this.state.value,this.setState({value:e}),this.raiseOnPropertyChanged(e)},t.prototype.updateStateX=function(e){this._localChange=!0,this.state.value.x=e,this.updateVector4()},t.prototype.updateStateY=function(e){this._localChange=!0,this.state.value.y=e,this.updateVector4()},t.prototype.updateStateZ=function(e){this._localChange=!0,this.state.value.z=e,this.updateVector4()},t.prototype.updateStateW=function(e){this._localChange=!0,this.state.value.w=e,this.updateVector4()},t.prototype.render=function(){var e=this,t=this.state.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se});return l.createElement("div",{className:"vector3Line"},l.createElement("div",{className:"firstLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"vector"},"X: "+this.state.value.x.toFixed(2)+", Y: "+this.state.value.y.toFixed(2)+", Z: "+this.state.value.z.toFixed(2)+", W: "+this.state.value.w.toFixed(2)),l.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),l.createElement(Xe,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}}),l.createElement(Xe,{label:"z",step:this.props.step,value:this.state.value.z,onChange:function(t){return e.updateStateZ(t)}}),l.createElement(Xe,{label:"w",step:this.props.step,value:this.state.value.w,onChange:function(t){return e.updateStateW(t)}})))},t.defaultProps={step:.001},t}(l.Component),qr=n(102),Qr=n(103),Jr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={gradient:t.step.step},n}return a(t,e),t.prototype.updateColor=function(e){this.props.step.color=u.Color3.FromHexString(e),this.props.onUpdateStep(),this.forceUpdate()},t.prototype.updateStep=function(e){this.props.step.step=e,this.setState({gradient:e}),this.props.onUpdateStep()},t.prototype.onPointerUp=function(){this.props.onCheckForReOrder()},t.prototype.render=function(){var e=this,t=this.props.step;return l.createElement("div",{className:"gradient-step"},l.createElement("div",{className:"step"},"#"+this.props.lineIndex),l.createElement("div",{className:"color"},l.createElement(Ae,{value:t.color,onColorChanged:function(t){e.updateColor(t)}})),l.createElement("div",{className:"step-value"},t.step.toFixed(2)),l.createElement("div",{className:"step-slider slider"},l.createElement("input",{className:"range",type:"range",step:.01,min:0,max:1,value:t.step,onPointerUp:function(t){return e.onPointerUp()},onChange:function(t){return e.updateStep(parseFloat(t.target.value))}})),l.createElement("div",{className:"gradient-copy",onClick:function(){e.props.onCopy&&e.props.onCopy()},title:"Copy Step"},l.createElement("img",{className:"img",src:Qr})),l.createElement("div",{className:"gradient-delete",onClick:function(){return e.props.onDelete()},title:"Delete Step"},l.createElement("img",{className:"img",src:qr})))},t}(l.Component),$r=function(e){function t(t){var n=e.call(this,t)||this;return n._gradientBlock=n.props.block,n}return a(t,e),t.prototype.forceRebuild=function(){this._gradientBlock.colorStepsUpdated(),this.forceUpdate()},t.prototype.deleteStep=function(e){var t=this._gradientBlock.colorSteps.indexOf(e);t>-1&&(this._gradientBlock.colorSteps.splice(t,1),this.forceRebuild())},t.prototype.copyStep=function(e){var t=this.props.block,n=new u.GradientBlockColorStep(1,e.color);t.colorSteps.push(n),t.colorStepsUpdated(),this.forceRebuild(),this.forceUpdate()},t.prototype.addNewStep=function(){var e=new u.GradientBlockColorStep(1,u.Color3.White());this._gradientBlock.colorSteps.push(e),this.forceRebuild()},t.prototype.checkForReOrder=function(){this._gradientBlock.colorSteps.sort((function(e,t){return e.step-t.step})),this.forceRebuild()},t.prototype.render=function(){var e=this;return l.createElement("div",null,l.createElement(we,{label:"Add new step",onClick:function(){return e.addNewStep()}}),this._gradientBlock.colorSteps.map((function(t,n){return l.createElement(Jr,{globalState:e.props.globalState,onCheckForReOrder:function(){return e.checkForReOrder()},onUpdateStep:function(){return e.forceRebuild()},key:"step-"+n,lineIndex:n,step:t,onCopy:function(){return e.copyStep(t)},onDelete:function(){return e.deleteStep(t)}})})))},t}(l.Component),ea=n(15),ta=function(e){function t(t){var n=e.call(this,t)||this;n._localChange=!1;var r=n.props.target[n.props.propertyName],a="Color4"===r.getClassName()?r.clone():new u.Color4(r.r,r.g,r.b,1);return n.state={isExpanded:!1,color:a},t.isLinear&&n.state.color.toGammaSpaceToRef(n.state.color),t.target._isLinearColor=t.isLinear,n}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=this.props.target[this.props.propertyName],r="Color4"===n.getClassName()?n:new u.Color4(n.r,n.g,n.b,1);return this.props.isLinear&&r.toGammaSpaceRef(r),!(r.equals(t.color)&&!this._localChange)&&(t.color=r.clone(),this._localChange=!1,!0)},t.prototype.setPropertyValue=function(e){this.props.target[this.props.propertyName]=e,this.props.isLinear&&(this.props.target[this.props.propertyName]=e.toLinearSpace())},t.prototype.onChange=function(e){this._localChange=!0;var t=u.Color4.FromHexString(e);this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:t,initialValue:this.state.color}),this.setPropertyValue(t),this.setState({color:t}),this.props.onChange&&this.props.onChange()},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.color,initialValue:e})},t.prototype.updateStateR=function(e){this._localChange=!0;var t=this.state.color.clone();this.state.color.r=e,this.setPropertyValue(this.state.color),this.setState({color:this.state.color}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateG=function(e){this._localChange=!0;var t=this.state.color.clone();this.state.color.g=e,this.setPropertyValue(this.state.color),this.setState({color:this.state.color}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateB=function(e){this._localChange=!0;var t=this.state.color.clone();this.state.color.b=e,this.setPropertyValue(this.state.color),this.setState({color:this.state.color}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateA=function(e){this._localChange=!0;var t=this.state.color.clone();this.props.target[this.props.propertyName].a=e,this.state.color.a=e,this.props.target[this.props.propertyName]=this.state.color,this.setState({color:this.state.color}),this.raiseOnPropertyChanged(t)},t.prototype.copyToClipboard=function(){var e=document.createElement("div");if(e.textContent=this.state.color.toHexString(),document.body.appendChild(e),window.getSelection){var t=document.createRange();t.selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}document.execCommand("copy"),e.remove()},t.prototype.render=function(){var e=this,t=this.state.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se});return l.createElement("div",{className:"color3Line"},l.createElement("div",{className:"firstLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("div",{className:"label",title:this.props.label},this.props.label),l.createElement("div",{className:"color3"},l.createElement(Ae,{value:this.state.color,onColorChanged:function(t){e.onChange(t)}})),l.createElement("div",{className:"copy hoverIcon",onClick:function(){return e.copyToClipboard()},title:"Copy to clipboard"},l.createElement("img",{src:ea,alt:""})),l.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"r",value:this.state.color.r,onChange:function(t){return e.updateStateR(t)}}),l.createElement(Xe,{label:"g",value:this.state.color.g,onChange:function(t){return e.updateStateG(t)}}),l.createElement(Xe,{label:"b",value:this.state.color.b,onChange:function(t){return e.updateStateB(t)}}),l.createElement(Xe,{label:"a",value:this.state.color.a,onChange:function(t){return e.updateStateA(t)}})))},t}(l.Component),na=function(e){function t(t){var n=e.call(this,t)||this;return n._onDebugSelectionChangeObservable=new u.Observable,n}return a(t,e),t.prototype.edit=function(){this.props.material.edit()},t.prototype.renderTextures=function(){var e=this,t=this.props.material,n=this._onDebugSelectionChangeObservable,r=t.getTextureBlocks();return r&&0!==r.length?l.createElement(Oe,{title:"TEXTURES",selection:this.props.globalState},r.map((function(r,a){return l.createElement(xn,{label:r.name,key:"nodematText"+a,texture:r.texture,material:t,onTextureCreated:function(e){return r.texture=e},onSelectionChangedObservable:e.props.onSelectionChangedObservable,onDebugSelectionChangeObservable:n})}))):null},t.prototype.renderInputBlock=function(e){switch(e.type){case u.NodeMaterialBlockConnectionPointTypes.Float:var t=isNaN(e.min)||isNaN(e.max)||e.min===e.max;return l.createElement("div",{key:e.name},e.isBoolean&&l.createElement(Le,{key:e.name,label:e.name,target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!e.isBoolean&&t&&l.createElement(He,{key:e.name,lockObject:this.props.lockObject,label:e.name,target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!e.isBoolean&&!t&&l.createElement(We,{key:e.name,label:e.name,target:e,propertyName:"value",step:(e.max-e.min)/100,minimum:e.min,maximum:e.max,onPropertyChangedObservable:this.props.onPropertyChangedObservable}));case u.NodeMaterialBlockConnectionPointTypes.Color3:return l.createElement(Qe,{key:e.name,label:e.name,target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.NodeMaterialBlockConnectionPointTypes.Color4:return l.createElement(ta,{key:e.name,label:e.name,target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.NodeMaterialBlockConnectionPointTypes.Vector2:return l.createElement($n,{key:e.name,label:e.name,target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.NodeMaterialBlockConnectionPointTypes.Vector3:return l.createElement(Je,{key:e.name,label:e.name,target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable});case u.NodeMaterialBlockConnectionPointTypes.Vector4:return l.createElement(Zr,{key:e.name,label:e.name,target:e,propertyName:"value",onPropertyChangedObservable:this.props.onPropertyChangedObservable})}return null},t.prototype.renderInputValues=function(){var e=this,t=this.props.material.getInputBlocks().filter((function(e){return e.visibleInInspector&&e.isUniform&&!e.isSystemValue})).sort((function(e,t){return e.name.localeCompare(t.name)})),n=[];t.forEach((function(e){e.groupInInspector&&-1===n.indexOf(e.groupInInspector)&&n.push(e.groupInInspector)})),n.sort();var r=this.props.material.attachedBlocks.filter((function(e){return e.visibleInInspector&&"GradientBlock"===e.getClassName()})).sort((function(e,t){return e.name.localeCompare(t.name)})),a=t.length>0?l.createElement(Oe,{title:"INPUTS",selection:this.props.globalState}," ",t.filter((function(e){return!e.groupInInspector})).map((function(t){return e.renderInputBlock(t)}))):null;return l.createElement(l.Fragment,null,a,n.map((function(n,r){return l.createElement(Oe,{key:"inputValue"+r,title:n.toUpperCase(),selection:e.props.globalState},t.filter((function(e){return e.groupInInspector===n})).map((function(t){return e.renderInputBlock(t)})))})),r.map((function(t,n){return l.createElement(Oe,{key:t.name+n,title:t.name.toUpperCase(),selection:e.props.globalState},l.createElement($r,{globalState:e.props.globalState,block:t}))})))},t.prototype.render=function(){var e=this,t=this.props.material;return l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:t,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"CONFIGURATION",selection:this.props.globalState},l.createElement(Le,{label:"Ignore alpha",target:t,propertyName:"ignoreAlpha",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:"Node Material Editor",onClick:function(){return e.edit()}})),this.renderInputValues(),this.renderTextures())},t}(l.Component),ra=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onMaterialLink=function(e){this.props.onSelectionChangedObservable&&this.props.onSelectionChangedObservable.notifyObservers(e)},t.prototype.renderChildMaterial=function(){var e=this,t=this.props.material;return l.createElement(Oe,{title:"CHILDREN",selection:this.props.globalState},t.subMaterials.map((function(t,n){return t?l.createElement(Ee,{key:"Material #"+n,label:"Material #"+n,value:t.name,onLink:function(){return e.onMaterialLink(t)}}):null})))},t.prototype.render=function(){var e=this.props.material;return l.createElement("div",{className:"pane"},l.createElement(Cn,{globalState:this.props.globalState,lockObject:this.props.lockObject,material:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),this.renderChildMaterial())},t}(l.Component),aa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.emitter;return l.createElement(l.Fragment,null,l.createElement(Je,{label:"Direction 1",target:e,propertyName:"direction1",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Direction 2",target:e,propertyName:"direction2",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Min emit box",target:e,propertyName:"minEmitBox",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Max emit box",target:e,propertyName:"maxEmitBox",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),oa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.emitter;return l.createElement(l.Fragment,null,l.createElement(We,{label:"Radius range",target:e,propertyName:"radiusRange",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Height range",target:e,propertyName:"heightRange",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Emit from spawn point only",target:e,propertyName:"emitFromSpawnPointOnly",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Direction randomizer",target:e,propertyName:"directionRandomizer",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),ia=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.emitter;return l.createElement(l.Fragment,null,l.createElement(He,{lockObject:this.props.lockObject,label:"Radius",target:e,propertyName:"radius",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Height",target:e,propertyName:"height",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Radius range",target:e,propertyName:"radiusRange",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Direction randomizer",target:e,propertyName:"directionRandomizer",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),sa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.emitter;return l.createElement(l.Fragment,null,l.createElement(He,{lockObject:this.props.lockObject,label:"Radius",target:e,propertyName:"radius",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Radius range",target:e,propertyName:"radiusRange",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Direction randomizer",target:e,propertyName:"directionRandomizer",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),la=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.emitter;return l.createElement(l.Fragment,null,l.createElement(Je,{label:"Direction 1",target:e,propertyName:"direction1",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Direction 2",target:e,propertyName:"direction2",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),pa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.emitter;return l.createElement(l.Fragment,null,l.createElement(He,{lockObject:this.props.lockObject,label:"Radius",target:e,propertyName:"radius",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Radius range",target:e,propertyName:"radiusRange",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Direction randomizer",target:e,propertyName:"directionRandomizer",minimum:0,maximum:1,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),ca=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.scene.meshes.filter((function(e){return!!e.name}));t.sort((function(e,t){return e.name.localeCompare(t.name)}));var n=[{label:"None",value:-1}];return t.sort((function(e,t){return e.name.localeCompare(t.name)})),n.push.apply(n,t.map((function(e,t){return{label:e.name,value:t}}))),l.createElement(l.Fragment,null,l.createElement(Ye,{label:this.props.label,options:n,target:this.props.target,propertyName:this.props.property,noDirectUpdate:!0,onSelect:function(n){var r=e.props.target[e.props.property];switch(n){case-1:e.props.target[e.props.property]=null;break;default:e.props.target[e.props.property]=t[n]}e.props.onPropertyChangedObservable&&e.props.onPropertyChangedObservable.notifyObservers({object:e.props.target,property:e.props.property,value:e.props.target[e.props.property],initialValue:r}),e.forceUpdate()},extractValue:function(){if(!e.props.target[e.props.property])return-1;var n=t.indexOf(e.props.target[e.props.property]);return n>-1?n:-1}}))},t}(l.Component),ua=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.emitter;return l.createElement(l.Fragment,null,l.createElement(ca,{globalState:this.props.globalState,label:"Source",scene:this.props.scene,onPropertyChangedObservable:this.props.onPropertyChangedObservable,target:this.props.emitter,property:"mesh"}),!e.useMeshNormalsForDirection&&l.createElement(Je,{label:"Direction 1",target:e,propertyName:"direction1",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),!e.useMeshNormalsForDirection&&l.createElement(Je,{label:"Direction 2",target:e,propertyName:"direction2",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use normals for direction",target:e,propertyName:"useMeshNormalsForDirection",onPropertyChangedObservable:this.props.onPropertyChangedObservable}))},t}(l.Component),da=function(e){function t(t){var n,r=e.call(this,t)||this;return r.state={gradient:t.gradient.gradient,factor1:r.props.gradient.factor1.toString(),factor2:null===(n=r.props.gradient.factor2)||void 0===n?void 0:n.toString()},r}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n;return e.gradient!==this.props.gradient&&(t.gradient=e.gradient.gradient,t.factor1=e.gradient.factor1.toString(),t.factor2=null===(n=e.gradient.factor2)||void 0===n?void 0:n.toString()),!0},t.prototype.updateFactor1=function(e){if(!/[^0-9\.\-]/g.test(e)){var t=parseFloat(e);this.setState({factor1:e}),isNaN(t)||(this.props.gradient.factor1=t,this.props.onUpdateGradient(),this.forceUpdate())}},t.prototype.updateFactor2=function(e){if(!/[^0-9\.\-]/g.test(e)){var t=parseFloat(e);this.setState({factor2:e}),isNaN(t)||(this.props.gradient.factor2=t,this.props.onUpdateGradient(),this.forceUpdate())}},t.prototype.updateGradient=function(e){this.props.gradient.gradient=e,this.setState({gradient:e}),this.props.onUpdateGradient()},t.prototype.onPointerUp=function(){this.props.onCheckForReOrder()},t.prototype.lock=function(){this.props.lockObject&&(this.props.lockObject.lock=!0)},t.prototype.unlock=function(){this.props.lockObject&&(this.props.lockObject.lock=!1)},t.prototype.render=function(){var e=this,t=this.props.gradient;return l.createElement("div",{className:"gradient-step"},l.createElement("div",{className:"step"},"#"+this.props.lineIndex),l.createElement("div",{className:"factor1"},l.createElement("input",{type:"number",step:"0.01",className:"numeric-input",value:this.state.factor1,onBlur:function(){return e.unlock()},onFocus:function(){return e.lock()},onChange:function(t){return e.updateFactor1(t.target.value)}})),this.props.host instanceof u.ParticleSystem&&l.createElement("div",{className:"factor2"},l.createElement("input",{type:"number",step:"0.01",className:"numeric-input"+(this.state.factor1===this.state.factor2||void 0===t.factor2?" grayed":""),value:this.state.factor2,onBlur:function(){return e.unlock()},onFocus:function(){return e.lock()},onChange:function(t){return e.updateFactor2(t.target.value)}})),l.createElement("div",{className:"step-value"},t.gradient.toFixed(2)),l.createElement("div",{className:"step-slider"},l.createElement("input",{className:"range",type:"range",step:.01,min:0,max:1,value:t.gradient,onPointerUp:function(t){return e.onPointerUp()},onChange:function(t){return e.updateGradient(parseFloat(t.target.value))}})),l.createElement("div",{className:"gradient-delete hoverIcon",onClick:function(){return e.props.onDelete()}},l.createElement(w,{icon:be})))},t}(l.Component),ha=function(e){function t(t){var n=e.call(this,t)||this;return n.state={gradient:t.gradient.gradient},n}return a(t,e),t.prototype.updateColor1=function(e){this.props.gradient instanceof u.ColorGradient?this.props.gradient.color1=u.Color4.FromHexString(e):this.props.gradient.color=u.Color3.FromHexString(e),this.props.onUpdateGradient(),this.forceUpdate()},t.prototype.updateColor2=function(e){this.props.gradient instanceof u.ColorGradient&&(this.props.gradient.color2=u.Color4.FromHexString(e)),this.props.onUpdateGradient(),this.forceUpdate()},t.prototype.updateGradient=function(e){this.props.gradient.gradient=e,this.setState({gradient:e}),this.props.onUpdateGradient()},t.prototype.onPointerUp=function(){this.props.onCheckForReOrder()},t.prototype.lock=function(){this.props.lockObject&&(this.props.lockObject.lock=!0)},t.prototype.unlock=function(){this.props.lockObject&&(this.props.lockObject.lock=!1)},t.prototype.render=function(){var e=this,t=this.props.gradient;return l.createElement("div",{className:"gradient-step"},l.createElement("div",{className:"step"},"#"+this.props.lineIndex),l.createElement("div",{className:"color1"},l.createElement(Ae,{value:t instanceof u.Color3Gradient?t.color:t.color1,onColorChanged:function(t){e.updateColor1(t)}})),this.props.host instanceof u.ParticleSystem&&t instanceof u.ColorGradient&&l.createElement("div",{className:"color2"},l.createElement(Ae,{value:t.color2?t.color2:new u.Color4,onColorChanged:function(t){e.updateColor2(t)}})),l.createElement("div",{className:"step-value"},t.gradient.toFixed(2)),l.createElement("div",{className:"step-slider"},l.createElement("input",{className:"range",type:"range",step:.01,min:0,max:1,value:t.gradient,onPointerUp:function(t){return e.onPointerUp()},onChange:function(t){return e.updateGradient(parseFloat(t.target.value))}})),l.createElement("div",{className:"gradient-delete hoverIcon",onClick:function(){return e.props.onDelete()}},l.createElement(w,{icon:be})))},t}(l.Component),ma=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onLink=function(){this.props.url&&window.open(this.props.url,"_blank")},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"linkButtonLine"},l.createElement("div",{className:"link",title:this.props.label,onClick:function(){return e.onLink()}},this.props.label),l.createElement("div",{className:"link-button"},l.createElement("button",{onClick:function(){return e.props.onClick()}},this.props.buttonLabel)),this.props.icon&&l.createElement("div",{className:"link-icon hoverIcon",onClick:function(){e.props.onIconClick&&e.props.onIconClick()}},l.createElement(w,{icon:this.props.icon})))},t}(l.Component);!function(e){e[e.Factor=0]="Factor",e[e.Color3=1]="Color3",e[e.Color4=2]="Color4"}(Zn||(Zn={}));var ba=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.deleteStep=function(e){var t=this.props.gradients,n=t.indexOf(e);n>-1&&(t.splice(n,1),this.updateAndSync())},t.prototype.addNewStep=function(){var e=this.props.gradients;switch(this.props.mode){case Zn.Factor:var t=new u.FactorGradient(1,1,1);e.push(t);break;case Zn.Color4:var n=new u.ColorGradient(1,new u.Color4(1,1,1,1),new u.Color4(1,1,1,1));e.push(n);break;case Zn.Color3:var r=new u.Color3Gradient(1,u.Color3.White());e.push(r)}this.props.host.forceRefreshGradients(),this.forceUpdate()},t.prototype.checkForReOrder=function(){this.props.gradients.sort((function(e,t){return e.gradient===t.gradient?0:e.gradient>t.gradient?1:-1})),this.forceUpdate()},t.prototype.updateAndSync=function(){this.props.host.forceRefreshGradients(),this.forceUpdate()},t.prototype.render=function(){var e=this,t=this.props.gradients;return l.createElement("div",null,t&&t.length>0&&l.createElement("div",{className:"gradient-container"},l.createElement(ma,{label:this.props.label,url:this.props.docLink,icon:be,onIconClick:function(){t.length=0,e.updateAndSync()},buttonLabel:"Add new step",onClick:function(){return e.addNewStep()}}),t.map((function(t,n){var r=e.props.codeRecorderPropertyName+"["+n+"]";switch(e.props.mode){case Zn.Factor:return l.createElement(da,{globalState:e.props.globalState,lockObject:e.props.lockObject,onCheckForReOrder:function(){return e.checkForReOrder()},onUpdateGradient:function(){return e.updateAndSync()},host:e.props.host,codeRecorderPropertyName:r,key:"step-"+n,lineIndex:n,gradient:t,onDelete:function(){return e.deleteStep(t)}});case Zn.Color4:return l.createElement(ha,{globalState:e.props.globalState,host:e.props.host,codeRecorderPropertyName:r,lockObject:e.props.lockObject,isColor3:!1,onCheckForReOrder:function(){return e.checkForReOrder()},onUpdateGradient:function(){return e.updateAndSync()},key:"step-"+n,lineIndex:n,gradient:t,onDelete:function(){return e.deleteStep(t)}});case Zn.Color3:return l.createElement(ha,{globalState:e.props.globalState,host:e.props.host,codeRecorderPropertyName:r,lockObject:e.props.lockObject,isColor3:!0,onCheckForReOrder:function(){return e.checkForReOrder()},onUpdateGradient:function(){return e.updateAndSync()},key:"step-"+n,lineIndex:n,gradient:t,onDelete:function(){return e.deleteStep(t)}})}}))),(!t||0===t.length)&&l.createElement(we,{label:"Use "+this.props.label,onClick:function(){e.props.onCreateRequired(),e.forceUpdate()}}))},t}(l.Component),ga=function(e){function t(t){var n=e.call(this,t)||this;return n._snippetUrl="https://snippet.babylonjs.com",n}return a(t,e),t.prototype.renderEmitter=function(){var e,t=this.props.system;switch(null===(e=t.particleEmitterType)||void 0===e?void 0:e.getClassName()){case"BoxParticleEmitter":return l.createElement(aa,{globalState:this.props.globalState,emitter:t.particleEmitterType,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case"ConeParticleEmitter":return l.createElement(oa,{globalState:this.props.globalState,emitter:t.particleEmitterType,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case"CylinderParticleEmitter":return l.createElement(ia,{lockObject:this.props.lockObject,globalState:this.props.globalState,emitter:t.particleEmitterType,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case"HemisphericParticleEmitter":return l.createElement(sa,{lockObject:this.props.lockObject,globalState:this.props.globalState,emitter:t.particleEmitterType,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case"MeshParticleEmitter":return l.createElement(ua,{lockObject:this.props.lockObject,scene:t.getScene(),globalState:this.props.globalState,emitter:t.particleEmitterType,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case"PointParticleEmitter":return l.createElement(la,{lockObject:this.props.lockObject,globalState:this.props.globalState,emitter:t.particleEmitterType,onPropertyChangedObservable:this.props.onPropertyChangedObservable});case"SphereParticleEmitter":return l.createElement(pa,{lockObject:this.props.lockObject,globalState:this.props.globalState,emitter:t.particleEmitterType,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}return null},t.prototype.raiseOnPropertyChanged=function(e,t,n){if(this.props.onPropertyChangedObservable){var r=this.props.system;this.props.onPropertyChangedObservable.notifyObservers({object:r,property:e,value:t,initialValue:n})}},t.prototype.renderControls=function(){var e=this,t=this.props.system;if(t instanceof u.GPUParticleSystem){var n=t.isStarted()&&!t.isStopped();return l.createElement(we,{label:n?"Stop":"Start",onClick:function(){n?(t.stop(),t.reset()):t.start(),e.forceUpdate()}})}var r=t.isStarted();return l.createElement(l.Fragment,null,!t.isStopping()&&l.createElement(we,{label:r?"Stop":"Start",onClick:function(){r?t.stop():t.start(),e.forceUpdate()}}),t.isStopping()&&l.createElement(Ee,{label:"System is stoppping...",ignoreValue:!0}))},t.prototype.saveToFile=function(){var e=this.props.system,t=JSON.stringify(e.serialize(!0));u.Tools.Download(new Blob([t]),"particleSystem.json")},t.prototype.loadFromFile=function(e){var t=this,n=this.props.system,r=n.getScene();r&&u.Tools.ReadFile(e,(function(e){var a=new TextDecoder("utf-8"),o=JSON.parse(a.decode(e)),i=n instanceof u.GPUParticleSystem;n.dispose(),t.props.globalState.onSelectionChangedObservable.notifyObservers(null);var s=i?u.GPUParticleSystem.Parse(o,r,""):u.ParticleSystem.Parse(o,r,"");t.props.globalState.onSelectionChangedObservable.notifyObservers(s)}),void 0,!0)},t.prototype.loadFromSnippet=function(){var e=this,t=this.props.system,n=t.getScene(),r=t instanceof u.GPUParticleSystem,a=window.prompt("Please enter the snippet ID to use");a&&n&&(t.dispose(),this.props.globalState.onSelectionChangedObservable.notifyObservers(null),u.ParticleHelper.CreateFromSnippetAsync(a,n,r).then((function(t){e.props.globalState.onSelectionChangedObservable.notifyObservers(t)})).catch((function(e){alert("Unable to load your particle system: "+e)})))},t.prototype.saveToSnippet=function(){var e=this,t=this.props.system,n=JSON.stringify(t.serialize(!0)),r=new XMLHttpRequest;r.onreadystatechange=function(){if(4==r.readyState)if(200==r.status){var n=JSON.parse(r.responseText),a=t.snippetId||"_BLANK";t.snippetId=n.id,n.version&&"0"!=n.version&&(t.snippetId+="#"+n.version),e.forceUpdate(),navigator.clipboard&&navigator.clipboard.writeText(t.snippetId);var o=window;o.Playground&&a&&o.Playground.onRequestCodeChangeObservable.notifyObservers({regex:new RegExp('ParticleHelper.CreateFromSnippetAsync\\("'+a,"g"),replace:'ParticleHelper.CreateFromSnippetAsync("'+t.snippetId}),alert("Particle system saved with ID: "+t.snippetId+" (please note that the id was also saved to your clipboard)")}else alert("Unable to save your particle system")},r.open("POST",this._snippetUrl+(t.snippetId?"/"+t.snippetId:""),!0),r.setRequestHeader("Content-Type","application/json");var a={payload:JSON.stringify({particleSystem:n}),name:"",description:"",tags:""};r.send(JSON.stringify(a))},t.prototype.render=function(){var e,t,n=this,r=this.props.system,a=[{label:"Add",value:u.ParticleSystem.BLENDMODE_ADD},{label:"Multiply",value:u.ParticleSystem.BLENDMODE_MULTIPLY},{label:"Multiply Add",value:u.ParticleSystem.BLENDMODE_MULTIPLYADD},{label:"OneOne",value:u.ParticleSystem.BLENDMODE_ONEONE},{label:"Standard",value:u.ParticleSystem.BLENDMODE_STANDARD}],o=this.props.system.getScene().meshes.filter((function(e){return!!e.name})),i=[{label:"None",value:-1},{label:"Vector3",value:0}];return o.sort((function(e,t){return e.name.localeCompare(t.name)})),i.push.apply(i,o.map((function(e,t){return{label:e.name,value:t+1}}))),l.createElement("div",{className:"pane"},l.createElement(et,{globalState:this.props.globalState,target:r,lockObject:this.props.lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"ID",value:r.id}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:r,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Class",value:r.getClassName()}),l.createElement(Ee,{label:"Capacity",value:r.getCapacity().toString()}),l.createElement(Ee,{label:"Active count",value:r.getActiveCount().toString()}),l.createElement(xn,{label:"Texture",texture:r.particleTexture,onSelectionChangedObservable:this.props.onSelectionChangedObservable}),l.createElement(Ye,{label:"Blend mode",options:a,target:r,propertyName:"blendMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"World offset",target:r,propertyName:"worldOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Je,{label:"Gravity",target:r,propertyName:"gravity",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Is billboard",target:r,propertyName:"isBillboardBased",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Is local",target:r,propertyName:"isLocal",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Force depth write",target:r,propertyName:"forceDepthWrite",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Update speed",target:r,propertyName:"updateSpeed",minimum:0,maximum:.1,decimalCount:3,step:.001,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"COMMANDS",selection:this.props.globalState},this.renderControls(),l.createElement(we,{label:"Dispose",onClick:function(){n.props.globalState.onSelectionChangedObservable.notifyObservers(null),r.dispose()}})),l.createElement(Oe,{title:"FILE",selection:this.props.globalState},l.createElement(Pe,{label:"Load",onClick:function(e){return n.loadFromFile(e)},accept:".json"}),l.createElement(we,{label:"Save",onClick:function(){return n.saveToFile()}})),l.createElement(Oe,{title:"SNIPPET",selection:this.props.globalState},r.snippetId&&l.createElement(Ee,{label:"Snippet ID",value:r.snippetId}),l.createElement(we,{label:"Load from snippet server",onClick:function(){return n.loadFromSnippet()}}),l.createElement(we,{label:"Save to snippet server",onClick:function(){return n.saveToSnippet()}})),l.createElement(Oe,{title:"EMITTER",closed:!0,selection:this.props.globalState},l.createElement(Ye,{label:"Emitter",options:i,target:r,propertyName:"emitter",noDirectUpdate:!0,onSelect:function(e){switch(e){case-1:n.raiseOnPropertyChanged("emitter",null,r.emitter),r.emitter=null;break;case 0:n.raiseOnPropertyChanged("emitter",u.Vector3.Zero(),r.emitter),r.emitter=u.Vector3.Zero();break;default:n.raiseOnPropertyChanged("emitter",o[e-1],r.emitter),r.emitter=o[e-1]}n.forceUpdate()},extractValue:function(){if(!r.emitter)return-1;if(void 0!==r.emitter.x)return 0;var e=o.indexOf(r.emitter);return e>-1?e+1:-1}}),r.emitter&&void 0===r.emitter.x&&l.createElement(Ee,{label:"Link to emitter",value:r.emitter.name,onLink:function(){return n.props.globalState.onSelectionChangedObservable.notifyObservers(r.emitter)}}),r.emitter&&void 0!==r.emitter.x&&l.createElement(Je,{label:"Position",target:r,propertyName:"emitter",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Type",options:[{label:"Box",value:0},{label:"Cone",value:1},{label:"Cylinder",value:2},{label:"Hemispheric",value:3},{label:"Mesh",value:4},{label:"Point",value:5},{label:"Sphere",value:6}],target:r,propertyName:"particleEmitterType",noDirectUpdate:!0,onSelect:function(e){var t=r.particleEmitterType;switch(e){case 0:r.particleEmitterType=new u.BoxParticleEmitter;break;case 1:r.particleEmitterType=new u.ConeParticleEmitter;break;case 2:r.particleEmitterType=new u.CylinderParticleEmitter;break;case 3:r.particleEmitterType=new u.HemisphericParticleEmitter;break;case 4:r.particleEmitterType=new u.MeshParticleEmitter;break;case 5:r.particleEmitterType=new u.PointParticleEmitter;break;case 6:r.particleEmitterType=new u.SphereParticleEmitter}n.raiseOnPropertyChanged("particleEmitterType",r.particleEmitterType,t),n.forceUpdate()},extractValue:function(){var e;switch(null===(e=r.particleEmitterType)||void 0===e?void 0:e.getClassName()){case"BoxParticleEmitter":return 0;case"ConeParticleEmitter":return 1;case"CylinderParticleEmitter":return 2;case"HemisphericParticleEmitter":return 3;case"MeshParticleEmitter":return 4;case"PointParticleEmitter":return 5;case"SphereParticleEmitter":return 6}return 0}}),this.renderEmitter()),l.createElement(Oe,{title:"EMISSION",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Rate",target:r,propertyName:"emitRate",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r instanceof u.ParticleSystem&&l.createElement(ba,{globalState:this.props.globalState,gradients:r.getEmitRateGradients(),label:"Velocity gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time",onCreateRequired:function(){r.addEmitRateGradient(0,50,50)},mode:Zn.Factor,host:r,codeRecorderPropertyName:"getEmitRateGradients()",lockObject:this.props.lockObject}),l.createElement(He,{lockObject:this.props.lockObject,label:"Min emit power",target:r,propertyName:"minEmitPower",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max emit power",target:r,propertyName:"maxEmitPower",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getVelocityGradients(),label:"Velocity gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#velocity-over-time",onCreateRequired:function(){r.addVelocityGradient(0,.1,.1)},mode:Zn.Factor,host:r,codeRecorderPropertyName:"getVelocityGradients()",lockObject:this.props.lockObject}),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getLimitVelocityGradients(),label:"Limit velocity gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#limit-velocity-over-time",onCreateRequired:function(){r.addLimitVelocityGradient(0,.1,.1)},mode:Zn.Factor,host:r,codeRecorderPropertyName:"getLimitVelocityGradients()",lockObject:this.props.lockObject}),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getDragGradients(),label:"Drag gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#drag-factor",onCreateRequired:function(){r.addDragGradient(0,.1,.1)},host:r,codeRecorderPropertyName:"getDragGradients()",mode:Zn.Factor,lockObject:this.props.lockObject})),l.createElement(Oe,{title:"SIZE",closed:!0,selection:this.props.globalState},(!r.getSizeGradients()||0===(null===(e=r.getSizeGradients())||void 0===e?void 0:e.length))&&l.createElement(l.Fragment,null,l.createElement(He,{lockObject:this.props.lockObject,label:"Min size",target:r,propertyName:"minSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max size",target:r,propertyName:"maxSize",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(He,{lockObject:this.props.lockObject,label:"Min scale X",target:r,propertyName:"minScaleX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max scale X",target:r,propertyName:"maxScaleX",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Min scale Y",target:r,propertyName:"minScaleY",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max scale Y",target:r,propertyName:"maxScaleY",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r instanceof u.ParticleSystem&&l.createElement(ba,{globalState:this.props.globalState,gradients:r.getStartSizeGradients(),label:"Start size gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#start-size-over-time",onCreateRequired:function(){r.addStartSizeGradient(0,1,1)},host:r,codeRecorderPropertyName:"getStartSizeGradients()",mode:Zn.Factor,lockObject:this.props.lockObject}),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getSizeGradients(),label:"Size gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#size",onCreateRequired:function(){r.addSizeGradient(0,1,1)},host:r,codeRecorderPropertyName:"getSizeGradients()",mode:Zn.Factor,lockObject:this.props.lockObject})),l.createElement(Oe,{title:"LIFETIME",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Min lifetime",target:r,propertyName:"minLifeTime",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max lifetime",target:r,propertyName:"maxLifeTime",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Target stop duration",target:r,propertyName:"targetStopDuration",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),r instanceof u.ParticleSystem&&l.createElement(ba,{globalState:this.props.globalState,gradients:r.getLifeTimeGradients(),label:"Lifetime gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#lifetime",onCreateRequired:function(){r.addLifeTimeGradient(0,1,1)},host:r,codeRecorderPropertyName:"getLifeTimeGradients()",mode:Zn.Factor,lockObject:this.props.lockObject})),l.createElement(Oe,{title:"COLORS",closed:!0,selection:this.props.globalState},(!r.getColorGradients()||0===(null===(t=r.getColorGradients())||void 0===t?void 0:t.length))&&l.createElement(l.Fragment,null,l.createElement(ta,{label:"Color 1",target:r,propertyName:"color1",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(ta,{label:"Color 2",target:r,propertyName:"color2",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(ta,{label:"Color dead",target:r,propertyName:"colorDead",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getColorGradients(),label:"Color gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#particle-colors",onCreateRequired:function(){r.addColorGradient(0,new u.Color4(0,0,0,1),new u.Color4(0,0,0,1)),r.addColorGradient(1,new u.Color4(1,1,1,1),new u.Color4(1,1,1,1))},host:r,codeRecorderPropertyName:"getColorGradients()",mode:Zn.Color4,lockObject:this.props.lockObject}),r instanceof u.ParticleSystem&&l.createElement(l.Fragment,null,l.createElement(Le,{label:"Enable ramp grandients",target:r,propertyName:"useRampGradients"}),r.useRampGradients&&l.createElement(l.Fragment,null,l.createElement(ba,{globalState:this.props.globalState,gradients:r.getRampGradients(),label:"Ramp gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#ramp-gradients",onCreateRequired:function(){r.addRampGradient(0,u.Color3.White()),r.addRampGradient(1,u.Color3.Black())},mode:Zn.Color3,host:r,codeRecorderPropertyName:"getRampGradients()",lockObject:this.props.lockObject}),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getColorRemapGradients(),label:"Color remap gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#ramp-gradients",onCreateRequired:function(){r.addColorRemapGradient(0,1,1)},host:r,codeRecorderPropertyName:"getColorRemapGradients()",mode:Zn.Factor,lockObject:this.props.lockObject}),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getAlphaRemapGradients(),label:"Alpha remap gradients",docLink:"https://doc.babylonjs.com/babylon101/particles#ramp-gradients",onCreateRequired:function(){r.addAlphaRemapGradient(0,1,1)},host:r,codeRecorderPropertyName:"getAlphaRemapGradients()",mode:Zn.Factor,lockObject:this.props.lockObject})))),l.createElement(Oe,{title:"ROTATION",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Min angular speed",target:r,propertyName:"minAngularSpeed",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max angular speed",target:r,propertyName:"maxAngularSpeed",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Min initial rotation",target:r,propertyName:"minInitialRotation",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max initial rotation",target:r,propertyName:"maxInitialRotation",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(ba,{globalState:this.props.globalState,gradients:r.getAngularSpeedGradients(),label:"Angular speed gradients",docLink:"hhttps://doc.babylonjs.com/babylon101/particles#rotation",onCreateRequired:function(){r.addAngularSpeedGradient(0,.1,.1)},host:r,codeRecorderPropertyName:"getAngularSpeedGradients()",mode:Zn.Factor,lockObject:this.props.lockObject})),l.createElement(Oe,{title:"SPRITESHEET",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"Animation sheet enabled",target:r,propertyName:"isAnimationSheetEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"First sprite index",isInteger:!0,target:r,propertyName:"startSpriteCellID",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"Last sprite index",isInteger:!0,target:r,propertyName:"endSpriteCellID",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Animation Loop",target:r,propertyName:"spriteCellLoop",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Random start cell index",target:r,propertyName:"spriteRandomStartCell",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"Cell width",isInteger:!0,target:r,propertyName:"spriteCellWidth",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"Cell height",isInteger:!0,target:r,propertyName:"spriteCellHeight",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Cell change speed",target:r,propertyName:"spriteCellChangeSpeed",minimum:0,maximum:10,step:.1,onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),fa=function(e){function t(t){var n=e.call(this,t)||this;return n._snippetUrl="https://snippet.babylonjs.com",n}return a(t,e),t.prototype.addNewSprite=function(){var e,t=this.props.spriteManager,n=new u.Sprite("new sprite",t);null===(e=this.props.onSelectionChangedObservable)||void 0===e||e.notifyObservers(n)},t.prototype.disposeManager=function(){var e;this.props.spriteManager.dispose(),null===(e=this.props.onSelectionChangedObservable)||void 0===e||e.notifyObservers(null)},t.prototype.saveToFile=function(){var e=this.props.spriteManager,t=JSON.stringify(e.serialize(!0));u.Tools.Download(new Blob([t]),"spriteManager.json")},t.prototype.loadFromFile=function(e){var t=this,n=this.props.spriteManager,r=n.scene;u.Tools.ReadFile(e,(function(e){var a=new TextDecoder("utf-8"),o=JSON.parse(a.decode(e));n.dispose(),t.props.globalState.onSelectionChangedObservable.notifyObservers(null);var i=u.SpriteManager.Parse(o,r,"");t.props.globalState.onSelectionChangedObservable.notifyObservers(i)}),void 0,!0)},t.prototype.loadFromSnippet=function(){var e=this,t=this.props.spriteManager,n=t.scene,r=window.prompt("Please enter the snippet ID to use");r&&(t.dispose(),this.props.globalState.onSelectionChangedObservable.notifyObservers(null),u.SpriteManager.CreateFromSnippetAsync(r,n).then((function(t){e.props.globalState.onSelectionChangedObservable.notifyObservers(t)})).catch((function(e){alert("Unable to load your sprite manager: "+e)})))},t.prototype.saveToSnippet=function(){var e=this,t=this.props.spriteManager,n=JSON.stringify(t.serialize(!0)),r=new XMLHttpRequest;r.onreadystatechange=function(){if(4==r.readyState)if(200==r.status){var n=JSON.parse(r.responseText),a=t.snippetId||"_BLANK";t.snippetId=n.id,n.version&&"0"!=n.version&&(t.snippetId+="#"+n.version),e.forceUpdate(),navigator.clipboard&&navigator.clipboard.writeText(t.snippetId);var o=window;o.Playground&&a&&o.Playground.onRequestCodeChangeObservable.notifyObservers({regex:new RegExp('SpriteManager.CreateFromSnippetAsync\\("'+a,"g"),replace:'SpriteManager.CreateFromSnippetAsync("'+t.snippetId}),alert("Sprite manager saved with ID: "+t.snippetId+" (please note that the id was also saved to your clipboard)")}else alert("Unable to save your sprite manager")},r.open("POST",this._snippetUrl+(t.snippetId?"/"+t.snippetId:""),!0),r.setRequestHeader("Content-Type","application/json");var a={payload:JSON.stringify({spriteManager:n}),name:"",description:"",tags:""};r.send(JSON.stringify(a))},t.prototype.render=function(){var e=this,t=this.props.spriteManager,n=[{label:"Combine",value:u.Constants.ALPHA_COMBINE},{label:"One one",value:u.Constants.ALPHA_ONEONE},{label:"Add",value:u.Constants.ALPHA_ADD},{label:"Subtract",value:u.Constants.ALPHA_SUBTRACT},{label:"Multiply",value:u.Constants.ALPHA_MULTIPLY},{label:"Maximized",value:u.Constants.ALPHA_MAXIMIZED},{label:"Pre-multiplied",value:u.Constants.ALPHA_PREMULTIPLIED}];return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:t.uniqueId.toString()}),l.createElement(Ee,{label:"Capacity",value:t.capacity.toString()}),l.createElement(xn,{label:"Texture",texture:t.texture,onSelectionChangedObservable:this.props.onSelectionChangedObservable}),t.sprites.length<t.capacity&&l.createElement(we,{label:"Add new sprite",onClick:function(){return e.addNewSprite()}}),l.createElement(we,{label:"Dispose",onClick:function(){return e.disposeManager()}})),l.createElement(Oe,{title:"FILE",selection:this.props.globalState},l.createElement(Pe,{label:"Load",onClick:function(t){return e.loadFromFile(t)},accept:".json"}),l.createElement(we,{label:"Save",onClick:function(){return e.saveToFile()}})),l.createElement(Oe,{title:"SNIPPET",selection:this.props.globalState},t.snippetId&&l.createElement(Ee,{label:"Snippet ID",value:t.snippetId}),l.createElement(we,{label:"Load from snippet server",onClick:function(){return e.loadFromSnippet()}}),l.createElement(we,{label:"Save to snippet server",onClick:function(){return e.saveToSnippet()}})),l.createElement(Oe,{title:"PROPERTIES",selection:this.props.globalState},l.createElement(Le,{label:"Pickable",target:t,propertyName:"isPickable",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Fog enabled",target:t,propertyName:"fogEnabled",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"No depth write",target:t,propertyName:"disableDepthWrite",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Rendering group ID",decimalCount:0,target:t,propertyName:"renderingGroupId",minimum:u.RenderingManager.MIN_RENDERINGGROUPS,maximum:u.RenderingManager.MAX_RENDERINGGROUPS-1,step:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ye,{label:"Alpha mode",options:n,target:t,propertyName:"blendMode",onPropertyChangedObservable:this.props.onPropertyChangedObservable,onSelect:function(t){return e.setState({blendMode:t})}})),l.createElement(Oe,{title:"CELLS",selection:this.props.globalState},l.createElement(He,{label:"Cell width",isInteger:!0,target:t,propertyName:"cellWidth",min:0,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"Cell height",isInteger:!0,target:t,propertyName:"cellHeight",min:0,onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),va=function(e){function t(t){var n=e.call(this,t)||this;return n.imageData=null,n.cachedCellIndex=-1,n.canvasRef=l.createRef(),n}return a(t,e),t.prototype.onManagerLink=function(){if(this.props.onSelectionChangedObservable){var e=this.props.sprite;this.props.onSelectionChangedObservable.notifyObservers(e.manager)}},t.prototype.switchPlayStopState=function(){var e=this.props.sprite;e.animationStarted?e.stopAnimation():e.playAnimation(e.fromIndex,e.toIndex,e.loopAnimation,e.delay,(function(){})),this.forceUpdate()},t.prototype.disposeSprite=function(){var e;this.props.sprite.dispose(),null===(e=this.props.onSelectionChangedObservable)||void 0===e||e.notifyObservers(null)},t.prototype.componentDidMount=function(){this.updatePreview()},t.prototype.componentDidUpdate=function(){this.updatePreview()},t.prototype.shouldComponentUpdate=function(e){return e.sprite!==this.props.sprite&&(this.imageData=null),!0},t.prototype.updatePreview=function(){var e=this,t=this.props.sprite,n=t.manager,r=n.texture,a=r.getSize();if(this.imageData){if(this.cachedCellIndex!==t.cellIndex){this.cachedCellIndex=t.cellIndex;var o=this.canvasRef.current;o.width=n.cellWidth,o.height=n.cellHeight;var i=o.getContext("2d");if(i){for(var s=i.createImageData(n.cellWidth,n.cellHeight),l=s.data,p=a.width/n.cellWidth|0,c=t.cellIndex/p|0,u=4*(t.cellIndex-c*p+c*a.width)*n.cellWidth,d=0;d<n.cellWidth;d++)for(var h=0;h<n.cellHeight;h++){var m=4*(d+h*n.cellWidth),b=4*(d+h*a.width);l[m]=this.imageData[u+b],l[m+1]=this.imageData[u+b+1],l[m+2]=this.imageData[u+b+2],l[m+3]=this.imageData[u+b+3]}i.putImageData(s,0,0)}}}else wn.GetTextureDataAsync(r,a.width,a.height,0,{R:!0,G:!0,B:!0,A:!0},this.props.globalState).then((function(t){e.imageData=t,e.forceUpdate()}))},t.prototype.render=function(){var e=this,t=this.props.sprite,n=t.manager,r=n.texture.getSize(),a=0;return a=r.width&&r.height?r.width/n.cellWidth*(r.height/n.cellHeight):Math.max(t.fromIndex,t.toIndex),l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Unique ID",value:t.uniqueId.toString()}),l.createElement(Ee,{label:"Link to manager",value:n.name,onLink:function(){return e.onManagerLink()}}),l.createElement(Le,{label:"Visible",target:t,propertyName:"isVisible",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:"Dispose",onClick:function(){return e.disposeSprite()}})),l.createElement(Oe,{title:"PROPERTIES",selection:this.props.globalState},l.createElement(Je,{label:"Position",target:t,propertyName:"position",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Pickable",target:t,propertyName:"isPickable",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use alpha for picking",target:t,propertyName:"useAlphaForPicking",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(ta,{label:"Color",target:t,propertyName:"color",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{useEuler:this.props.globalState.onlyUseEulers,label:"Angle",target:t,propertyName:"angle",minimum:0,maximum:2*Math.PI,step:.01,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"CELL",selection:this.props.globalState},l.createElement("canvas",{ref:this.canvasRef,className:"preview",style:{margin:"auto",marginTop:"4px",marginBottom:"4px",display:"grid",height:"108px"}}),l.createElement(We,{label:"Cell index",decimalCount:0,target:t,propertyName:"cellIndex",minimum:0,maximum:a,step:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable,onChange:function(){return e.forceUpdate()}}),l.createElement(Le,{label:"Invert U axis",target:t,propertyName:"invertU",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Invert V axis",target:t,propertyName:"invertV",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"SCALE",selection:this.props.globalState},l.createElement(He,{label:"Width",lockObject:this.props.lockObject,target:t,propertyName:"width",min:0,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"Height",lockObject:this.props.lockObject,target:t,propertyName:"height",min:0,onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"ANIMATION",selection:this.props.globalState},l.createElement(He,{label:"Start cell",isInteger:!0,lockObject:this.props.lockObject,target:t,propertyName:"fromIndex",min:0,max:a,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"End cell",isInteger:!0,lockObject:this.props.lockObject,target:t,propertyName:"toIndex",min:0,max:a,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Loop",target:t,propertyName:"loopAnimation",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{label:"Delay",lockObject:this.props.lockObject,target:t,propertyName:"delay",digits:0,min:0,isInteger:!0,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(we,{label:t.animationStarted?"Stop":"Start",onClick:function(){return e.switchPlayStopState()}})))},t}(l.Component),ya=function(e){function t(t){var n=e.call(this,t)||this;return n.playOrPause=function(){n._animationGroup&&(n._animationGroup.isPlaying?n._animationGroup.stop():n._animationGroup.start(),n.forceUpdate())},n.deleteAnimation=function(){var e;if(n._animationGroup){var t=n._animationGroup.targetedAnimations.indexOf(n.props.targetedAnimation);t>-1&&(n._animationGroup.targetedAnimations.splice(t,1),null===(e=n.props.onSelectionChangedObservable)||void 0===e||e.notifyObservers(null),n._animationGroup.isPlaying&&(n._animationGroup.stop(),n._animationGroup.start()))}},n._animationGroup=n.props.scene.animationGroups.find((function(e){return void 0!==e.targetedAnimations.find((function(e){return e===n.props.targetedAnimation}))})),n}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.targetedAnimation;return this._animationCurveEditorContext||(this._animationCurveEditorContext=new fn,this._animationCurveEditorContext.title=this.props.targetedAnimation.target.name||"",this._animationCurveEditorContext.animations=[this.props.targetedAnimation.animation],this._animationCurveEditorContext.target=this.props.targetedAnimation.target,this._animationCurveEditorContext.scene=this.props.scene,this._animationGroup&&(this._animationCurveEditorContext.rootAnimationGroup=this._animationGroup)),l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"Class",value:t.getClassName()}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t.animation,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),t.target.name&&l.createElement(Ee,{label:"Target",value:t.target.name,onLink:function(){return e.props.globalState.onSelectionChangedObservable.notifyObservers(t)}}),l.createElement(gn,{globalState:this.props.globalState,context:this._animationCurveEditorContext}),l.createElement(we,{label:"Dispose",onClick:this.deleteAnimation})))},t}(l.Component),Ca=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.camera;return l.createElement("div",{className:"pane"},l.createElement(lr,{globalState:this.props.globalState,lockObject:this.props.lockObject,camera:e,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Oe,{title:"TRANSFORMS",selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Radius",target:e,propertyName:"radius",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Rotation offset",target:e,propertyName:"rotationOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Height offset",target:e,propertyName:"heightOffset",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Camera acceleration",target:e,propertyName:"cameraAcceleration",onPropertyChangedObservable:this.props.onPropertyChangedObservable})),l.createElement(Oe,{title:"LIMITS",closed:!0,selection:this.props.globalState},l.createElement(He,{lockObject:this.props.lockObject,label:"Lower radius limit",target:e,propertyName:"lowerRadiusLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Upper radius limit",target:e,propertyName:"upperRadiusLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Lower rotation offset limit",target:e,propertyName:"lowerRotationOffsetLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Upper rotation offset limit",target:e,propertyName:"upperRotationOffsetLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Lower height offset limit",target:e,propertyName:"lowerHeightOffsetLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Upper height offset limit",target:e,propertyName:"upperHeightOffsetLimit",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(He,{lockObject:this.props.lockObject,label:"Max camera speed",target:e,propertyName:"maxCameraSpeed",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Ea=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.sound;return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"Class",value:t.getClassName()}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:t,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Ee,{label:"Status",value:t.isPaused?"Paused":t.isPlaying?"Playing":"Stopped"})),l.createElement(Oe,{title:"COMMANDS",selection:this.props.globalState},t.isPlaying&&l.createElement(we,{label:"Pause",onClick:function(){t.pause(),e.forceUpdate()}}),!t.isPlaying&&l.createElement(we,{label:"Play",onClick:function(){t.play(),e.forceUpdate()}}),l.createElement(We,{label:"Samples",target:t,directValue:t.getVolume(),onChange:function(n){t.setVolume(n),e.forceUpdate()},minimum:0,maximum:5,step:.1,decimalCount:1,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Loop",target:t,propertyName:"loop",onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),xa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.layer;return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"GENERAL",selection:this.props.globalState},l.createElement(Ee,{label:"Class",value:e.getClassName()}),l.createElement(Ze,{lockObject:this.props.lockObject,label:"Name",target:e,propertyName:"name",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Intensity",target:e,propertyName:"intensity",minimum:0,maximum:2,step:.01,decimalCount:2,onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(We,{label:"Blur Kernel Size",target:e,propertyName:"blurKernelSize",minimum:0,maximum:64,step:1,decimalCount:0,onPropertyChangedObservable:this.props.onPropertyChangedObservable})))},t}(l.Component),Oa=function(e){function t(t){var n=e.call(this,t)||this;return n._lockObject=new Or,n}return a(t,e),t.prototype.timerRefresh=function(){this._lockObject.lock||this.forceUpdate()},t.prototype.componentDidMount=function(){var e=this;this._timerIntervalId=window.setInterval((function(){return e.timerRefresh()}),500)},t.prototype.componentWillUnmount=function(){window.clearInterval(this._timerIntervalId)},t.prototype.render=function(){var e=this.props.selectedEntity;if(!e)return l.createElement("div",{className:"infoMessage"},"Please select an entity in the scene explorer.");if(e.getClassName){var t=e.getClassName();if("Scene"===t){var n=e;return l.createElement(rr,{scene:n,globalState:this.props.globalState,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Sound"===t){var r=e;return l.createElement(Ea,{sound:r,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Sprite"===t){var a=e;return l.createElement(va,{sprite:a,globalState:this.props.globalState,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("SpriteManager"===t){var o=e;return l.createElement(fa,{spriteManager:o,globalState:this.props.globalState,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("Mesh")){var i=e;if(i.getTotalVertices()>0)return l.createElement("div",null,l.createElement(mr,{globalState:this.props.globalState,mesh:i,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable}))}if(-1!==t.indexOf("ParticleSystem")){var s=e;return l.createElement(ga,{globalState:this.props.globalState,system:s,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("FreeCamera")||-1!==t.indexOf("UniversalCamera")||-1!==t.indexOf("WebXRCamera")||-1!==t.indexOf("DeviceOrientationCamera")){var p=e;return l.createElement(pr,{globalState:this.props.globalState,camera:p,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("ArcRotateCamera")){var c=e;return l.createElement(cr,{globalState:this.props.globalState,camera:c,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("FollowCamera")){var u=e;return l.createElement(Ca,{globalState:this.props.globalState,camera:u,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("HemisphericLight"===t){var d=e;return l.createElement(or,{globalState:this.props.globalState,light:d,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("PointLight"===t){var h=e;return l.createElement(sr,{globalState:this.props.globalState,light:h,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("DirectionalLight"===t){h=e;return l.createElement(Kr,{globalState:this.props.globalState,light:h,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("SpotLight"===t){h=e;return l.createElement(Yr,{globalState:this.props.globalState,light:h,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("TransformNode")||-1!==t.indexOf("Mesh")){var m=e;return l.createElement(br,{transformNode:m,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("MultiMaterial"===t){var b=e;return l.createElement(ra,{globalState:this.props.globalState,material:b,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("StandardMaterial"===t){b=e;return l.createElement(On,{globalState:this.props.globalState,material:b,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("NodeMaterial"===t){b=e;return l.createElement(na,{globalState:this.props.globalState,material:b,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("PBRMaterial"===t){b=e;return l.createElement(er,{globalState:this.props.globalState,material:b,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("PBRMetallicRoughnessMaterial"===t){b=e;return l.createElement(Rr,{globalState:this.props.globalState,material:b,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("PBRSpecularGlossinessMaterial"===t){b=e;return l.createElement(Ir,{globalState:this.props.globalState,material:b,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("BackgroundMaterial"===t){b=e;return l.createElement(gr,{globalState:this.props.globalState,material:b,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("AnimationGroup"===t){var g=e;return l.createElement(xr,{globalState:this.props.globalState,animationGroup:g,scene:this.props.scene,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("TargetedAnimation"===t){var f=e;return l.createElement(ya,{globalState:this.props.globalState,targetedAnimation:f,scene:this.props.scene,lockObject:this._lockObject,onSelectionChangedObservable:this.props.onSelectionChangedObservable,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("Material")){b=e;return l.createElement(En,{material:b,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("DefaultRenderingPipeline")){var v=e;return l.createElement(Ur,{renderPipeline:v,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("LensRenderingPipeline")){v=e;return l.createElement(Xr,{renderPipeline:v,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("SSAORenderingPipeline")){v=e;return l.createElement(Gr,{renderPipeline:v,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("SSAO2RenderingPipeline")){v=e;return l.createElement(Br,{renderPipeline:v,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("RenderingPipeline")){v=e;return l.createElement(Vr,{renderPipeline:v,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("PostProcess")){var y=e;return l.createElement(zr,{postProcess:y,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("Layer")){var C=e;return l.createElement(xa,{layer:C,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("Texture")){var E=e;return l.createElement(Jn,{texture:E,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("Skeleton")){var x=e;return l.createElement(Hr,{skeleton:x,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(-1!==t.indexOf("Bone")){var O=e;return l.createElement(Wr,{bone:O,globalState:this.props.globalState,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("TextBlock"===t){var S=e;return l.createElement(yr,{textBlock:S,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("InputText"===t){var _=e;return l.createElement(Cr,{inputText:_,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("ColorPicker"===t){var w=e;return l.createElement(Er,{colorPicker:w,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Image"===t){var P=e;return l.createElement(Sr,{image:P,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Slider"===t){var T=e;return l.createElement(_r,{slider:T,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("ImageBasedSlider"===t){var k=e;return l.createElement(wr,{imageBasedSlider:k,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Rectangle"===t){var N=e;return l.createElement(Pr,{rectangle:N,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("StackPanel"===t){var M=e;return l.createElement(Dr,{stackPanel:M,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Grid"===t){var A=e;return l.createElement(Lr,{grid:A,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("ScrollViewer"===t){var L=e;return l.createElement(Ar,{scrollViewer:L,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Ellipse"===t){var R=e;return l.createElement(Tr,{ellipse:R,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Checkbox"===t){var I=e;return l.createElement(kr,{checkbox:I,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("RadioButton"===t){var D=e;return l.createElement(Nr,{radioButton:D,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if("Line"===t){var j=e;return l.createElement(Mr,{line:j,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}if(e._host){var z=e;return l.createElement(vr,{control:z,lockObject:this._lockObject,onPropertyChangedObservable:this.props.onPropertyChangedObservable})}}return null},t}(Ce),Sa=function(e){function t(t){var n=e.call(this,t)||this;return n._backStack=new Array,n.state={isBackVisible:!1},n}return a(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.onSelectionChangedObservable&&(this._onSelectionChangeObserver=this.props.onSelectionChangedObservable.add((function(t){0!==e._backStack.length&&t===e._backStack[e._backStack.length-1]||(e._backStack.push(t),e.setState({isBackVisible:e._backStack.length>1}))})))},t.prototype.componentWillUnmount=function(){this._onSelectionChangeObserver&&this.props.onSelectionChangedObservable.remove(this._onSelectionChangeObserver)},t.prototype.goBack=function(){this._backStack.pop();var e=this._backStack[this._backStack.length-1];this.props.onSelectionChangedObservable&&this.props.onSelectionChangedObservable.notifyObservers(e),this.setState({isBackVisible:this._backStack.length>1})},t.prototype.renderLogo=function(){var e=this;return this.props.noCommands?null:this.props.handleBack?this.state.isBackVisible?l.createElement("div",{id:"back",onClick:function(){return e.goBack()}},l.createElement(w,{icon:N})):null:l.createElement("img",{id:"logo",style:{top:"0%"},src:"https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png"})},t.prototype.render=function(){var e=this;return l.createElement("div",{id:"header"},this.renderLogo(),l.createElement("div",{id:"title"},this.props.title),l.createElement("div",{id:"commands"},!this.props.noCommands&&!this.props.noExpand&&l.createElement("div",{className:"expand",onClick:function(){return e.props.onPopup()}},l.createElement(w,{icon:ve})),!this.props.noCommands&&!this.props.noClose&&l.createElement("div",{className:"close",onClick:function(){return e.props.onClose()}},l.createElement(w,{icon:he}))))},t}(l.Component),_a=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){return this.props.icon?l.createElement("div",{className:"iconMessageLine"},l.createElement("div",{className:"icon",style:{color:this.props.color?this.props.color:""}},l.createElement(w,{icon:this.props.icon})),l.createElement("div",{className:"value",title:this.props.text},this.props.text)):l.createElement("div",{className:"messageLine"},l.createElement("div",{className:"value",title:this.props.text,style:{color:this.props.color?this.props.color:""}},this.props.text))},t}(l.Component),wa=n(7),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onValidationResultsUpdatedObserver=null,t}return a(t,e),t.prototype.openValidationDetails=function(){var e=this.props.globalState.validationResults,t=window.open("","_blank");t&&(t.document.title="glTF Validation Results",t.document.body.innerText=JSON.stringify(e,null,2),t.document.body.style.whiteSpace="pre",t.document.body.style.fontFamily="monospace",t.document.body.style.fontSize="14px",t.focus())},t.prototype.prepareText=function(e,t){return t?t+" "+e+"s":""+e},t.prototype.componentDidMount=function(){var e=this;this.props.globalState&&(this._onValidationResultsUpdatedObserver=this.props.globalState.onValidationResultsUpdatedObservable.add((function(){e.forceUpdate()})))},t.prototype.componentWillUnmount=function(){this.props.globalState&&this._onValidationResultsUpdatedObserver&&this.props.globalState.onValidationResultsUpdatedObservable.remove(this._onValidationResultsUpdatedObserver)},t.prototype.renderValidation=function(){var e=this,t=this.props.globalState.validationResults;if(!t)return null;var n=t.issues;return l.createElement(Oe,{title:"GLTF VALIDATION",closed:!n.numErrors&&!n.numWarnings,selection:this.props.globalState},0!==n.numErrors&&l.createElement(_a,{text:"Your file has some validation issues",icon:me,color:"Red"}),0===n.numErrors&&l.createElement(_a,{text:"Your file is a valid glTF file",icon:F,color:"Green"}),l.createElement(Ee,{label:"Errors",value:n.numErrors.toString()}),l.createElement(Ee,{label:"Warnings",value:n.numWarnings.toString()}),l.createElement(Ee,{label:"Infos",value:n.numInfos.toString()}),l.createElement(Ee,{label:"Hints",value:n.numHints.toString()}),l.createElement(Ee,{label:"More details",value:"Click here",onLink:function(){return e.openValidationDetails()}}))},t.prototype.render=function(){var e=this.props.globalState.glTFLoaderExtensionDefaults,t=this.props.globalState.glTFLoaderDefaults,n=void 0!==wa.GLTFLoaderAnimationStartMode?[{label:"None",value:wa.GLTFLoaderAnimationStartMode.NONE},{label:"First",value:wa.GLTFLoaderAnimationStartMode.FIRST},{label:"ALL",value:wa.GLTFLoaderAnimationStartMode.ALL}]:[{label:"None",value:0},{label:"First",value:1},{label:"ALL",value:2}],r=void 0!==wa.GLTFLoaderCoordinateSystemMode?[{label:"Auto",value:wa.GLTFLoaderCoordinateSystemMode.AUTO},{label:"Right handed",value:wa.GLTFLoaderCoordinateSystemMode.FORCE_RIGHT_HANDED}]:[{label:"Auto",value:0},{label:"Right handed",value:1}];return l.createElement("div",null,l.createElement(Oe,{title:"GLTF LOADER",closed:!0,selection:this.props.globalState},l.createElement(Ye,{label:"Animation start mode",options:n,target:t,propertyName:"animationStartMode"}),l.createElement(Le,{label:"Capture performance counters",target:t,propertyName:"capturePerformanceCounters"}),l.createElement(Le,{label:"Compile materials",target:t,propertyName:"compileMaterials"}),l.createElement(Le,{label:"Compile shadow generators",target:t,propertyName:"compileShadowGenerators"}),l.createElement(Ye,{label:"Coordinate system",options:r,target:t,propertyName:"coordinateSystemMode"}),l.createElement(Le,{label:"Enable logging",target:t,propertyName:"loggingEnabled"}),l.createElement(Le,{label:"Transparency as coverage",target:t,propertyName:"transparencyAsCoverage"}),l.createElement(Le,{label:"Use clip plane",target:t,propertyName:"useClipPlane"}),l.createElement(Le,{label:"Validate",target:t,propertyName:"validate"}),l.createElement(_a,{text:"You need to reload your file to see these changes"})),l.createElement(Oe,{title:"GLTF EXTENSIONS",closed:!0,selection:this.props.globalState},l.createElement(Le,{label:"EXT_lights_image_based",isSelected:function(){return e.EXT_lights_image_based.enabled},onSelect:function(t){return e.EXT_lights_image_based.enabled=t}}),l.createElement(Le,{label:"EXT_mesh_gpu_instancing",isSelected:function(){return e.EXT_mesh_gpu_instancing.enabled},onSelect:function(t){return e.EXT_mesh_gpu_instancing.enabled=t}}),l.createElement(Le,{label:"EXT_texture_webp",isSelected:function(){return e.EXT_texture_webp.enabled},onSelect:function(t){return e.EXT_texture_webp.enabled=t}}),l.createElement(Le,{label:"KHR_draco_mesh_compression",isSelected:function(){return e.KHR_draco_mesh_compression.enabled},onSelect:function(t){return e.KHR_draco_mesh_compression.enabled=t}}),l.createElement(Le,{label:"KHR_materials_pbrSpecularGloss...",isSelected:function(){return e.KHR_materials_pbrSpecularGlossiness.enabled},onSelect:function(t){return e.KHR_materials_pbrSpecularGlossiness.enabled=t}}),l.createElement(Le,{label:"KHR_materials_clearcoat",isSelected:function(){return e.KHR_materials_clearcoat.enabled},onSelect:function(t){return e.KHR_materials_clearcoat.enabled=t}}),l.createElement(Le,{label:"KHR_materials_emissive_strength",isSelected:function(){return e.KHR_materials_emissive_strength.enabled},onSelect:function(t){return e.KHR_materials_emissive_strength.enabled=t}}),l.createElement(Le,{label:"KHR_materials_ior",isSelected:function(){return e.KHR_materials_ior.enabled},onSelect:function(t){return e.KHR_materials_ior.enabled=t}}),l.createElement(Le,{label:"KHR_materials_sheen",isSelected:function(){return e.KHR_materials_sheen.enabled},onSelect:function(t){return e.KHR_materials_sheen.enabled=t}}),l.createElement(Le,{label:"KHR_materials_specular",isSelected:function(){return e.KHR_materials_specular.enabled},onSelect:function(t){return e.KHR_materials_specular.enabled=t}}),l.createElement(Le,{label:"KHR_materials_unlit",isSelected:function(){return e.KHR_materials_unlit.enabled},onSelect:function(t){return e.KHR_materials_unlit.enabled=t}}),l.createElement(Le,{label:"KHR_materials_variants",isSelected:function(){return e.KHR_materials_variants.enabled},onSelect:function(t){return e.KHR_materials_variants.enabled=t}}),l.createElement(Le,{label:"KHR_materials_transmission",isSelected:function(){return e.KHR_materials_transmission.enabled},onSelect:function(t){return e.KHR_materials_transmission.enabled=t}}),l.createElement(Le,{label:"KHR_materials_translucency",isSelected:function(){return e.KHR_materials_translucency.enabled},onSelect:function(t){return e.KHR_materials_translucency.enabled=t}}),l.createElement(Le,{label:"KHR_materials_volume",isSelected:function(){return e.KHR_materials_volume.enabled},onSelect:function(t){return e.KHR_materials_volume.enabled=t}}),l.createElement(Le,{label:"KHR_mesh_quantization",isSelected:function(){return e.KHR_mesh_quantization.enabled},onSelect:function(t){return e.KHR_mesh_quantization.enabled=t}}),l.createElement(Le,{label:"KHR_lights_punctual",isSelected:function(){return e.KHR_lights_punctual.enabled},onSelect:function(t){return e.KHR_lights_punctual.enabled=t}}),l.createElement(Le,{label:"KHR_texture_basisu",isSelected:function(){return e.KHR_texture_basisu.enabled},onSelect:function(t){return e.KHR_texture_basisu.enabled=t}}),l.createElement(Le,{label:"KHR_texture_transform",isSelected:function(){return e.KHR_texture_transform.enabled},onSelect:function(t){return e.KHR_texture_transform.enabled=t}}),l.createElement(Le,{label:"KHR_xmp_json_ld",isSelected:function(){return e.KHR_xmp_json_ld.enabled},onSelect:function(t){return e.KHR_xmp_json_ld.enabled=t}}),l.createElement(Le,{label:"MSFT_lod",isSelected:function(){return e.MSFT_lod.enabled},onSelect:function(t){return e.MSFT_lod.enabled=t}}),l.createElement(He,{label:"Maximum LODs",target:e.MSFT_lod,propertyName:"maxLODsToLoad",additionalClass:"gltf-extension-property",isInteger:!0}),l.createElement(Le,{label:"MSFT_minecraftMesh",isSelected:function(){return e.MSFT_minecraftMesh.enabled},onSelect:function(t){return e.MSFT_minecraftMesh.enabled=t}}),l.createElement(Le,{label:"MSFT_sRGBFactors",isSelected:function(){return e.MSFT_sRGBFactors.enabled},onSelect:function(t){return e.MSFT_sRGBFactors.enabled=t}}),l.createElement(Le,{label:"MSFT_audio_emitter",isSelected:function(){return e.MSFT_audio_emitter.enabled},onSelect:function(t){return e.MSFT_audio_emitter.enabled=t}}),l.createElement(_a,{text:"You need to reload your file to see these changes"})),this.props.globalState.validationResults&&this.renderValidation())},t}(l.Component),Ta=n(17),ka=function(e){function t(n){var r=e.call(this,n)||this;return r._id=t._IDGenerator++,r.uploadInputRef=l.createRef(),r}return a(t,e),t.prototype.onChange=function(e){var t=e.target.files;t&&t.length&&this.props.onClick(e),e.target.value=""},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"buttonLine"},this.props.icon&&l.createElement("img",{src:this.props.icon,title:this.props.iconLabel,alt:this.props.iconLabel,className:"icon"}),l.createElement("label",{htmlFor:"file-upload"+this._id,className:"file-upload"},this.props.label),l.createElement("input",{ref:this.uploadInputRef,id:"file-upload"+this._id,type:"file",accept:this.props.accept,onChange:function(t){return e.onChange(t)},multiple:!0}))},t._IDGenerator=0,t}(l.Component),Na=n(104),Ma=[{label:"PNG",value:0,imageType:"image/png"},{label:"WebP",value:1,imageType:"image/webp"}],Aa=function(e){function t(t){var n=e.call(this,t)||this;n._lockObject=new Or,n._screenShotSize={precision:1},n._gifOptions={width:512,frequency:200},n._useWidthHeight=!1,n._isExporting=!1,n._crunchingGIF=!1,n._reflectorHostname="localhost",n._reflectorPort=1234,n._envOptions={imageTypeIndex:0,imageQuality:.8},n.state={tag:"Record video"};var r=n.props.globalState.sceneImportDefaults;return void 0===r.overwriteAnimations&&(r.overwriteAnimations=!0),void 0===r.animationGroupLoadingMode&&(r.animationGroupLoadingMode=u.SceneLoaderAnimationGroupLoadingMode.Clean),n}return a(t,e),t.prototype.componentDidMount=function(){BABYLON.GLTF2Export||u.Tools.LoadScript("https://preview.babylonjs.com/serializers/babylonjs.serializers.min.js",(function(){}))},t.prototype.componentWillUnmount=function(){if(this._videoRecorder&&(this._videoRecorder.stopRecording(),this._videoRecorder.dispose(),this._videoRecorder=null),this._gifRecorder)return this._gifRecorder.render(),void(this._gifRecorder=null)},t.prototype.captureScreenshot=function(){var e=this.props.scene;e.activeCamera&&u.Tools.CreateScreenshot(e.getEngine(),e.activeCamera,this._screenShotSize)},t.prototype.captureRender=function(){var e=this.props.scene,t={height:this._screenShotSize.height,width:this._screenShotSize.width,precision:this._screenShotSize.precision};this._useWidthHeight||(this._screenShotSize.width=void 0,this._screenShotSize.height=void 0),e.activeCamera&&u.Tools.CreateScreenshotUsingRenderTarget(e.getEngine(),e.activeCamera,this._screenShotSize,void 0,void 0,4),this._screenShotSize=t},t.prototype.recordVideo=function(){var e=this;if(this._videoRecorder&&this._videoRecorder.isRecording)this._videoRecorder.stopRecording();else{var t=this.props.scene;this._videoRecorder||(this._videoRecorder=new u.VideoRecorder(t.getEngine())),this._videoRecorder.startRecording().then((function(){e.setState({tag:"Record video"})})),this.setState({tag:"Stop recording"})}},t.prototype.recordGIFInternal=function(){var e,t=this,n=URL.createObjectURL(this._gifWorkerBlob);this._gifRecorder=new Na({workers:2,quality:10,workerScript:n});var r=this.props.scene.getEngine();this._previousRenderingScale=r.getHardwareScalingLevel(),r.setHardwareScalingLevel(null!==(e=r.getRenderWidth()/this._gifOptions.width)&&void 0!==e?e:1);var a=setInterval((function(){t._gifRecorder?t._gifRecorder.addFrame(r.getRenderingCanvas(),{delay:0,copy:!0}):clearInterval(a)}),this._gifOptions.frequency);this._gifRecorder.on("finished",(function(e){t._crunchingGIF=!1,u.Tools.Download(e,"record.gif"),t.forceUpdate(),URL.revokeObjectURL(n),r.setHardwareScalingLevel(t._previousRenderingScale)})),this.forceUpdate()},t.prototype.recordGIF=function(){var e=this;if(this._gifRecorder)return this._crunchingGIF=!0,this.forceUpdate(),this._gifRecorder.render(),void(this._gifRecorder=null);this._gifWorkerBlob?this.recordGIFInternal():u.Tools.LoadFileAsync("https://cdn.jsdelivr.net/gh//terikon/gif.js.optimized@0.1.6/dist/gif.worker.js").then((function(t){e._gifWorkerBlob=new Blob([t],{type:"application/javascript"}),e.recordGIFInternal()}))},t.prototype.importAnimations=function(e){var t=this.props.scene,n=this.props.globalState.sceneImportDefaults.overwriteAnimations,r=this.props.globalState.sceneImportDefaults.animationGroupLoadingMode;new u.FilesInput(t.getEngine(),t,(function(){}),(function(){}),(function(){}),(function(e){}),(function(){}),(function(e){if(e){BABYLON.SceneLoader.ImportAnimationsAsync("file:",e,t,n,r,null,(function(e){e.animationGroups.length>0&&e.animationGroups[0].play(!0)}))}}),(function(){})).loadFiles(e)},t.prototype.shouldExport=function(e){if(e instanceof u.Mesh&&e.material){var t=e.material.reflectionTexture;if(t&&t.coordinatesMode===u.Texture.SKYBOX_MODE)return!1}return!0},t.prototype.exportGLTF=function(){var e=this,t=this.props.scene;this._isExporting=!0,this.forceUpdate(),Ta.GLTF2Export.GLBAsync(t,"scene",{shouldExportNode:function(t){return e.shouldExport(t)}}).then((function(t){t.downloadFiles(),e._isExporting=!1,e.forceUpdate()})).catch((function(t){e._isExporting=!1,e.forceUpdate()}))},t.prototype.exportBabylon=function(){var e=this.props.scene,t=JSON.stringify(u.SceneSerializer.Serialize(e)),n=new Blob([t],{type:"octet/stream"});u.Tools.Download(n,"scene.babylon")},t.prototype.createEnvTexture=function(){var e=this.props.scene;u.EnvironmentTextureTools.CreateEnvTextureAsync(e.environmentTexture,{imageType:Ma[this._envOptions.imageTypeIndex].imageType,imageQuality:this._envOptions.imageQuality}).then((function(e){var t=new Blob([e],{type:"octet/stream"});u.Tools.Download(t,"environment.env")})).catch((function(e){console.error(e),alert(e)}))},t.prototype.exportReplay=function(){this.props.globalState.recorder.export(),this.forceUpdate()},t.prototype.startRecording=function(){this.props.globalState.recorder.trackScene(this.props.scene),this.forceUpdate()},t.prototype.applyDelta=function(e){var t=this;u.Tools.ReadFile(e,(function(e){t.props.globalState.recorder.applyDelta(e,t.props.scene),t.forceUpdate()}))},t.prototype.connectReflector=function(){this._reflector&&this._reflector.close(),this._reflector=new u.Reflector(this.props.scene,this._reflectorHostname,this._reflectorPort)},t.prototype.render=function(){var e=this,t=this.props.scene;if(!t)return null;var n=this.props.globalState.sceneImportDefaults,r=[{label:"Clean",value:u.SceneLoaderAnimationGroupLoadingMode.Clean},{label:"Stop",value:u.SceneLoaderAnimationGroupLoadingMode.Stop},{label:"Sync",value:u.SceneLoaderAnimationGroupLoadingMode.Sync},{label:"NoSync",value:u.SceneLoaderAnimationGroupLoadingMode.NoSync}];return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"CAPTURE",selection:this.props.globalState},l.createElement(we,{label:"Screenshot",onClick:function(){return e.captureScreenshot()}}),l.createElement(we,{label:this.state.tag,onClick:function(){return e.recordVideo()}})),l.createElement(Oe,{title:"CAPTURE WITH RTT",selection:this.props.globalState},l.createElement(we,{label:"Capture",onClick:function(){return e.captureRender()}}),l.createElement("div",{className:"vector3Line"},l.createElement(He,{label:"Precision",target:this._screenShotSize,propertyName:"precision",onPropertyChangedObservable:this.props.onPropertyChangedObservable}),l.createElement(Le,{label:"Use Width/Height",onSelect:function(t){e._useWidthHeight=t,e.forceUpdate()},isSelected:function(){return e._useWidthHeight}}),this._useWidthHeight&&l.createElement("div",{className:"secondLine"},l.createElement(Xe,{label:"Width",precision:0,step:1,value:this._screenShotSize.width?this._screenShotSize.width:512,onChange:function(t){return e._screenShotSize.width=t}}),l.createElement(Xe,{label:"Height",precision:0,step:1,value:this._screenShotSize.height?this._screenShotSize.height:512,onChange:function(t){return e._screenShotSize.height=t}})))),l.createElement(Oe,{title:"GIF",selection:this.props.globalState},this._crunchingGIF&&l.createElement(_a,{text:"Creating the GIF file..."}),!this._crunchingGIF&&l.createElement(we,{label:this._gifRecorder?"Stop":"Record",onClick:function(){return e.recordGIF()}}),!this._crunchingGIF&&!this._gifRecorder&&l.createElement(l.Fragment,null,l.createElement(He,{label:"Resolution",isInteger:!0,target:this._gifOptions,propertyName:"width"}),l.createElement(He,{label:"Frequency (ms)",isInteger:!0,target:this._gifOptions,propertyName:"frequency"}))),l.createElement(Oe,{title:"REPLAY",selection:this.props.globalState},!this.props.globalState.recorder.isRecording&&l.createElement(we,{label:"Start recording",onClick:function(){return e.startRecording()}}),this.props.globalState.recorder.isRecording&&l.createElement(ur,{value:"Record in progress"}),this.props.globalState.recorder.isRecording&&l.createElement(we,{label:"Generate delta file",onClick:function(){return e.exportReplay()}}),l.createElement(Pe,{label:"Apply delta file",onClick:function(t){return e.applyDelta(t)},accept:".json"})),l.createElement(Oe,{title:"SCENE IMPORT",selection:this.props.globalState},l.createElement(ka,{label:"Import animations",accept:"gltf",onClick:function(t){return e.importAnimations(t)}}),l.createElement(Le,{label:"Overwrite animations",target:n,propertyName:"overwriteAnimations",onSelect:function(t){n.overwriteAnimations=t,e.forceUpdate()}}),!1===n.overwriteAnimations&&l.createElement(Ye,{label:"Animation merge mode",options:r,target:n,propertyName:"animationGroupLoadingMode"})),l.createElement(Oe,{title:"SCENE EXPORT",selection:this.props.globalState},this._isExporting&&l.createElement(Ee,{label:"Please wait..exporting",ignoreValue:!0}),!this._isExporting&&l.createElement(l.Fragment,null,l.createElement(we,{label:"Export to GLB",onClick:function(){return e.exportGLTF()}}),l.createElement(we,{label:"Export to Babylon",onClick:function(){return e.exportBabylon()}}),!t.getEngine().premultipliedAlpha&&t.environmentTexture&&t.environmentTexture._prefiltered&&t.activeCamera&&l.createElement(l.Fragment,null,l.createElement(we,{label:"Generate .env texture",onClick:function(){return e.createEnvTexture()}}),l.createElement(Ye,{label:"Image type",options:Ma,target:this._envOptions,propertyName:"imageTypeIndex",onSelect:function(){e.forceUpdate()}}),this._envOptions.imageTypeIndex>0&&l.createElement(He,{label:"Quality",isInteger:!1,min:0,max:1,target:this._envOptions,propertyName:"imageQuality"})))),BABYLON.GLTFFileLoader&&l.createElement(Pa,{scene:t,globalState:this.props.globalState}),l.createElement(Oe,{title:"REFLECTOR",selection:this.props.globalState},l.createElement(Ze,{lockObject:this._lockObject,label:"Hostname",target:this,propertyName:"_reflectorHostname"}),l.createElement(He,{lockObject:this._lockObject,label:"Port",target:this,propertyName:"_reflectorPort",isInteger:!0}),l.createElement(we,{label:"Connect",onClick:function(){return e.connectReflector()}})))},t}(Ce),La=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this.props.globalState;return l.createElement("div",{className:"pane"},l.createElement(Oe,{title:"UI",selection:this.props.globalState},l.createElement(Le,{label:"Only display Euler values",target:e,propertyName:"onlyUseEulers"}),l.createElement(Le,{label:"Ignore backfaces when picking",target:e,propertyName:"ignoreBackfacesForPicking"})))},t}(Ce);n(105);var Ra=function(e){function t(t){var n=e.call(this,t)||this;n._once=!0;var r=void 0===t.initialTab?u.DebugLayerTab.Properties:t.initialTab;if(n.props.globalState){var a=n.props.globalState.validationResults;a&&(a.issues.numErrors||a.issues.numWarnings)&&(r=u.DebugLayerTab.Tools)}return n.state={selectedEntity:null,selectedIndex:r},n}return a(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.globalState&&(this._onSelectionChangeObserver=this.props.globalState.onSelectionChangedObservable.add((function(t){e.setState({selectedEntity:t,selectedIndex:u.DebugLayerTab.Properties})})),this._onTabChangedObserver=this.props.globalState.onTabChangedObservable.add((function(t){e.setState({selectedIndex:t})})))},t.prototype.componentWillUnmount=function(){this.props.globalState&&(this._onSelectionChangeObserver&&this.props.globalState.onSelectionChangedObservable.remove(this._onSelectionChangeObserver),this._onTabChangedObserver&&this.props.globalState.onTabChangedObservable.remove(this._onTabChangedObserver))},t.prototype.changeSelectedTab=function(e){this.props.globalState&&this.props.globalState.onTabChangedObservable.notifyObservers(e)},t.prototype.renderContent=function(){var e=this;return this.props.globalState&&this.props.scene?l.createElement(T,{selectedIndex:this.state.selectedIndex,onSelectedIndexChange:function(t){return e.changeSelectedTab(t)}},l.createElement(Oa,{title:"Properties",icon:Z,scene:this.props.scene,selectedEntity:this.state.selectedEntity,globalState:this.props.globalState,onSelectionChangedObservable:this.props.globalState.onSelectionChangedObservable,onPropertyChangedObservable:this.props.globalState.onPropertyChangedObservable}),l.createElement(Ue,{title:"Debug",icon:D,scene:this.props.scene,globalState:this.props.globalState}),l.createElement(ze,{title:"Statistics",icon:z,scene:this.props.scene,globalState:this.props.globalState}),l.createElement(Aa,{title:"Tools",icon:ye,scene:this.props.scene,globalState:this.props.globalState}),l.createElement(La,{title:"Settings",icon:U,scene:this.props.scene,globalState:this.props.globalState})):null},t.prototype.onClose=function(){this.props.onClose&&this.props.onClose()},t.prototype.onPopup=function(){this.props.onPopup&&this.props.onPopup()},t.prototype.render=function(){var e=this;return this.props.popupMode?l.createElement("div",{id:"actionTabs"},!this.props.noHeader&&l.createElement(Sa,{title:"INSPECTOR",handleBack:!0,noClose:this.props.noClose,noExpand:this.props.noExpand,noCommands:this.props.noCommands,onClose:function(){return e.onClose()},onPopup:function(){return e.onPopup()},onSelectionChangedObservable:this.props.globalState?this.props.globalState.onSelectionChangedObservable:void 0}),this.renderContent()):(this._once&&(this._once=!1,setTimeout((function(){var e=document.getElementById("actionTabs");e&&(e.style.width="300px")}),150)),l.createElement(Be.a,{id:"actionTabs",minWidth:300,maxWidth:600,size:{height:"100%"},minHeight:"100%",enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}},!this.props.noHeader&&l.createElement(Sa,{title:"INSPECTOR",handleBack:!0,noClose:this.props.noClose,noExpand:this.props.noExpand,noCommands:this.props.noCommands,onClose:function(){return e.onClose()},onPopup:function(){return e.onPopup()},onSelectionChangedObservable:this.props.globalState?this.props.globalState.onSelectionChangedObservable:void 0}),this.renderContent()))},t}(l.Component),Ia={prefix:"far",iconName:"eye",icon:[576,512,[],"f06e","M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"]},Da={prefix:"far",iconName:"eye-slash",icon:[640,512,[],"f070","M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"]},ja={prefix:"far",iconName:"lightbulb",icon:[352,512,[],"f0eb","M176 80c-52.94 0-96 43.06-96 96 0 8.84 7.16 16 16 16s16-7.16 16-16c0-35.3 28.72-64 64-64 8.84 0 16-7.16 16-16s-7.16-16-16-16zM96.06 459.17c0 3.15.93 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84l.05-43.18H96.02l.04 43.18zM176 0C73.72 0 0 82.97 0 176c0 44.37 16.45 84.85 43.56 115.78 16.64 18.99 42.74 58.8 52.42 92.16v.06h48v-.12c-.01-4.77-.72-9.51-2.15-14.07-5.59-17.81-22.82-64.77-62.17-109.67-20.54-23.43-31.52-53.15-31.61-84.14-.2-73.64 59.67-128 127.95-128 70.58 0 128 57.42 128 128 0 30.97-11.24 60.85-31.65 84.14-39.11 44.61-56.42 91.47-62.1 109.46a47.507 47.507 0 0 0-2.22 14.3v.1h48v-.05c9.68-33.37 35.78-73.18 52.42-92.16C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0z"]},za={prefix:"far",iconName:"square",icon:[448,512,[],"f0c8","M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z"]},Fa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onClick=function(){this.props.onClick&&this.props.onClick()},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"title",title:this.props.label,onClick:function(){return e.onClick()}},l.createElement("div",{className:"titleIcon"},l.createElement(w,{icon:this.props.icon,color:this.props.color})),l.createElement("div",{className:"titleText"},this.props.label||"no name"))},t}(l.Component),Va=function(e){function t(t){var n=e.call(this,t)||this;return n.state={popupVisible:!1},n.extensionRef=l.createRef(),n}return a(t,e),t.prototype.showPopup=function(){this.setState({popupVisible:!0})},t.prototype.componentDidMount=function(){this._popup&&this._popup.focus()},t.prototype.componentDidUpdate=function(){this._popup&&this._popup.focus()},t.prototype.render=function(){var e=this;if(!this.props.extensibilityGroups)return null;for(var t=[],n=0,r=this.props.extensibilityGroups;n<r.length;n++){var a=r[n];a.predicate(this.props.target)&&t.push.apply(t,a.entries)}return 0===t.length?null:l.createElement("div",{ref:this.extensionRef,className:"extensions",onClick:function(){return e.showPopup()}},l.createElement("div",{title:"Additional options",className:"icon"},l.createElement(w,{icon:W})),l.createElement("div",{ref:function(t){e._popup=t},tabIndex:-1,className:this.state.popupVisible?"popup show":"popup",onBlur:function(){return e.setState({popupVisible:!1})}},t.map((function(t){return l.createElement("div",{key:t.label,className:"popupMenu",onClick:function(){return t.action(e.props.target)}},t.label)}))))},t}(l.Component),Ua=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.mesh;return n.state={isBoundingBoxEnabled:r.showBoundingBox,isVisible:n.props.mesh.isVisible},n}return a(t,e),t.prototype.showBoundingBox=function(){this.props.mesh.showBoundingBox=!this.state.isBoundingBoxEnabled,this.setState({isBoundingBoxEnabled:!this.state.isBoundingBoxEnabled})},t.prototype.switchVisibility=function(){var e=!this.state.isVisible;this.setState({isVisible:e}),this.props.mesh.isVisible=e},t.prototype.render=function(){var e=this,t=this.props.mesh,n=this.state.isVisible?l.createElement(w,{icon:Ia}):l.createElement(w,{icon:Da,className:"isNotActive"});return l.createElement("div",{className:"meshTools"},l.createElement(Fa,{label:t.name,onClick:function(){return e.props.onClick()},icon:H,color:"dodgerblue"}),l.createElement("div",{className:this.state.isBoundingBoxEnabled?"bounding-box selected icon":"bounding-box icon",onClick:function(){return e.showBoundingBox()},title:"Show/Hide bounding box"},l.createElement(w,{icon:za})),l.createElement("div",{className:"visibility icon",onClick:function(){return e.switchVisibility()},title:"Show/Hide mesh"},n),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Ga=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.camera,a=r.getScene();return n.state={isActive:a.activeCamera===r,isGizmoEnabled:r.reservedDataStore&&r.reservedDataStore.cameraGizmo},n}return a(t,e),t.prototype.setActive=function(){var e=this.props.camera;e.getScene().activeCamera=e,e.attachControl(!0),this.setState({isActive:!0})},t.prototype.componentDidMount=function(){var e=this,t=this.props.camera.getScene();this._onBeforeRenderObserver=t.onBeforeRenderObservable.add((function(){var n=e.props.camera;e.state.isActive&&t.activeCameras&&t.activeCameras.length<=1&&t.activeCamera!==n&&n.detachControl();var r=t.activeCamera===n;r!==e.state.isActive&&e.setState({isActive:r})}))},t.prototype.componentWillUnmount=function(){this._onBeforeRenderObserver&&this.props.camera.getScene().onBeforeRenderObservable.remove(this._onBeforeRenderObserver)},t.prototype.toggleGizmo=function(){var e=this.props.camera;e.reservedDataStore&&e.reservedDataStore.cameraGizmo?(e.getScene().reservedDataStore&&e.getScene().reservedDataStore.gizmoManager&&e.getScene().reservedDataStore.gizmoManager.attachToMesh(null),this.props.globalState.enableCameraGizmo(e,!1),this.setState({isGizmoEnabled:!1})):(this.props.globalState.enableCameraGizmo(e,!0),this.setState({isGizmoEnabled:!0}))},t.prototype.render=function(){var e=this,t=this.state.isActive?l.createElement(w,{icon:fe}):l.createElement(w,{icon:fe,className:"isNotActive"}),n=this.props.camera.getScene(),r=this.state.isGizmoEnabled||this.props.camera&&this.props.camera.reservedDataStore&&this.props.camera.reservedDataStore.cameraGizmo?l.createElement(w,{icon:Y}):l.createElement(w,{icon:Y,className:"isNotActive"});return l.createElement("div",{className:"cameraTools"},l.createElement(Fa,{label:this.props.camera.name,onClick:function(){return e.props.onClick()},icon:j,color:"green"}),(!n.activeCameras||0===n.activeCameras.length)&&l.createElement("div",{className:"activeCamera icon",onClick:function(){return e.setActive()},title:"Set as main camera and attach to controls"},t),l.createElement("div",{className:"enableGizmo icon",onClick:function(){return e.toggleGizmo()},title:"Turn on/off the camera's gizmo"},r),l.createElement(Va,{target:this.props.camera,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Ba=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.light;return n.state={isEnabled:r.isEnabled(),isGizmoEnabled:r.reservedDataStore&&r.reservedDataStore.lightGizmo},n}return a(t,e),t.prototype.switchIsEnabled=function(){var e=this.props.light;e.setEnabled(!e.isEnabled()),this.setState({isEnabled:e.isEnabled()})},t.prototype.toggleGizmo=function(){var e=this.props.light;e.reservedDataStore&&e.reservedDataStore.lightGizmo?(e.getScene().reservedDataStore&&e.getScene().reservedDataStore.gizmoManager&&e.getScene().reservedDataStore.gizmoManager.attachToMesh(null),this.props.globalState.enableLightGizmo(e,!1),this.setState({isGizmoEnabled:!1})):(this.props.globalState.enableLightGizmo(e,!0),this.setState({isGizmoEnabled:!0}))},t.prototype.render=function(){var e=this,t=this.state.isEnabled?l.createElement(w,{icon:ja}):l.createElement(w,{icon:ja,className:"isNotActive"}),n=this.state.isGizmoEnabled||this.props.light&&this.props.light.reservedDataStore&&this.props.light.reservedDataStore.lightGizmo?l.createElement(w,{icon:Y}):l.createElement(w,{icon:Y,className:"isNotActive"});return l.createElement("div",{className:"lightTools"},l.createElement(Fa,{label:this.props.light.name,onClick:function(){return e.props.onClick()},icon:te,color:"yellow"}),l.createElement("div",{className:"visibility icon",onClick:function(){return e.switchIsEnabled()},title:"Turn on/off the light"},t),l.createElement("div",{className:"enableGizmo icon",onClick:function(){return e.toggleGizmo()},title:"Turn on/off the light's gizmo"},n),l.createElement(Va,{target:this.props.light,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Ha=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t="NodeMaterial"===this.props.material.getClassName()?l.createElement("div",{className:"icon",onClick:function(){e.props.material.edit()},title:"Node Material Editor",color:"white"},l.createElement(w,{icon:ie})):null;return l.createElement("div",{className:"materialTools"},l.createElement(Fa,{label:this.props.material.name,onClick:function(){return e.props.onClick()},icon:I,color:"orange"}),l.createElement(Va,{target:this.props.material,extensibilityGroups:this.props.extensibilityGroups}),t)},t}(l.Component),Wa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"textureTools"},l.createElement(Fa,{label:this.props.texture.name,onClick:function(){return e.props.onClick()},icon:$,color:"mediumpurple"}),l.createElement(Va,{target:this.props.texture,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Ka=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.transformNode;return l.createElement("div",{className:"transformNodeTools"},l.createElement(Fa,{label:t.name,onClick:function(){return e.props.onClick()},icon:V,color:"cornflowerblue"}),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Ya=function(e){function t(t){var n=e.call(this,t)||this,r=n.props.control;return n.state={isActive:r.isHighlighted,isVisible:r.isVisible},n}return a(t,e),t.prototype.highlight=function(){var e=this.props.control;e.isHighlighted=!e.isHighlighted,this.setState({isActive:e.isHighlighted})},t.prototype.switchVisibility=function(){var e=!this.state.isVisible;this.setState({isVisible:e}),this.props.control.isVisible=e},t.prototype.render=function(){var e=this,t=this.props.control,n=(t.name||"No name")+" ["+t.getClassName()+"]",r=this.state.isActive?l.createElement(w,{icon:J}):l.createElement(w,{icon:J,className:"isNotActive"}),a=this.state.isVisible?l.createElement(w,{icon:Y}):l.createElement(w,{icon:X,className:"isNotActive"});return l.createElement("div",{className:"controlTools"},l.createElement(Fa,{label:n,onClick:function(){return e.props.onClick()},icon:oe,color:"greenyellow"}),l.createElement("div",{className:"highlight icon",onClick:function(){return e.highlight()},title:"Highlight this control"},r),l.createElement("div",{className:"visibility icon",onClick:function(){return e.switchVisibility()},title:"Show/Hide control"},a),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Xa=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isInPickingMode:!1},n}return a(t,e),t.prototype.componentWillUnmount=function(){var e=this.props.texture;this._onControlPickedObserver&&(e.onControlPickedObservable.remove(this._onControlPickedObserver),this._onControlPickedObserver=null)},t.prototype.onPickingMode=function(){var e=this,t=this.props.texture;this._onControlPickedObserver&&(t.onControlPickedObservable.remove(this._onControlPickedObserver),this._onControlPickedObserver=null),this.state.isInPickingMode||(this._onControlPickedObserver=t.onControlPickedObservable.add((function(t){e.props.onSelectionChangedObservable&&("ScrollViewerWindow"===t.getClassName()&&(t=t.getAscendantOfClass("ScrollViewer")),e.props.onSelectionChangedObservable.notifyObservers(t))}))),this.setState({isInPickingMode:!this.state.isInPickingMode})},t.prototype.render=function(){var e=this;return l.createElement("div",{className:"adtextureTools"},l.createElement(Fa,{label:this.props.texture.name,onClick:function(){return e.props.onClick()},icon:$,color:"mediumpurple"}),l.createElement("div",{className:"icon edit",onClick:function(){return Xn(e.props.texture)},title:"Edit"},l.createElement(w,{icon:ie})),l.createElement("div",{className:this.state.isInPickingMode?"pickingMode selected icon":"pickingMode icon",onClick:function(){return e.onPickingMode()},title:"Turn picking mode on/off"},l.createElement(w,{icon:B})),l.createElement(Va,{target:this.props.texture,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Za=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.animationGroup;return l.createElement("div",{className:"animationGroupTools"},l.createElement(Fa,{label:t.name,onClick:function(){return e.props.onClick()},icon:ee,color:"cornflowerblue"}),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),qa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"postProcessTools"},l.createElement(Fa,{label:this.props.postProcess.name,onClick:function(){return e.props.onClick()},icon:ne,color:"red"}),l.createElement(Va,{target:this.props.postProcess,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Qa=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"postProcessTools"},l.createElement(Fa,{label:this.props.renderPipeline.name,onClick:function(){return e.props.onClick()},icon:ne,color:"orangered"}),l.createElement(Va,{target:this.props.renderPipeline,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),Ja=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.skeleton;return l.createElement("div",{className:"skeletonTools"},l.createElement(Fa,{label:t.name||"no name",onClick:function(){return e.props.onClick()},icon:ce,color:"gray"}),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),$a=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.bone;return l.createElement("div",{className:"skeletonTools"},l.createElement(Fa,{label:t.name||"no name",onClick:function(){return e.props.onClick()},icon:L,color:"lightgray"}),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),eo=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"particleSystemTools"},l.createElement(Fa,{label:this.props.system.name||"Particle system",onClick:function(){return e.props.onClick()},icon:R,color:"crimson"}),l.createElement(Va,{target:this.props.system,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),to=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"spriteManagerTools"},l.createElement(Fa,{label:this.props.spriteManager.name||"No name",onClick:function(){return e.props.onClick()},icon:k,color:"blanchedalmond"}),l.createElement(Va,{target:this.props.spriteManager,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),no=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"spriteTools"},l.createElement(Fa,{label:this.props.sprite.name||"No name",onClick:function(){return e.props.onClick()},icon:Q,color:"blanchedalmond"}),l.createElement(Va,{target:this.props.sprite,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),ro=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.targetedAnimation;return l.createElement("div",{className:"targetedAnimationTools"},l.createElement(Fa,{label:t.animation.name,onClick:function(){return e.props.onClick()},icon:q,color:"cornflowerblue"}),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),ao=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this,t=this.props.sound;return l.createElement("div",{className:"soundTools"},l.createElement(Fa,{label:t.name,onClick:function(){return e.props.onClick()},icon:ae,color:"teal"}),l.createElement(Va,{target:t,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),oo=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"effectLayerTools"},l.createElement(Fa,{label:this.props.layer.name,onClick:function(){return e.props.onClick()},icon:ue,color:"Plum"}),l.createElement(Va,{target:this.props.layer,extensibilityGroups:this.props.extensibilityGroups}))},t}(l.Component),io=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.onClick=function(){this.props.onClick&&this.props.onClick()},t.prototype.render=function(){var e=this,t=this.props.entity;if(t&&t.getClassName){var n=t.getClassName();if(-1!==n.indexOf("Mesh")){var r=t;return r.isAnInstance||r.getTotalVertices()>0?l.createElement(Ua,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,mesh:r,onClick:function(){return e.onClick()}}):l.createElement(Ka,{extensibilityGroups:this.props.extensibilityGroups,transformNode:t,onClick:function(){return e.onClick()}})}if(-1!==n.indexOf("SpriteManager"))return l.createElement(to,{extensibilityGroups:this.props.extensibilityGroups,spriteManager:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Sprite"))return l.createElement(no,{extensibilityGroups:this.props.extensibilityGroups,sprite:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Skeleton"))return l.createElement(Ja,{extensibilityGroups:this.props.extensibilityGroups,skeleton:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Bone"))return l.createElement($a,{extensibilityGroups:this.props.extensibilityGroups,bone:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("TransformNode"))return l.createElement(Ka,{extensibilityGroups:this.props.extensibilityGroups,transformNode:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Camera"))return l.createElement(Ga,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,camera:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Light",n.length-5))return l.createElement(Ba,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,light:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Material"))return l.createElement(Ha,{extensibilityGroups:this.props.extensibilityGroups,material:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("ParticleSystem"))return l.createElement(eo,{extensibilityGroups:this.props.extensibilityGroups,system:t,onClick:function(){return e.onClick()}});if("AdvancedDynamicTexture"===n)return l.createElement(Xa,{onSelectionChangedObservable:this.props.globalState.onSelectionChangedObservable,extensibilityGroups:this.props.extensibilityGroups,texture:t,onClick:function(){return e.onClick()}});if("AnimationGroup"===n)return l.createElement(Za,{extensibilityGroups:this.props.extensibilityGroups,animationGroup:t,onClick:function(){return e.onClick()}});if("TargetedAnimation"===n)return l.createElement(ro,{extensibilityGroups:this.props.extensibilityGroups,targetedAnimation:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Texture"))return l.createElement(Wa,{extensibilityGroups:this.props.extensibilityGroups,texture:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("RenderingPipeline"))return l.createElement(Qa,{extensibilityGroups:this.props.extensibilityGroups,renderPipeline:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("PostProcess"))return l.createElement(qa,{extensibilityGroups:this.props.extensibilityGroups,postProcess:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Layer"))return l.createElement(oo,{extensibilityGroups:this.props.extensibilityGroups,layer:t,onClick:function(){return e.onClick()}});if(-1!==n.indexOf("Sound"))return l.createElement(ao,{extensibilityGroups:this.props.extensibilityGroups,sound:t,onClick:function(){return e.onClick()}});if(t._host)return l.createElement(Ya,{extensibilityGroups:this.props.extensibilityGroups,control:t,onClick:function(){return e.onClick()}})}return l.createElement("div",{className:"meshTools"},l.createElement(Fa,{label:t.name,onClick:function(){return e.onClick()},icon:le,color:"cornflowerblue"}))},t}(l.Component),so=function(){function e(){}return e.LookForItem=function(t,n){if(t===n)return!0;var r=t.getChildren?t.getChildren():t.children;if(r&&"MultiMaterial"!==t.getClassName())for(var a=0,o=r;a<o.length;a++){var i=o[a];if(e.LookForItem(i,n))return!0}return!1},e._RecursiveRemoveHiddenMeshesAndHoistChildren=function(t){for(var n=[],r=0,a=t;r<a.length;r++){var o=a[r];o.reservedDataStore&&o.reservedDataStore.hidden&&o.getChildMeshes?e._RecursiveRemoveHiddenMeshesAndHoistChildren(o.getChildMeshes()).forEach((function(e){n.push(e)})):o.reservedDataStore&&o.reservedDataStore.hidden||n.push(o)}return n},e.SortAndFilter=function(t,n){if(!n)return[];var r=e._RecursiveRemoveHiddenMeshesAndHoistChildren(n);return t&&t.reservedDataStore&&t.reservedDataStore.detachedChildren&&r.push.apply(r,t.reservedDataStore.detachedChildren),r.sort((function(e,t){var n=(e.name||"").toLowerCase(),r=(t.name||"").toLowerCase();return n===r?0:n>r?1:-1}))},e}(),lo=function(e){function t(t){var n=e.call(this,t)||this;return n._wasSelected=!1,n.state={isSelected:n.props.entity===n.props.selectedEntity,isExpanded:n.props.mustExpand||so.LookForItem(n.props.entity,n.props.selectedEntity)},n}return a(t,e),t.prototype.switchExpandedState=function(){this.setState({isExpanded:!this.state.isExpanded})},t.prototype.shouldComponentUpdate=function(e,t){if(!t.isExpanded&&this.state.isExpanded)return!0;if(e.selectedEntity){if(e.entity===e.selectedEntity)return t.isSelected=!0,!0;if(t.isSelected=!1,so.LookForItem(e.entity,e.selectedEntity))return t.isExpanded=!0,!0}return!0},t.prototype.scrollIntoView=function(){var e=c.findDOMNode(this);e&&e.scrollIntoView(!1)},t.prototype.componentDidMount=function(){this.state.isSelected&&this.scrollIntoView()},t.prototype.componentDidUpdate=function(){this.state.isSelected&&!this._wasSelected&&this.scrollIntoView(),this._wasSelected=!1},t.prototype.onSelect=function(){if(this.props.globalState.onSelectionChangedObservable){this._wasSelected=!0;var e=this.props.entity;this.props.globalState.onSelectionChangedObservable.notifyObservers(e)}},t.prototype.renderChildren=function(){var e=this,n=this.props.entity;return(n.getChildren||n.children)&&this.state.isExpanded?so.SortAndFilter(n,n.getChildren?n.getChildren():n.children).map((function(n,r){return l.createElement(t,{globalState:e.props.globalState,mustExpand:e.props.mustExpand,extensibilityGroups:e.props.extensibilityGroups,selectedEntity:e.props.selectedEntity,key:r,offset:e.props.offset+2,entity:n,filter:e.props.filter})})):null},t.prototype.render=function(){var e=this,t={paddingLeft:10*(this.props.offset+.5)+"px"},n=this.props.entity,r=this.state.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se}),a=("MultiMaterial"===n.getClassName()?[]:so.SortAndFilter(n,n.getChildren?n.getChildren():n.children)).length>0;if(n.reservedDataStore||(n.reservedDataStore={}),n.reservedDataStore.setExpandedState=function(t){e.setState({isExpanded:t})},n.reservedDataStore.isExpanded=this.state.isExpanded,this.props.filter){var o=this.props.filter.toLowerCase();if(!n.name||-1===n.name.toLowerCase().indexOf(o)){if(!a)return null;if(n.getDescendants&&0===n.getDescendants(!1,(function(e){return e.name&&-1!==e.name.toLowerCase().indexOf(o)})).length)return null}}return l.createElement("div",null,l.createElement("div",{className:this.state.isSelected?"itemContainer selected":"itemContainer",style:t},a&&l.createElement("div",{className:"arrow icon",onClick:function(){return e.switchExpandedState()}},r),l.createElement(io,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,label:n.name,entity:n,onClick:function(){return e.onSelect()}})),this.renderChildren())},t}(l.Component),po=n(6),co=n.n(po),uo=n(4),ho=n.n(uo);function mo(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e&&e.apply(void 0,n)}function bo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var go="react-contextmenu",fo="react-contextmenu--visible",vo="react-contextmenu-wrapper",yo="react-contextmenu-item",Co="react-contextmenu-item--active",Eo="react-contextmenu-item--disabled",xo="react-contextmenu-item--divider",Oo="react-contextmenu-item--selected",So="react-contextmenu-submenu",_o={},wo=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Po="REACT_CONTEXTMENU_SHOW",To="REACT_CONTEXTMENU_HIDE";function ko(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r=void 0;"function"==typeof window.CustomEvent?r=new window.CustomEvent(e,{detail:t}):(r=document.createEvent("CustomEvent")).initCustomEvent(e,!1,!0,t),n&&(n.dispatchEvent(r),ho()(_o,t))}function No(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];ko(Po,ho()({},e,{type:Po}),t)}function Mo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];ko(To,ho()({},e,{type:To}),t)}var Ao=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.handleShowEvent=function(e){for(var n in t.callbacks)bo(t.callbacks,n)&&t.callbacks[n].show(e)},this.handleHideEvent=function(e){for(var n in t.callbacks)bo(t.callbacks,n)&&t.callbacks[n].hide(e)},this.register=function(e,n){var r=Math.random().toString(36).substring(7);return t.callbacks[r]={show:e,hide:n},r},this.unregister=function(e){e&&t.callbacks[e]&&delete t.callbacks[e]},this.callbacks={},wo&&(window.addEventListener(Po,this.handleShowEvent),window.addEventListener(To,this.handleHideEvent))},Lo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ro=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jo(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var zo=function(e){function t(){var e,n,r;Do(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=jo(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleClick=function(e){0!==e.button&&1!==e.button&&e.preventDefault(),r.props.disabled||r.props.divider||(mo(r.props.onClick,e,ho()({},r.props.data,_o.data),_o.target),r.props.preventClose||Mo())},jo(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Ro(t,[{key:"render",value:function(){var e,t=this,n=this.props,r=n.attributes,a=n.children,o=n.className,i=n.disabled,s=n.divider,l=n.selected,c=co()(o,yo,r.className,(Io(e={},co()(Eo,r.disabledClassName),i),Io(e,co()(xo,r.dividerClassName),s),Io(e,co()(Oo,r.selectedClassName),l),e));return p.a.createElement("div",Lo({},r,{className:c,role:"menuitem",tabIndex:"-1","aria-disabled":i?"true":"false","aria-orientation":s?"horizontal":null,ref:function(e){t.ref=e},onMouseMove:this.props.onMouseMove,onMouseLeave:this.props.onMouseLeave,onTouchEnd:this.handleClick,onClick:this.handleClick}),s?null:a)}}]),t}(l.Component);zo.propTypes={attributes:m.a.object,children:m.a.node,className:m.a.string,data:m.a.object,disabled:m.a.bool,divider:m.a.bool,onClick:m.a.func,onMouseLeave:m.a.func,onMouseMove:m.a.func,preventClose:m.a.bool,selected:m.a.bool},zo.defaultProps={attributes:{},children:null,className:"",data:{},disabled:!1,divider:!1,onClick:function(){return null},onMouseMove:function(){return null},onMouseLeave:function(){return null},preventClose:!1,selected:!1};var Fo=zo;var Vo=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return Uo.call(n),n.seletedItemRef=null,n.state={selectedItem:null,forceSubMenuOpen:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(l.Component);Vo.propTypes={children:m.a.node.isRequired};var Uo=function(){var e=this;this.handleKeyNavigation=function(t){if(!1!==e.state.isVisible)switch(t.keyCode){case 37:case 27:t.preventDefault(),e.hideMenu(t);break;case 38:t.preventDefault(),e.selectChildren(!0);break;case 40:t.preventDefault(),e.selectChildren(!1);break;case 39:e.tryToOpenSubMenu(t);break;case 13:t.preventDefault(),e.tryToOpenSubMenu(t);var n=e.seletedItemRef&&e.seletedItemRef.props&&e.seletedItemRef.props.disabled;e.seletedItemRef&&e.seletedItemRef.ref instanceof HTMLElement&&!n?e.seletedItemRef.ref.click():e.hideMenu(t)}},this.handleForceClose=function(){e.setState({forceSubMenuOpen:!1})},this.tryToOpenSubMenu=function(t){e.state.selectedItem&&e.state.selectedItem.type===e.getSubMenuType()&&(t.preventDefault(),e.setState({forceSubMenuOpen:!0}))},this.selectChildren=function(t){var n=e.state.selectedItem,r=[],a=0,o={};if(p.a.Children.forEach(e.props.children,(function t(n,i){n&&([Fo,e.getSubMenuType()].indexOf(n.type)<0?p.a.Children.forEach(n.props.children,t):n.props.divider||(n.props.disabled&&(++a,o[i]=!0),r.push(n)))})),a!==r.length){var i=function(e){var n=e;do{t?--n:++n,n<0?n=r.length-1:n>=r.length&&(n=0)}while(n!==e&&o[n]);return n===e?null:n}(r.indexOf(n));null!==i&&e.setState({selectedItem:r[i],forceSubMenuOpen:!1})}},this.onChildMouseMove=function(t){e.state.selectedItem!==t&&e.setState({selectedItem:t,forceSubMenuOpen:!1})},this.onChildMouseLeave=function(){e.setState({selectedItem:null,forceSubMenuOpen:!1})},this.renderChildren=function(t){return p.a.Children.map(t,(function(t){var n={};return p.a.isValidElement(t)?[Fo,e.getSubMenuType()].indexOf(t.type)<0?(n.children=e.renderChildren(t.props.children),p.a.cloneElement(t,n)):(n.onMouseLeave=e.onChildMouseLeave.bind(e),t.type===e.getSubMenuType()&&(n.forceOpen=e.state.forceSubMenuOpen&&e.state.selectedItem===t,n.forceClose=e.handleForceClose,n.parentKeyNavigationHandler=e.handleKeyNavigation),t.props.divider||e.state.selectedItem!==t?(n.onMouseMove=function(){return e.onChildMouseMove(t)},p.a.cloneElement(t,n)):(n.selected=!0,n.ref=function(t){e.seletedItemRef=t},p.a.cloneElement(t,n))):t}))}},Go=Vo,Bo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ho=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Wo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ko=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getMenuPosition=function(){var e=window,t=e.innerWidth,r=e.innerHeight,a=n.subMenu.getBoundingClientRect(),o={};return a.bottom>r?o.bottom=0:o.top=0,a.right<t?o.left="100%":o.right="100%",o},n.getRTLMenuPosition=function(){var e=window.innerHeight,t=n.subMenu.getBoundingClientRect(),r={};return t.bottom>e?r.bottom=0:r.top=0,t.left<0?r.left="100%":r.right="100%",r},n.hideSubMenu=function(e){e.detail&&e.detail.id&&n.menu&&e.detail.id!==n.menu.id||(n.props.forceOpen&&n.props.forceClose(),n.setState({visible:!1,selectedItem:null}),n.unregisterHandlers())},n.handleClick=function(e){e.preventDefault(),n.props.disabled||(mo(n.props.onClick,e,ho()({},n.props.data,_o.data),_o.target),n.props.onClick&&!n.props.preventCloseOnClick&&Mo())},n.handleMouseEnter=function(){n.closetimer&&clearTimeout(n.closetimer),n.props.disabled||n.state.visible||(n.opentimer=setTimeout((function(){return n.setState({visible:!0,selectedItem:null})}),n.props.hoverDelay))},n.handleMouseLeave=function(){n.opentimer&&clearTimeout(n.opentimer),n.state.visible&&(n.closetimer=setTimeout((function(){return n.setState({visible:!1,selectedItem:null})}),n.props.hoverDelay))},n.menuRef=function(e){n.menu=e},n.subMenuRef=function(e){n.subMenu=e},n.registerHandlers=function(){document.removeEventListener("keydown",n.props.parentKeyNavigationHandler),document.addEventListener("keydown",n.handleKeyNavigation)},n.unregisterHandlers=function(e){document.removeEventListener("keydown",n.handleKeyNavigation),e||document.addEventListener("keydown",n.props.parentKeyNavigationHandler)},n.state=ho()({},n.state,{visible:!1}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Ho(t,[{key:"componentDidMount",value:function(){this.listenId=Ao.register((function(){}),this.hideSubMenu)}},{key:"getSubMenuType",value:function(){return t}},{key:"shouldComponentUpdate",value:function(e,t){return this.isVisibilityChange=!(this.state.visible===t.visible&&this.props.forceOpen===e.forceOpen||this.state.visible&&e.forceOpen||this.props.forceOpen&&t.visible),!0}},{key:"componentDidUpdate",value:function(){var e=this;if(this.isVisibilityChange)if(this.props.forceOpen||this.state.visible){(window.requestAnimationFrame||setTimeout)((function(){var t=e.props.rtl?e.getRTLMenuPosition():e.getMenuPosition();e.subMenu.style.removeProperty("top"),e.subMenu.style.removeProperty("bottom"),e.subMenu.style.removeProperty("left"),e.subMenu.style.removeProperty("right"),bo(t,"top")&&(e.subMenu.style.top=t.top),bo(t,"left")&&(e.subMenu.style.left=t.left),bo(t,"bottom")&&(e.subMenu.style.bottom=t.bottom),bo(t,"right")&&(e.subMenu.style.right=t.right),e.subMenu.classList.add(fo),e.registerHandlers(),e.setState({selectedItem:null})}))}else{this.subMenu.addEventListener("transitionend",(function t(){e.subMenu.removeEventListener("transitionend",t),e.subMenu.style.removeProperty("bottom"),e.subMenu.style.removeProperty("right"),e.subMenu.style.top=0,e.subMenu.style.left="100%",e.unregisterHandlers()})),this.subMenu.classList.remove(fo)}}},{key:"componentWillUnmount",value:function(){this.listenId&&Ao.unregister(this.listenId),this.opentimer&&clearTimeout(this.opentimer),this.closetimer&&clearTimeout(this.closetimer),this.unregisterHandlers(!0)}},{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.attributes,a=t.disabled,o=t.title,i=t.selected,s=this.state.visible,l={ref:this.menuRef,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,className:co()(yo,So,r.listClassName),style:{position:"relative"}},c={className:co()(yo,r.className,(e={},Wo(e,co()(Eo,r.disabledClassName),a),Wo(e,co()(Co,r.visibleClassName),s),Wo(e,co()(Oo,r.selectedClassName),i),e)),onMouseMove:this.props.onMouseMove,onMouseOut:this.props.onMouseOut,onClick:this.handleClick},u={ref:this.subMenuRef,style:{position:"absolute",transition:"opacity 1ms",top:0,left:"100%"},className:co()(go,this.props.className)};return p.a.createElement("nav",Bo({},l,{role:"menuitem",tabIndex:"-1","aria-haspopup":"true"}),p.a.createElement("div",Bo({},r,c),o),p.a.createElement("nav",Bo({},u,{role:"menu",tabIndex:"-1"}),this.renderChildren(n)))}}]),t}(Go);Ko.propTypes={children:m.a.node.isRequired,attributes:m.a.object,title:m.a.node.isRequired,className:m.a.string,disabled:m.a.bool,hoverDelay:m.a.number,rtl:m.a.bool,selected:m.a.bool,onMouseMove:m.a.func,onMouseOut:m.a.func,forceOpen:m.a.bool,forceClose:m.a.func,parentKeyNavigationHandler:m.a.func},Ko.defaultProps={disabled:!1,hoverDelay:500,attributes:{},className:"",rtl:!1,selected:!1,onMouseMove:function(){return null},onMouseOut:function(){return null},forceOpen:!1,forceClose:function(){return null},parentKeyNavigationHandler:function(){return null}};var Yo=Ko,Xo=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var Zo=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.registerHandlers=function(){document.addEventListener("mousedown",n.handleOutsideClick),document.addEventListener("touchstart",n.handleOutsideClick),n.props.preventHideOnScroll||document.addEventListener("scroll",n.handleHide),n.props.preventHideOnContextMenu||document.addEventListener("contextmenu",n.handleHide),document.addEventListener("keydown",n.handleKeyNavigation),n.props.preventHideOnResize||window.addEventListener("resize",n.handleHide)},n.unregisterHandlers=function(){document.removeEventListener("mousedown",n.handleOutsideClick),document.removeEventListener("touchstart",n.handleOutsideClick),document.removeEventListener("scroll",n.handleHide),document.removeEventListener("contextmenu",n.handleHide),document.removeEventListener("keydown",n.handleKeyNavigation),window.removeEventListener("resize",n.handleHide)},n.handleShow=function(e){if(e.detail.id===n.props.id&&!n.state.isVisible){var t=e.detail.position,r=t.x,a=t.y;n.setState({isVisible:!0,x:r,y:a}),n.registerHandlers(),mo(n.props.onShow,e)}},n.handleHide=function(e){!n.state.isVisible||e.detail&&e.detail.id&&e.detail.id!==n.props.id||(n.unregisterHandlers(),n.setState({isVisible:!1,selectedItem:null,forceSubMenuOpen:!1}),mo(n.props.onHide,e))},n.handleOutsideClick=function(e){n.menu.contains(e.target)||Mo()},n.handleMouseLeave=function(e){e.preventDefault(),mo(n.props.onMouseLeave,e,ho()({},n.props.data,_o.data),_o.target),n.props.hideOnLeave&&Mo()},n.handleContextMenu=function(e){e.preventDefault(),n.handleHide(e)},n.hideMenu=function(e){27!==e.keyCode&&13!==e.keyCode||Mo()},n.getMenuPosition=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r={top:t,left:e};if(!n.menu)return r;var a=window,o=a.innerWidth,i=a.innerHeight,s=n.menu.getBoundingClientRect();return t+s.height>i&&(r.top-=s.height),e+s.width>o&&(r.left-=s.width),r.top<0&&(r.top=s.height<i?(i-s.height)/2:0),r.left<0&&(r.left=s.width<o?(o-s.width)/2:0),r},n.getRTLMenuPosition=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r={top:t,left:e};if(!n.menu)return r;var a=window,o=a.innerWidth,i=a.innerHeight,s=n.menu.getBoundingClientRect();return r.left=e-s.width,t+s.height>i&&(r.top-=s.height),r.left<0&&(r.left+=s.width),r.top<0&&(r.top=s.height<i?(i-s.height)/2:0),r.left+s.width>o&&(r.left=s.width<o?(o-s.width)/2:0),r},n.menuRef=function(e){n.menu=e},n.state=ho()({},n.state,{x:0,y:0,isVisible:!1}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Xo(t,[{key:"getSubMenuType",value:function(){return Yo}},{key:"componentDidMount",value:function(){this.listenId=Ao.register(this.handleShow,this.handleHide)}},{key:"componentDidUpdate",value:function(){var e=this,t=window.requestAnimationFrame||setTimeout;this.state.isVisible?t((function(){var n=e.state,r=n.x,a=n.y,o=e.props.rtl?e.getRTLMenuPosition(r,a):e.getMenuPosition(r,a),i=o.top,s=o.left;t((function(){e.menu&&(e.menu.style.top=i+"px",e.menu.style.left=s+"px",e.menu.style.opacity=1,e.menu.style.pointerEvents="auto")}))})):t((function(){e.menu&&(e.menu.style.opacity=0,e.menu.style.pointerEvents="none")}))}},{key:"componentWillUnmount",value:function(){this.listenId&&Ao.unregister(this.listenId),this.unregisterHandlers()}},{key:"render",value:function(){var e,t,n,r=this.props,a=r.children,o=r.className,i=r.style,s=this.state.isVisible,l=ho()({},i,{position:"fixed",opacity:0,pointerEvents:"none"}),c=co()(go,o,(n=s,(t=fo)in(e={})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e));return p.a.createElement("nav",{role:"menu",tabIndex:"-1",ref:this.menuRef,style:l,className:c,onContextMenu:this.handleContextMenu,onMouseLeave:this.handleMouseLeave},this.renderChildren(a))}}]),t}(Go);Zo.propTypes={id:m.a.string.isRequired,children:m.a.node.isRequired,data:m.a.object,className:m.a.string,hideOnLeave:m.a.bool,rtl:m.a.bool,onHide:m.a.func,onMouseLeave:m.a.func,onShow:m.a.func,preventHideOnContextMenu:m.a.bool,preventHideOnResize:m.a.bool,preventHideOnScroll:m.a.bool,style:m.a.object},Zo.defaultProps={className:"",data:{},hideOnLeave:!1,rtl:!1,onHide:function(){return null},onMouseLeave:function(){return null},onShow:function(){return null},preventHideOnContextMenu:!1,preventHideOnResize:!1,preventHideOnScroll:!1,style:{}};var qo=Zo,Qo=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Jo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var ei=function(e){function t(){var e,n,r;Jo(this,t);for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=r=$o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.touchHandled=!1,r.handleMouseDown=function(e){r.props.holdToDisplay>=0&&0===e.button&&(e.persist(),e.stopPropagation(),r.mouseDownTimeoutId=setTimeout((function(){return r.handleContextClick(e)}),r.props.holdToDisplay)),mo(r.props.attributes.onMouseDown,e)},r.handleMouseUp=function(e){0===e.button&&clearTimeout(r.mouseDownTimeoutId),mo(r.props.attributes.onMouseUp,e)},r.handleMouseOut=function(e){0===e.button&&clearTimeout(r.mouseDownTimeoutId),mo(r.props.attributes.onMouseOut,e)},r.handleTouchstart=function(e){r.touchHandled=!1,r.props.holdToDisplay>=0&&(e.persist(),e.stopPropagation(),r.touchstartTimeoutId=setTimeout((function(){r.handleContextClick(e),r.touchHandled=!0}),r.props.holdToDisplay)),mo(r.props.attributes.onTouchStart,e)},r.handleTouchEnd=function(e){r.touchHandled&&e.preventDefault(),clearTimeout(r.touchstartTimeoutId),mo(r.props.attributes.onTouchEnd,e)},r.handleContextMenu=function(e){e.button===r.props.mouseButton&&r.handleContextClick(e),mo(r.props.attributes.onContextMenu,e)},r.handleMouseClick=function(e){e.button===r.props.mouseButton&&r.handleContextClick(e),mo(r.props.attributes.onClick,e)},r.handleContextClick=function(e){if(!(r.props.disable||r.props.disableIfShiftIsPressed&&e.shiftKey)){e.preventDefault(),e.stopPropagation();var t=e.clientX||e.touches&&e.touches[0].pageX,n=e.clientY||e.touches&&e.touches[0].pageY;r.props.posX&&(t-=r.props.posX),r.props.posY&&(n-=r.props.posY),Mo();var a=mo(r.props.collect,r.props),o={position:{x:t,y:n},target:r.elem,id:r.props.id};a&&"function"==typeof a.then?a.then((function(t){o.data=ho()({},t,{target:e.target}),No(o)})):(o.data=ho()({},a,{target:e.target}),No(o))}},r.elemRef=function(e){r.elem=e},$o(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Qo(t,[{key:"render",value:function(){var e=this.props,t=e.renderTag,n=e.attributes,r=e.children,a=ho()({},n,{className:co()(vo,n.className),onContextMenu:this.handleContextMenu,onClick:this.handleMouseClick,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchstart,onTouchEnd:this.handleTouchEnd,onMouseOut:this.handleMouseOut,ref:this.elemRef});return p.a.createElement(t,a,r)}}]),t}(l.Component);ei.propTypes={id:m.a.string.isRequired,children:m.a.node.isRequired,attributes:m.a.object,collect:m.a.func,disable:m.a.bool,holdToDisplay:m.a.number,posX:m.a.number,posY:m.a.number,renderTag:m.a.elementType,mouseButton:m.a.number,disableIfShiftIsPressed:m.a.bool},ei.defaultProps={attributes:{},collect:function(){return null},disable:!1,holdToDisplay:1e3,renderTag:"div",posX:0,posY:0,mouseButton:2,disableIfShiftIsPressed:!1};var ti=ei;Object.assign,function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}}();[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Object.keys(ti.propTypes)),["children"]);var ni=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.expandAll=function(){this.props.onExpandAll(!this.props.isExpanded)},t.prototype.render=function(){var e=this,t=this.props.isExpanded?l.createElement(w,{icon:re}):l.createElement(w,{icon:se}),n=this.props.isExpanded?l.createElement(w,{icon:G}):l.createElement(w,{icon:K});return l.createElement("div",{className:"expandableHeader"},l.createElement("div",{className:"text"},l.createElement("div",{className:"arrow icon",onClick:function(){return e.props.onClick()}},t),l.createElement("div",{className:"text-value"},this.props.label)),l.createElement("div",{className:"expandAll icon",onClick:function(){return e.expandAll()},title:this.props.isExpanded?"Collapse all":"Expand all"},n))},t}(l.Component),ri=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){return l.createElement("div",{className:"expandableHeader"},l.createElement("div",{className:"text"},l.createElement("div",{className:"arrow icon"},l.createElement(w,{icon:A})),l.createElement("div",{className:"text-value"},this.props.label)))},t}(l.Component),ai=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isExpanded:!1,mustExpand:!1},n}return a(t,e),t.prototype.switchExpandedState=function(){this.setState({isExpanded:!this.state.isExpanded,mustExpand:!1})},t.prototype.shouldComponentUpdate=function(e,t){if(!t.isExpanded&&this.state.isExpanded)return!0;var n=e.items;if(n&&n.length&&e.selectedEntity)for(var r=0,a=n;r<a.length;r++){var o=a[r];if(so.LookForItem(o,e.selectedEntity))return t.isExpanded=!0,!0}return!0},t.prototype.expandAll=function(e){this.setState({isExpanded:e,mustExpand:e})},t.prototype.renderContextMenu=function(){return this.props.contextMenuItems?l.createElement(qo,{id:"contextmenu#"+t._ContextMenuUniqueIdGenerator++,className:"context-menu"},this.props.contextMenuItems.map((function(e){return l.createElement(Fo,{onClick:function(){return e.action()},key:e.label},e.label)}))):(t._ContextMenuUniqueIdGenerator++,null)},t.prototype.render=function(){var e=this,n=this.props.items,r={paddingLeft:10*(this.props.offset+.5)+"px"};if(!n){if(!this.props.forceSubitems)return l.createElement("div",{className:"groupContainer",style:r},l.createElement("div",null,this.props.label));n=[]}if(!n.length)return l.createElement("div",{className:"groupContainer",style:r},l.createElement(ti,{id:"contextmenu#"+t._ContextMenuUniqueIdGenerator},this.renderContextMenu(),l.createElement(ri,{label:this.props.label})));if(!this.state.isExpanded)return l.createElement("div",{className:"groupContainer",style:r},l.createElement(ti,{id:"contextmenu#"+t._ContextMenuUniqueIdGenerator},this.renderContextMenu(),l.createElement(ni,{isExpanded:!1,label:this.props.label,onClick:function(){return e.switchExpandedState()},onExpandAll:function(t){return e.expandAll(t)}})));var a=so.SortAndFilter(null,n);return l.createElement("div",null,l.createElement("div",{className:"groupContainer",style:r},l.createElement(ti,{id:"contextmenu#"+t._ContextMenuUniqueIdGenerator},this.renderContextMenu(),l.createElement(ni,{isExpanded:this.state.isExpanded,label:this.props.label,onClick:function(){return e.switchExpandedState()},onExpandAll:function(t){return e.expandAll(t)}}))),a.map((function(t){return l.createElement(lo,{mustExpand:e.state.mustExpand,extensibilityGroups:e.props.extensibilityGroups,key:void 0!==t.uniqueId&&null!==t.uniqueId?t.uniqueId:t.name,offset:e.props.offset+1,selectedEntity:e.props.selectedEntity,entity:t,globalState:e.props.globalState,filter:e.props.filter})})))},t._ContextMenuUniqueIdGenerator=0,t}(l.Component),oi=function(){},ii=function(e){function t(t){var n=e.call(this,t)||this;n._posDragEnd=null,n._scaleDragEnd=null,n._rotateDragEnd=null;var r=n.props.scene,a=0;if(r.reservedDataStore&&r.reservedDataStore.gizmoManager){var o=r.reservedDataStore.gizmoManager;o.positionGizmoEnabled?a=1:o.rotationGizmoEnabled?a=2:o.scaleGizmoEnabled?a=3:o.boundingBoxGizmoEnabled&&(a=4)}return n.state={isSelected:!1,isInPickingMode:!1,gizmoMode:a},n}return a(t,e),t.prototype.shouldComponentUpdate=function(e,t){if(e.selectedEntity){if(e.scene===e.selectedEntity)return t.isSelected=!0,!0;t.isSelected=!1}return!0},t.prototype.componentDidMount=function(){var e=this;if(this.props.onSelectionChangedObservable){var t=this.props.scene;this._onSelectionChangeObserver=this.props.onSelectionChangedObservable.add((function(n){if(e._selectedEntity=n,n&&t.reservedDataStore&&t.reservedDataStore.gizmoManager){var r=t.reservedDataStore.gizmoManager,a=n.getClassName();"TransformNode"===a||-1!==a.indexOf("Mesh")?r.attachToMesh(n):-1!==a.indexOf("Light")?(e._selectedEntity.reservedDataStore&&e._selectedEntity.reservedDataStore.lightGizmo||(e.props.globalState.enableLightGizmo(e._selectedEntity,!0),e.forceUpdate()),r.attachToNode(e._selectedEntity.reservedDataStore.lightGizmo.attachedNode)):-1!==a.indexOf("Camera")?(e._selectedEntity.reservedDataStore&&e._selectedEntity.reservedDataStore.cameraGizmo||(e.props.globalState.enableCameraGizmo(e._selectedEntity,!0),e.forceUpdate()),r.attachToNode(e._selectedEntity.reservedDataStore.cameraGizmo.attachedNode)):-1!==a.indexOf("Bone")?r.attachToMesh(e._selectedEntity._linkedTransformNode?e._selectedEntity._linkedTransformNode:e._selectedEntity):r.attachToNode(null)}}))}},t.prototype.componentWillUnmount=function(){var e=this.props.scene;this._onPointerObserver&&(e.onPointerObservable.remove(this._onPointerObserver),this._onPointerObserver=null),this._gizmoLayerOnPointerObserver&&(e.onPointerObservable.remove(this._gizmoLayerOnPointerObserver),this._gizmoLayerOnPointerObserver=null),this._onSelectionChangeObserver&&this.props.onSelectionChangedObservable&&this.props.onSelectionChangedObservable.remove(this._onSelectionChangeObserver)},t.prototype.onSelect=function(){if(this.props.onSelectionChangedObservable){var e=this.props.scene;this.props.onSelectionChangedObservable.notifyObservers(e)}},t.prototype.onPickingMode=function(){var e=this,t=this.props.scene;this._onPointerObserver&&(t.onPointerObservable.remove(this._onPointerObserver),this._onPointerObserver=null),this.state.isInPickingMode||(this._onPointerObserver=t.onPointerObservable.add((function(){var n=t.unTranslatedPointer,r=t.pick(n.x,n.y,(function(e){return e.isEnabled()&&e.isVisible&&e.getTotalVertices()>0}),!1,void 0,(function(t,n,r,a){if(!e.props.globalState.ignoreBackfacesForPicking)return!0;var o=u.TmpVectors.Vector3[0],i=u.TmpVectors.Vector3[1],s=u.TmpVectors.Vector3[2];return n.subtractToRef(t,o),r.subtractToRef(n,i),s=u.Vector3.Cross(o,i),u.Vector3.Dot(s,a.direction)<0}));if(e.props.globalState.lightGizmos.length>0){var a=e.props.globalState.lightGizmos[0].gizmoLayer.utilityLayerScene.pick(n.x,n.y,(function(t){for(var n=0,r=e.props.globalState.lightGizmos;n<r.length;n++){if(r[n].attachedNode==t)return!0}return!1}));if(a&&a.hit&&e.props.onSelectionChangedObservable)return void e.props.onSelectionChangedObservable.notifyObservers(a.pickedMesh)}if(e.props.globalState.cameraGizmos.length>0){var o=e.props.globalState.cameraGizmos[0].gizmoLayer.utilityLayerScene.pick(n.x,n.y,(function(t){for(var n=0,r=e.props.globalState.cameraGizmos;n<r.length;n++){if(r[n].attachedNode==t)return!0}return!1}));if(o&&o.hit&&e.props.onSelectionChangedObservable)return void e.props.onSelectionChangedObservable.notifyObservers(o.pickedMesh)}r&&r.hit&&e.props.onSelectionChangedObservable&&e.props.onSelectionChangedObservable.notifyObservers(r.pickedMesh)}),u.PointerEventTypes.POINTERTAP)),this.setState({isInPickingMode:!this.state.isInPickingMode})},t.prototype.setGizmoMode=function(e){var t=this,n=this.props.scene;n.reservedDataStore||(n.reservedDataStore={}),this._gizmoLayerOnPointerObserver&&(n.onPointerObservable.remove(this._gizmoLayerOnPointerObserver),this._gizmoLayerOnPointerObserver=null),n.reservedDataStore.gizmoManager||(n.reservedDataStore.gizmoManager=new u.GizmoManager(n));var r=n.reservedDataStore.gizmoManager;if(this._gizmoLayerOnPointerObserver=u.UtilityLayerRenderer.DefaultUtilityLayer.utilityLayerScene.onPointerObservable.add((function(e){if(e.type==u.PointerEventTypes.POINTERDOWN&&e.pickInfo&&e.pickInfo.pickedMesh){for(var n=e.pickInfo.pickedMesh;n&&null!=n.parent;)n=n.parent;for(var a=0,o=t.props.globalState.lightGizmos;a<o.length;a++){var i=o[a];i._rootMesh==n&&r.attachToNode(i.attachedNode)}}})),r.boundingBoxGizmoEnabled=!1,r.positionGizmoEnabled=!1,r.rotationGizmoEnabled=!1,r.scaleGizmoEnabled=!1,this.state.gizmoMode===e)e=0,r.dispose(),n.reservedDataStore.gizmoManager=null;else{switch(e){case 1:r.positionGizmoEnabled=!0,this._posDragEnd||(this._posDragEnd=r.gizmos.positionGizmo.onDragEndObservable.add((function(){if(r.gizmos.positionGizmo&&r.gizmos.positionGizmo.attachedNode){var e=r.gizmos.positionGizmo.attachedNode.reservedDataStore?r.gizmos.positionGizmo.attachedNode.reservedDataStore.lightGizmo:null,n=e&&e.light?e.light:r.gizmos.positionGizmo.attachedNode;if(n.position){(a=new oi).object=n,a.property="position",a.value=n.position,t.props.globalState.onPropertyChangedObservable.notifyObservers(a)}else{var a,o=r.gizmos.positionGizmo.attachedNode.reservedDataStore?r.gizmos.positionGizmo.attachedNode.reservedDataStore.cameraGizmo:null,i=o&&o.camera?o.camera:r.gizmos.positionGizmo.attachedNode;if(i.position)(a=new oi).object=i,a.property="position",a.value=i.position,t.props.globalState.onPropertyChangedObservable.notifyObservers(a)}}})));break;case 2:r.rotationGizmoEnabled=!0,this._rotateDragEnd||(this._rotateDragEnd=r.gizmos.rotationGizmo.onDragEndObservable.add((function(){if(r.gizmos.rotationGizmo&&r.gizmos.rotationGizmo.attachedNode){var e=r.gizmos.rotationGizmo.attachedNode.reservedDataStore?r.gizmos.rotationGizmo.attachedNode.reservedDataStore.lightGizmo:null,n=e&&e.light?e.light:r.gizmos.rotationGizmo.attachedNode,a=r.gizmos.rotationGizmo.attachedNode.reservedDataStore?r.gizmos.rotationGizmo.attachedNode.reservedDataStore.cameraGizmo:null,o=a&&a.camera?a.camera:r.gizmos.rotationGizmo.attachedNode;if(n.rotationQuaternion)(i=new oi).object=n,i.property="rotationQuaternion",i.value=n.rotationQuaternion,t.props.globalState.onPropertyChangedObservable.notifyObservers(i);else if(n.rotation){(i=new oi).object=n,i.property="rotation",i.value=n.rotation,t.props.globalState.onPropertyChangedObservable.notifyObservers(i)}else if(n.direction){(i=new oi).object=n,i.property="direction",i.value=n.direction,t.props.globalState.onPropertyChangedObservable.notifyObservers(i)}else if(o.rotationQuaternion){(i=new oi).object=o,i.property="rotationQuaternion",i.value=o.rotationQuaternion,t.props.globalState.onPropertyChangedObservable.notifyObservers(i)}else if(o.rotation){var i;(i=new oi).object=o,i.property="rotation",i.value=o.rotation,t.props.globalState.onPropertyChangedObservable.notifyObservers(i)}}})));break;case 3:r.scaleGizmoEnabled=!0,this._scaleDragEnd||(this._scaleDragEnd=r.gizmos.scaleGizmo.onDragEndObservable.add((function(){if(r.gizmos.scaleGizmo&&r.gizmos.scaleGizmo.attachedMesh){var e=r.gizmos.scaleGizmo.attachedMesh.reservedDataStore?r.gizmos.scaleGizmo.attachedMesh.reservedDataStore.lightGizmo:null,n=e&&e.light?e.light:r.gizmos.scaleGizmo.attachedMesh;if(n.scaling){var a=new oi;a.object=n,a.property="scaling",a.value=n.scaling,t.props.globalState.onPropertyChangedObservable.notifyObservers(a)}}})));break;case 4:r.boundingBoxGizmoEnabled=!0,r.gizmos.boundingBoxGizmo&&(r.gizmos.boundingBoxGizmo.fixedDragMeshScreenSize=!0)}if(this._selectedEntity&&this._selectedEntity.getClassName){var a=this._selectedEntity.getClassName();"TransformNode"===a||-1!==a.indexOf("Mesh")?r.attachToMesh(this._selectedEntity):-1!==a.indexOf("Light")?(this._selectedEntity.reservedDataStore&&this._selectedEntity.reservedDataStore.lightGizmo||(this.props.globalState.enableLightGizmo(this._selectedEntity,!0),this.forceUpdate()),r.attachToNode(this._selectedEntity.reservedDataStore.lightGizmo.attachedNode)):-1!==a.indexOf("Camera")?(this._selectedEntity.reservedDataStore&&this._selectedEntity.reservedDataStore.cameraGizmo||(this.props.globalState.enableCameraGizmo(this._selectedEntity,!0),this.forceUpdate()),r.attachToNode(this._selectedEntity.reservedDataStore.cameraGizmo.attachedNode)):-1!==a.indexOf("Bone")&&r.attachToMesh(this._selectedEntity._linkedTransformNode?this._selectedEntity._linkedTransformNode:this._selectedEntity)}}this.setState({gizmoMode:e})},t.prototype.render=function(){var e=this;return l.createElement("div",{className:this.state.isSelected?"itemContainer selected":"itemContainer"},l.createElement("div",{className:"sceneNode"},l.createElement("div",{className:"sceneTitle",onClick:function(){return e.onSelect()}},l.createElement(w,{icon:$})," Scene"),l.createElement("div",{className:1===this.state.gizmoMode?"translation selected icon":"translation icon",onClick:function(){return e.setGizmoMode(1)},title:"Enable/Disable position mode"},l.createElement(w,{icon:M})),l.createElement("div",{className:2===this.state.gizmoMode?"rotation selected icon":"rotation icon",onClick:function(){return e.setGizmoMode(2)},title:"Enable/Disable rotation mode"},l.createElement(w,{icon:pe})),l.createElement("div",{className:3===this.state.gizmoMode?"scaling selected icon":"scaling icon",onClick:function(){return e.setGizmoMode(3)},title:"Enable/Disable scaling mode"},l.createElement(w,{icon:G})),l.createElement("div",{className:4===this.state.gizmoMode?"bounding selected icon":"bounding icon",onClick:function(){return e.setGizmoMode(4)},title:"Enable/Disable bounding box mode"},l.createElement(w,{icon:ge})),l.createElement("div",{className:"separator"}),l.createElement("div",{className:this.state.isInPickingMode?"pickingMode selected icon":"pickingMode icon",onClick:function(){return e.onPickingMode()},title:"Turn picking mode on/off"},l.createElement(w,{icon:B})),l.createElement("div",{className:"refresh icon",onClick:function(){return e.props.onRefresh()},title:"Refresh the explorer"},l.createElement(w,{icon:de})),l.createElement(Va,{target:this.props.scene,extensibilityGroups:this.props.extensibilityGroups})))},t}(l.Component);n(107);var si=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",{className:"filter"},l.createElement("input",{type:"text",placeholder:"Filter",onChange:function(t){return e.props.onFilter(t.target.value)}}))},t}(l.Component),li=function(e){function t(t){var n=e.call(this,t)||this;return n._mutationTimeout=null,n._once=!0,n._hooked=!1,n.state={filter:null,selectedEntity:null,scene:n.props.scene},n.sceneMutationFunc=n.processMutation.bind(n),n.sceneExplorerRef=l.createRef(),n._onNewSceneObserver=n.props.globalState.onNewSceneObservable.add((function(e){n.setState({scene:e})})),n}return a(t,e),t.prototype.processMutation=function(){var e=this;this.props.globalState.blockMutationUpdates||(null!==this._mutationTimeout&&window.clearTimeout(this._mutationTimeout),this._mutationTimeout=window.setTimeout((function(){e._mutationTimeout=null,e.forceUpdate()}),32))},t.prototype.componentDidMount=function(){var e=this;this._onSelectionChangeObserver=this.props.globalState.onSelectionChangedObservable.add((function(t){e.state.selectedEntity!==t&&e.setState({selectedEntity:t})})),this._onSelectionRenamedObserver=this.props.globalState.onSelectionRenamedObservable.add((function(){e.forceUpdate()}))},t.prototype.componentWillUnmount=function(){this._onSelectionChangeObserver&&this.props.globalState.onSelectionChangedObservable.remove(this._onSelectionChangeObserver),this._onSelectionRenamedObserver&&this.props.globalState.onSelectionRenamedObservable.remove(this._onSelectionRenamedObserver),this._onNewSceneAddedObserver&&u.EngineStore.LastCreatedEngine.onNewSceneAddedObservable.remove(this._onNewSceneAddedObserver),this._onNewSceneObserver&&this.props.globalState.onNewSceneObservable.remove(this._onNewSceneObserver);var e=this.state.scene;e.onNewSkeletonAddedObservable.removeCallback(this.sceneMutationFunc),e.onNewCameraAddedObservable.removeCallback(this.sceneMutationFunc),e.onNewLightAddedObservable.removeCallback(this.sceneMutationFunc),e.onNewMaterialAddedObservable.removeCallback(this.sceneMutationFunc),e.onNewMeshAddedObservable.removeCallback(this.sceneMutationFunc),e.onNewTextureAddedObservable.removeCallback(this.sceneMutationFunc),e.onNewTransformNodeAddedObservable.removeCallback(this.sceneMutationFunc),e.onSkeletonRemovedObservable.removeCallback(this.sceneMutationFunc),e.onMeshRemovedObservable.removeCallback(this.sceneMutationFunc),e.onCameraRemovedObservable.removeCallback(this.sceneMutationFunc),e.onLightRemovedObservable.removeCallback(this.sceneMutationFunc),e.onMaterialRemovedObservable.removeCallback(this.sceneMutationFunc),e.onTransformNodeRemovedObservable.removeCallback(this.sceneMutationFunc),e.onTextureRemovedObservable.removeCallback(this.sceneMutationFunc)},t.prototype.filterContent=function(e){this.setState({filter:e})},t.prototype.findSiblings=function(e,t,n,r,a){if(!t)return!1;var o=so.SortAndFilter(e,t);if(!t||0===o.length)return!1;for(var i=0,s=o;i<s.length;i++){var l=s[i];if(l===n){if(a.found=!0,!r)return a.previousOne&&this.props.globalState.onSelectionChangedObservable.notifyObservers(a.previousOne),!0}else{if(a.found)return this.props.globalState.onSelectionChangedObservable.notifyObservers(l),!0;a.previousOne=l}if(l.getChildren&&l.reservedDataStore&&l.reservedDataStore.isExpanded&&this.findSiblings(l,l.getChildren(),n,r,a))return!0}return!1},t.prototype.processKeys=function(e){if(this.state.selectedEntity){var t=this.state.scene,n=!1,r=!1;if(38===e.keyCode)n=!0;else if(40===e.keyCode)r=!0,n=!0;else{var a;if(13===e.keyCode||39===e.keyCode)return(a=this.state.selectedEntity.reservedDataStore)&&a.setExpandedState&&a.setExpandedState(!0),void e.preventDefault();if(37===e.keyCode)return(a=this.state.selectedEntity.reservedDataStore)&&a.setExpandedState&&a.setExpandedState(!1),void e.preventDefault();46===e.keyCode&&this.state.selectedEntity.dispose()}if(n){e.preventDefault();var o={};this.findSiblings(null,t.rootNodes,this.state.selectedEntity,r,o)||this.findSiblings(null,t.materials,this.state.selectedEntity,r,o)||this.findSiblings(null,t.textures,this.state.selectedEntity,r,o)}}},t.prototype.renderContent=function(){var e=this,t=this.state.scene;if(!t)return this._onNewSceneAddedObserver=u.EngineStore.LastCreatedEngine.onNewSceneAddedObservable.addOnce((function(t){return e.setState({scene:t})})),null;this._hooked||(this._hooked=!0,t.onNewSkeletonAddedObservable.add(this.sceneMutationFunc),t.onNewCameraAddedObservable.add(this.sceneMutationFunc),t.onNewLightAddedObservable.add(this.sceneMutationFunc),t.onNewMaterialAddedObservable.add(this.sceneMutationFunc),t.onNewMeshAddedObservable.add(this.sceneMutationFunc),t.onNewTextureAddedObservable.add(this.sceneMutationFunc),t.onNewTransformNodeAddedObservable.add(this.sceneMutationFunc),t.onSkeletonRemovedObservable.add(this.sceneMutationFunc),t.onMeshRemovedObservable.add(this.sceneMutationFunc),t.onCameraRemovedObservable.add(this.sceneMutationFunc),t.onLightRemovedObservable.add(this.sceneMutationFunc),t.onMaterialRemovedObservable.add(this.sceneMutationFunc),t.onTransformNodeRemovedObservable.add(this.sceneMutationFunc),t.onTextureRemovedObservable.add(this.sceneMutationFunc));var n=t.textures.filter((function(e){return"AdvancedDynamicTexture"===e.getClassName()})),r=t.textures.filter((function(e){return"AdvancedDynamicTexture"!==e.getClassName()})),a=t.postProcesses,o=t.postProcessRenderPipelineManager.supportedPipelines,i=[];t.activeCamera&&(o.some((function(e){return"DefaultRenderingPipeline"===e.getClassName()}))||i.push({label:"Add new Default Rendering Pipeline",action:function(){var n=new u.DefaultRenderingPipeline("Default rendering pipeline",!0,t,t.cameras);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}),o.some((function(e){return"SSAORenderingPipeline"===e.getClassName()}))||i.push({label:"Add new SSAO Rendering Pipeline",action:function(){var n=new u.SSAORenderingPipeline("SSAO rendering pipeline",t,1,t.cameras);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}),t.getEngine().getCaps().drawBuffersExtension&&!o.some((function(e){return"SSAORenderingPipeline"===e.getClassName()}))&&i.push({label:"Add new SSAO2 Rendering Pipeline",action:function(){var n=new u.SSAO2RenderingPipeline("SSAO2 rendering pipeline",t,1,t.cameras);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}));var s=[];s.push({label:"Add new point light",action:function(){var n=new u.PointLight("point light",u.Vector3.Zero(),t);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}),s.push({label:"Add new directional light",action:function(){var n=new u.DirectionalLight("directional light",new u.Vector3(-1,-1,-.5),t);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}),s.push({label:"Add new free camera",action:function(){var n=new u.FreeCamera("free camera",t.activeCamera?t.activeCamera.globalPosition:new u.Vector3(0,0,-5),t);t.activeCamera&&(n.minZ=t.activeCamera.minZ,n.maxZ=t.activeCamera.maxZ,t.activeCamera.getTarget&&n.setTarget(t.activeCamera.getTarget())),e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}});var p=function(e){for(var n=1;t.getMaterialById(e);)e=e+" "+n++;return e},c=[];c.push({label:"Add new standard material",action:function(){var n=new u.StandardMaterial(p("Standard material"),t);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}),c.push({label:"Add new PBR material",action:function(){var n=new u.PBRMaterial(p("PBR material"),t);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}),c.push({label:"Add new node material",action:function(){var n=new u.NodeMaterial(p("node material"),t);n.setToDefault(),n.build(),e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}});var d=[];d.push.apply(d,t.materials),t.multiMaterials&&t.multiMaterials.length&&d.push.apply(d,t.multiMaterials);var h=[];h.push({label:"Add new sprite manager",action:function(){var n=new u.SpriteManager("Default sprite manager","//playground.babylonjs.com/textures/player.png",500,64,t);e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}});var m=[];m.push({label:"Add new CPU particle system",action:function(){var n=u.ParticleHelper.CreateDefault(u.Vector3.Zero(),1e4,t);n.name="CPU particle system",n.start(),e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}}),u.GPUParticleSystem.IsSupported&&m.push({label:"Add new GPU particle system",action:function(){var n=u.ParticleHelper.CreateDefault(u.Vector3.Zero(),1e4,t,!0);n.name="GPU particle system",n.start(),e.props.globalState.onSelectionChangedObservable.notifyObservers(n)}});for(var b=t.rootNodes.slice(0),g=0,f=t.meshes;g<f.length;g++){var v=f[g];v.parent&&"Bone"===v.parent.getClassName()&&b.push(v)}return l.createElement("div",{id:"tree",onContextMenu:function(e){return e.preventDefault()}},l.createElement(si,{onFilter:function(t){return e.filterContent(t)}}),l.createElement(ii,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,scene:t,onRefresh:function(){return e.forceUpdate()},onSelectionChangedObservable:this.props.globalState.onSelectionChangedObservable}),l.createElement(ai,{globalState:this.props.globalState,contextMenuItems:s,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:b,label:"Nodes",offset:1,filter:this.state.filter}),t.skeletons.length>0&&l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:t.skeletons,label:"Skeletons",offset:1,filter:this.state.filter}),l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:d,contextMenuItems:c,label:"Materials",offset:1,filter:this.state.filter}),l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:r,label:"Textures",offset:1,filter:this.state.filter}),a.length>0&&l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:a,label:"Post-processes",offset:1,filter:this.state.filter}),l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,contextMenuItems:i,selectedEntity:this.state.selectedEntity,items:o,label:"Rendering pipelines",offset:1,filter:this.state.filter}),t.effectLayers&&t.effectLayers.length>0&&l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:t.effectLayers,label:"Effect layers",offset:1,filter:this.state.filter}),l.createElement(ai,{globalState:this.props.globalState,contextMenuItems:m,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:t.particleSystems,label:"Particle systems",offset:1,filter:this.state.filter}),l.createElement(ai,{globalState:this.props.globalState,contextMenuItems:h,forceSubitems:!0,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:t.spriteManagers,label:"Sprite managers",offset:1,filter:this.state.filter}),n&&n.length>0&&l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:n,label:"GUI",offset:1,filter:this.state.filter}),t.animationGroups.length>0&&l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:t.animationGroups,label:"Animation groups",offset:1,filter:this.state.filter}),t.mainSoundTrack&&t.mainSoundTrack.soundCollection.length>0&&l.createElement(ai,{globalState:this.props.globalState,extensibilityGroups:this.props.extensibilityGroups,selectedEntity:this.state.selectedEntity,items:t.mainSoundTrack.soundCollection,label:"Sounds",offset:1,filter:this.state.filter}))},t.prototype.onClose=function(){this.props.onClose&&this.props.onClose()},t.prototype.onPopup=function(){this.props.onPopup&&this.props.onPopup()},t.prototype.render=function(){var e=this;return this.props.popupMode?l.createElement("div",{id:"sceneExplorer",tabIndex:0,onKeyDown:function(t){return e.processKeys(t)}},!this.props.noHeader&&l.createElement(Sa,{title:"SCENE EXPLORER",noClose:this.props.noClose,noExpand:this.props.noExpand,noCommands:this.props.noCommands,onClose:function(){return e.onClose()},onPopup:function(){return e.onPopup()}}),this.renderContent()):(this._once&&(this._once=!1,setTimeout((function(){var e=document.getElementById("sceneExplorer");e&&(e.style.width="300px")}),150)),l.createElement(Be.a,{tabIndex:-1,id:"sceneExplorer",ref:this.sceneExplorerRef,size:{height:"100%"},minWidth:300,maxWidth:600,minHeight:"100%",enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onKeyDown:function(t){return e.processKeys(t)}},!this.props.noHeader&&l.createElement(Sa,{title:"SCENE EXPLORER",noClose:this.props.noClose,noExpand:this.props.noExpand,noCommands:this.props.noCommands,onClose:function(){return e.onClose()},onPopup:function(){return e.onPopup()}}),this.renderContent()))},t}(l.Component),pi=n(109).default;n(110);var ci=function(e){function t(t){var n=e.call(this,t)||this;return n._once=!0,n.splitRef=l.createRef(),n.topPartRef=l.createRef(),n.bottomPartRef=l.createRef(),n}return a(t,e),t.prototype.componentDidMount=function(){this.splitRef.current&&pi([this.topPartRef.current,this.bottomPartRef.current],{direction:"vertical",minSize:[200,200],gutterSize:4})},t.prototype.renderContent=function(){return this.props.popupMode?l.createElement("div",{id:"split",className:"splitPopup"},l.createElement("div",{id:"topPart"},l.createElement(li,{scene:this.props.scene,extensibilityGroups:this.props.extensibilityGroups,popupMode:!0,globalState:this.props.globalState,noHeader:!0})),l.createElement("div",{id:"separator"}),l.createElement("div",{id:"bottomPart",style:{marginTop:"4px",overflow:"hidden"}},l.createElement(Ra,{scene:this.props.scene,popupMode:!0,globalState:this.props.globalState,noHeader:!0,initialTab:this.props.initialTab}))):l.createElement("div",{ref:this.splitRef,id:"split",className:"noPopup"},l.createElement("div",{id:"topPart",ref:this.topPartRef},l.createElement(li,{scene:this.props.scene,extensibilityGroups:this.props.extensibilityGroups,globalState:this.props.globalState,popupMode:!0,noHeader:!0})),l.createElement("div",{id:"bottomPart",ref:this.bottomPartRef,style:{marginTop:"4px",overflow:"hidden"}},l.createElement(Ra,{scene:this.props.scene,globalState:this.props.globalState,popupMode:!0,noHeader:!0,initialTab:this.props.initialTab})))},t.prototype.render=function(){var e=this;return this.props.popupMode?l.createElement("div",{id:"embed"},l.createElement(Sa,{title:"INSPECTOR",noClose:this.props.noClose,noExpand:this.props.noExpand,handleBack:!0,onClose:function(){return e.props.onClose()},onPopup:function(){return e.props.onPopup()},onSelectionChangedObservable:this.props.globalState.onSelectionChangedObservable}),this.renderContent()):(this._once&&(this._once=!1,setTimeout((function(){var e=document.getElementById("embed");e&&(e.style.width="300px")}),150)),l.createElement(Be.a,{id:"embed",minWidth:300,maxWidth:600,size:{height:"100%"},minHeight:"100%",enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}},l.createElement(Sa,{title:"INSPECTOR",noClose:this.props.noClose,noExpand:this.props.noExpand,handleBack:!0,onClose:function(){return e.props.onClose()},onPopup:function(){return e.props.onPopup()},onSelectionChangedObservable:this.props.globalState.onSelectionChangedObservable}),this.renderContent()))},t}(l.Component),ui=function(){function e(){this._sceneRecorder=new u.SceneRecorder,this._isRecording=!1}return Object.defineProperty(e.prototype,"isRecording",{get:function(){return this._isRecording},enumerable:!1,configurable:!0}),e.prototype.cancel=function(){this._isRecording=!1},e.prototype.trackScene=function(e){this._sceneRecorder.track(e),this._isRecording=!0},e.prototype.applyDelta=function(e,t){u.SceneRecorder.ApplyDelta(e,t),this._isRecording=!1},e.prototype.export=function(){var e=JSON.stringify(this._sceneRecorder.getDelta());u.Tools.Download(new Blob([e]),"diff.json"),this._isRecording=!1},e}(),di=function(){function e(){this.onInspectorClosedObservable=new u.Observable,this.onTabChangedObservable=new u.Observable,this.onSelectionRenamedObservable=new u.Observable,this.onNewSceneObservable=new u.Observable,this.sceneImportDefaults={},this.validationResults=null,this.onValidationResultsUpdatedObservable=new u.Observable,this.glTFLoaderExtensionDefaults={MSFT_lod:{enabled:!0,maxLODsToLoad:10},MSFT_minecraftMesh:{enabled:!0},MSFT_sRGBFactors:{enabled:!0},MSFT_audio_emitter:{enabled:!0},KHR_xmp_json_ld:{enabled:!0},KHR_draco_mesh_compression:{enabled:!0},KHR_mesh_quantization:{enabled:!0},KHR_materials_pbrSpecularGlossiness:{enabled:!0},KHR_materials_clearcoat:{enabled:!0},KHR_materials_emissive_strength:{enabled:!0},KHR_materials_ior:{enabled:!0},KHR_materials_sheen:{enabled:!0},KHR_materials_specular:{enabled:!0},KHR_materials_unlit:{enabled:!0},KHR_materials_variants:{enabled:!0},KHR_materials_transmission:{enabled:!0},KHR_materials_translucency:{enabled:!0},KHR_materials_volume:{enabled:!0},KHR_lights_punctual:{enabled:!0},KHR_texture_basisu:{enabled:!0},KHR_texture_transform:{enabled:!0},EXT_lights_image_based:{enabled:!0},EXT_mesh_gpu_instancing:{enabled:!0},EXT_texture_webp:{enabled:!0}},this.glTFLoaderDefaults={animationStartMode:void 0!==wa.GLTFLoaderAnimationStartMode?wa.GLTFLoaderAnimationStartMode.FIRST:1,capturePerformanceCounters:!1,compileMaterials:!1,compileShadowGenerators:!1,coordinateSystemMode:void 0!==wa.GLTFLoaderCoordinateSystemMode?wa.GLTFLoaderCoordinateSystemMode.AUTO:0,loggingEnabled:!1,transparencyAsCoverage:!1,useClipPlane:!1},this.glTFLoaderExtensions={},this.blockMutationUpdates=!1,this.selectedLineContainerTitles=[],this.selectedLineContainerTitlesNoFocus=[],this.recorder=new ui,this._onlyUseEulers=null,this._ignoreBackfacesForPicking=null,this.lightGizmos=[],this.cameraGizmos=[],this.onSceneExplorerClosedObservable=new u.Observable,this.onActionTabsClosedObservable=new u.Observable}return Object.defineProperty(e.prototype,"onlyUseEulers",{get:function(){return null===this._onlyUseEulers&&(this._onlyUseEulers=u.DataStorage.ReadBoolean("settings_onlyUseEulers",!0)),this._onlyUseEulers},set:function(e){this._onlyUseEulers=e,u.DataStorage.WriteBoolean("settings_onlyUseEulers",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ignoreBackfacesForPicking",{get:function(){return null===this._ignoreBackfacesForPicking&&(this._ignoreBackfacesForPicking=u.DataStorage.ReadBoolean("settings_ignoreBackfacesForPicking",!1)),this._ignoreBackfacesForPicking},set:function(e){this._ignoreBackfacesForPicking=e,u.DataStorage.WriteBoolean("settings_ignoreBackfacesForPicking",e)},enumerable:!1,configurable:!0}),e.prototype.init=function(e){var t=this;this.onPropertyChangedObservable=e,this.onNewSceneObservable.add((function(e){t.recorder.cancel()}))},e.prototype.prepareGLTFPlugin=function(e){var t=this;this.glTFLoaderExtensions={};var n=this.glTFLoaderDefaults;if(void 0!==n)for(var r in n)e[r]=n[r];e.onExtensionLoadedObservable.add((function(e){var n=t.glTFLoaderExtensionDefaults[e.name];if(void 0!==n)for(var r in n)e[r]=n[r];t.glTFLoaderExtensions[e.name]=e})),e.onValidatedObservable.add((function(e){t.validationResults=e,t.onValidationResultsUpdatedObservable.notifyObservers(e),(e.issues.numErrors||e.issues.numWarnings)&&(t.selectedLineContainerTitlesNoFocus.push("GLTF VALIDATION"),t.onTabChangedObservable.notifyObservers(3))}))},e.prototype.resetGLTFValidationResults=function(){this.validationResults&&(this.validationResults=null,this.onValidationResultsUpdatedObservable.notifyObservers(null))},e.prototype.enableLightGizmo=function(e,t){void 0===t&&(t=!0),t?(e.reservedDataStore||(e.reservedDataStore={}),e.reservedDataStore.lightGizmo||(e.reservedDataStore.lightGizmo=new u.LightGizmo,this.lightGizmos.push(e.reservedDataStore.lightGizmo),e.reservedDataStore.lightGizmo.light=e,e.reservedDataStore.lightGizmo.material.reservedDataStore={hidden:!0})):e.reservedDataStore&&e.reservedDataStore.lightGizmo&&(this.lightGizmos.splice(this.lightGizmos.indexOf(e.reservedDataStore.lightGizmo),1),e.reservedDataStore.lightGizmo.dispose(),e.reservedDataStore.lightGizmo=null)},e.prototype.enableCameraGizmo=function(e,t){void 0===t&&(t=!0),t?(e.reservedDataStore||(e.reservedDataStore={}),e.reservedDataStore.cameraGizmo||(e.reservedDataStore.cameraGizmo=new u.CameraGizmo,this.cameraGizmos.push(e.reservedDataStore.cameraGizmo),e.reservedDataStore.cameraGizmo.camera=e,e.reservedDataStore.cameraGizmo.material.reservedDataStore={hidden:!0})):e.reservedDataStore&&e.reservedDataStore.cameraGizmo&&(this.cameraGizmos.splice(this.cameraGizmos.indexOf(e.reservedDataStore.cameraGizmo),1),e.reservedDataStore.cameraGizmo.dispose(),e.reservedDataStore.cameraGizmo=null)},e}(),hi=function(){function e(){}return e.MarkLineContainerTitleForHighlighting=function(e){this._GlobalState.selectedLineContainerTitles=[],this._GlobalState.selectedLineContainerTitles.push(e)},e.MarkMultipleLineContainerTitlesForHighlighting=function(e){var t;this._GlobalState.selectedLineContainerTitles=[],(t=this._GlobalState.selectedLineContainerTitles).push.apply(t,e)},e._CopyStyles=function(e,t){for(var n=0;n<e.styleSheets.length;n++){var r=e.styleSheets[n];try{if(r.cssRules){for(var a=e.createElement("style"),o=0,i=r.cssRules;o<i.length;o++){var s=i[o];a.appendChild(e.createTextNode(s.cssText))}t.head.appendChild(a)}else if(r.href){var l=e.createElement("link");l.rel="stylesheet",l.href=r.href,t.head.appendChild(l)}}catch(e){}}},e._CreateSceneExplorer=function(t,n,r){var a=this;if(n.original&&(n={original:!1,popup:n.popup,overlay:n.overlay,showExplorer:n.showExplorer,showInspector:n.showInspector,embedMode:n.embedMode,handleResize:n.handleResize,enablePopup:n.enablePopup,enableClose:n.enableClose,explorerExtensibility:n.explorerExtensibility}),r&&(this._SceneExplorerHost=r.ownerDocument.createElement("div"),this._SceneExplorerHost.id="scene-explorer-host",this._SceneExplorerHost.style.width=n.explorerWidth||"auto",n.popup?r.appendChild(this._SceneExplorerHost):r.insertBefore(this._SceneExplorerHost,this._NewCanvasContainer),n.overlay||(this._SceneExplorerHost.style.position="relative")),this._SceneExplorerHost){this._OpenedPane++;var o=l.createElement(li,{scene:t,globalState:this._GlobalState,extensibilityGroups:n.explorerExtensibility,noClose:!n.enableClose,noExpand:!n.enablePopup,popupMode:n.popup,onPopup:function(){c.unmountComponentAtNode(a._SceneExplorerHost),a._RemoveElementFromDOM(a._SceneExplorerHost),n.popup&&a._SceneExplorerWindow.close(),n.popup=!n.popup,n.showExplorer=!0,n.showInspector=!1,n.explorerWidth=n.popup?"100%":"300px",e.Show(t,n)},onClose:function(){c.unmountComponentAtNode(a._SceneExplorerHost),e._OpenedPane--,a._RemoveElementFromDOM(a._SceneExplorerHost),a._Cleanup(),n.popup&&a._SceneExplorerWindow.close(),a._GlobalState.onSceneExplorerClosedObservable.notifyObservers()}});c.render(o,this._SceneExplorerHost)}},e._CreateActionTabs=function(t,n,r){var a=this;if(n.original=!1,r){var o=r.ownerDocument.createElement("div");o.id="inspector-host",o.style.width=n.inspectorWidth||"auto",r.appendChild(o),this._ActionTabsHost=o,n.overlay||(this._ActionTabsHost.style.position="relative")}if(this._ActionTabsHost){this._OpenedPane++;var i=l.createElement(Ra,{globalState:this._GlobalState,scene:t,noClose:!n.enableClose,noExpand:!n.enablePopup,popupMode:n.popup,onPopup:function(){c.unmountComponentAtNode(a._ActionTabsHost),a._RemoveElementFromDOM(a._ActionTabsHost),n.popup&&a._ActionTabsWindow.close(),n.popup=!n.popup,n.showExplorer=!1,n.showInspector=!0,n.inspectorWidth=n.popup?"100%":"300px",e.Show(t,n)},onClose:function(){c.unmountComponentAtNode(a._ActionTabsHost),e._OpenedPane--,a._Cleanup(),a._RemoveElementFromDOM(a._ActionTabsHost),n.popup&&a._ActionTabsWindow.close(),a._GlobalState.onActionTabsClosedObservable.notifyObservers()},initialTab:n.initialTab});c.render(i,this._ActionTabsHost)}},e._CreateEmbedHost=function(t,n,r,a){var o=this;if(r){var i=r.ownerDocument.createElement("div");i.id="embed-host",i.style.width=n.embedHostWidth||"auto",r.appendChild(i),this._EmbedHost=i,n.overlay||(this._EmbedHost.style.position="relative")}if(this._EmbedHost){this._OpenedPane++;var s=l.createElement(ci,{globalState:this._GlobalState,scene:t,extensibilityGroups:n.explorerExtensibility,noExpand:!n.enablePopup,noClose:!n.enableClose,popupMode:n.popup,onPopup:function(){c.unmountComponentAtNode(o._EmbedHost),n.popup&&o._EmbedHostWindow.close(),o._RemoveElementFromDOM(o._EmbedHost),n.popup=!n.popup,n.embedMode=!0,n.showExplorer=!0,n.showInspector=!0,n.embedHostWidth=n.popup?"100%":"auto",e.Show(t,n)},onClose:function(){c.unmountComponentAtNode(o._EmbedHost),o._OpenedPane=0,o._Cleanup(),o._RemoveElementFromDOM(o._EmbedHost),n.popup&&o._EmbedHostWindow.close(),o._GlobalState.onSceneExplorerClosedObservable.notifyObservers(),o._GlobalState.onActionTabsClosedObservable.notifyObservers()},initialTab:n.initialTab});c.render(s,this._EmbedHost)}},e._CreatePopup=function(e,t,n,r,a){var o=this;void 0===n&&(n=300),void 0===r&&(r=800);var i={width:n,height:r,top:(window.innerHeight-n)/2+window.screenY,left:(window.innerWidth-r)/2+window.screenX},s=Object.keys(i).map((function(e){return e+"="+i[e]})).join(","),l=window.open("",e,s);if(!l)return null;var p=l.document,c=p.createElement("link");c.rel="stylesheet",c.href="https://use.typekit.net/cta4xsb.css",p.head.appendChild(c),p.title=e,p.body.style.width="100%",p.body.style.height="100%",p.body.style.margin="0",p.body.style.padding="0";var u=p.createElement("div");return u.style.width="100%",u.style.height="100%",u.style.margin="0",u.style.padding="0",l.document.body.appendChild(u),this._CopyStyles(window.document,p),a&&setTimeout((function(){o._CopyStyles(window.document,p)}),0),this[t]=l,u},Object.defineProperty(e,"IsVisible",{get:function(){return this._OpenedPane>0},enumerable:!1,configurable:!0}),e.EarlyAttachToLoader=function(){var e=this;this._GlobalState.onPluginActivatedObserver||(this._GlobalState.onPluginActivatedObserver=u.SceneLoader.OnPluginActivatedObservable.add((function(t){e._GlobalState.resetGLTFValidationResults();var n=t;"gltf"===n.name&&e._GlobalState.prepareGLTFPlugin(n)})))},e.Show=function(t,n){var r=this,a=o({original:!0,popup:!1,overlay:!1,showExplorer:!0,showInspector:!0,embedMode:!1,enableClose:!0,handleResize:!0,enablePopup:!0},n);this._GlobalState.onPropertyChangedObservable||this._GlobalState.init(this.OnPropertyChangedObservable),this._GlobalState.onSelectionChangedObservable||(this._GlobalState.onSelectionChangedObservable=this.OnSelectionChangeObservable),this.IsVisible&&a.original&&this.Hide(),t||(t=u.EngineStore.LastCreatedScene),this._Scene=t;var i=t?t.getEngine().getInputElement():u.EngineStore.LastCreatedEngine.getInputElement();if(a.embedMode&&a.showExplorer&&a.showInspector)if(a.popup)this._CreateEmbedHost(t,a,this._CreatePopup("INSPECTOR","_EmbedHostWindow"),e.OnSelectionChangeObservable),this._EmbedHostWindow.addEventListener("beforeunload",(function(){return r._GlobalState.onSceneExplorerClosedObservable.notifyObservers()})),this._EmbedHostWindow.addEventListener("beforeunload",(function(){return r._GlobalState.onActionTabsClosedObservable.notifyObservers()}));else{if(!i)return;var s=a.globalRoot?a.globalRoot:i.parentElement;a.overlay||this._NewCanvasContainer?!a.overlay&&this._NewCanvasContainer&&this._NewCanvasContainer.parentElement&&(s=this._NewCanvasContainer.parentElement):this._CreateCanvasContainer(s),this._NewCanvasContainer&&a.handleResize&&t&&(this._OnBeforeRenderObserver=t.onBeforeRenderObservable.add((function(){t.getEngine().resize()}))),this._CreateEmbedHost(t,a,s,e.OnSelectionChangeObservable)}else if(a.popup)a.showExplorer&&(this._SceneExplorerHost&&(this._SceneExplorerHost.style.width="0"),this._CreateSceneExplorer(t,a,this._CreatePopup("SCENE EXPLORER","_SceneExplorerWindow")),this._SceneExplorerWindow.addEventListener("beforeunload",(function(){return r._GlobalState.onSceneExplorerClosedObservable.notifyObservers()}))),a.showInspector&&(this._ActionTabsHost&&(this._ActionTabsHost.style.width="0"),this._CreateActionTabs(t,a,this._CreatePopup("INSPECTOR","_ActionTabsWindow")),this._ActionTabsWindow.addEventListener("beforeunload",(function(){return r._GlobalState.onActionTabsClosedObservable.notifyObservers()})));else{s=a.globalRoot?a.globalRoot:i.parentElement;a.overlay||this._NewCanvasContainer?!a.overlay&&this._NewCanvasContainer&&this._NewCanvasContainer.parentElement&&(s=this._NewCanvasContainer.parentElement):this._CreateCanvasContainer(s),this._NewCanvasContainer&&a.handleResize&&t&&(this._OnBeforeRenderObserver=t.onBeforeRenderObservable.add((function(){t.getEngine().resize()}))),a.showExplorer&&this._CreateSceneExplorer(t,a,s),a.showInspector&&this._CreateActionTabs(t,a,s)}},e._SetNewScene=function(e){this._Scene=e,this._GlobalState.onNewSceneObservable.notifyObservers(e)},e._CreateCanvasContainer=function(e){for(this._NewCanvasContainer=e.ownerDocument.createElement("div"),this._NewCanvasContainer.style.display=e.style.display,e.style.display="flex";e.childElementCount>0;){var t=e.childNodes[0];e.removeChild(t),this._NewCanvasContainer.appendChild(t)}e.appendChild(this._NewCanvasContainer),this._NewCanvasContainer.style.width="100%",this._NewCanvasContainer.style.height="100%"},e._DestroyCanvasContainer=function(){if(this._NewCanvasContainer){for(var e=this._NewCanvasContainer.parentElement;this._NewCanvasContainer.childElementCount>0;){var t=this._NewCanvasContainer.childNodes[0];this._NewCanvasContainer.removeChild(t),e.appendChild(t)}e.removeChild(this._NewCanvasContainer),e.style.display=this._NewCanvasContainer.style.display,this._NewCanvasContainer=null}},e._Cleanup=function(){var t=this;0===e._OpenedPane&&(this._GlobalState.lightGizmos.forEach((function(e){e.light&&t._GlobalState.enableLightGizmo(e.light,!1)})),this._GlobalState.cameraGizmos.forEach((function(e){e.camera&&t._GlobalState.enableCameraGizmo(e.camera,!1)})),this._Scene&&this._Scene.reservedDataStore&&this._Scene.reservedDataStore.gizmoManager&&(this._Scene.reservedDataStore.gizmoManager.dispose(),this._Scene.reservedDataStore.gizmoManager=null),this._NewCanvasContainer&&this._DestroyCanvasContainer(),this._OnBeforeRenderObserver&&this._Scene&&(this._Scene.onBeforeRenderObservable.remove(this._OnBeforeRenderObserver),this._OnBeforeRenderObserver=null,this._Scene.getEngine().resize()),this._GlobalState.onInspectorClosedObservable.notifyObservers(this._Scene))},e._RemoveElementFromDOM=function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},e.Hide=function(){this._ActionTabsHost&&(c.unmountComponentAtNode(this._ActionTabsHost),this._RemoveElementFromDOM(this._ActionTabsHost),this._ActionTabsHost=null,this._GlobalState.onActionTabsClosedObservable.notifyObservers()),this._SceneExplorerHost&&(c.unmountComponentAtNode(this._SceneExplorerHost),this._SceneExplorerHost.parentElement&&this._SceneExplorerHost.parentElement.removeChild(this._SceneExplorerHost),this._SceneExplorerHost=null,this._GlobalState.onSceneExplorerClosedObservable.notifyObservers()),this._EmbedHost&&(c.unmountComponentAtNode(this._EmbedHost),this._EmbedHost.parentElement&&this._EmbedHost.parentElement.removeChild(this._EmbedHost),this._EmbedHost=null,this._GlobalState.onActionTabsClosedObservable.notifyObservers(),this._GlobalState.onSceneExplorerClosedObservable.notifyObservers()),e._OpenedPane=0,this._Cleanup(),this._GlobalState.onPluginActivatedObserver||(u.SceneLoader.OnPluginActivatedObservable.remove(this._GlobalState.onPluginActivatedObserver),this._GlobalState.onPluginActivatedObserver=null)},e._CreatePersistentPopup=function(e,t){var n=this;this._PersistentPopupHost&&this._ClosePersistentPopup(),this._PersistentPopupHost=t.ownerDocument.createElement("div");var r=l.createElement(tt,e.props,e.children);c.render(r,this._PersistentPopupHost),e.closeWhenSceneExplorerCloses&&(this._OnSceneExplorerClosedObserver=this._GlobalState.onSceneExplorerClosedObservable.add((function(){return n._ClosePersistentPopup()}))),e.closeWhenActionTabsCloses&&(this._OnActionTabsClosedObserver=this._GlobalState.onActionTabsClosedObservable.add((function(){return n._ClosePersistentPopup()})))},e._ClosePersistentPopup=function(){this._PersistentPopupHost&&(c.unmountComponentAtNode(this._PersistentPopupHost),this._PersistentPopupHost.remove(),this._PersistentPopupHost=null),this._OnSceneExplorerClosedObserver&&(this._GlobalState.onSceneExplorerClosedObservable.remove(this._OnSceneExplorerClosedObserver),this._OnSceneExplorerClosedObserver=null),this._OnActionTabsClosedObserver&&(this._GlobalState.onActionTabsClosedObservable.remove(this._OnActionTabsClosedObserver),this._OnActionTabsClosedObserver=null)},e._OpenedPane=0,e.OnSelectionChangeObservable=new u.Observable,e.OnPropertyChangedObservable=new u.Observable,e._GlobalState=new di,e}();hi.EarlyAttachToLoader()},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Crect width='10' height='10' style='fill:none'/%3E%3Crect x='2.17' y='2.17' width='5.66' height='5.66' rx='1' transform='translate(-2.07 5) rotate(-45)' style='fill:%23ffc017'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3Ecopy%3C/title%3E%3Cg id='UI_Elements' data-name='UI Elements'%3E%3Cpath class='cls-1' d='M24,14.89H22.76l-3-3H12.43V26.59h4.26v3h11.5V19Zm.3,1.71,2.14,2.13H24.34Zm-10.91,9V12.93h5.93l2,2H16.69v10.7Zm4.26,3V15.89h5.65v3.84h3.85v8.83Z'/%3E%3C/g%3E%3C/svg%3E"},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t,n){"use strict";n.r(t),function(e){var r=n(13);n.d(t,"Inspector",(function(){return r.a}));var a=void 0!==e?e:"undefined"!=typeof window?window:void 0;void 0!==a&&(a.BABYLON=a.BABYLON||{},a.BABYLON.Inspector=r.a)}.call(this,n(12))},function(e,t,n){"use strict";
/** @license React v16.13.1
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=n(4),a="function"==typeof Symbol&&Symbol.for,o=a?Symbol.for("react.element"):60103,i=a?Symbol.for("react.portal"):60106,s=a?Symbol.for("react.fragment"):60107,l=a?Symbol.for("react.strict_mode"):60108,p=a?Symbol.for("react.profiler"):60114,c=a?Symbol.for("react.provider"):60109,u=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.forward_ref"):60112,h=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.memo"):60115,b=a?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function C(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||v}function E(){}function x(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||v}C.prototype.isReactComponent={},C.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},C.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},E.prototype=C.prototype;var O=x.prototype=new E;O.constructor=x,r(O,C.prototype),O.isPureReactComponent=!0;var S={current:null},_=Object.prototype.hasOwnProperty,w={key:!0,ref:!0,__self:!0,__source:!0};function P(e,t,n){var r,a={},i=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)_.call(t,r)&&!w.hasOwnProperty(r)&&(a[r]=t[r]);var l=arguments.length-2;if(1===l)a.children=n;else if(1<l){for(var p=Array(l),c=0;c<l;c++)p[c]=arguments[c+2];a.children=p}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===a[r]&&(a[r]=l[r]);return{$$typeof:o,type:e,key:i,ref:s,props:a,_owner:S.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var k=/\/+/g,N=[];function M(e,t,n,r){if(N.length){var a=N.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>N.length&&N.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case i:l=!0}}if(l)return r(a,t,""===n?"."+R(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var p=0;p<t.length;p++){var c=n+R(s=t[p],p);l+=e(s,c,r,a)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=g&&t[g]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),p=0;!(s=t.next()).done;)l+=e(s=s.value,c=n+R(s,p++),r,a);else if("object"===s)throw r=""+t,Error(f(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return l}(e,"",t,n)}function R(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function I(e,t){e.func.call(e.context,t,e.count++)}function D(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?j(e,r,n,(function(e){return e})):null!=e&&(T(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(k,"$&/")+"/")+n)),r.push(e))}function j(e,t,n,r,a){var o="";null!=n&&(o=(""+n).replace(k,"$&/")+"/"),L(e,D,t=M(t,o,r,a)),A(t)}var z={current:null};function F(){var e=z.current;if(null===e)throw Error(f(321));return e}var V={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return j(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;L(e,I,t=M(null,null,t,n)),A(t)},count:function(e){return L(e,(function(){return null}),null)},toArray:function(e){var t=[];return j(e,t,null,(function(e){return e})),t},only:function(e){if(!T(e))throw Error(f(143));return e}},t.Component=C,t.Fragment=s,t.Profiler=p,t.PureComponent=x,t.StrictMode=l,t.Suspense=h,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,t.cloneElement=function(e,t,n){if(null==e)throw Error(f(267,e));var a=r({},e.props),i=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=S.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var p=e.type.defaultProps;for(c in t)_.call(t,c)&&!w.hasOwnProperty(c)&&(a[c]=void 0===t[c]&&void 0!==p?p[c]:t[c])}var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){p=Array(c);for(var u=0;u<c;u++)p[u]=arguments[u+2];a.children=p}return{$$typeof:o,type:e.type,key:i,ref:s,props:a,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:u,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=P,t.createFactory=function(e){var t=P.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:b,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";
/** @license React v16.13.1
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=n(0),a=n(4),o=n(21);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(i(227));function s(e,t,n,r,a,o,i,s,l){var p=Array.prototype.slice.call(arguments,3);try{t.apply(n,p)}catch(e){this.onError(e)}}var l=!1,p=null,c=!1,u=null,d={onError:function(e){l=!0,p=e}};function h(e,t,n,r,a,o,i,c,u){l=!1,p=null,s.apply(d,arguments)}var m=null,b=null,g=null;function f(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,a,o,s,d,m){if(h.apply(this,arguments),l){if(!l)throw Error(i(198));var b=p;l=!1,p=null,c||(c=!0,u=b)}}(r,t,void 0,e),e.currentTarget=null}var v=null,y={};function C(){if(v)for(var e in y){var t=y[e],n=v.indexOf(e);if(!(-1<n))throw Error(i(96,e));if(!x[n]){if(!t.extractEvents)throw Error(i(97,e));for(var r in x[n]=t,n=t.eventTypes){var a=void 0,o=n[r],s=t,l=r;if(O.hasOwnProperty(l))throw Error(i(99,l));O[l]=o;var p=o.phasedRegistrationNames;if(p){for(a in p)p.hasOwnProperty(a)&&E(p[a],s,l);a=!0}else o.registrationName?(E(o.registrationName,s,l),a=!0):a=!1;if(!a)throw Error(i(98,r,e))}}}}function E(e,t,n){if(S[e])throw Error(i(100,e));S[e]=t,_[e]=t.eventTypes[n].dependencies}var x=[],O={},S={},_={};function w(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!y.hasOwnProperty(t)||y[t]!==r){if(y[t])throw Error(i(102,t));y[t]=r,n=!0}}n&&C()}var P=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),T=null,k=null,N=null;function M(e){if(e=b(e)){if("function"!=typeof T)throw Error(i(280));var t=e.stateNode;t&&(t=m(t),T(e.stateNode,e.type,t))}}function A(e){k?N?N.push(e):N=[e]:k=e}function L(){if(k){var e=k,t=N;if(N=k=null,M(e),t)for(e=0;e<t.length;e++)M(t[e])}}function R(e,t){return e(t)}function I(e,t,n,r,a){return e(t,n,r,a)}function D(){}var j=R,z=!1,F=!1;function V(){null===k&&null===N||(D(),L())}function U(e,t,n){if(F)return e(t,n);F=!0;try{return j(e,t,n)}finally{F=!1,V()}}var G=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,B=Object.prototype.hasOwnProperty,H={},W={};function K(e,t,n,r,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Y[e]=new K(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Y[t]=new K(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Y[e]=new K(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Y[e]=new K(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Y[e]=new K(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Y[e]=new K(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){Y[e]=new K(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){Y[e]=new K(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){Y[e]=new K(e,5,!1,e.toLowerCase(),null,!1)}));var X=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(X,Z);Y[t]=new K(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(X,Z);Y[t]=new K(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(X,Z);Y[t]=new K(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){Y[e]=new K(e,1,!1,e.toLowerCase(),null,!1)})),Y.xlinkHref=new K("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){Y[e]=new K(e,1,!1,e.toLowerCase(),null,!0)}));var q=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q(e,t,n,r){var a=Y.hasOwnProperty(t)?Y[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!B.call(W,e)||!B.call(H,e)&&(G.test(e)?W[e]=!0:(H[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}q.hasOwnProperty("ReactCurrentDispatcher")||(q.ReactCurrentDispatcher={current:null}),q.hasOwnProperty("ReactCurrentBatchConfig")||(q.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,$="function"==typeof Symbol&&Symbol.for,ee=$?Symbol.for("react.element"):60103,te=$?Symbol.for("react.portal"):60106,ne=$?Symbol.for("react.fragment"):60107,re=$?Symbol.for("react.strict_mode"):60108,ae=$?Symbol.for("react.profiler"):60114,oe=$?Symbol.for("react.provider"):60109,ie=$?Symbol.for("react.context"):60110,se=$?Symbol.for("react.concurrent_mode"):60111,le=$?Symbol.for("react.forward_ref"):60112,pe=$?Symbol.for("react.suspense"):60113,ce=$?Symbol.for("react.suspense_list"):60120,ue=$?Symbol.for("react.memo"):60115,de=$?Symbol.for("react.lazy"):60116,he=$?Symbol.for("react.block"):60121,me="function"==typeof Symbol&&Symbol.iterator;function be(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=me&&e[me]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ae:return"Profiler";case re:return"StrictMode";case pe:return"Suspense";case ce:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ie:return"Context.Consumer";case oe:return"Context.Provider";case le:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case ue:return ge(e.type);case he:return ge(e.render);case de:if(e=1===e._status?e._result:null)return ge(e)}return null}function fe(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,a=e._debugSource,o=ge(e.type);n=null,r&&(n=ge(r.type)),r=o,o="",a?o=" (at "+a.fileName.replace(J,"")+":"+a.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}function ve(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function ye(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ce(e){e._valueTracker||(e._valueTracker=function(e){var t=ye(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ye(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function xe(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Oe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ve(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&Q(e,"checked",t,!1)}function _e(e,t){Se(e,t);var n=ve(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Pe(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pe(e,t.type,ve(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function we(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Pe(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Te(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ke(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ve(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function Ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Me(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ve(n)}}function Ae(e,t){var n=ve(t.value),r=ve(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Re="http://www.w3.org/1999/xhtml",Ie="http://www.w3.org/2000/svg";function De(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function je(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?De(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ze,Fe=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Ie||"innerHTML"in e)e.innerHTML=t;else{for((ze=ze||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ze.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ue(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ge={animationend:Ue("Animation","AnimationEnd"),animationiteration:Ue("Animation","AnimationIteration"),animationstart:Ue("Animation","AnimationStart"),transitionend:Ue("Transition","TransitionEnd")},Be={},He={};function We(e){if(Be[e])return Be[e];if(!Ge[e])return e;var t,n=Ge[e];for(t in n)if(n.hasOwnProperty(t)&&t in He)return Be[e]=n[t];return e}P&&(He=document.createElement("div").style,"AnimationEvent"in window||(delete Ge.animationend.animation,delete Ge.animationiteration.animation,delete Ge.animationstart.animation),"TransitionEvent"in window||delete Ge.transitionend.transition);var Ke=We("animationend"),Ye=We("animationiteration"),Xe=We("animationstart"),Ze=We("transitionend"),qe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Qe=new("function"==typeof WeakMap?WeakMap:Map);function Je(e){var t=Qe.get(e);return void 0===t&&(t=new Map,Qe.set(e,t)),t}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if($e(e)!==e)throw Error(i(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var o=a.alternate;if(null===o){if(null!==(r=a.return)){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return tt(a),e;if(o===r)return tt(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var s=!1,l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(i(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function at(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function it(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)f(e,t[r],n[r]);else t&&f(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function st(e){if(null!==e&&(ot=rt(ot,e)),e=ot,ot=null,e){if(at(e,it),ot)throw Error(i(95));if(c)throw e=u,c=!1,u=null,e}}function lt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function pt(e){if(!P)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function ut(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function dt(e,t,n,r){if(ct.length){var a=ct.pop();return a.topLevelType=e,a.eventSystemFlags=r,a.nativeEvent=t,a.targetInst=n,a}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function ht(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Pn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var a=lt(e.nativeEvent);r=e.topLevelType;var o=e.nativeEvent,i=e.eventSystemFlags;0===n&&(i|=64);for(var s=null,l=0;l<x.length;l++){var p=x[l];p&&(p=p.extractEvents(r,t,o,a,i))&&(s=rt(s,p))}st(s)}}function mt(e,t,n){if(!n.has(e)){switch(e){case"scroll":Xt(t,"scroll",!0);break;case"focus":case"blur":Xt(t,"focus",!0),Xt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":pt(e)&&Xt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===qe.indexOf(e)&&Yt(e,t)}n.set(e,null)}}var bt,gt,ft,vt=!1,yt=[],Ct=null,Et=null,xt=null,Ot=new Map,St=new Map,_t=[],wt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Pt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Tt(e,t,n,r,a){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:a,container:r}}function kt(e,t){switch(e){case"focus":case"blur":Ct=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":xt=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":St.delete(t.pointerId)}}function Nt(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e=Tt(t,n,r,a,o),null!==t&&(null!==(t=Tn(t))&&gt(t)),e):(e.eventSystemFlags|=r,e)}function Mt(e){var t=Pn(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){ft(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function At(e){if(null!==e.blockedOn)return!1;var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Tn(t);return null!==n&&gt(n),e.blockedOn=t,!1}return!0}function Lt(e,t,n){At(e)&&n.delete(t)}function Rt(){for(vt=!1;0<yt.length;){var e=yt[0];if(null!==e.blockedOn){null!==(e=Tn(e.blockedOn))&&bt(e);break}var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:yt.shift()}null!==Ct&&At(Ct)&&(Ct=null),null!==Et&&At(Et)&&(Et=null),null!==xt&&At(xt)&&(xt=null),Ot.forEach(Lt),St.forEach(Lt)}function It(e,t){e.blockedOn===t&&(e.blockedOn=null,vt||(vt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Rt)))}function Dt(e){function t(t){return It(t,e)}if(0<yt.length){It(yt[0],e);for(var n=1;n<yt.length;n++){var r=yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&It(Ct,e),null!==Et&&It(Et,e),null!==xt&&It(xt,e),Ot.forEach(t),St.forEach(t),n=0;n<_t.length;n++)(r=_t[n]).blockedOn===e&&(r.blockedOn=null);for(;0<_t.length&&null===(n=_t[0]).blockedOn;)Mt(n),null===n.blockedOn&&_t.shift()}var jt={},zt=new Map,Ft=new Map,Vt=["abort","abort",Ke,"animationEnd",Ye,"animationIteration",Xe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ze,"transitionEnd","waiting","waiting"];function Ut(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1],o="on"+(a[0].toUpperCase()+a.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:t},Ft.set(r,t),zt.set(r,o),jt[a]=o}}Ut("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ut("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ut(Vt,2);for(var Gt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Bt=0;Bt<Gt.length;Bt++)Ft.set(Gt[Bt],0);var Ht=o.unstable_UserBlockingPriority,Wt=o.unstable_runWithPriority,Kt=!0;function Yt(e,t){Xt(t,e,!1)}function Xt(e,t,n){var r=Ft.get(t);switch(void 0===r?2:r){case 0:r=Zt.bind(null,t,1,e);break;case 1:r=qt.bind(null,t,1,e);break;default:r=Qt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Zt(e,t,n,r){z||D();var a=Qt,o=z;z=!0;try{I(a,e,t,n,r)}finally{(z=o)||V()}}function qt(e,t,n,r){Wt(Ht,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){if(Kt)if(0<yt.length&&-1<wt.indexOf(e))e=Tt(null,e,t,n,r),yt.push(e);else{var a=Jt(e,t,n,r);if(null===a)kt(e,r);else if(-1<wt.indexOf(e))e=Tt(a,e,t,n,r),yt.push(e);else if(!function(e,t,n,r,a){switch(t){case"focus":return Ct=Nt(Ct,e,t,n,r,a),!0;case"dragenter":return Et=Nt(Et,e,t,n,r,a),!0;case"mouseover":return xt=Nt(xt,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return Ot.set(o,Nt(Ot.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,St.set(o,Nt(St.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r)){kt(e,r),e=dt(e,r,null,t);try{U(ht,e)}finally{ut(e)}}}}function Jt(e,t,n,r){if(null!==(n=Pn(n=lt(r)))){var a=$e(n);if(null===a)n=null;else{var o=a.tag;if(13===o){if(null!==(n=et(a)))return n;n=null}else if(3===o){if(a.stateNode.hydrate)return 3===a.tag?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}e=dt(e,r,n,t);try{U(ht,e)}finally{ut(e)}return null}var $t={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||$t.hasOwnProperty(e)&&$t[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys($t).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$t[t]=$t[e]}))}));var rn=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62,""))}}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=Re;function ln(e,t){var n=Je(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=_[t];for(var r=0;r<t.length;r++)mt(t[r],e,n)}function pn(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function un(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var n,r=un(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=un(r)}}function hn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var bn=null,gn=null;function fn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function vn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var yn="function"==typeof setTimeout?setTimeout:void 0,Cn="function"==typeof clearTimeout?clearTimeout:void 0;function En(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function xn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var On=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+On,_n="__reactEventHandlers$"+On,wn="__reactContainere$"+On;function Pn(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wn]||n[Sn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=xn(e);null!==e;){if(n=e[Sn])return n;e=xn(e)}return t}n=(e=n).parentNode}return null}function Tn(e){return!(e=e[Sn]||e[wn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function kn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function Nn(e){return e[_n]||null}function Mn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function An(e,t){var n=e.stateNode;if(!n)return null;var r=m(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(i(231,t,typeof n));return n}function Ln(e,t,n){(t=An(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Rn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Mn(t);for(t=n.length;0<t--;)Ln(n[t],"captured",e);for(t=0;t<n.length;t++)Ln(n[t],"bubbled",e)}}function In(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=An(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Dn(e){e&&e.dispatchConfig.registrationName&&In(e._targetInst,null,e)}function jn(e){at(e,Rn)}var zn=null,Fn=null,Vn=null;function Un(){if(Vn)return Vn;var e,t,n=Fn,r=n.length,a="value"in zn?zn.value:zn.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return Vn=a.slice(e,1<t?1-t:void 0)}function Gn(){return!0}function Bn(){return!1}function Hn(e,t,n,r){for(var a in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(a)&&((t=e[a])?this[a]=t(n):"target"===a?this.target=r:this[a]=n[a]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Gn:Bn,this.isPropagationStopped=Bn,this}function Wn(e,t,n,r){if(this.eventPool.length){var a=this.eventPool.pop();return this.call(a,e,t,n,r),a}return new this(e,t,n,r)}function Kn(e){if(!(e instanceof this))throw Error(i(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Yn(e){e.eventPool=[],e.getPooled=Wn,e.release=Kn}a(Hn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Gn)},persist:function(){this.isPersistent=Gn},isPersistent:Bn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Bn,this._dispatchInstances=this._dispatchListeners=null}}),Hn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Hn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return a(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=a({},r.Interface,e),n.extend=r.extend,Yn(n),n},Yn(Hn);var Xn=Hn.extend({data:null}),Zn=Hn.extend({data:null}),qn=[9,13,27,32],Qn=P&&"CompositionEvent"in window,Jn=null;P&&"documentMode"in document&&(Jn=document.documentMode);var $n=P&&"TextEvent"in window&&!Jn,er=P&&(!Qn||Jn&&8<Jn&&11>=Jn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function ar(e,t){switch(e){case"keyup":return-1!==qn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function or(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ir=!1;var sr={eventTypes:nr,extractEvents:function(e,t,n,r){var a;if(Qn)e:{switch(e){case"compositionstart":var o=nr.compositionStart;break e;case"compositionend":o=nr.compositionEnd;break e;case"compositionupdate":o=nr.compositionUpdate;break e}o=void 0}else ir?ar(e,n)&&(o=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=nr.compositionStart);return o?(er&&"ko"!==n.locale&&(ir||o!==nr.compositionStart?o===nr.compositionEnd&&ir&&(a=Un()):(Fn="value"in(zn=r)?zn.value:zn.textContent,ir=!0)),o=Xn.getPooled(o,t,n,r),a?o.data=a:null!==(a=or(n))&&(o.data=a),jn(o),a=o):a=null,(e=$n?function(e,t){switch(e){case"compositionend":return or(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ir)return"compositionend"===e||!Qn&&ar(e,t)?(e=Un(),Vn=Fn=zn=null,ir=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Zn.getPooled(nr.beforeInput,t,n,r)).data=e,jn(t)):t=null,null===a?t:null===t?a:[a,t]}},lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!lr[e.type]:"textarea"===t}var cr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function ur(e,t,n){return(e=Hn.getPooled(cr.change,e,t,n)).type="change",A(n),jn(e),e}var dr=null,hr=null;function mr(e){st(e)}function br(e){if(Ee(kn(e)))return e}function gr(e,t){if("change"===e)return t}var fr=!1;function vr(){dr&&(dr.detachEvent("onpropertychange",yr),hr=dr=null)}function yr(e){if("value"===e.propertyName&&br(hr))if(e=ur(hr,e,lt(e)),z)st(e);else{z=!0;try{R(mr,e)}finally{z=!1,V()}}}function Cr(e,t,n){"focus"===e?(vr(),hr=n,(dr=t).attachEvent("onpropertychange",yr)):"blur"===e&&vr()}function Er(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return br(hr)}function xr(e,t){if("click"===e)return br(t)}function Or(e,t){if("input"===e||"change"===e)return br(t)}P&&(fr=pt("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:cr,_isInputEventSupported:fr,extractEvents:function(e,t,n,r){var a=t?kn(t):window,o=a.nodeName&&a.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===a.type)var i=gr;else if(pr(a))if(fr)i=Or;else{i=Er;var s=Cr}else(o=a.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(i=xr);if(i&&(i=i(e,t)))return ur(i,n,r);s&&s(e,a,t),"blur"===e&&(e=a._wrapperState)&&e.controlled&&"number"===a.type&&Pe(a,"number",a.value)}},_r=Hn.extend({view:null,detail:null}),wr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wr[e])&&!!t[e]}function Tr(){return Pr}var kr=0,Nr=0,Mr=!1,Ar=!1,Lr=_r.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Tr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=kr;return kr=e.screenX,Mr?"mousemove"===e.type?e.screenX-t:0:(Mr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Nr;return Nr=e.screenY,Ar?"mousemove"===e.type?e.screenY-t:0:(Ar=!0,0)}}),Rr=Lr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Ir={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Dr={eventTypes:Ir,extractEvents:function(e,t,n,r,a){var o="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e;if(o&&0==(32&a)&&(n.relatedTarget||n.fromElement)||!i&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,i)?(i=t,null!==(t=(t=n.relatedTarget||n.toElement)?Pn(t):null)&&(t!==$e(t)||5!==t.tag&&6!==t.tag)&&(t=null)):i=null;if(i===t)return null;if("mouseout"===e||"mouseover"===e)var s=Lr,l=Ir.mouseLeave,p=Ir.mouseEnter,c="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Rr,l=Ir.pointerLeave,p=Ir.pointerEnter,c="pointer");if(e=null==i?o:kn(i),o=null==t?o:kn(t),(l=s.getPooled(l,i,n,r)).type=c+"leave",l.target=e,l.relatedTarget=o,(n=s.getPooled(p,t,n,r)).type=c+"enter",n.target=o,n.relatedTarget=e,c=t,(r=i)&&c)e:{for(p=c,i=0,e=s=r;e;e=Mn(e))i++;for(e=0,t=p;t;t=Mn(t))e++;for(;0<i-e;)s=Mn(s),i--;for(;0<e-i;)p=Mn(p),e--;for(;i--;){if(s===p||s===p.alternate)break e;s=Mn(s),p=Mn(p)}s=null}else s=null;for(p=s,s=[];r&&r!==p&&(null===(i=r.alternate)||i!==p);)s.push(r),r=Mn(r);for(r=[];c&&c!==p&&(null===(i=c.alternate)||i!==p);)r.push(c),c=Mn(c);for(c=0;c<s.length;c++)In(s[c],"bubbled",l);for(c=r.length;0<c--;)In(r[c],"captured",n);return 0==(64&a)?[l]:[l,n]}};var jr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},zr=Object.prototype.hasOwnProperty;function Fr(e,t){if(jr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!zr.call(t,n[r])||!jr(e[n[r]],t[n[r]]))return!1;return!0}var Vr=P&&"documentMode"in document&&11>=document.documentMode,Ur={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Gr=null,Br=null,Hr=null,Wr=!1;function Kr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Wr||null==Gr||Gr!==cn(n)?null:("selectionStart"in(n=Gr)&&mn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hr&&Fr(Hr,n)?null:(Hr=n,(e=Hn.getPooled(Ur.select,Br,e,t)).type="select",e.target=Gr,jn(e),e))}var Yr={eventTypes:Ur,extractEvents:function(e,t,n,r,a,o){if(!(o=!(a=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{a=Je(a),o=_.onSelect;for(var i=0;i<o.length;i++)if(!a.has(o[i])){a=!1;break e}a=!0}o=!a}if(o)return null;switch(a=t?kn(t):window,e){case"focus":(pr(a)||"true"===a.contentEditable)&&(Gr=a,Br=t,Hr=null);break;case"blur":Hr=Br=Gr=null;break;case"mousedown":Wr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Wr=!1,Kr(n,r);case"selectionchange":if(Vr)break;case"keydown":case"keyup":return Kr(n,r)}return null}},Xr=Hn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Zr=Hn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qr=_r.extend({relatedTarget:null});function Qr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ea=_r.extend({key:function(e){if(e.key){var t=Jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?$r[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Tr,charCode:function(e){return"keypress"===e.type?Qr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ta=Lr.extend({dataTransfer:null}),na=_r.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Tr}),ra=Hn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),aa=Lr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),oa={eventTypes:jt,extractEvents:function(e,t,n,r){var a=zt.get(e);if(!a)return null;switch(e){case"keypress":if(0===Qr(n))return null;case"keydown":case"keyup":e=ea;break;case"blur":case"focus":e=qr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Lr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ta;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=na;break;case Ke:case Ye:case Xe:e=Xr;break;case Ze:e=ra;break;case"scroll":e=_r;break;case"wheel":e=aa;break;case"copy":case"cut":case"paste":e=Zr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Rr;break;default:e=Hn}return jn(t=e.getPooled(a,t,n,r)),t}};if(v)throw Error(i(101));v=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),C(),m=Nn,b=Tn,g=kn,w({SimpleEventPlugin:oa,EnterLeaveEventPlugin:Dr,ChangeEventPlugin:Sr,SelectEventPlugin:Yr,BeforeInputEventPlugin:sr});var ia=[],sa=-1;function la(e){0>sa||(e.current=ia[sa],ia[sa]=null,sa--)}function pa(e,t){sa++,ia[sa]=e.current,e.current=t}var ca={},ua={current:ca},da={current:!1},ha=ca;function ma(e,t){var n=e.type.contextTypes;if(!n)return ca;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ba(e){return null!=(e=e.childContextTypes)}function ga(){la(da),la(ua)}function fa(e,t,n){if(ua.current!==ca)throw Error(i(168));pa(ua,t),pa(da,n)}function va(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(i(108,ge(t)||"Unknown",o));return a({},n,{},r)}function ya(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ca,ha=ua.current,pa(ua,e),pa(da,da.current),!0}function Ca(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=va(e,t,ha),r.__reactInternalMemoizedMergedChildContext=e,la(da),la(ua),pa(ua,e)):la(da),pa(da,n)}var Ea=o.unstable_runWithPriority,xa=o.unstable_scheduleCallback,Oa=o.unstable_cancelCallback,Sa=o.unstable_requestPaint,_a=o.unstable_now,wa=o.unstable_getCurrentPriorityLevel,Pa=o.unstable_ImmediatePriority,Ta=o.unstable_UserBlockingPriority,ka=o.unstable_NormalPriority,Na=o.unstable_LowPriority,Ma=o.unstable_IdlePriority,Aa={},La=o.unstable_shouldYield,Ra=void 0!==Sa?Sa:function(){},Ia=null,Da=null,ja=!1,za=_a(),Fa=1e4>za?_a:function(){return _a()-za};function Va(){switch(wa()){case Pa:return 99;case Ta:return 98;case ka:return 97;case Na:return 96;case Ma:return 95;default:throw Error(i(332))}}function Ua(e){switch(e){case 99:return Pa;case 98:return Ta;case 97:return ka;case 96:return Na;case 95:return Ma;default:throw Error(i(332))}}function Ga(e,t){return e=Ua(e),Ea(e,t)}function Ba(e,t,n){return e=Ua(e),xa(e,t,n)}function Ha(e){return null===Ia?(Ia=[e],Da=xa(Pa,Ka)):Ia.push(e),Aa}function Wa(){if(null!==Da){var e=Da;Da=null,Oa(e)}Ka()}function Ka(){if(!ja&&null!==Ia){ja=!0;var e=0;try{var t=Ia;Ga(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ia=null}catch(t){throw null!==Ia&&(Ia=Ia.slice(e+1)),xa(Pa,Wa),t}finally{ja=!1}}}function Ya(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Xa(e,t){if(e&&e.defaultProps)for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Za={current:null},qa=null,Qa=null,Ja=null;function $a(){Ja=Qa=qa=null}function eo(e){var t=Za.current;la(Za),e.type._context._currentValue=t}function to(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function no(e,t){qa=e,Ja=Qa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Ni=!0),e.firstContext=null)}function ro(e,t){if(Ja!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Ja=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qa){if(null===qa)throw Error(i(308));Qa=t,qa.dependencies={expirationTime:0,firstContext:t,responders:null}}else Qa=Qa.next=t;return e._currentValue}var ao=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function io(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function so(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function lo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function po(e,t){var n=e.alternate;null!==n&&io(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function co(e,t,n,r){var o=e.updateQueue;ao=!1;var i=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==i){var l=i.next;i.next=s.next,s.next=l}i=s,o.shared.pending=null,null!==(l=e.alternate)&&(null!==(l=l.updateQueue)&&(l.baseQueue=s))}if(null!==i){l=i.next;var p=o.baseState,c=0,u=null,d=null,h=null;if(null!==l)for(var m=l;;){if((s=m.expirationTime)<r){var b={expirationTime:m.expirationTime,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null};null===h?(d=h=b,u=p):h=h.next=b,s>c&&(c=s)}else{null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null}),ol(s,m.suspenseConfig);e:{var g=e,f=m;switch(s=t,b=n,f.tag){case 1:if("function"==typeof(g=f.payload)){p=g.call(b,p,s);break e}p=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s="function"==typeof(g=f.payload)?g.call(b,p,s):g))break e;p=a({},p,s);break e;case 2:ao=!0}}null!==m.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[m]:s.push(m))}if(null===(m=m.next)||m===l){if(null===(s=o.shared.pending))break;m=i.next=s.next,s.next=l,o.baseQueue=i=s,o.shared.pending=null}}null===h?u=p:h.next=d,o.baseState=u,o.baseQueue=h,il(c),e.expirationTime=c,e.memoizedState=p}}function uo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=a,a=n,"function"!=typeof r)throw Error(i(191,r));r.call(a)}}}var ho=q.ReactCurrentBatchConfig,mo=(new r.Component).refs;function bo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var go={isMounted:function(e){return!!(e=e._reactInternalFiber)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Ks(),a=ho.suspense;(a=so(r=Ys(r,e,a),a)).payload=t,null!=n&&(a.callback=n),lo(e,a),Xs(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Ks(),a=ho.suspense;(a=so(r=Ys(r,e,a),a)).tag=1,a.payload=t,null!=n&&(a.callback=n),lo(e,a),Xs(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Ks(),r=ho.suspense;(r=so(n=Ys(n,e,r),r)).tag=2,null!=t&&(r.callback=t),lo(e,r),Xs(e,n)}};function fo(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!Fr(n,r)||!Fr(a,o))}function vo(e,t,n){var r=!1,a=ca,o=t.contextType;return"object"==typeof o&&null!==o?o=ro(o):(a=ba(t)?ha:ua.current,o=(r=null!=(r=t.contextTypes))?ma(e,a):ca),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=go,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function yo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&go.enqueueReplaceState(t,t.state,null)}function Co(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=mo,oo(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=ro(o):(o=ba(t)?ha:ua.current,a.context=ma(e,o)),co(e,n,a,r),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(bo(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&go.enqueueReplaceState(a,a.state,null),co(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.effectTag|=4)}var Eo=Array.isArray;function xo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=r.refs;t===mo&&(t=r.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Oo(e,t){if("textarea"!==e.type)throw Error(i(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function So(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=wl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=kl(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function p(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=xo(e,t,n),r.return=e,r):((r=Pl(n.type,n.key,n.props,null,e.mode,r)).ref=xo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Nl(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Tl(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=kl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Pl(t.type,t.key,t.props,null,e.mode,n)).ref=xo(e,null,t),n.return=e,n;case te:return(t=Nl(t,e.mode,n)).return=e,t}if(Eo(t)||be(t))return(t=Tl(t,e.mode,n,null)).return=e,t;Oo(e,t)}return null}function h(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===a?n.type===ne?u(e,t,n.props.children,r,a):p(e,t,n,r):null;case te:return n.key===a?c(e,t,n,r):null}if(Eo(n)||be(n))return null!==a?null:u(e,t,n,r,null);Oo(e,n)}return null}function m(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?u(t,e,r.props.children,a,r.key):p(t,e,r,a);case te:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(Eo(r)||be(r))return u(t,e=e.get(n)||null,r,a,null);Oo(t,r)}return null}function b(a,i,s,l){for(var p=null,c=null,u=i,b=i=0,g=null;null!==u&&b<s.length;b++){u.index>b?(g=u,u=null):g=u.sibling;var f=h(a,u,s[b],l);if(null===f){null===u&&(u=g);break}e&&u&&null===f.alternate&&t(a,u),i=o(f,i,b),null===c?p=f:c.sibling=f,c=f,u=g}if(b===s.length)return n(a,u),p;if(null===u){for(;b<s.length;b++)null!==(u=d(a,s[b],l))&&(i=o(u,i,b),null===c?p=u:c.sibling=u,c=u);return p}for(u=r(a,u);b<s.length;b++)null!==(g=m(u,a,b,s[b],l))&&(e&&null!==g.alternate&&u.delete(null===g.key?b:g.key),i=o(g,i,b),null===c?p=g:c.sibling=g,c=g);return e&&u.forEach((function(e){return t(a,e)})),p}function g(a,s,l,p){var c=be(l);if("function"!=typeof c)throw Error(i(150));if(null==(l=c.call(l)))throw Error(i(151));for(var u=c=null,b=s,g=s=0,f=null,v=l.next();null!==b&&!v.done;g++,v=l.next()){b.index>g?(f=b,b=null):f=b.sibling;var y=h(a,b,v.value,p);if(null===y){null===b&&(b=f);break}e&&b&&null===y.alternate&&t(a,b),s=o(y,s,g),null===u?c=y:u.sibling=y,u=y,b=f}if(v.done)return n(a,b),c;if(null===b){for(;!v.done;g++,v=l.next())null!==(v=d(a,v.value,p))&&(s=o(v,s,g),null===u?c=v:u.sibling=v,u=v);return c}for(b=r(a,b);!v.done;g++,v=l.next())null!==(v=m(b,a,g,v.value,p))&&(e&&null!==v.alternate&&b.delete(null===v.key?g:v.key),s=o(v,s,g),null===u?c=v:u.sibling=v,u=v);return e&&b.forEach((function(e){return t(a,e)})),c}return function(e,r,o,l){var p="object"==typeof o&&null!==o&&o.type===ne&&null===o.key;p&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case ee:e:{for(c=o.key,p=r;null!==p;){if(p.key===c){switch(p.tag){case 7:if(o.type===ne){n(e,p.sibling),(r=a(p,o.props.children)).return=e,e=r;break e}break;default:if(p.elementType===o.type){n(e,p.sibling),(r=a(p,o.props)).ref=xo(e,p,o),r.return=e,e=r;break e}}n(e,p);break}t(e,p),p=p.sibling}o.type===ne?((r=Tl(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Pl(o.type,o.key,o.props,null,e.mode,l)).ref=xo(e,r,o),l.return=e,e=l)}return s(e);case te:e:{for(p=o.key;null!==r;){if(r.key===p){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=a(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Nl(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,o)).return=e,e=r):(n(e,r),(r=kl(o,e.mode,l)).return=e,e=r),s(e);if(Eo(o))return b(e,r,o,l);if(be(o))return g(e,r,o,l);if(c&&Oo(e,o),void 0===o&&!p)switch(e.tag){case 1:case 0:throw e=e.type,Error(i(152,e.displayName||e.name||"Component"))}return n(e,r)}}var _o=So(!0),wo=So(!1),Po={},To={current:Po},ko={current:Po},No={current:Po};function Mo(e){if(e===Po)throw Error(i(174));return e}function Ao(e,t){switch(pa(No,t),pa(ko,e),pa(To,Po),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:je(null,"");break;default:t=je(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}la(To),pa(To,t)}function Lo(){la(To),la(ko),la(No)}function Ro(e){Mo(No.current);var t=Mo(To.current),n=je(t,e.type);t!==n&&(pa(ko,e),pa(To,n))}function Io(e){ko.current===e&&(la(To),la(ko))}var Do={current:0};function jo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function zo(e,t){return{responder:e,props:t}}var Fo=q.ReactCurrentDispatcher,Vo=q.ReactCurrentBatchConfig,Uo=0,Go=null,Bo=null,Ho=null,Wo=!1;function Ko(){throw Error(i(321))}function Yo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,a,o){if(Uo=o,Go=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Fo.current=null===e||null===e.memoizedState?fi:vi,e=n(r,a),t.expirationTime===Uo){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(i(301));o+=1,Ho=Bo=null,t.updateQueue=null,Fo.current=yi,e=n(r,a)}while(t.expirationTime===Uo)}if(Fo.current=gi,t=null!==Bo&&null!==Bo.next,Uo=0,Ho=Bo=Go=null,Wo=!1,t)throw Error(i(300));return e}function Zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ho?Go.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function qo(){if(null===Bo){var e=Go.alternate;e=null!==e?e.memoizedState:null}else e=Bo.next;var t=null===Ho?Go.memoizedState:Ho.next;if(null!==t)Ho=t,Bo=e;else{if(null===e)throw Error(i(310));e={memoizedState:(Bo=e).memoizedState,baseState:Bo.baseState,baseQueue:Bo.baseQueue,queue:Bo.queue,next:null},null===Ho?Go.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function Qo(e,t){return"function"==typeof t?t(e):t}function Jo(e){var t=qo(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=Bo,a=r.baseQueue,o=n.pending;if(null!==o){if(null!==a){var s=a.next;a.next=o.next,o.next=s}r.baseQueue=a=o,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var l=s=o=null,p=a;do{var c=p.expirationTime;if(c<Uo){var u={expirationTime:p.expirationTime,suspenseConfig:p.suspenseConfig,action:p.action,eagerReducer:p.eagerReducer,eagerState:p.eagerState,next:null};null===l?(s=l=u,o=r):l=l.next=u,c>Go.expirationTime&&(Go.expirationTime=c,il(c))}else null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:p.suspenseConfig,action:p.action,eagerReducer:p.eagerReducer,eagerState:p.eagerState,next:null}),ol(c,p.suspenseConfig),r=p.eagerReducer===e?p.eagerState:e(r,p.action);p=p.next}while(null!==p&&p!==a);null===l?o=r:l.next=s,jr(r,t.memoizedState)||(Ni=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function $o(e){var t=qo(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(null!==a){n.pending=null;var s=a=a.next;do{o=e(o,s.action),s=s.next}while(s!==a);jr(o,t.memoizedState)||(Ni=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ei(e){var t=Zo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e}).dispatch=bi.bind(null,Go,e),[t.memoizedState,e]}function ti(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Go.updateQueue)?(t={lastEffect:null},Go.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ni(){return qo().memoizedState}function ri(e,t,n,r){var a=Zo();Go.effectTag|=e,a.memoizedState=ti(1|t,n,void 0,void 0===r?null:r)}function ai(e,t,n,r){var a=qo();r=void 0===r?null:r;var o=void 0;if(null!==Bo){var i=Bo.memoizedState;if(o=i.destroy,null!==r&&Yo(r,i.deps))return void ti(t,n,o,r)}Go.effectTag|=e,a.memoizedState=ti(1|t,n,o,r)}function oi(e,t){return ri(516,4,e,t)}function ii(e,t){return ai(516,4,e,t)}function si(e,t){return ai(4,2,e,t)}function li(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function pi(e,t,n){return n=null!=n?n.concat([e]):null,ai(4,2,li.bind(null,t,e),n)}function ci(){}function ui(e,t){return Zo().memoizedState=[e,void 0===t?null:t],e}function di(e,t){var n=qo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hi(e,t){var n=qo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Yo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mi(e,t,n){var r=Va();Ga(98>r?98:r,(function(){e(!0)})),Ga(97<r?97:r,(function(){var r=Vo.suspense;Vo.suspense=void 0===t?null:t;try{e(!1),n()}finally{Vo.suspense=r}}))}function bi(e,t,n){var r=Ks(),a=ho.suspense;a={expirationTime:r=Ys(r,e,a),suspenseConfig:a,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?a.next=a:(a.next=o.next,o.next=a),t.pending=a,o=e.alternate,e===Go||null!==o&&o===Go)Wo=!0,a.expirationTime=Uo,Go.expirationTime=Uo;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=o(i,n);if(a.eagerReducer=o,a.eagerState=s,jr(s,i))return}catch(e){}Xs(e,r)}}var gi={readContext:ro,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useResponder:Ko,useDeferredValue:Ko,useTransition:Ko},fi={readContext:ro,useCallback:ui,useContext:ro,useEffect:oi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ri(4,2,li.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ri(4,2,e,t)},useMemo:function(e,t){var n=Zo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=bi.bind(null,Go,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Zo().memoizedState=e},useState:ei,useDebugValue:ci,useResponder:zo,useDeferredValue:function(e,t){var n=ei(e),r=n[0],a=n[1];return oi((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{a(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ei(!1),n=t[0];return t=t[1],[ui(mi.bind(null,t,e),[t,e]),n]}},vi={readContext:ro,useCallback:di,useContext:ro,useEffect:ii,useImperativeHandle:pi,useLayoutEffect:si,useMemo:hi,useReducer:Jo,useRef:ni,useState:function(){return Jo(Qo)},useDebugValue:ci,useResponder:zo,useDeferredValue:function(e,t){var n=Jo(Qo),r=n[0],a=n[1];return ii((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{a(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Jo(Qo),n=t[0];return t=t[1],[di(mi.bind(null,t,e),[t,e]),n]}},yi={readContext:ro,useCallback:di,useContext:ro,useEffect:ii,useImperativeHandle:pi,useLayoutEffect:si,useMemo:hi,useReducer:$o,useRef:ni,useState:function(){return $o(Qo)},useDebugValue:ci,useResponder:zo,useDeferredValue:function(e,t){var n=$o(Qo),r=n[0],a=n[1];return ii((function(){var n=Vo.suspense;Vo.suspense=void 0===t?null:t;try{a(e)}finally{Vo.suspense=n}}),[e,t]),r},useTransition:function(e){var t=$o(Qo),n=t[0];return t=t[1],[di(mi.bind(null,t,e),[t,e]),n]}},Ci=null,Ei=null,xi=!1;function Oi(e,t){var n=Sl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Si(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function _i(e){if(xi){var t=Ei;if(t){var n=t;if(!Si(e,t)){if(!(t=En(n.nextSibling))||!Si(e,t))return e.effectTag=-1025&e.effectTag|2,xi=!1,void(Ci=e);Oi(Ci,n)}Ci=e,Ei=En(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,xi=!1,Ci=e}}function wi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ci=e}function Pi(e){if(e!==Ci)return!1;if(!xi)return wi(e),xi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!vn(t,e.memoizedProps))for(t=Ei;t;)Oi(e,t),t=En(t.nextSibling);if(wi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ei=En(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ei=null}}else Ei=Ci?En(e.stateNode.nextSibling):null;return!0}function Ti(){Ei=Ci=null,xi=!1}var ki=q.ReactCurrentOwner,Ni=!1;function Mi(e,t,n,r){t.child=null===e?wo(t,null,n,r):_o(t,e.child,n,r)}function Ai(e,t,n,r,a){n=n.render;var o=t.ref;return no(t,a),r=Xo(e,t,n,r,o,a),null===e||Ni?(t.effectTag|=1,Mi(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=a&&(e.expirationTime=0),Xi(e,t,a))}function Li(e,t,n,r,a,o){if(null===e){var i=n.type;return"function"!=typeof i||_l(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pl(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Ri(e,t,i,r,a,o))}return i=e.child,a<o&&(a=i.memoizedProps,(n=null!==(n=n.compare)?n:Fr)(a,r)&&e.ref===t.ref)?Xi(e,t,o):(t.effectTag|=1,(e=wl(i,r)).ref=t.ref,e.return=t,t.child=e)}function Ri(e,t,n,r,a,o){return null!==e&&Fr(e.memoizedProps,r)&&e.ref===t.ref&&(Ni=!1,a<o)?(t.expirationTime=e.expirationTime,Xi(e,t,o)):Di(e,t,n,r,o)}function Ii(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Di(e,t,n,r,a){var o=ba(n)?ha:ua.current;return o=ma(t,o),no(t,a),n=Xo(e,t,n,r,o,a),null===e||Ni?(t.effectTag|=1,Mi(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=a&&(e.expirationTime=0),Xi(e,t,a))}function ji(e,t,n,r,a){if(ba(n)){var o=!0;ya(t)}else o=!1;if(no(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),vo(t,n,r),Co(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,p=n.contextType;"object"==typeof p&&null!==p?p=ro(p):p=ma(t,p=ba(n)?ha:ua.current);var c=n.getDerivedStateFromProps,u="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;u||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==p)&&yo(t,i,r,p),ao=!1;var d=t.memoizedState;i.state=d,co(t,r,i,a),l=t.memoizedState,s!==r||d!==l||da.current||ao?("function"==typeof c&&(bo(t,n,c,r),l=t.memoizedState),(s=ao||fo(t,n,s,r,d,l,p))?(u||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.effectTag|=4)):("function"==typeof i.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=p,r=s):("function"==typeof i.componentDidMount&&(t.effectTag|=4),r=!1)}else i=t.stateNode,io(e,t),s=t.memoizedProps,i.props=t.type===t.elementType?s:Xa(t.type,s),l=i.context,"object"==typeof(p=n.contextType)&&null!==p?p=ro(p):p=ma(t,p=ba(n)?ha:ua.current),(u="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==p)&&yo(t,i,r,p),ao=!1,l=t.memoizedState,i.state=l,co(t,r,i,a),d=t.memoizedState,s!==r||l!==d||da.current||ao?("function"==typeof c&&(bo(t,n,c,r),d=t.memoizedState),(c=ao||fo(t,n,s,r,l,d,p))?(u||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,d,p),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,d,p)),"function"==typeof i.componentDidUpdate&&(t.effectTag|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),i.props=r,i.state=d,i.context=p,r=c):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),r=!1);return zi(e,t,n,r,o,a)}function zi(e,t,n,r,a,o){Ii(e,t);var i=0!=(64&t.effectTag);if(!r&&!i)return a&&Ca(t,n,!1),Xi(e,t,o);r=t.stateNode,ki.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&i?(t.child=_o(t,e.child,null,o),t.child=_o(t,null,s,o)):Mi(e,t,s,o),t.memoizedState=r.state,a&&Ca(t,n,!0),t.child}function Fi(e){var t=e.stateNode;t.pendingContext?fa(0,t.pendingContext,t.pendingContext!==t.context):t.context&&fa(0,t.context,!1),Ao(e,t.containerInfo)}var Vi,Ui,Gi,Bi={dehydrated:null,retryTime:0};function Hi(e,t,n){var r,a=t.mode,o=t.pendingProps,i=Do.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&i)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),pa(Do,1&i),null===e){if(void 0!==o.fallback&&_i(t),s){if(s=o.fallback,(o=Tl(null,a,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Tl(s,a,n,null)).return=t,o.sibling=n,t.memoizedState=Bi,t.child=o,n}return a=o.children,t.memoizedState=null,t.child=wo(t,null,a,n)}if(null!==e.memoizedState){if(a=(e=e.child).sibling,s){if(o=o.fallback,(n=wl(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(a=wl(a,o)).return=t,n.sibling=a,n.childExpirationTime=0,t.memoizedState=Bi,t.child=n,a}return n=_o(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Tl(null,a,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Tl(s,a,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=Bi,t.child=o,n}return t.memoizedState=null,t.child=_o(t,e,o.children,n)}function Wi(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),to(e.return,t)}function Ki(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:a,lastEffect:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailExpiration=0,i.tailMode=a,i.lastEffect=o)}function Yi(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(Mi(e,t,r.children,n),0!=(2&(r=Do.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Wi(e,n);else if(19===e.tag)Wi(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(pa(Do,r),0==(2&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===jo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ki(t,!1,a,n,o,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===jo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ki(t,!0,n,null,o,t.lastEffect);break;case"together":Ki(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Xi(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&il(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=wl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=wl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Zi(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qi(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return ba(t.type)&&ga(),null;case 3:return Lo(),la(da),la(ua),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Pi(t)||(t.effectTag|=4),null;case 5:Io(t),n=Mo(No.current);var o=t.type;if(null!==e&&null!=t.stateNode)Ui(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(i(166));return null}if(e=Mo(To.current),Pi(t)){r=t.stateNode,o=t.type;var s=t.memoizedProps;switch(r[Sn]=t,r[_n]=s,o){case"iframe":case"object":case"embed":Yt("load",r);break;case"video":case"audio":for(e=0;e<qe.length;e++)Yt(qe[e],r);break;case"source":Yt("error",r);break;case"img":case"image":case"link":Yt("error",r),Yt("load",r);break;case"form":Yt("reset",r),Yt("submit",r);break;case"details":Yt("toggle",r);break;case"input":Oe(r,s),Yt("invalid",r),ln(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Yt("invalid",r),ln(n,"onChange");break;case"textarea":Me(r,s),Yt("invalid",r),ln(n,"onChange")}for(var l in an(o,s),e=null,s)if(s.hasOwnProperty(l)){var p=s[l];"children"===l?"string"==typeof p?r.textContent!==p&&(e=["children",p]):"number"==typeof p&&r.textContent!==""+p&&(e=["children",""+p]):S.hasOwnProperty(l)&&null!=p&&ln(n,l)}switch(o){case"input":Ce(r),we(r,s,!0);break;case"textarea":Ce(r),Le(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=pn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(l=9===n.nodeType?n:n.ownerDocument,e===sn&&(e=De(o)),e===sn?"script"===o?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(o,{is:r.is}):(e=l.createElement(o),"select"===o&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,o),e[Sn]=t,e[_n]=r,Vi(e,t),t.stateNode=e,l=on(o,r),o){case"iframe":case"object":case"embed":Yt("load",e),p=r;break;case"video":case"audio":for(p=0;p<qe.length;p++)Yt(qe[p],e);p=r;break;case"source":Yt("error",e),p=r;break;case"img":case"image":case"link":Yt("error",e),Yt("load",e),p=r;break;case"form":Yt("reset",e),Yt("submit",e),p=r;break;case"details":Yt("toggle",e),p=r;break;case"input":Oe(e,r),p=xe(e,r),Yt("invalid",e),ln(n,"onChange");break;case"option":p=Te(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},p=a({},r,{value:void 0}),Yt("invalid",e),ln(n,"onChange");break;case"textarea":Me(e,r),p=Ne(e,r),Yt("invalid",e),ln(n,"onChange");break;default:p=r}an(o,p);var c=p;for(s in c)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?nn(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&Fe(e,u):"children"===s?"string"==typeof u?("textarea"!==o||""!==u)&&Ve(e,u):"number"==typeof u&&Ve(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=u&&ln(n,s):null!=u&&Q(e,s,u,l))}switch(o){case"input":Ce(e),we(e,r,!1);break;case"textarea":Ce(e),Le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ve(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?ke(e,!!r.multiple,n,!1):null!=r.defaultValue&&ke(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof p.onClick&&(e.onclick=pn)}fn(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Gi(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));n=Mo(No.current),Mo(To.current),Pi(t)?(n=t.stateNode,r=t.memoizedProps,n[Sn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=t,t.stateNode=n)}return null;case 13:return la(Do),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Pi(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=o,o.nextEffect=s):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Do.current)?Ps===Cs&&(Ps=Es):(Ps!==Cs&&Ps!==Es||(Ps=xs),0!==As&&null!==Ss&&(Ll(Ss,ws),Rl(Ss,As)))),(n||r)&&(t.effectTag|=4),null);case 4:return Lo(),null;case 10:return eo(t),null;case 17:return ba(t.type)&&ga(),null;case 19:if(la(Do),null===(r=t.memoizedState))return null;if(o=0!=(64&t.effectTag),null===(s=r.rendering)){if(o)Zi(r,!1);else if(Ps!==Cs||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=jo(s))){for(t.effectTag|=64,Zi(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,s=e.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return pa(Do,1&Do.current|2),t.child}s=s.sibling}}else{if(!o)if(null!==(e=jo(s))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Zi(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Fa()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,Zi(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Fa()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Fa(),n.sibling=null,t=Do.current,pa(Do,o?1&t|2:1&t),n):null}throw Error(i(156,t.tag))}function Qi(e){switch(e.tag){case 1:ba(e.type)&&ga();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Lo(),la(da),la(ua),0!=(64&(t=e.effectTag)))throw Error(i(285));return e.effectTag=-4097&t|64,e;case 5:return Io(e),null;case 13:return la(Do),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return la(Do),null;case 4:return Lo(),null;case 10:return eo(e),null;default:return null}}function Ji(e,t){return{value:e,source:t,stack:fe(t)}}Vi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ui=function(e,t,n,r,o){var i=e.memoizedProps;if(i!==r){var s,l,p=t.stateNode;switch(Mo(To.current),e=null,n){case"input":i=xe(p,i),r=xe(p,r),e=[];break;case"option":i=Te(p,i),r=Te(p,r),e=[];break;case"select":i=a({},i,{value:void 0}),r=a({},r,{value:void 0}),e=[];break;case"textarea":i=Ne(p,i),r=Ne(p,r),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(p.onclick=pn)}for(s in an(n,r),n=null,i)if(!r.hasOwnProperty(s)&&i.hasOwnProperty(s)&&null!=i[s])if("style"===s)for(l in p=i[s])p.hasOwnProperty(l)&&(n||(n={}),n[l]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var c=r[s];if(p=null!=i?i[s]:void 0,r.hasOwnProperty(s)&&c!==p&&(null!=c||null!=p))if("style"===s)if(p){for(l in p)!p.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in c)c.hasOwnProperty(l)&&p[l]!==c[l]&&(n||(n={}),n[l]=c[l])}else n||(e||(e=[]),e.push(s,n)),n=c;else"dangerouslySetInnerHTML"===s?(c=c?c.__html:void 0,p=p?p.__html:void 0,null!=c&&p!==c&&(e=e||[]).push(s,c)):"children"===s?p===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(s,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=c&&ln(o,s),e||p===c||(e=[])):(e=e||[]).push(s,c))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},Gi=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var $i="function"==typeof WeakSet?WeakSet:Set;function es(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=fe(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function ts(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){vl(e,t)}else t.current=null}function ns(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xa(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(i(163))}function rs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function as(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function os(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void as(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Xa(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&uo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}uo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&fn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Dt(n)))));case 19:case 17:case 20:case 21:return}throw Error(i(163))}function is(e,t,n){switch("function"==typeof xl&&xl(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Ga(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var a=t;try{n()}catch(e){vl(a,e)}}e=e.next}while(e!==r)}))}break;case 1:ts(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){vl(e,t)}}(t,n);break;case 5:ts(t);break;case 4:cs(e,t,n)}}function ss(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ss(t)}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function ps(e){e:{for(var t=e.return;null!==t;){if(ls(t)){var n=t;break e}t=t.return}throw Error(i(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(i(161))}16&n.effectTag&&(Ve(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ls(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var a=t.tag,o=5===a||6===a;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=pn));else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var a=t.tag,o=5===a||6===a;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function cs(e,t,n){for(var r,a,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(i(160));switch(r=s.stateNode,s.tag){case 5:a=!1;break e;case 3:case 4:r=r.containerInfo,a=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var l=e,p=o,c=n,u=p;;)if(is(l,u,c),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===p)break e;for(;null===u.sibling;){if(null===u.return||u.return===p)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}a?(l=r,p=o.stateNode,8===l.nodeType?l.parentNode.removeChild(p):l.removeChild(p)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,a=!0,o.child.return=o,o=o.child;continue}}else if(is(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function us(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void rs(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,a=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[_n]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),on(e,a),t=on(e,r),a=0;a<o.length;a+=2){var s=o[a],l=o[a+1];"style"===s?nn(n,l):"dangerouslySetInnerHTML"===s?Fe(n,l):"children"===s?Ve(n,l):Q(n,s,l,t)}switch(e){case"input":_e(n,r);break;case"textarea":Ae(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?ke(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?ke(n,!!r.multiple,r.defaultValue,!0):ke(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(i(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Dt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Rs=Fa()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"==typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,a=null!=(a=e.memoizedProps.style)&&a.hasOwnProperty("display")?a.display:null,o.style.display=tn("display",a));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void ds(t);case 19:return void ds(t);case 17:return}throw Error(i(163))}function ds(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new $i),t.forEach((function(t){var r=Cl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var hs="function"==typeof WeakMap?WeakMap:Map;function ms(e,t,n){(n=so(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ds||(Ds=!0,js=r),es(e,t)},n}function bs(e,t,n){(n=so(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return es(e,t),r(a)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===zs?zs=new Set([this]):zs.add(this),es(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var gs,fs=Math.ceil,vs=q.ReactCurrentDispatcher,ys=q.ReactCurrentOwner,Cs=0,Es=3,xs=4,Os=0,Ss=null,_s=null,ws=0,Ps=Cs,Ts=null,ks=1073741823,Ns=1073741823,Ms=null,As=0,Ls=!1,Rs=0,Is=null,Ds=!1,js=null,zs=null,Fs=!1,Vs=null,Us=90,Gs=null,Bs=0,Hs=null,Ws=0;function Ks(){return 0!=(48&Os)?1073741821-(Fa()/10|0):0!==Ws?Ws:Ws=1073741821-(Fa()/10|0)}function Ys(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Va();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Os))return ws;if(null!==n)e=Ya(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Ya(e,150,100);break;case 97:case 96:e=Ya(e,5e3,250);break;case 95:e=2;break;default:throw Error(i(326))}return null!==Ss&&e===ws&&--e,e}function Xs(e,t){if(50<Bs)throw Bs=0,Hs=null,Error(i(185));if(null!==(e=Zs(e,t))){var n=Va();1073741823===t?0!=(8&Os)&&0==(48&Os)?$s(e):(Qs(e),0===Os&&Wa()):Qs(e),0==(4&Os)||98!==n&&99!==n||(null===Gs?Gs=new Map([[e,t]]):(void 0===(n=Gs.get(e))||n>t)&&Gs.set(e,t))}}function Zs(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,a=null;if(null===r&&3===e.tag)a=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){a=r.stateNode;break}r=r.return}return null!==a&&(Ss===a&&(il(t),Ps===xs&&Ll(a,ws)),Rl(a,t)),a}function qs(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Al(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Qs(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Ha($s.bind(null,e));else{var t=qs(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Ks();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var a=e.callbackPriority;if(e.callbackExpirationTime===t&&a>=r)return;n!==Aa&&Oa(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Ha($s.bind(null,e)):Ba(r,Js.bind(null,e),{timeout:10*(1073741821-t)-Fa()}),e.callbackNode=t}}}function Js(e,t){if(Ws=0,t)return Il(e,t=Ks()),Qs(e),null;var n=qs(e);if(0!==n){if(t=e.callbackNode,0!=(48&Os))throw Error(i(327));if(bl(),e===Ss&&n===ws||nl(e,n),null!==_s){var r=Os;Os|=16;for(var a=al();;)try{ll();break}catch(t){rl(e,t)}if($a(),Os=r,vs.current=a,1===Ps)throw t=Ts,nl(e,n),Ll(e,n),Qs(e),t;if(null===_s)switch(a=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ps,Ss=null,r){case Cs:case 1:throw Error(i(345));case 2:Il(e,2<n?2:n);break;case Es:if(Ll(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=ul(a)),1073741823===ks&&10<(a=Rs+500-Fa())){if(Ls){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,nl(e,n);break}}if(0!==(o=qs(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=yn(dl.bind(null,e),a);break}dl(e);break;case xs:if(Ll(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=ul(a)),Ls&&(0===(a=e.lastPingedTime)||a>=n)){e.lastPingedTime=n,nl(e,n);break}if(0!==(a=qs(e))&&a!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ns?r=10*(1073741821-Ns)-Fa():1073741823===ks?r=0:(r=10*(1073741821-ks)-5e3,0>(r=(a=Fa())-r)&&(r=0),(n=10*(1073741821-n)-a)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fs(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=yn(dl.bind(null,e),r);break}dl(e);break;case 5:if(1073741823!==ks&&null!==Ms){o=ks;var s=Ms;if(0>=(r=0|s.busyMinDurationMs)?r=0:(a=0|s.busyDelayMs,r=(o=Fa()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=a?0:a+r-o),10<r){Ll(e,n),e.timeoutHandle=yn(dl.bind(null,e),r);break}}dl(e);break;default:throw Error(i(329))}if(Qs(e),e.callbackNode===t)return Js.bind(null,e)}}return null}function $s(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Os))throw Error(i(327));if(bl(),e===Ss&&t===ws||nl(e,t),null!==_s){var n=Os;Os|=16;for(var r=al();;)try{sl();break}catch(t){rl(e,t)}if($a(),Os=n,vs.current=r,1===Ps)throw n=Ts,nl(e,t),Ll(e,t),Qs(e),n;if(null!==_s)throw Error(i(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Ss=null,dl(e),Qs(e)}return null}function el(e,t){var n=Os;Os|=1;try{return e(t)}finally{0===(Os=n)&&Wa()}}function tl(e,t){var n=Os;Os&=-2,Os|=8;try{return e(t)}finally{0===(Os=n)&&Wa()}}function nl(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Cn(n)),null!==_s)for(n=_s.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&ga();break;case 3:Lo(),la(da),la(ua);break;case 5:Io(r);break;case 4:Lo();break;case 13:case 19:la(Do);break;case 10:eo(r)}n=n.return}Ss=e,_s=wl(e.current,null),ws=t,Ps=Cs,Ts=null,Ns=ks=1073741823,Ms=null,As=0,Ls=!1}function rl(e,t){for(;;){try{if($a(),Fo.current=gi,Wo)for(var n=Go.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Uo=0,Ho=Bo=Go=null,Wo=!1,null===_s||null===_s.return)return Ps=1,Ts=t,_s=null;e:{var a=e,o=_s.return,i=_s,s=t;if(t=ws,i.effectTag|=2048,i.firstEffect=i.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var l=s;if(0==(2&i.mode)){var p=i.alternate;p?(i.updateQueue=p.updateQueue,i.memoizedState=p.memoizedState,i.expirationTime=p.expirationTime):(i.updateQueue=null,i.memoizedState=null)}var c=0!=(1&Do.current),u=o;do{var d;if(d=13===u.tag){var h=u.memoizedState;if(null!==h)d=null!==h.dehydrated;else{var m=u.memoizedProps;d=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!c)}}if(d){var b=u.updateQueue;if(null===b){var g=new Set;g.add(l),u.updateQueue=g}else b.add(l);if(0==(2&u.mode)){if(u.effectTag|=64,i.effectTag&=-2981,1===i.tag)if(null===i.alternate)i.tag=17;else{var f=so(1073741823,null);f.tag=2,lo(i,f)}i.expirationTime=1073741823;break e}s=void 0,i=t;var v=a.pingCache;if(null===v?(v=a.pingCache=new hs,s=new Set,v.set(l,s)):void 0===(s=v.get(l))&&(s=new Set,v.set(l,s)),!s.has(i)){s.add(i);var y=yl.bind(null,a,l,i);l.then(y,y)}u.effectTag|=4096,u.expirationTime=t;break e}u=u.return}while(null!==u);s=Error((ge(i.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+fe(i))}5!==Ps&&(Ps=2),s=Ji(s,i),u=o;do{switch(u.tag){case 3:l=s,u.effectTag|=4096,u.expirationTime=t,po(u,ms(u,l,t));break e;case 1:l=s;var C=u.type,E=u.stateNode;if(0==(64&u.effectTag)&&("function"==typeof C.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===zs||!zs.has(E)))){u.effectTag|=4096,u.expirationTime=t,po(u,bs(u,l,t));break e}}u=u.return}while(null!==u)}_s=cl(_s)}catch(e){t=e;continue}break}}function al(){var e=vs.current;return vs.current=gi,null===e?gi:e}function ol(e,t){e<ks&&2<e&&(ks=e),null!==t&&e<Ns&&2<e&&(Ns=e,Ms=t)}function il(e){e>As&&(As=e)}function sl(){for(;null!==_s;)_s=pl(_s)}function ll(){for(;null!==_s&&!La();)_s=pl(_s)}function pl(e){var t=gs(e.alternate,e,ws);return e.memoizedProps=e.pendingProps,null===t&&(t=cl(e)),ys.current=null,t}function cl(e){_s=e;do{var t=_s.alternate;if(e=_s.return,0==(2048&_s.effectTag)){if(t=qi(t,_s,ws),1===ws||1!==_s.childExpirationTime){for(var n=0,r=_s.child;null!==r;){var a=r.expirationTime,o=r.childExpirationTime;a>n&&(n=a),o>n&&(n=o),r=r.sibling}_s.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=_s.firstEffect),null!==_s.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=_s.firstEffect),e.lastEffect=_s.lastEffect),1<_s.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=_s:e.firstEffect=_s,e.lastEffect=_s))}else{if(null!==(t=Qi(_s)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=_s.sibling))return t;_s=e}while(null!==_s);return Ps===Cs&&(Ps=5),null}function ul(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function dl(e){var t=Va();return Ga(99,hl.bind(null,e,t)),null}function hl(e,t){do{bl()}while(null!==Vs);if(0!=(48&Os))throw Error(i(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var a=ul(n);if(e.firstPendingTime=a,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Ss&&(_s=Ss=null,ws=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,a=n.firstEffect):a=n:a=n.firstEffect,null!==a){var o=Os;Os|=32,ys.current=null,bn=Kt;var s=hn();if(mn(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{var p=(l=(l=s.ownerDocument)&&l.defaultView||window).getSelection&&l.getSelection();if(p&&0!==p.rangeCount){l=p.anchorNode;var c=p.anchorOffset,u=p.focusNode;p=p.focusOffset;try{l.nodeType,u.nodeType}catch(e){l=null;break e}var d=0,h=-1,m=-1,b=0,g=0,f=s,v=null;t:for(;;){for(var y;f!==l||0!==c&&3!==f.nodeType||(h=d+c),f!==u||0!==p&&3!==f.nodeType||(m=d+p),3===f.nodeType&&(d+=f.nodeValue.length),null!==(y=f.firstChild);)v=f,f=y;for(;;){if(f===s)break t;if(v===l&&++b===c&&(h=d),v===u&&++g===p&&(m=d),null!==(y=f.nextSibling))break;v=(f=v).parentNode}f=y}l=-1===h||-1===m?null:{start:h,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;gn={activeElementDetached:null,focusedElem:s,selectionRange:l},Kt=!1,Is=a;do{try{ml()}catch(e){if(null===Is)throw Error(i(330));vl(Is,e),Is=Is.nextEffect}}while(null!==Is);Is=a;do{try{for(s=e,l=t;null!==Is;){var C=Is.effectTag;if(16&C&&Ve(Is.stateNode,""),128&C){var E=Is.alternate;if(null!==E){var x=E.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&C){case 2:ps(Is),Is.effectTag&=-3;break;case 6:ps(Is),Is.effectTag&=-3,us(Is.alternate,Is);break;case 1024:Is.effectTag&=-1025;break;case 1028:Is.effectTag&=-1025,us(Is.alternate,Is);break;case 4:us(Is.alternate,Is);break;case 8:cs(s,c=Is,l),ss(c)}Is=Is.nextEffect}}catch(e){if(null===Is)throw Error(i(330));vl(Is,e),Is=Is.nextEffect}}while(null!==Is);if(x=gn,E=hn(),C=x.focusedElem,l=x.selectionRange,E!==C&&C&&C.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(C.ownerDocument.documentElement,C)){null!==l&&mn(C)&&(E=l.start,void 0===(x=l.end)&&(x=E),"selectionStart"in C?(C.selectionStart=E,C.selectionEnd=Math.min(x,C.value.length)):(x=(E=C.ownerDocument||document)&&E.defaultView||window).getSelection&&(x=x.getSelection(),c=C.textContent.length,s=Math.min(l.start,c),l=void 0===l.end?s:Math.min(l.end,c),!x.extend&&s>l&&(c=l,l=s,s=c),c=dn(C,s),u=dn(C,l),c&&u&&(1!==x.rangeCount||x.anchorNode!==c.node||x.anchorOffset!==c.offset||x.focusNode!==u.node||x.focusOffset!==u.offset)&&((E=E.createRange()).setStart(c.node,c.offset),x.removeAllRanges(),s>l?(x.addRange(E),x.extend(u.node,u.offset)):(E.setEnd(u.node,u.offset),x.addRange(E))))),E=[];for(x=C;x=x.parentNode;)1===x.nodeType&&E.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof C.focus&&C.focus(),C=0;C<E.length;C++)(x=E[C]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Kt=!!bn,gn=bn=null,e.current=n,Is=a;do{try{for(C=e;null!==Is;){var O=Is.effectTag;if(36&O&&os(C,Is.alternate,Is),128&O){E=void 0;var S=Is.ref;if(null!==S){var _=Is.stateNode;switch(Is.tag){case 5:E=_;break;default:E=_}"function"==typeof S?S(E):S.current=E}}Is=Is.nextEffect}}catch(e){if(null===Is)throw Error(i(330));vl(Is,e),Is=Is.nextEffect}}while(null!==Is);Is=null,Ra(),Os=o}else e.current=n;if(Fs)Fs=!1,Vs=e,Us=t;else for(Is=a;null!==Is;)t=Is.nextEffect,Is.nextEffect=null,Is=t;if(0===(t=e.firstPendingTime)&&(zs=null),1073741823===t?e===Hs?Bs++:(Bs=0,Hs=e):Bs=0,"function"==typeof El&&El(n.stateNode,r),Qs(e),Ds)throw Ds=!1,e=js,js=null,e;return 0!=(8&Os)||Wa(),null}function ml(){for(;null!==Is;){var e=Is.effectTag;0!=(256&e)&&ns(Is.alternate,Is),0==(512&e)||Fs||(Fs=!0,Ba(97,(function(){return bl(),null}))),Is=Is.nextEffect}}function bl(){if(90!==Us){var e=97<Us?97:Us;return Us=90,Ga(e,gl)}}function gl(){if(null===Vs)return!1;var e=Vs;if(Vs=null,0!=(48&Os))throw Error(i(331));var t=Os;for(Os|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rs(5,n),as(5,n)}}catch(t){if(null===e)throw Error(i(330));vl(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Os=t,Wa(),!0}function fl(e,t,n){lo(e,t=ms(e,t=Ji(n,t),1073741823)),null!==(e=Zs(e,1073741823))&&Qs(e)}function vl(e,t){if(3===e.tag)fl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){fl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zs||!zs.has(r))){lo(n,e=bs(n,e=Ji(t,e),1073741823)),null!==(n=Zs(n,1073741823))&&Qs(n);break}}n=n.return}}function yl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Ss===e&&ws===n?Ps===xs||Ps===Es&&1073741823===ks&&Fa()-Rs<500?nl(e,ws):Ls=!0:Al(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Qs(e)))}function Cl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Ys(t=Ks(),e,null)),null!==(e=Zs(e,t))&&Qs(e)}gs=function(e,t,n){var r=t.expirationTime;if(null!==e){var a=t.pendingProps;if(e.memoizedProps!==a||da.current)Ni=!0;else{if(r<n){switch(Ni=!1,t.tag){case 3:Fi(t),Ti();break;case 5:if(Ro(t),4&t.mode&&1!==n&&a.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:ba(t.type)&&ya(t);break;case 4:Ao(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,a=t.type._context,pa(Za,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Hi(e,t,n):(pa(Do,1&Do.current),null!==(t=Xi(e,t,n))?t.sibling:null);pa(Do,1&Do.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Yi(e,t,n);t.effectTag|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null),pa(Do,Do.current),!r)return null}return Xi(e,t,n)}Ni=!1}}else Ni=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,a=ma(t,ua.current),no(t,n),a=Xo(null,t,r,e,a,n),t.effectTag|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ba(r)){var o=!0;ya(t)}else o=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,oo(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&bo(t,r,s,e),a.updater=go,t.stateNode=a,a._reactInternalFiber=t,Co(t,r,e,n),t=zi(null,t,r,!0,o,n)}else t.tag=0,Mi(null,t,a,n),t=t.child;return t;case 16:e:{if(a=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(a),1!==a._status)throw a._result;switch(a=a._result,t.type=a,o=t.tag=function(e){if("function"==typeof e)return _l(e)?1:0;if(null!=e){if((e=e.$$typeof)===le)return 11;if(e===ue)return 14}return 2}(a),e=Xa(a,e),o){case 0:t=Di(null,t,a,e,n);break e;case 1:t=ji(null,t,a,e,n);break e;case 11:t=Ai(null,t,a,e,n);break e;case 14:t=Li(null,t,a,Xa(a.type,e),r,n);break e}throw Error(i(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,Di(e,t,r,a=t.elementType===r?a:Xa(r,a),n);case 1:return r=t.type,a=t.pendingProps,ji(e,t,r,a=t.elementType===r?a:Xa(r,a),n);case 3:if(Fi(t),r=t.updateQueue,null===e||null===r)throw Error(i(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,io(e,t),co(t,r,null,n),(r=t.memoizedState.element)===a)Ti(),t=Xi(e,t,n);else{if((a=t.stateNode.hydrate)&&(Ei=En(t.stateNode.containerInfo.firstChild),Ci=t,a=xi=!0),a)for(n=wo(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Mi(e,t,r,n),Ti();t=t.child}return t;case 5:return Ro(t),null===e&&_i(t),r=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,s=a.children,vn(r,a)?s=null:null!==o&&vn(r,o)&&(t.effectTag|=16),Ii(e,t),4&t.mode&&1!==n&&a.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Mi(e,t,s,n),t=t.child),t;case 6:return null===e&&_i(t),null;case 13:return Hi(e,t,n);case 4:return Ao(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_o(t,null,r,n):Mi(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Ai(e,t,r,a=t.elementType===r?a:Xa(r,a),n);case 7:return Mi(e,t,t.pendingProps,n),t.child;case 8:case 12:return Mi(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,s=t.memoizedProps,o=a.value;var l=t.type._context;if(pa(Za,l._currentValue),l._currentValue=o,null!==s)if(l=s.value,0===(o=jr(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===a.children&&!da.current){t=Xi(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var p=l.dependencies;if(null!==p){s=l.child;for(var c=p.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===l.tag&&((c=so(n,null)).tag=2,lo(l,c)),l.expirationTime<n&&(l.expirationTime=n),null!==(c=l.alternate)&&c.expirationTime<n&&(c.expirationTime=n),to(l.return,n),p.expirationTime<n&&(p.expirationTime=n);break}c=c.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Mi(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(o=t.pendingProps).children,no(t,n),r=r(a=ro(a,o.unstable_observedBits)),t.effectTag|=1,Mi(e,t,r,n),t.child;case 14:return o=Xa(a=t.type,t.pendingProps),Li(e,t,a,o=Xa(a.type,o),r,n);case 15:return Ri(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Xa(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,ba(r)?(e=!0,ya(t)):e=!1,no(t,n),vo(t,r,a),Co(t,r,a,n),zi(null,t,r,!0,e,n);case 19:return Yi(e,t,n)}throw Error(i(156,t.tag))};var El=null,xl=null;function Ol(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Sl(e,t,n,r){return new Ol(e,t,n,r)}function _l(e){return!(!(e=e.prototype)||!e.isReactComponent)}function wl(e,t){var n=e.alternate;return null===n?((n=Sl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,a,o){var s=2;if(r=e,"function"==typeof e)_l(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Tl(n.children,a,o,t);case se:s=8,a|=7;break;case re:s=8,a|=1;break;case ae:return(e=Sl(12,n,t,8|a)).elementType=ae,e.type=ae,e.expirationTime=o,e;case pe:return(e=Sl(13,n,t,a)).type=pe,e.elementType=pe,e.expirationTime=o,e;case ce:return(e=Sl(19,n,t,a)).elementType=ce,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case oe:s=10;break e;case ie:s=9;break e;case le:s=11;break e;case ue:s=14;break e;case de:s=16,r=null;break e;case he:s=22;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Sl(s,n,t,a)).elementType=e,t.type=r,t.expirationTime=o,t}function Tl(e,t,n,r){return(e=Sl(7,e,r,t)).expirationTime=n,e}function kl(e,t,n){return(e=Sl(6,e,null,t)).expirationTime=n,e}function Nl(e,t,n){return(t=Sl(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ml(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Al(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Ll(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Rl(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Il(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Dl(e,t,n,r){var a=t.current,o=Ks(),s=ho.suspense;o=Ys(o,a,s);e:if(n){t:{if($e(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(i(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(ba(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(i(171))}if(1===n.tag){var p=n.type;if(ba(p)){n=va(n,p,l);break e}}n=l}else n=ca;return null===t.context?t.context=n:t.pendingContext=n,(t=so(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),lo(a,t),Xs(a,o),o}function jl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function zl(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Fl(e,t){zl(e,t),(e=e.alternate)&&zl(e,t)}function Vl(e,t,n){var r=new Ml(e,t,n=null!=n&&!0===n.hydrate),a=Sl(3,null,null,2===t?7:1===t?3:0);r.current=a,a.stateNode=r,oo(a),e[wn]=r.current,n&&0!==t&&function(e,t){var n=Je(t);wt.forEach((function(e){mt(e,t,n)})),Pt.forEach((function(e){mt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Ul(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Gl(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o._internalRoot;if("function"==typeof a){var s=a;a=function(){var e=jl(i);s.call(e)}}Dl(t,i,e,a)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Vl(e,0,t?{hydrate:!0}:void 0)}(n,r),i=o._internalRoot,"function"==typeof a){var l=a;a=function(){var e=jl(i);l.call(e)}}tl((function(){Dl(t,i,e,a)}))}return jl(i)}function Bl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Hl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ul(t))throw Error(i(200));return Bl(e,t,null,n)}Vl.prototype.render=function(e){Dl(e,this._internalRoot,null,null)},Vl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Dl(null,e,null,(function(){t[wn]=null}))},bt=function(e){if(13===e.tag){var t=Ya(Ks(),150,100);Xs(e,t),Fl(e,t)}},gt=function(e){13===e.tag&&(Xs(e,3),Fl(e,3))},ft=function(e){if(13===e.tag){var t=Ks();Xs(e,t=Ys(t,e,null)),Fl(e,t)}},T=function(e,t,n){switch(t){case"input":if(_e(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=Nn(r);if(!a)throw Error(i(90));Ee(r),_e(r,a)}}}break;case"textarea":Ae(e,n);break;case"select":null!=(t=n.value)&&ke(e,!!n.multiple,t,!1)}},R=el,I=function(e,t,n,r,a){var o=Os;Os|=4;try{return Ga(98,e.bind(null,t,n,r,a))}finally{0===(Os=o)&&Wa()}},D=function(){0==(49&Os)&&(function(){if(null!==Gs){var e=Gs;Gs=null,e.forEach((function(e,t){Il(t,e),Qs(t)})),Wa()}}(),bl())},j=function(e,t){var n=Os;Os|=2;try{return e(t)}finally{0===(Os=n)&&Wa()}};var Wl,Kl,Yl={Events:[Tn,kn,Nn,w,O,jn,function(e){at(e,Dn)},A,L,Qt,st,bl,{current:!1}]};Kl=(Wl={findFiberByHostInstance:Pn,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);El=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},xl=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(a({},Wl,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Kl?Kl(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yl,t.createPortal=Hl,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(i(188));throw Error(i(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Os))throw Error(i(187));var n=Os;Os|=1;try{return Ga(99,e.bind(null,t))}finally{Os=n,Wa()}},t.hydrate=function(e,t,n){if(!Ul(t))throw Error(i(200));return Gl(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ul(t))throw Error(i(200));return Gl(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ul(e))throw Error(i(40));return!!e._reactRootContainer&&(tl((function(){Gl(null,null,e,!1,(function(){e._reactRootContainer=null,e[wn]=null}))})),!0)},t.unstable_batchedUpdates=el,t.unstable_createPortal=function(e,t){return Hl(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ul(n))throw Error(i(200));if(null==e||void 0===e._reactInternalFiber)throw Error(i(38));return Gl(e,t,n,!1,r)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=n(22)},function(e,t,n){"use strict";
/** @license React v0.19.1
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r,a,o,i,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,p=null,c=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(c,0),e}},u=Date.now();t.unstable_now=function(){return Date.now()-u},r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(c,0))},a=function(e,t){p=setTimeout(e,t)},o=function(){clearTimeout(p)},i=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,h=window.Date,m=window.setTimeout,b=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var f=h.now();t.unstable_now=function(){return h.now()-f}}var v=!1,y=null,C=-1,E=5,x=0;i=function(){return t.unstable_now()>=x},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):E=0<e?Math.floor(1e3/e):5};var O=new MessageChannel,S=O.port2;O.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();x=e+E;try{y(!0,e)?S.postMessage(null):(v=!1,y=null)}catch(e){throw S.postMessage(null),e}}else v=!1},r=function(e){y=e,v||(v=!0,S.postMessage(null))},a=function(e,n){C=m((function(){e(t.unstable_now())}),n)},o=function(){b(C),C=-1}}function _(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<T(a,t)))break e;e[r]=t,e[n]=a,n=r}}function w(e){return void 0===(e=e[0])?null:e}function P(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var o=2*(r+1)-1,i=e[o],s=o+1,l=e[s];if(void 0!==i&&0>T(i,n))void 0!==l&&0>T(l,i)?(e[r]=l,e[s]=n,r=s):(e[r]=i,e[o]=n,r=o);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var k=[],N=[],M=1,A=null,L=3,R=!1,I=!1,D=!1;function j(e){for(var t=w(N);null!==t;){if(null===t.callback)P(N);else{if(!(t.startTime<=e))break;P(N),t.sortIndex=t.expirationTime,_(k,t)}t=w(N)}}function z(e){if(D=!1,j(e),!I)if(null!==w(k))I=!0,r(F);else{var t=w(N);null!==t&&a(z,t.startTime-e)}}function F(e,n){I=!1,D&&(D=!1,o()),R=!0;var r=L;try{for(j(n),A=w(k);null!==A&&(!(A.expirationTime>n)||e&&!i());){var s=A.callback;if(null!==s){A.callback=null,L=A.priorityLevel;var l=s(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?A.callback=l:A===w(k)&&P(k),j(n)}else P(k);A=w(k)}if(null!==A)var p=!0;else{var c=w(N);null!==c&&a(z,c.startTime-n),p=!1}return p}finally{A=null,L=r,R=!1}}function V(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){I||R||(I=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return w(k)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,n,i){var s=t.unstable_now();if("object"==typeof i&&null!==i){var l=i.delay;l="number"==typeof l&&0<l?s+l:s,i="number"==typeof i.timeout?i.timeout:V(e)}else i=V(e),l=s;return e={id:M++,callback:n,priorityLevel:e,startTime:l,expirationTime:i=l+i,sortIndex:-1},l>s?(e.sortIndex=l,_(N,e),null===w(k)&&e===w(N)&&(D?o():D=!0,a(z,l-s))):(e.sortIndex=i,_(k,e),I||R||(I=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();j(e);var n=w(k);return n!==A&&null!==A&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<A.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(24),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,s,l=1,p={},c=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){m(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){m(e.data)},r=function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(m,0,e)}:(i="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&m(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(i+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return p[l]=a,r(l),l++},d.clearImmediate=h}function h(e){delete p[e]}function m(e){if(c)setTimeout(m,0,e);else{var t=p[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{h(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(12),n(25))},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,p=[],c=!1,u=-1;function d(){c&&l&&(c=!1,l.length?p=l.concat(p):u=-1,p.length&&h())}function h(){if(!c){var e=s(d);c=!0;for(var t=p.length;t;){for(l=p,p=[];++u<t;)l&&l[u].run();u=-1,t=p.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function b(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new m(e,t)),1!==p.length||c||s(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=b,a.addListener=b,a.once=b,a.off=b,a.removeListener=b,a.removeAllListeners=b,a.emit=b,a.prependListener=b,a.prependOnceListener=b,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(27);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports="data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg' width='17' height='17'%3E %3Cpath d='M4.21967 8.46967C4.51256 8.17678 4.98744 8.17678 5.28033 8.46967L12 15.1893L18.7197 8.46967C19.0126 8.17678 19.4874 8.17678 19.7803 8.46967C20.0732 8.76256 20.0732 9.23744 19.7803 9.53033L12.5303 16.7803C12.2374 17.0732 11.7626 17.0732 11.4697 16.7803L4.21967 9.53033C3.92678 9.23744 3.92678 8.76256 4.21967 8.46967Z' fill='white' /%3E %3C/svg%3E"},function(e,t,n){var r=n(8),a=n(30);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,'.color-picker-container{width:320px;height:300px;background-color:white;display:grid;grid-template-columns:100%;grid-template-rows:50% 50px 60px 40px 1fr auto;font-family:"acumin-pro-condensed";font-weight:normal;font-size:14px}.color-picker-container.with-hints{height:380px}.color-picker-container .color-picker-saturation{grid-row:1;grid-column:1;display:grid;grid-template-columns:100%;grid-template-rows:100%;position:relative;cursor:pointer}.color-picker-container .color-picker-saturation .color-picker-saturation-white{grid-row:1;grid-column:1;background:-webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.color-picker-container .color-picker-saturation .color-picker-saturation-black{grid-row:1;grid-column:1;background:-webkit-linear-gradient(to top, #000, rgba(0,0,0,0));background:linear-gradient(to top, #000, rgba(0,0,0,0))}.color-picker-container .color-picker-saturation .color-picker-saturation-cursor{pointer-events:none;width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,0.3),0 0 1px 2px rgba(0,0,0,0.4);border-radius:50%;transform:translate(-2px, -2px);position:absolute}.color-picker-container .color-picker-hue{grid-row:2;grid-column:1;display:grid;margin:10px;grid-template-columns:24% 76%;grid-template-rows:100%}.color-picker-container .color-picker-hue .color-picker-hue-color{grid-row:1;grid-column:1;align-self:center;justify-self:center;width:30px;height:30px;border-radius:15px;border:1px solid black}.color-picker-container .color-picker-hue .color-picker-hue-slider{grid-row:1;grid-column:2;align-self:center;height:16px;position:relative;cursor:pointer;background:linear-gradient(to right, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-linear-gradient(to right, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.color-picker-container .color-picker-hue .color-picker-hue-slider .color-picker-hue-cursor{pointer-events:none;width:8px;height:18px;transform:translate(-4px, -2px);background-color:#f8f8f8;box-shadow:0 1px 4px 0 rgba(0,0,0,0.37);position:absolute}.color-picker-container .color-picker-component{display:grid;margin:5px;grid-template-columns:100%;grid-template-rows:50% 50%}.color-picker-container .color-picker-component .color-picker-component-value{justify-self:center;align-self:center;grid-row:1;grid-column:1;margin-bottom:4px}.color-picker-container .color-picker-component .color-picker-component-value input{width:50px}.color-picker-container .color-picker-component .color-picker-component-label{justify-self:center;align-self:center;grid-row:2;grid-column:1;color:black}.color-picker-container .color-picker-rgb{grid-row:3;grid-column:1;display:grid;margin:10px;grid-template-columns:20% 6.66% 20% 6.66% 20% 6.66% 20%;grid-template-rows:100%}.color-picker-container .red{grid-row:1;grid-column:1}.color-picker-container .green{grid-row:1;grid-column:3}.color-picker-container .blue{grid-row:1;grid-column:5}.color-picker-container .alpha{grid-row:1;grid-column:7}.color-picker-container .alpha.grayed{opacity:0.5}.color-picker-container .color-picker-hex{grid-row:4;grid-column:1;display:grid;grid-template-columns:20% 80%;grid-template-rows:100%}.color-picker-container .color-picker-hex .color-picker-hex-label{justify-self:center;align-self:center;grid-row:1;grid-column:1;margin-left:10px;color:black}.color-picker-container .color-picker-hex .color-picker-hex-value{justify-self:left;align-self:center;grid-row:1;grid-column:2;margin-left:10px;margin-right:10px}.color-picker-container .color-picker-hex .color-picker-hex-value input{width:70px}.color-picker-container .color-picker-warning{color:black;font-size:11px;padding:4px;justify-self:left;align-self:center;grid-row:6;grid-column:1}\n',""]),e.exports=t},function(e,t,n){var r=n(8),a=n(32);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#performance-viewer{display:grid;height:100%;width:100%;grid-template-columns:25% 75%;font-family:'acumin-pro-condensed'}#performance-viewer .performancePlayheadButton{grid-area:liveButton;height:30px;width:100px;justify-self:right;background-color:#dcdfe1;color:#2e3f47;outline:2px #2e3f47;margin:5px;position:absolute;top:10px;right:10px}#performance-viewer #performance-viewer-sidebar{display:flex;flex-direction:column;overflow-y:scroll;border:2px solid gray}#performance-viewer #performance-viewer-sidebar .sidebar-item{display:grid;width:100%;align-items:center;padding:5px 0px}#performance-viewer #performance-viewer-sidebar .header{color:white;grid-template-columns:10px 9fr 1fr 10px}#performance-viewer #performance-viewer-sidebar .header .category{grid-column:2}#performance-viewer #performance-viewer-sidebar .header .value{grid-column:3}#performance-viewer #performance-viewer-sidebar .version-header{background-color:#2e3f47;color:white;grid-template-columns:10px 1fr 1fr 10px;font-size:smaller}#performance-viewer #performance-viewer-sidebar .version-header .category{grid-column:2}#performance-viewer #performance-viewer-sidebar .version-header .value{grid-column:3;display:flex;justify-content:end}#performance-viewer #performance-viewer-sidebar .category-header{background-color:#4a5960;text-transform:uppercase;font-size:smaller}#performance-viewer #performance-viewer-sidebar .measure{color:black;grid-template-columns:10px 6fr 1fr}#performance-viewer #performance-viewer-sidebar .measure .category{display:grid;grid-template-columns:14px 4px 14px 6px 1fr;grid-column:2;align-items:center}#performance-viewer #performance-viewer-sidebar .measure .category .color-picker{grid-column:3}#performance-viewer #performance-viewer-sidebar .measure .category .sidebar-item-label{grid-column:5}#performance-viewer #performance-viewer-sidebar .measure .value{grid-column:3}#performance-viewer #performance-viewer-sidebar .measure:nth-child(odd){background-color:#dcdfe1}#performance-viewer #performance-viewer-sidebar .measure:nth-child(even){background-color:#ebedee}#performance-viewer #performance-viewer-sidebar .checkBoxLine{color:white;width:100%;height:100%;display:flex;justify-content:center;align-items:center}#performance-viewer #performance-viewer-sidebar .checkBoxLine .disabled{color:gray}#performance-viewer #performance-viewer-sidebar .color-picker{width:100%}#performance-viewer #performance-viewer-sidebar .color-picker .color-rect{height:14px;width:14px;cursor:pointer}#performance-viewer #performance-viewer-sidebar .color-picker .color-picker-cover{position:fixed;top:0px;right:0px;bottom:0px;left:0px;z-index:100}#performance-viewer #performance-viewer-sidebar .color-picker .color-picker-float{position:absolute}#performance-viewer #performance-viewer-sidebar .color-picker .color-picker-float .color-picker-container{width:200px}\n",""]),e.exports=t},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M8.07,21.72a1.42,1.42,0,0,0-.32,2,1.44,1.44,0,0,0,.38.36l8.47,5.43a1.42,1.42,0,0,0,2-.44,1.4,1.4,0,0,0,.22-.75V16.8a1.43,1.43,0,0,0-1.43-1.41,1.39,1.39,0,0,0-.81.26Zm9.49,6.58a.2.2,0,0,1-.31.17L8.79,23a.22.22,0,0,1,0-.29l0-.05,8.46-6.07a.2.2,0,0,1,.28,0,.2.2,0,0,1,0,.13Z' style='fill:%23888'/%3E%3Cpath d='M4.22,29.17a.61.61,0,0,0,1.22,0V15.83a.61.61,0,0,0-1.22,0h0Z' style='fill:%23ffc017'/%3E%3Cpath d='M3.48,25.91a1.35,1.35,0,1,0,2.7,0V19.09a1.35,1.35,0,1,0-2.7,0h0Z' style='fill:%23ffc017'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M18.78,28.3a1.43,1.43,0,0,1-1.43,1.41,1.4,1.4,0,0,1-.75-.22L8.13,24.06a1.42,1.42,0,0,1-.42-2,1.45,1.45,0,0,1,.36-.38l8.47-6.07a1.42,1.42,0,0,1,2,.34,1.39,1.39,0,0,1,.26.81Z' style='fill:%23ccc'/%3E%3Cpath d='M4.22,29.17a.61.61,0,0,0,1.22,0V15.83a.61.61,0,0,0-1.22,0h0Z' style='fill:%23ffc017'/%3E%3Cpath d='M3.48,25.91a1.35,1.35,0,1,0,2.7,0V19.09a1.35,1.35,0,1,0-2.7,0h0Z' style='fill:%23ffc017'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M6.28,22a.6.6,0,0,0,0,1.06l9.87,5.36a.59.59,0,0,0,.8-.22.64.64,0,0,0,.08-.3V17.13a.6.6,0,0,0-.58-.6.61.61,0,0,0-.3.08Zm12,5.9a1.79,1.79,0,0,1-1.81,1.79,1.77,1.77,0,0,1-.84-.21l-9.92-5.4A1.81,1.81,0,0,1,5,21.64a1.85,1.85,0,0,1,.72-.72l9.87-5.37a1.8,1.8,0,0,1,2.44.74,1.77,1.77,0,0,1,.21.84Z' style='fill:%23888'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M18.23,27.87a1.79,1.79,0,0,1-1.81,1.79,1.77,1.77,0,0,1-.84-.21L5.71,24.08A1.81,1.81,0,0,1,5,21.64a1.85,1.85,0,0,1,.72-.72l9.87-5.37a1.8,1.8,0,0,1,2.44.74,1.77,1.77,0,0,1,.21.84Z' style='fill:%23ccc'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M6.85,16.61a.59.59,0,0,0-.8.22.64.64,0,0,0-.08.3V27.87a.6.6,0,0,0,.58.6.61.61,0,0,0,.3-.08L16.72,23a.6.6,0,0,0,0-1.06Zm-2.08.52a1.79,1.79,0,0,1,1.81-1.79,1.77,1.77,0,0,1,.84.21l9.87,5.37A1.81,1.81,0,0,1,18,23.36a1.85,1.85,0,0,1-.72.72L7.42,29.45A1.8,1.8,0,0,1,5,28.71a1.77,1.77,0,0,1-.21-.84Z' style='fill:%23888'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M4.77,17.13a1.79,1.79,0,0,1,1.81-1.79,1.77,1.77,0,0,1,.84.21l9.87,5.37A1.81,1.81,0,0,1,18,23.36a1.85,1.85,0,0,1-.72.72L7.42,29.45A1.8,1.8,0,0,1,5,28.71a1.77,1.77,0,0,1-.21-.84Z' style='fill:%23ccc'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M6.46,15.65a1.42,1.42,0,0,0-2,.34,1.39,1.39,0,0,0-.26.81V28.3a1.43,1.43,0,0,0,1.43,1.41,1.4,1.4,0,0,0,.75-.22l8.47-5.43a1.42,1.42,0,0,0,.42-2,1.45,1.45,0,0,0-.36-.38Zm-1,1.15a.2.2,0,0,1,.32-.17l8.46,6.07a.22.22,0,0,1,0,.29s0,0,0,.05L5.75,28.47a.2.2,0,0,1-.28-.06.2.2,0,0,1,0-.11Z' style='fill:%23888'/%3E%3Cpath d='M17.56,29.17a.61.61,0,0,0,1.22,0V15.83a.61.61,0,0,0-1.22,0h0Z' style='fill:%23ffc017'/%3E%3Cpath d='M16.82,25.91a1.35,1.35,0,0,0,2.7,0V19.09a1.35,1.35,0,1,0-2.7,0h0Z' style='fill:%23ffc017'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M4.22,16.8a1.43,1.43,0,0,1,1.43-1.41,1.39,1.39,0,0,1,.81.26l8.47,6.07a1.42,1.42,0,0,1,.32,2,1.44,1.44,0,0,1-.38.36L6.4,29.49a1.42,1.42,0,0,1-2-.44,1.4,1.4,0,0,1-.22-.75Z' style='fill:%23ccc'/%3E%3Cpath d='M17.56,29.17a.61.61,0,0,0,1.22,0V15.83a.61.61,0,0,0-1.22,0h0Z' style='fill:%23ffc017'/%3E%3Cpath d='M16.82,25.91a1.35,1.35,0,0,0,2.7,0V19.09a1.35,1.35,0,1,0-2.7,0h0Z' style='fill:%23ffc017'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M12.32,16.79v4.14l5.94-4.62a.61.61,0,0,1,.86.08.63.63,0,0,1,.14.4V28.21a.61.61,0,0,1-.6.62.63.63,0,0,1-.4-.14l-5.94-4.62v4.14a.61.61,0,0,1-.6.62.63.63,0,0,1-.4-.14L4,23a.61.61,0,0,1-.15-.85A.54.54,0,0,1,4,22l7.35-5.71a.61.61,0,0,1,.85.13A.63.63,0,0,1,12.32,16.79Zm-7,5.71L11.09,27V18Zm7,0h0L18,27V18Z' style='fill:%23888'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M11.33,16.31,4,22a.61.61,0,0,0-.15.85A.54.54,0,0,0,4,23l7.35,5.71a.61.61,0,0,0,.86-.08.63.63,0,0,0,.14-.4V24.07l5.94,4.62a.61.61,0,0,0,.86-.08.63.63,0,0,0,.14-.4V16.79a.61.61,0,0,0-.6-.62.63.63,0,0,0-.4.14l-5.94,4.62V16.79a.61.61,0,0,0-1-.48Z' style='fill:%23ccc'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M11.67,16.31,19,22a.61.61,0,0,1,.15.85A.54.54,0,0,1,19,23l-7.35,5.71a.61.61,0,0,1-.86-.08.63.63,0,0,1-.14-.4V24.07L4.74,28.69a.61.61,0,0,1-.86-.08.63.63,0,0,1-.14-.4V16.79a.61.61,0,0,1,.6-.62.63.63,0,0,1,.4.14l5.94,4.62V16.79a.61.61,0,0,1,.61-.61A.58.58,0,0,1,11.67,16.31ZM11.91,18v9l5.73-4.46ZM5,18v9l5.71-4.44h0Z' style='fill:%23888'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M11.67,16.31,19,22a.61.61,0,0,1,.15.85A.54.54,0,0,1,19,23l-7.35,5.71a.61.61,0,0,1-.86-.08.63.63,0,0,1-.14-.4V24.07L4.74,28.69a.61.61,0,0,1-.86-.08.63.63,0,0,1-.14-.4V16.79a.61.61,0,0,1,.6-.62.63.63,0,0,1,.4.14l5.94,4.62V16.79a.61.61,0,0,1,.61-.61A.58.58,0,0,1,11.67,16.31Z' style='fill:%23ccc'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M17.37,16.43a.2.2,0,0,1,.2.2h0V28.37a.2.2,0,0,1-.2.2H5.63a.2.2,0,0,1-.2-.2h0V16.63a.2.2,0,0,1,.2-.2H17.37ZM5.63,15.21a1.44,1.44,0,0,0-1.42,1.42V28.37a1.44,1.44,0,0,0,1.42,1.42H17.37a1.44,1.44,0,0,0,1.42-1.42V16.63a1.44,1.44,0,0,0-1.42-1.42Z' style='fill:%238c2f2f'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M5.63,15.21a1.44,1.44,0,0,0-1.42,1.42V28.37a1.44,1.44,0,0,0,1.42,1.42H17.37a1.44,1.44,0,0,0,1.42-1.42V16.63a1.44,1.44,0,0,0-1.42-1.42Z' style='fill:%23c12d2d'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M6.46,15.65a1.42,1.42,0,0,0-2,.34,1.39,1.39,0,0,0-.26.81V28.3a1.43,1.43,0,0,0,1.43,1.41,1.4,1.4,0,0,0,.75-.22l8.47-5.43a1.42,1.42,0,0,0,.42-2,1.45,1.45,0,0,0-.36-.38Zm-1,1.15a.2.2,0,0,1,.32-.17l8.46,6.07a.22.22,0,0,1,0,.29s0,0,0,.05L5.75,28.47a.2.2,0,0,1-.28-.06.2.2,0,0,1,0-.11Z' style='fill:%23888'/%3E%3Cpath d='M17.56,29.17a.61.61,0,0,0,1.22,0V15.83a.61.61,0,0,0-1.22,0h0Z' style='fill:%23888'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M4.22,16.8a1.43,1.43,0,0,1,1.43-1.41,1.39,1.39,0,0,1,.81.26l8.47,6.07a1.42,1.42,0,0,1,.32,2,1.44,1.44,0,0,1-.38.36L6.4,29.49a1.42,1.42,0,0,1-2-.44,1.4,1.4,0,0,1-.22-.75Z' style='fill:%23ccc'/%3E%3Cpath d='M18.78,15.83a.61.61,0,0,0-1.22,0V29.17a.61.61,0,0,0,1.22,0Z' style='fill:%23ccc'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Cpath d='M8.07,21.72a1.42,1.42,0,0,0-.32,2,1.44,1.44,0,0,0,.38.36l8.47,5.43a1.42,1.42,0,0,0,2-.44,1.4,1.4,0,0,0,.22-.75V16.8a1.43,1.43,0,0,0-1.43-1.41,1.39,1.39,0,0,0-.81.26Zm9.49,6.58a.2.2,0,0,1-.31.17L8.79,23a.22.22,0,0,1,0-.29l0-.05,8.46-6.07a.2.2,0,0,1,.28,0,.2.2,0,0,1,0,.13Zm-13.34.87a.61.61,0,0,0,1.22,0V15.83a.61.61,0,0,0-1.22,0h0Z' style='fill:%23888'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='45' viewBox='0 0 23 45'%3E%3Crect width='23' height='45' style='fill:none'/%3E%3Cpath d='M18.78,28.3a1.43,1.43,0,0,1-1.43,1.41,1.4,1.4,0,0,1-.75-.22L8.13,24.06a1.42,1.42,0,0,1-.42-2,1.45,1.45,0,0,1,.36-.38l8.47-6.07a1.42,1.42,0,0,1,2,.34,1.39,1.39,0,0,1,.26.81Z' style='fill:%23ccc'/%3E%3Cpath d='M4.22,29.17a.61.61,0,0,0,1.22,0V15.83a.61.61,0,0,0-1.22,0h0Z' style='fill:%23ccc'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' viewBox='0 0 20 21'%3E%3Crect width='20' height='21' style='fill:none'/%3E%3Cpath d='M13.68,17.39V3.61A.6.6,0,0,1,14.32,3a.61.61,0,0,1,.57.5V17.39a.61.61,0,1,1-1.22.08Zm-4.29,0V3.61A.61.61,0,0,1,10,3a.62.62,0,0,1,.61.53V17.39A.6.6,0,0,1,10,18a.61.61,0,0,1-.57-.5Zm-4.29,0V3.61a.61.61,0,0,1,1.22-.08V17.39a.6.6,0,0,1-.64.58.61.61,0,0,1-.57-.5Z' style='fill:%23333'/%3E%3C/svg%3E"},function(e,t,n){var r=n(8),a=n(53);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#bottom-bar{display:grid;grid-template-rows:100%;grid-template-columns:10px 210px 10px 1fr 10px 61px 10px}#bottom-bar #bottom-bar-total{grid-row:1;grid-column:6;color:white;background:#222222;height:25px;align-self:center;font-size:12pt}#bottom-bar #bottom-bar-total #clip-range{width:100%}#bottom-bar .control-button .control-button-image{display:unset}#bottom-bar .control-button .control-button-hover-image{display:none}#bottom-bar .control-button:hover{cursor:pointer}#bottom-bar .control-button:hover .control-button-image{display:none}#bottom-bar .control-button:hover .control-button-hover-image{display:unset}#bottom-bar .control-button:active{transform-origin:50% 50%;transform:scale(0.96)}#bottom-bar #media-player{grid-row:1;grid-column:2;display:grid;align-self:center;justify-self:center;grid-template-rows:100%;grid-template-columns:23px 23px 23px 23px 23px 23px 23px}#bottom-bar #media-player #start-key{grid-row:1;grid-column:1}#bottom-bar #media-player #prev-frame{grid-row:1;grid-column:2}#bottom-bar #media-player #first-key{grid-row:1;grid-column:3}#bottom-bar #media-player #rev-key{grid-row:1;grid-column:4}#bottom-bar #media-player #fwd-key{grid-row:1;grid-column:5}#bottom-bar #media-player #next-key{grid-row:1;grid-column:6}#bottom-bar #media-player #next-frame{grid-row:1;grid-column:7}#bottom-bar #media-player #end-key{grid-row:1;grid-column:8}#bottom-bar #range-selector{grid-row:1;grid-column:4;background:#222222;width:100%;height:calc(100% - 20px);margin:10px 0;position:relative}#bottom-bar #range-selector #range-scrollbar{position:absolute;left:2px;top:2px;right:2px;bottom:2px;background:#666666;display:grid;grid-template-rows:100%;grid-template-columns:20px auto 1fr auto 20px;color:#222222;font-family:'acumin-pro-condensed';font-size:14px;min-width:70px}#bottom-bar #range-selector #range-scrollbar #left-handle{grid-row:1;grid-column:1}#bottom-bar #range-selector #range-scrollbar #right-handle{grid-row:1;grid-column:5}#bottom-bar #range-selector #range-scrollbar #from-key{grid-row:1;grid-column:2;align-self:center;justify-self:center;user-select:none;pointer-events:none}#bottom-bar #range-selector #range-scrollbar #to-key{grid-row:1;grid-column:4;align-self:center;justify-self:center;user-select:none;pointer-events:none}#bottom-bar #range-selector #range-scrollbar .handle{width:20px;align-self:center;justify-self:center;cursor:pointer;user-select:none}#bottom-bar #range-selector #range-scrollbar .handle img{pointer-events:none}\n",""]),e.exports=t},function(e,t,n){var r=n(8),a=n(55);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#top-bar{display:grid;grid-template-columns:40px 200px 75px 8px 75px 8px 40px 40px 40px 40px 40px 40px 40px 40px 1fr 40px;grid-template-rows:100%}#top-bar .disabled{opacity:20%;pointer-events:none}#top-bar #top-bar-logo{grid-row:1;grid-column:1}#top-bar #top-bar-parent-name{grid-row:1;grid-column:2;font-family:'acumin-pro-condensed';font-size:15pt;color:white;display:grid;align-content:center;padding-bottom:5px}#top-bar #key-frame{grid-row:1;grid-column:3;height:24px;display:grid;align-self:center}#top-bar #key-value{grid-row:1;grid-column:5;height:24px;display:grid;align-self:center}#top-bar #new-key{grid-row:1;grid-column:7}#top-bar #frame-canvas{grid-row:1;grid-column:8}#top-bar #flatten-tangent{grid-row:1;grid-column:9}#top-bar #linear-tangent{grid-row:1;grid-column:10}#top-bar #break-tangent{grid-row:1;grid-column:11}#top-bar #unify-tangent{grid-row:1;grid-column:12}#top-bar #step-tangent{grid-row:1;grid-column:13}\n",""]),e.exports=t},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpolygon points='22.14 7.57 11.37 13.78 11.37 26.22 22.14 32.44 32.91 26.22 32.91 13.78 22.14 7.57' style='fill:%23fff'/%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpolygon points='32.91 13.78 29.54 11.84 26.29 13.71 29.66 15.65 32.91 13.78' style='fill:%23e0684b'/%3E%3Cpolygon points='14.61 15.65 25.38 9.44 22.14 7.57 11.37 13.78 14.61 15.65' style='fill:%23e0684b'/%3E%3Cpolygon points='18.77 21.95 22.14 23.89 25.51 21.95 22.14 20 18.77 21.95' style='fill:%23e0684b'/%3E%3Cpolygon points='29.66 15.65 29.66 24.34 22.14 28.69 14.61 24.34 14.61 15.65 11.37 13.78 11.37 26.22 22.14 32.44 32.91 26.22 32.91 13.78 29.66 15.65' style='fill:%23bb464b'/%3E%3Cpolygon points='22.14 16.11 18.77 18.05 18.77 21.95 22.14 20 25.51 21.95 25.51 18.05 22.14 16.11' style='fill:%23bb464b'/%3E%3Cpolygon points='29.66 15.65 25.51 18.05 25.51 21.95 22.14 23.89 22.14 28.69 29.66 24.34 29.66 15.65' style='fill:%23e0ded8'/%3E%3Cpolygon points='14.61 15.65 18.77 18.05 18.77 21.95 22.14 23.89 22.14 28.69 14.61 24.34 14.61 15.65' style='fill:%23d5d2ca'/%3E%3Cpolygon points='25.38 9.44 29.54 11.84 26.29 13.71 29.66 15.65 25.51 18.05 22.14 16.11 18.77 18.05 14.61 15.65 25.38 9.44' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M14.05,15a1,1,0,0,1,1-1h1.59a.6.6,0,0,0,.59-.6.58.58,0,0,0-.59-.59H15A2.18,2.18,0,0,0,12.86,15v1.59a.58.58,0,0,0,.59.59h0a.6.6,0,0,0,.6-.59Zm0,10a1,1,0,0,0,1,1h1.59a.6.6,0,0,1,.59.6.58.58,0,0,1-.59.59H15A2.18,2.18,0,0,1,12.86,25V23.37a.58.58,0,0,1,.59-.59h0a.6.6,0,0,1,.6.59ZM25,14.05a1,1,0,0,1,1,1v1.59a.6.6,0,0,0,.6.59.58.58,0,0,0,.59-.59h0V15A2.18,2.18,0,0,0,25,12.86H23.37a.58.58,0,0,0-.59.59h0a.6.6,0,0,0,.59.6Zm1,11a1,1,0,0,1-1,1H23.37a.6.6,0,0,0-.59.6.58.58,0,0,0,.59.59H25A2.18,2.18,0,0,0,27.14,25V23.37a.58.58,0,0,0-.59-.59h0a.6.6,0,0,0-.6.59Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M21.83,14.83l3.34,3.34a2.59,2.59,0,0,1,0,3.66l-3.34,3.34a2.59,2.59,0,0,1-3.66,0l-3.34-3.34a2.59,2.59,0,0,1,0-3.66l3.34-3.34A2.59,2.59,0,0,1,21.83,14.83ZM19,15.68,15.68,19a1.37,1.37,0,0,0-.06,1.94l.06.06L19,24.32a1.37,1.37,0,0,0,1.94.06l.06-.06L24.32,21a1.37,1.37,0,0,0,.06-1.94L24.32,19,21,15.68a1.37,1.37,0,0,0-1.94-.06Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M28,18.5a1.51,1.51,0,0,0-1.41,1H11.5v1H26.59a1.5,1.5,0,1,0,1.41-2Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M26,14a1.49,1.49,0,0,0-2.4,1.69l-10,10,.71.71,10-10A1.49,1.49,0,0,0,26,14Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M27.11,13.05a1.49,1.49,0,0,0-2.05.53,1.47,1.47,0,0,0,.14,1.72l-4.78,8L20,22.92l-.42.42-4.78-8a1.47,1.47,0,0,0,.14-1.72,1.49,1.49,0,0,0-2-.53,1.5,1.5,0,0,0,1,2.76l4.91,8.26-1,1L20,27.16,22.12,25l-1-1,4.91-8.26a1.5,1.5,0,0,0,1.05-2.76Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M27.94,18.28a1.49,1.49,0,0,0-1.41,1h-5l-1.62-1.63-1.62,1.63h-5a1.5,1.5,0,1,0,0,1h5l1.62,1.62,1.62-1.62h5a1.5,1.5,0,1,0,1.41-2Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M29,16.71a1.5,1.5,0,1,0-2,1.41v5.67H11v1H28V18.12A1.51,1.51,0,0,0,29,16.71Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Crect width='10' height='10' style='fill:none'/%3E%3Cpath d='M5,1.41a1,1,0,0,0-.71.3L1.71,4.29a1,1,0,0,0,0,1.41h0L4.29,8.29a1,1,0,0,0,1.41,0h0L8.29,5.71a1,1,0,0,0,0-1.41h0L5.71,1.71A1,1,0,0,0,5,1.41Z' style='fill:%23aaa'/%3E%3Cpolyline points='5 2.41 5 2.41 7.59 5 5 7.59 2.41 5 5 2.41 5 2.41' style='fill:%23111'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5,1.41a1,1,0,0,0-.71.3L1.71,4.29a1,1,0,0,0,0,1.41h0L4.29,8.29a1,1,0,0,0,1.41,0h0L8.29,5.71a1,1,0,0,0,0-1.41h0L5.71,1.71A1,1,0,0,0,5,1.41Z' style='fill:%23ffc017'/%3E%3Crect width='10' height='10' style='fill:none'/%3E%3Cpolyline points='5 2.41 5 2.41 7.59 5 5 7.59 2.41 5 5 2.41 5 2.41' style='fill:%23111'/%3E%3C/svg%3E"},function(e,t,n){var r=n(8),a=n(67);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#canvas-zone{display:grid;grid-template-columns:100%;grid-template-rows:1fr 30px 10px 40px;overflow:hidden;position:relative}#canvas-zone #graph{grid-column:1;grid-row:1;width:100%;height:100%;background:#222222;display:grid;grid-template-columns:100%;grid-template-rows:100%;overflow:hidden;position:relative}#canvas-zone #graph #svg-graph-grid{grid-column:1;grid-row:1;width:100%;height:100%;pointer-events:none;z-index:1}#canvas-zone #graph #svg-graph-grid:focus{outline:none}#canvas-zone #graph #svg-graph-horizontal{grid-column:1;grid-row:1;margin-left:40px;width:calc(100% - 40px);height:100%;pointer-events:none;z-index:1}#canvas-zone #graph #svg-graph-horizontal:focus{outline:none}#canvas-zone #graph #dark-rectangle{grid-column:1;grid-row:1;margin-left:40px;width:calc(100% - 40px);height:100%;background:#111111;opacity:0.2;pointer-events:none;position:absolute}#canvas-zone #graph #block-rectangle{grid-column:1;grid-row:1;width:40px;height:100%;background:#222222;z-index:1}#canvas-zone #graph #svg-graph-curves{grid-column:1;grid-row:1;margin-left:40px;width:calc(100% - 40px);height:100%;z-index:2}#canvas-zone #graph #svg-graph-curves:focus{outline:none}#canvas-zone #graph #selection-rectangle{grid-column:1;grid-row:1;width:calc(100% - 40px);height:100%;pointer-events:none;position:absolute;left:40px;visibility:hidden;border:1px dashed white}#canvas-zone #range-frame-bar{grid-column:1;grid-row:4;width:100%;height:100%;background:#222222;pointer-events:none;display:grid;grid-template-rows:100%;grid-template-columns:100%;pointer-events:none;user-select:none}#canvas-zone #range-frame-bar #svg-range-frames{grid-column:1;grid-row:1;width:100%;height:100%}#canvas-zone #frame-bar{grid-column:1;grid-row:2;width:100%;height:100%;background:#222222;pointer-events:none;display:grid;grid-template-rows:100%;grid-template-columns:40px 1fr}#canvas-zone #frame-bar #angle-unit{grid-column:1;grid-row:1;background:#111111}#canvas-zone #frame-bar #frames{grid-column:1 / 3;grid-row:1;width:100%;height:100%;display:grid;grid-template-rows:100%;grid-template-columns:100%}#canvas-zone #frame-bar #frames #svg-frames{margin-left:40px;grid-column:1;grid-row:1;width:calc(100% - 40px);height:100%}#canvas-zone #play-head-control{grid-column:1;grid-row:2;position:absolute;height:30px;left:40px;width:calc(100% - 40px)}#canvas-zone #play-head{grid-column:1;grid-row:1 / 3;position:absolute;top:0;height:calc(100% - 5px);width:22px;margin-left:40px;display:grid;grid-template-columns:100%;grid-template-rows:1fr 22px;transform:translateX(-50%);pointer-events:none;z-index:3}#canvas-zone #play-head #play-head-bar{grid-row:1;grid-column:1;justify-self:center;width:1.5px;background:#ffffff;height:100%;pointer-events:none}#canvas-zone #play-head #play-head-circle{grid-row:2;grid-column:1;width:22px;height:22px;border-radius:50%;background:#FFFFFF;font-family:'acumin-pro-condensed';font-size:8pt;display:grid;align-content:center;justify-content:center;color:#555555;cursor:pointer}#canvas-zone #angle-mode{grid-column:1;grid-row:2;width:40px;height:100%;z-index:1;background:#222222}\n",""]),e.exports=t},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect width='20' height='20' style='fill:none'/%3E%3Cpath d='M10,4.1a6.62,6.62,0,0,1,1.33.16l.34.39.1.92a.85.85,0,0,0,.83.75,1.09,1.09,0,0,0,.4-.07l.85-.38.5.1A6,6,0,0,1,15.7,8.28l-.17.49-.75.56a.83.83,0,0,0-.18,1.16.77.77,0,0,0,.18.18l.75.56.17.49A6,6,0,0,1,14.3,14l-.5.1-.8-.35a.85.85,0,0,0-.76.05.83.83,0,0,0-.41.63l-.1.92-.34.39a5.82,5.82,0,0,1-2.69,0l-.33-.39-.1-.92a.83.83,0,0,0-.41-.63.85.85,0,0,0-.76,0l-.85.37L5.7,14a6,6,0,0,1-1.35-2.31l.17-.49.75-.56a.83.83,0,0,0,.18-1.16.77.77,0,0,0-.18-.18l-.75-.56-.17-.48A6.06,6.06,0,0,1,5.7,6l.5-.1.85.38a.85.85,0,0,0,.76,0,.83.83,0,0,0,.41-.63l.1-.92.34-.39A6.18,6.18,0,0,1,10,4.1ZM10,5a5.67,5.67,0,0,0-.82.07l-.07.59A1.73,1.73,0,0,1,7.2,7.21a1.53,1.53,0,0,1-.51-.13l-.55-.24a5,5,0,0,0-.81,1.4l.48.36A1.74,1.74,0,0,1,6.18,11a1.85,1.85,0,0,1-.37.37l-.48.36a5.07,5.07,0,0,0,.81,1.41l.55-.24A1.74,1.74,0,0,1,9,13.8a2,2,0,0,1,.14.53l.07.59a4.89,4.89,0,0,0,1.62,0l.07-.59a1.74,1.74,0,0,1,1.91-1.55,1.82,1.82,0,0,1,.52.14l.55.24a5,5,0,0,0,.81-1.4l-.48-.36A1.74,1.74,0,0,1,13.82,9a1.85,1.85,0,0,1,.37-.37l.48-.36a5,5,0,0,0-.81-1.4l-.55.24a1.86,1.86,0,0,1-.7.14,1.74,1.74,0,0,1-1.73-1.55l-.07-.59A4.45,4.45,0,0,0,10,5Zm0,2.72A2.27,2.27,0,1,1,7.73,10,2.27,2.27,0,0,1,10,7.72h0Zm0,.91A1.36,1.36,0,1,0,11.36,10,1.36,1.36,0,0,0,10,8.63Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fff;%7D%3C/style%3E%3C/defs%3E%3Cg id='UI'%3E%3Cpath class='cls-1' d='M21.13,20,28,26.87,26.87,28,20,21.13,13.13,28,12,26.87,18.87,20,12,13.13,13.13,12,20,18.87,26.87,12,28,13.13Z'/%3E%3C/g%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='2.89' style='fill:%23888'/%3E%3Crect width='10' height='10' style='fill:none'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M5.43,7.31,7.81,3.19a.51.51,0,0,0-.15-.68.55.55,0,0,0-.28-.07H2.62a.48.48,0,0,0-.5.47.45.45,0,0,0,.07.28L4.57,7.31a.49.49,0,0,0,.66.2A.48.48,0,0,0,5.43,7.31Z' style='fill:%23888'/%3E%3Crect width='10' height='10' style='fill:none'/%3E%3C/svg%3E"},function(e,t,n){var r=n(8),a=n(73);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#sideBar{display:grid;grid-template-columns:100%;grid-template-rows:30px 1fr}#sideBar #menu-bar{background:#252525;grid-row:1;grid-column:1;width:100%;height:100%;display:grid;grid-template-rows:100%;grid-template-columns:30px 30px 30px 30px 1fr 52px 3px}#sideBar #menu-bar.small{grid-template-columns:0px 0px 30px 30px 1fr 52px 3px}#sideBar #menu-bar #add-animation{grid-row:1;grid-column:1}#sideBar #menu-bar #load-animation{grid-row:1;grid-column:2}#sideBar #menu-bar #save-animation{grid-row:1;grid-column:3}#sideBar #menu-bar #edit-animation{grid-row:1;grid-column:4}#sideBar #menu-bar #framerate-animation{grid-row:1;grid-column:6}#sideBar .simple-button{width:80px;height:20px;color:white;font-family:'acumin-pro-condensed';font-size:10pt;background:#444444;border:0;line-height:12px;cursor:pointer;align-self:center;justify-self:center;border-radius:0}#sideBar .simple-button:active{transform-origin:center;transform:scale(0.95)}#sideBar #save-animation-pane{width:100%;height:100%;display:grid;grid-template-columns:100%;grid-template-rows:1fr 40px auto}#sideBar #save-animation-pane #save-animation-list{grid-row:1;grid-column:1;width:100%;height:100%;display:flex;flex-direction:column;padding-top:5px}#sideBar #save-animation-pane #save-animation-list .save-animation-list-entry{height:20px;margin-left:10px;display:flex;align-content:center;color:white;font-family:'acumin-pro-condensed';font-size:10pt;line-height:15px}#sideBar #save-animation-pane #save-animation-buttons{grid-row:2;grid-column:1;width:100%;height:100%;display:grid;grid-template-rows:100%;grid-template-columns:10px 1fr 10px 1fr 10px;align-items:center}#sideBar #save-animation-pane #save-animation-buttons #save-snippet{grid-row:1;grid-column:2}#sideBar #save-animation-pane #save-animation-buttons #save-file{grid-row:1;grid-column:4}#sideBar #save-animation-pane #save-animation-snippet{grid-row:3;grid-column:1;width:calc(100% - 31px);height:20px;align-content:center;color:white;font-family:'acumin-pro-condensed';font-size:10pt;padding-left:31px;background:#252525}#sideBar #load-animation-pane{width:100%;height:100%;display:grid;grid-template-columns:75px 1fr;grid-template-rows:10px 20px 10px 20px 10px 20px 1fr auto;color:white;font-family:'acumin-pro-condensed';font-size:10pt}#sideBar #load-animation-pane #load-animation-snippet-id-label{grid-row:2;grid-column:1;justify-self:end;margin-right:10px}#sideBar #load-animation-pane #load-animation-local-file-label{grid-row:6;grid-column:1;justify-self:end;margin-right:10px}#sideBar #load-animation-pane #load-snippet-id{grid-row:2;grid-column:2;margin-right:10px;border:0;background:#252525;width:127px;color:white;font-family:'acumin-pro-condensed';font-size:10pt}#sideBar #load-animation-pane #load-snippet{grid-row:4;grid-column:2;width:60px;justify-self:left}#sideBar #load-animation-pane input[type=\"file\"]{display:none}#sideBar #load-animation-pane #file-snippet-label{grid-row:6;grid-column:2;width:60px;justify-self:left;text-align:center;line-height:18px}#sideBar #load-animation-pane #load-animation-snippet{grid-row:8;grid-column:1 / 3;width:calc(100% - 31px);height:20px;align-content:center;color:white;font-family:'acumin-pro-condensed';font-size:10pt;padding-left:31px;background:#252525}#sideBar #add-animation-pane{grid-column:1;grid-row:2;width:100%;height:100%;display:grid;grid-template-columns:75px 1fr;grid-template-rows:10px 20px 10px 20px 10px 20px 10px 20px 10px 20px 10px 20px 1fr;color:white;font-family:'acumin-pro-condensed';font-size:10pt}#sideBar #add-animation-pane .input-text{border:0;background:#252525;width:127px;color:white;font-family:'acumin-pro-condensed';font-size:10pt}#sideBar #add-animation-pane .option{background:#252525;color:white;border:0}#sideBar #add-animation-pane #add-animation-display-name-label{grid-row:2;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-mode-label{grid-row:4;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-property-label{grid-row:6;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-type-label{grid-row:8;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-loop-mode-label{grid-row:10;grid-column:1;justify-self:end;margin-right:10px}#sideBar #add-animation-pane #add-animation-name{grid-row:2;grid-column:2;margin-right:10px}#sideBar #add-animation-pane #add-animation-mode{grid-row:4;grid-column:2;margin-right:10px;width:calc(100% - 10px)}#sideBar #add-animation-pane #add-animation-property{grid-row:6;grid-column:2;margin-right:10px;width:calc(100% - 10px)}#sideBar #add-animation-pane #add-animation-type{grid-row:8;grid-column:2;margin-right:10px}#sideBar #add-animation-pane #add-animation-loop-mode{grid-row:10;grid-column:2;margin-right:10px}#sideBar #add-animation-pane #add-animation{grid-row:12;grid-column:2;justify-self:left}#sideBar #edit-animation-pane{grid-column:1;grid-row:2;width:100%;height:100%;display:grid;grid-template-columns:75px 1fr;grid-template-rows:10px 20px 10px 20px 10px 20px 10px 20px 1fr;color:white;font-family:'acumin-pro-condensed';font-size:10pt;background:#111111}#sideBar #edit-animation-pane .input-text{border:0;background:#252525;width:127px;color:white;font-family:'acumin-pro-condensed';font-size:10pt}#sideBar #edit-animation-pane .option{background:#252525;color:white;border:0}#sideBar #edit-animation-pane #edit-animation-display-name-label{grid-row:2;grid-column:1;justify-self:end;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-property-label{grid-row:4;grid-column:1;justify-self:end;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-loop-mode-label{grid-row:6;grid-column:1;justify-self:end;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-name{grid-row:2;grid-column:2;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-property{grid-row:4;grid-column:2;margin-right:10px}#sideBar #edit-animation-pane #edit-animation-loop-mode{grid-row:6;grid-column:2;margin-right:10px}#sideBar #edit-animation-pane #edit-animation{grid-row:8;grid-column:1 / 3;display:grid;grid-template-columns:50% 50%;grid-template-rows:100%}#sideBar #edit-animation-pane #edit-animation #edit-animation-ok{grid-row:1;grid-column:1}#sideBar #edit-animation-pane #edit-animation #edit-animation-cancel{grid-row:1;grid-column:2}#sideBar #animation-list{background:#111111;grid-row:2;grid-column:1;width:100%;height:100%}#sideBar #animation-list .animation-entry{height:20px;display:grid;grid-template-columns:20px 10px 1fr 20px 20px;grid-template-rows:100%}#sideBar #animation-list .animation-entry.isActive{background:#444444}#sideBar #animation-list .animation-entry .animation-active-indicator{grid-row:1;grid-column:1;display:grid;margin:5px;padding-top:2px}#sideBar #animation-list .animation-entry .animation-chevron{grid-row:1;grid-column:2;display:grid;align-content:center;padding-top:5px;cursor:pointer}#sideBar #animation-list .animation-entry .animation-chevron .animation-chevron-image.collapsed{transform-origin:50% 50%;transform:rotateZ(-90deg)}#sideBar #animation-list .animation-entry .animation-name{cursor:pointer;grid-row:1;grid-column:3;font-family:'acumin-pro-condensed';font-size:10.5pt;color:white;display:grid;align-self:center;margin-left:5px;user-select:none}#sideBar #animation-list .animation-entry .animation-options{grid-row:1;grid-column:4}#sideBar #animation-list .animation-entry .animation-delete{grid-row:1;grid-column:5}\n",""]),e.exports=t},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Crect width='30' height='30' style='fill:none'/%3E%3Cpath d='M15,8.27a.58.58,0,0,1,.57.5v5.65h5.57a.58.58,0,0,1,.08,1.15H15.58v5.57a.58.58,0,0,1-1.15.08V15.58H8.85a.58.58,0,0,1-.08-1.15h5.65V8.85A.58.58,0,0,1,15,8.27Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Crect width='30' height='30' style='fill:none'/%3E%3Cpath d='M20.06,8.38a.59.59,0,0,0,.66-.51.59.59,0,0,0-.51-.66H9.93a.59.59,0,0,0-.51.66.57.57,0,0,0,.51.51ZM14.92,22.79H15a.59.59,0,0,0,.58-.5V11.55l2.9,2.89a.58.58,0,0,0,.76.06l.07-.06a.59.59,0,0,0,.05-.76l-.05-.06-3.9-3.89a.58.58,0,0,0-.76-.06l-.06.05-3.9,3.9a.58.58,0,0,0,0,.81h0a.58.58,0,0,0,.76.06l.07-.06,2.89-2.89V22.21A.59.59,0,0,0,14.92,22.79Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Crect width='30' height='30' style='fill:none'/%3E%3Cpath d='M8,10.16A2.13,2.13,0,0,1,10.1,8h7.78a2.51,2.51,0,0,1,1.78.73l1.58,1.58A2.53,2.53,0,0,1,22,12.12v7.73A2.13,2.13,0,0,1,19.89,22H10.15A2.14,2.14,0,0,1,8,19.87V10.16Zm2.13-1a1,1,0,0,0-1,1v9.69a1,1,0,0,0,1,1h.2v-4.1A1.74,1.74,0,0,1,12.06,15h5.85a1.74,1.74,0,0,1,1.74,1.74h0v4.07h.19a1,1,0,0,0,1-1v-7.7a1.38,1.38,0,0,0-.4-1l-1.6-1.53a1.26,1.26,0,0,0-.74-.38v2.11a1.74,1.74,0,0,1-1.74,1.74H12.87a1.73,1.73,0,0,1-1.75-1.73h0V9.19Zm8.34,11.63v-4a.59.59,0,0,0-.57-.59H12.09a.58.58,0,0,0-.58.58h0v4.07ZM12.29,9.19v2.13a.58.58,0,0,0,.58.58h3.48a.58.58,0,0,0,.59-.57h0V9.19Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Crect width='30' height='30' style='fill:none'/%3E%3Cpath d='M22,8A2.79,2.79,0,0,1,22,12h0l-9.33,9.33a1.76,1.76,0,0,1-.78.45l-4,1.09a.58.58,0,0,1-.72-.39.62.62,0,0,1,0-.33l1.09-4a1.76,1.76,0,0,1,.45-.78L18.06,8A2.8,2.8,0,0,1,22,8Zm-4.7,2.41L9.56,18.15a.46.46,0,0,0-.15.26l-.82,3,3-.82a.46.46,0,0,0,.26-.15l7.75-7.75Zm1.58-1.58-.75.75,2.29,2.29.75-.75a1.62,1.62,0,0,0-2.29-2.29Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t,n){var r=n(8),a=n(79);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#curve-editor{background:#333333;width:100%;height:100%;display:grid;grid-template-rows:40px calc(100% - 85px) 45px;grid-template-columns:10px 210px 10px 1fr 10px}#curve-editor #top-bar{background:#333333;grid-row:1;grid-column:1 / 6;width:100%;height:100%}#curve-editor #bottom-bar{background:#333333;grid-row:3;grid-column:1 / 6;width:100%;height:100%}#curve-editor #canvas-zone{grid-row:2;grid-column:4;width:100%;height:100%;background:#333333}#curve-editor #sidebar{grid-row:2;grid-column:2;width:100%;height:100%;background:#111111}#curve-editor .action-button:hover{background:#666666;color:white;cursor:pointer}#curve-editor .action-button.active{background:#111111}#curve-editor .action-button:active{transform-origin:50% 50%;transform:scale(0.96)}#curve-editor .push-button{cursor:pointer}#curve-editor .push-button.active{background:#666666}#curve-editor .text-input{color:white;background:#000000;font-family:'acumin-pro-condensed';font-size:11pt;border:0;margin:3px 1px;text-align:end;padding-right:4px}#curve-editor .text-input:focus{outline:none}\n",""]),e.exports=t},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M13.45,11.32a.78.78,0,0,0-.77.66v3a.77.77,0,0,0,.66.76h3a.78.78,0,0,0,.77-.77.77.77,0,0,0-.67-.76H15.36a7.43,7.43,0,1,1-2.64,4.38.77.77,0,1,0-1.51-.29,9,9,0,1,0,3-5.13V12.09A.76.76,0,0,0,13.45,11.32Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M13.5,28.5h13a.76.76,0,0,1,.75.75.75.75,0,0,1-.65.74H13.5a.75.75,0,0,1-.1-1.5Zm1-13.28,5-5a.73.73,0,0,1,1-.07l.09.07,5,5a.75.75,0,0,1,0,1.06.75.75,0,0,1-1,.07l-.09-.07-3.72-3.72V26.25a.75.75,0,0,1-.65.74H20a.75.75,0,0,1-.74-.65V12.56l-3.72,3.72a.76.76,0,0,1-1,.07l-.08-.07a.75.75,0,0,1-.07-1l.07-.08,5-5Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M29.36,18.39a2.18,2.18,0,0,1,0,3.08l-7.91,7.91a1.22,1.22,0,0,1-.89.37h-1.7a.85.85,0,0,1-.86-.86v-1.7a1.22,1.22,0,0,1,.37-.89l7.91-7.91A2.18,2.18,0,0,1,29.36,18.39ZM30,23.11V27.5a2.25,2.25,0,0,1-2.25,2.25H23l1.5-1.5h3.25a.76.76,0,0,0,.75-.75v-3ZM23.63,10.25a1.23,1.23,0,0,1,.76.26L29.64,15a1.21,1.21,0,0,1,.36.9v1.23a2.43,2.43,0,0,0-.75-.43,2,2,0,0,0-.74-.1V16L24,12.14V15a1.75,1.75,0,0,1-1.75,1.75h-6A1.75,1.75,0,0,1,14.5,15V11.75H12.25a.75.75,0,0,0-.75.75v15a.75.75,0,0,0,.75.75H13V22.51a1.75,1.75,0,0,1,1.61-1.74H22l-1.55,1.5H14.75a.25.25,0,0,0-.24.2v5.79h2v1.5H12.25A2.25,2.25,0,0,1,10,27.5v-15a2.25,2.25,0,0,1,2.25-2.25Zm3.72,9.21-7.84,7.83v.95h.95l7.83-7.84a.66.66,0,0,0-.94-.94ZM22.5,11.75H16V15a.25.25,0,0,0,.25.25h6A.25.25,0,0,0,22.5,15Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:none;%7D.cls-2%7Bfill:%23e0684b;%7D.cls-3%7Bfill:%23bb464b;%7D.cls-4%7Bfill:%23e0ded8;%7D.cls-5%7Bfill:%23d5d2ca;%7D.cls-6%7Bfill:%23fff;%7D%3C/style%3E%3C/defs%3E%3Cg id='UI'%3E%3Crect class='cls-1' width='40' height='40'/%3E%3Cpolygon class='cls-2' points='32.91 13.78 29.54 11.84 26.29 13.71 29.66 15.65 32.91 13.78'/%3E%3Cpolygon class='cls-2' points='14.61 15.65 25.38 9.44 22.14 7.57 11.37 13.78 14.61 15.65'/%3E%3Cpolygon class='cls-2' points='18.77 21.95 22.14 23.89 25.51 21.95 22.14 20 18.77 21.95'/%3E%3Cpolygon class='cls-3' points='29.66 15.65 29.66 24.34 22.14 28.69 14.61 24.34 14.61 15.65 11.37 13.78 11.37 26.22 22.14 32.44 32.91 26.22 32.91 13.78 29.66 15.65'/%3E%3Cpolygon class='cls-3' points='22.14 16.11 18.77 18.05 18.77 21.95 22.14 20 25.51 21.95 25.51 18.05 22.14 16.11'/%3E%3Cpolygon class='cls-4' points='29.66 15.65 25.51 18.05 25.51 21.95 22.14 23.89 22.14 28.69 29.66 24.34 29.66 15.65'/%3E%3Cpolygon class='cls-5' points='14.61 15.65 18.77 18.05 18.77 21.95 22.14 23.89 22.14 28.69 14.61 24.34 14.61 15.65'/%3E%3Cpolygon class='cls-6' points='25.38 9.44 29.54 11.84 26.29 13.71 29.66 15.65 25.51 18.05 22.14 16.11 18.77 18.05 14.61 15.65 25.38 9.44'/%3E%3C/g%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M12.5,21a.5.5,0,0,1,.5.5V25a2,2,0,0,0,2,2h3.5a.5.5,0,0,1,0,1H15a3,3,0,0,1-3-3V21.5A.5.5,0,0,1,12.5,21Zm15,0a.5.5,0,0,1,.49.41V25a3,3,0,0,1-2.82,3H21.5a.5.5,0,0,1-.09-1H25a2,2,0,0,0,2-1.85V21.5A.5.5,0,0,1,27.5,21Zm-9-9a.5.5,0,0,1,.09,1H15a2,2,0,0,0-2,1.85V18.5a.5.5,0,0,1-1,.09V15a3,3,0,0,1,2.82-3H18.5ZM25,12a3,3,0,0,1,3,2.82V18.5a.5.5,0,0,1-1,.09V15a2,2,0,0,0-1.85-2H21.5a.5.5,0,0,1-.09-1H25Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M15.47,20.28l.08.07a.75.75,0,0,0,1-.07l2.72-2.72v6.79A.75.75,0,0,0,20,25h.1a.75.75,0,0,0,.65-.74V17.56l2.72,2.72.08.07a.75.75,0,0,0,1-1.13l-4-4-.08-.07a.75.75,0,0,0-1,.07l-4,4-.07.08A.75.75,0,0,0,15.47,20.28Z' style='fill:%23fff'/%3E%3Cpath d='M30,20A10,10,0,1,0,20,30,10,10,0,0,0,30,20ZM11.5,20A8.5,8.5,0,1,1,20,28.5,8.51,8.51,0,0,1,11.5,20Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M24.53,19.72l-.08-.07a.75.75,0,0,0-1,.07l-2.72,2.72V15.65A.75.75,0,0,0,20,15h-.1a.75.75,0,0,0-.65.74v6.69l-2.72-2.72-.08-.07a.75.75,0,0,0-1,1.13l4,4,.08.07a.75.75,0,0,0,1-.07l4-4,.07-.08A.75.75,0,0,0,24.53,19.72Z' style='fill:%23fff'/%3E%3Cpath d='M10,20A10,10,0,1,0,20,10,10,10,0,0,0,10,20Zm18.5,0A8.5,8.5,0,1,1,20,11.5,8.51,8.51,0,0,1,28.5,20Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M16.89,16v3h2.82v1.27H16.89v3h-1.3v-3H12.74V19h2.85V16Z' style='fill:%23fff'/%3E%3Cpath d='M25.34,24.62l-1.75-4.21h0L21.8,24.62H20l2.61-5.57-2.51-5.29H22l1.63,3.8h0l1.65-3.8h1.77l-2.49,5.11,2.64,5.75Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M17.75,18.72v1.45H14.33V18.72Z' style='fill:%23fff'/%3E%3Cpath d='M23.75,24.62,22,20.41h0l-1.77,4.21H18.44l2.61-5.57-2.52-5.29h1.93l1.63,3.8h0l1.65-3.8h1.78L23,18.87l2.64,5.75Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M16.84,16v3h2.82v1.27H16.84v3h-1.3v-3H12.69V19h2.85V16Z' style='fill:%23fff'/%3E%3Cpath d='M22.79,24.62V20.68a.63.63,0,0,0-.06-.32L20,13.76h1.87c.66,1.76,1.51,4,1.83,5.13.4-1.24,1.25-3.46,1.84-5.13h1.78l-2.77,6.61a.73.73,0,0,0-.05.34v3.91Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M17.7,18.72v1.45H14.28V18.72Z' style='fill:%23fff'/%3E%3Cpath d='M21.21,24.62V20.68a.63.63,0,0,0-.07-.32l-2.73-6.6h1.87c.66,1.76,1.5,4,1.82,5.13.4-1.24,1.25-3.46,1.84-5.13h1.78L23,20.37a.9.9,0,0,0-.05.34v3.91Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M17.1,16v3h2.82v1.27H17.1v3H15.81v-3H13V19h2.85V16Z' style='fill:%23fff'/%3E%3Cpath d='M20.67,23.43,25,15.25H21V13.76h5.86v1.36l-4.23,8H27l-.22,1.48H20.67Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M18,18.72v1.45H14.54V18.72Z' style='fill:%23fff'/%3E%3Cpath d='M19.09,23.43l4.35-8.18h-4V13.76h5.86v1.36l-4.22,8h4.4l-.23,1.48H19.09Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M20,18.27a3.09,3.09,0,1,1-3.08,3.08A3.09,3.09,0,0,1,20,18.27Zm0,1.15a1.93,1.93,0,1,0,1.93,1.93A1.94,1.94,0,0,0,20,19.42Zm0-3.86a7.71,7.71,0,0,1,7.48,5.84.58.58,0,1,1-1.12.28,6.56,6.56,0,0,0-12.72,0,.58.58,0,0,1-1.12-.28A7.72,7.72,0,0,1,20,15.56Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M12.42,13a.57.57,0,0,0-.06.75l.06.07,3.13,3.13a7.69,7.69,0,0,0-3.07,4.45.58.58,0,0,0,1.13.29,6.6,6.6,0,0,1,2.77-3.91l1.41,1.41a3.1,3.1,0,0,0,4.38,4.38l4.59,4.59a.57.57,0,0,0,.82,0,.58.58,0,0,0,.06-.76l-.06-.06-4.74-4.74h0l-.93-.93-2.22-2.23h0L17.46,17.2h0l-.88-.88L13.24,13A.57.57,0,0,0,12.42,13Zm6.19,7,2.74,2.74A1.94,1.94,0,0,1,18.61,20ZM20,15.53a7.54,7.54,0,0,0-2.24.33l1,1A6.69,6.69,0,0,1,20,16.69a6.59,6.59,0,0,1,6.39,5,.59.59,0,0,0,.71.42.58.58,0,0,0,.42-.7A7.74,7.74,0,0,0,20,15.53Zm.15,2.72,3,2.95A3.11,3.11,0,0,0,20.15,18.25Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t,n){var r=n(8),a=n(96);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#texture-editor{height:100%;width:100%;color:white;background-color:#1e1e1e;font-family:'acumin-pro-condensed'}#texture-editor .icon{width:40px;height:40px}#texture-editor .icon.button{background-color:#333333}#texture-editor .icon.button:hover{background-color:#4a4a4a;cursor:pointer}#texture-editor .icon.button.active{background-color:#666666}#texture-editor .icon.button:active{background-color:#837c7c}#texture-editor .has-tooltip{display:inline-block}#texture-editor .has-tooltip .tooltip{visibility:hidden;background-color:#fff;z-index:1;position:absolute;opacity:0;transition:opacity 0.5s;line-height:normal;font-size:14px;padding:0px 5px;color:black}#texture-editor .has-tooltip:hover .tooltip{visibility:visible;opacity:1}#texture-editor #properties{width:100%;height:40px;display:flex;align-items:center;font-size:12px;color:white;user-select:none;background-color:#333333}#texture-editor #properties .tab{display:inline-flex;line-height:40px;height:40px;flex-shrink:0;flex-grow:0;border-right:2px solid #1e1e1e;background-color:#333333}#texture-editor #properties #left{overflow:hidden;height:40px;flex-grow:1;flex-shrink:1;display:flex;flex-wrap:wrap}#texture-editor #properties #left #dimensions-tab form{display:flex}#texture-editor #properties #left #dimensions-tab label{margin-left:15px;font-size:15px;color:#afafaf}#texture-editor #properties #left #dimensions-tab label input{width:40px;height:24px;background-color:#000000;color:#ffffff;border:0;font-size:12px;text-align:'left';font-family:'acumin-pro-condensed';font-size:15px;padding-left:8px}#texture-editor #properties #left #dimensions-tab label:last-of-type{margin-right:8px}#texture-editor #properties #right-tab{margin-right:0;flex-grow:0;flex-shrink:0}#texture-editor #properties #right-tab input[type=\"file\"]{display:none}#texture-editor #properties .pixel-data{width:45px;color:#afafaf;display:flex;justify-content:space-between;font-size:15px}#texture-editor #properties .pixel-data:first-of-type{margin-left:15px}#texture-editor #properties .pixel-data:last-of-type{padding-right:15px}#texture-editor #properties .pixel-data .value{display:inline-block;width:30px;color:white}#texture-editor #toolbar{position:absolute;top:60px;left:0;width:40px;display:flex;flex-direction:column;justify-content:left}#texture-editor #toolbar #tools{display:flex;flex-direction:column}#texture-editor #toolbar #add-tool{position:relative}#texture-editor #toolbar #add-tool #add-tool-popup{background-color:#333333;width:348px;margin-left:40px;position:absolute;top:0px;height:40px;padding-left:4px;line-height:40px;user-select:none}#texture-editor #toolbar #add-tool #add-tool-popup button{background:#222222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:white;padding:4px 5px;opacity:0.9;cursor:pointer}#texture-editor #toolbar #color{margin-top:8px}#texture-editor #toolbar #color #active-color-bg{border-radius:50%;width:20px;height:20px;margin:10px;position:relative;background-image:linear-gradient(45deg, gray 25%, transparent 25%),linear-gradient(-45deg, gray 25%, transparent 25%),linear-gradient(45deg, transparent 75%, gray 75%),linear-gradient(-45deg, transparent 75%, gray 75%);background-size:20px 20px;background-position:0 0, 0 10px, 10px -10px, -10px 0px}#texture-editor #toolbar #color #active-color{width:20px;height:20px;position:absolute;top:0;left:0;border-radius:50%}#texture-editor #toolbar #color-picker{position:absolute;margin-left:40px}#texture-editor #channels-bar{position:absolute;top:60px;right:0;width:80px;background:#666666;user-select:none}#texture-editor #channels-bar .channel{color:white;border-bottom:2px solid #232323;width:80px;height:40px;font-size:16px;display:flex;align-items:center}#texture-editor #channels-bar .channel.uneditable{background:#333333}#texture-editor #channels-bar .channel:hover{cursor:pointer}#texture-editor #channels-bar .channel:last-of-type{border-bottom:none}#texture-editor #canvas-ui{width:100%;height:calc(100% - 70px);outline:none}#texture-editor #tool-ui{background-color:#333;position:absolute;right:0;bottom:30px}#texture-editor #tool-ui label{display:flex;flex-direction:column;align-items:center}#texture-editor #tool-ui input[type='range']{background:#d3d3d3}#texture-editor #bottom-bar{height:30px;width:100%;background-color:#333333;font-size:14px;user-select:none;line-height:30px;position:relative}#texture-editor #bottom-bar #file-url{left:30px;position:absolute}#texture-editor #bottom-bar #mip-level{right:30px;position:absolute}\n",""]),e.exports=t},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M20,30.5A10.5,10.5,0,1,1,30.5,20,10.51,10.51,0,0,1,20,30.5Zm0-20A9.5,9.5,0,1,0,29.5,20,9.51,9.51,0,0,0,20,10.5Z' style='fill:%23fff'/%3E%3Cpath d='M18.45,20.77v4.14H16.26V14.58h4.55c2.25,0,3.46,1.23,3.46,2.83a2.5,2.5,0,0,1-1.5,2.45c.51.19,1.29.72,1.29,2.58V23a7.77,7.77,0,0,0,.15,2H22.08a7.38,7.38,0,0,1-.21-2.32v-.15c0-1.13-.28-1.67-1.95-1.67Zm0-1.78h1.88c1.21,0,1.69-.47,1.69-1.32s-.55-1.32-1.65-1.32H18.45Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M20,30.5A10.5,10.5,0,1,1,30.5,20,10.51,10.51,0,0,1,20,30.5Zm0-20A9.5,9.5,0,1,0,29.5,20,9.51,9.51,0,0,0,20,10.5Z' style='fill:%23fff'/%3E%3Cpath d='M24.6,24.91H23a5.43,5.43,0,0,1-.18-1,3.5,3.5,0,0,1-3,1.2c-3,0-4.68-2.28-4.68-5.22,0-3.1,1.81-5.44,5.07-5.44,2.65,0,4.23,1.5,4.47,3.25H22.39a2.09,2.09,0,0,0-2.26-1.51c-2.13,0-2.73,1.78-2.73,3.6s.69,3.54,2.74,3.54a2.05,2.05,0,0,0,2.27-2.25V21H20.14V19.12H24.6Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M20,30.5A10.5,10.5,0,1,1,30.5,20,10.51,10.51,0,0,1,20,30.5Zm0-20A9.5,9.5,0,1,0,29.5,20,9.51,9.51,0,0,0,20,10.5Z' style='fill:%23fff'/%3E%3Cpath d='M16.17,14.58h4.51c2.51,0,3.45,1.29,3.45,2.64a2.31,2.31,0,0,1-1.32,2.23,2.48,2.48,0,0,1,1.62,2.37c0,1.77-1.39,3.09-3.58,3.09H16.17Zm4.26,4.08c1.06,0,1.5-.48,1.5-1.22s-.57-1.14-1.43-1.14H18.36v2.36Zm-2.07,4.53h2c1.22,0,1.76-.51,1.76-1.44s-.54-1.37-1.77-1.37h-2Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M20,30.5A10.58,10.58,0,1,1,30.57,19.93,10.58,10.58,0,0,1,20,30.5Zm0-19.9a9.33,9.33,0,1,0,9.33,9.33A9.34,9.34,0,0,0,20,10.6Z' style='fill:%23fff'/%3E%3Cpath d='M16.32,14.54h4.09a4.68,4.68,0,0,1,4.95,5c0,3-1.91,5.27-5.06,5.27h-4ZM18.54,23h1.67c2,0,2.85-1.48,2.85-3.48,0-1.69-.82-3.22-2.83-3.22H18.54Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' style='fill:none'/%3E%3Cpath d='M20,30.5A10.5,10.5,0,1,1,30.5,20,10.51,10.51,0,0,1,20,30.5Zm0-20A9.5,9.5,0,1,0,29.5,20,9.51,9.51,0,0,0,20,10.5Z' style='fill:%23fff'/%3E%3Cpath d='M18,22.53l-.79,2.38H15l3.51-10.33h2.81L25,24.91H22.64l-.86-2.38Zm3.3-1.83c-.73-2.19-1.2-3.59-1.45-4.52h0c-.25,1-.76,2.64-1.35,4.52Z' style='fill:%23fff'/%3E%3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24' height='24'%3E %3C!-- Generator: Sketch 59.1 (86144) - https://sketch.com --%3E %3Ctitle%3Eic_fluent_delete_24_regular%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='🔍-Product-Icons' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='ic_fluent_delete_24_regular' fill='white' fill-rule='nonzero'%3E %3Cpath d='M12,1.75 C13.7330315,1.75 15.1492459,3.10645477 15.2448552,4.81557609 L15.25,5 L20.5,5 C20.9142136,5 21.25,5.33578644 21.25,5.75 C21.25,6.12969577 20.9678461,6.44349096 20.6017706,6.49315338 L20.5,6.5 L19.704,6.5 L18.4238627,19.5191927 C18.2911666,20.8682696 17.1984309,21.9099961 15.8626249,21.9944645 L15.6870698,22 L8.31293022,22 C6.95734302,22 5.81365352,21.0144851 5.59883106,19.6933629 L5.57613734,19.5191927 L4.295,6.5 L3.5,6.5 C3.12030423,6.5 2.80650904,6.21784612 2.75684662,5.85177056 L2.75,5.75 C2.75,5.37030423 3.03215388,5.05650904 3.39822944,5.00684662 L3.5,5 L8.75,5 C8.75,3.20507456 10.2050746,1.75 12,1.75 Z M18.197,6.5 L5.802,6.5 L7.06893346,19.3723603 C7.12767639,19.9695801 7.60033019,20.4342891 8.18584501,20.493596 L8.31293022,20.5 L15.6870698,20.5 C16.2871716,20.5 16.795916,20.0751057 16.9122531,19.4982083 L16.9310665,19.3723603 L18.197,6.5 Z M13.75,9.25 C14.1296958,9.25 14.443491,9.53215388 14.4931534,9.89822944 L14.5,10 L14.5,17 C14.5,17.4142136 14.1642136,17.75 13.75,17.75 C13.3703042,17.75 13.056509,17.4678461 13.0068466,17.1017706 L13,17 L13,10 C13,9.58578644 13.3357864,9.25 13.75,9.25 Z M10.25,9.25 C10.6296958,9.25 10.943491,9.53215388 10.9931534,9.89822944 L11,10 L11,17 C11,17.4142136 10.6642136,17.75 10.25,17.75 C9.87030423,17.75 9.55650904,17.4678461 9.50684662,17.1017706 L9.5,17 L9.5,10 C9.5,9.58578644 9.83578644,9.25 10.25,9.25 Z M12,3.25 C11.0818266,3.25 10.3288077,3.95711027 10.2558012,4.85647279 L10.25,5 L13.75,5 C13.75,4.03350169 12.9664983,3.25 12,3.25 Z' id='🎨-Color'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E"},function(e,t){e.exports="data:image/svg+xml,%3Csvg viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24' height='24'%3E %3C!-- Generator: Sketch 59.1 (86144) - https://sketch.com --%3E %3Ctitle%3Eic_fluent_copy_24_regular%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cg id='🔍-Product-Icons' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='ic_fluent_copy_24_regular' fill='white' fill-rule='nonzero'%3E %3Cpath d='M5.50280381,4.62704038 L5.5,6.75 L5.5,17.2542087 C5.5,19.0491342 6.95507456,20.5042087 8.75,20.5042087 L17.3662868,20.5044622 C17.057338,21.3782241 16.2239751,22.0042087 15.2444057,22.0042087 L8.75,22.0042087 C6.12664744,22.0042087 4,19.8775613 4,17.2542087 L4,6.75 C4,5.76928848 4.62744523,4.93512464 5.50280381,4.62704038 Z M17.75,2 C18.9926407,2 20,3.00735931 20,4.25 L20,17.25 C20,18.4926407 18.9926407,19.5 17.75,19.5 L8.75,19.5 C7.50735931,19.5 6.5,18.4926407 6.5,17.25 L6.5,4.25 C6.5,3.00735931 7.50735931,2 8.75,2 L17.75,2 Z M17.75,3.5 L8.75,3.5 C8.33578644,3.5 8,3.83578644 8,4.25 L8,17.25 C8,17.6642136 8.33578644,18 8.75,18 L17.75,18 C18.1642136,18 18.5,17.6642136 18.5,17.25 L18.5,4.25 C18.5,3.83578644 18.1642136,3.5 17.75,3.5 Z' id='🎨-Color'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E"},function(e,t,n){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r,a,o={}.hasOwnProperty,i=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};r=n(1).EventEmitter,n(2),a=function(e){function t(e){var t,r,a;for(r in this.running=!1,this.options={},this.frames=[],this.groups=new Map,this.freeWorkers=[],this.activeWorkers=[],this.setOptions(e),n)a=n[r],null==(t=this.options)[r]&&(t[r]=a)}var n,r;return function(e,t){function n(){this.constructor=e}for(var r in t)o.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),n={workerScript:"gif.worker.js",workers:2,repeat:0,background:"#fff",quality:10,width:null,height:null,transparent:null,debug:!1},r={delay:500,copy:!1},t.prototype.setOption=function(e,t){if(this.options[e]=t,null!=this._canvas&&("width"===e||"height"===e))return this._canvas[e]=t},t.prototype.setOptions=function(e){var t,n,r;for(t in n=[],e)o.call(e,t)&&(r=e[t],n.push(this.setOption(t,r)));return n},t.prototype.addFrame=function(e,t){var n,a,o;for(o in null==t&&(t={}),(n={}).transparent=this.options.transparent,r)n[o]=t[o]||r[o];if(null==this.options.width&&this.setOption("width",e.width),null==this.options.height&&this.setOption("height",e.height),"undefined"!=typeof ImageData&&null!==ImageData&&e instanceof ImageData)n.data=e.data;else if("undefined"!=typeof CanvasRenderingContext2D&&null!==CanvasRenderingContext2D&&e instanceof CanvasRenderingContext2D||"undefined"!=typeof WebGLRenderingContext&&null!==WebGLRenderingContext&&e instanceof WebGLRenderingContext)t.copy?n.data=this.getContextData(e):n.context=e;else{if(null==e.childNodes)throw new Error("Invalid image");t.copy?n.data=this.getImageData(e):n.image=e}return(a=this.frames.length)>0&&n.data&&(this.groups.has(n.data)?this.groups.get(n.data).push(a):this.groups.set(n.data,[a])),this.frames.push(n)},t.prototype.render=function(){var e,t,n;if(this.running)throw new Error("Already running");if(null==this.options.width||null==this.options.height)throw new Error("Width and height must be set prior to rendering");if(this.running=!0,this.nextFrame=0,this.finishedFrames=0,this.imageParts=function(){var e,t,n;for(n=[],e=0,t=this.frames.length;0<=t?e<t:e>t;0<=t?++e:--e)n.push(null);return n}.call(this),t=this.spawnWorkers(),!0===this.options.globalPalette)this.renderNextFrame();else for(e=0,n=t;0<=n?e<n:e>n;0<=n?++e:--e)this.renderNextFrame();return this.emit("start"),this.emit("progress",0)},t.prototype.abort=function(){for(var e;null!=(e=this.activeWorkers.shift());)this.log("killing active worker"),e.terminate();return this.running=!1,this.emit("abort")},t.prototype.spawnWorkers=function(){var e,t,n;return e=Math.min(this.options.workers,this.frames.length),function(){n=[];for(var r=t=this.freeWorkers.length;t<=e?r<e:r>e;t<=e?r++:r--)n.push(r);return n}.apply(this).forEach(function(e){return function(t){var n;return e.log("spawning worker "+t),(n=new Worker(e.options.workerScript)).onmessage=function(t){return e.activeWorkers.splice(e.activeWorkers.indexOf(n),1),e.freeWorkers.push(n),e.frameFinished(t.data,!1)},e.freeWorkers.push(n)}}(this)),e},t.prototype.frameFinished=function(e,t){var n,r,a,o;if(this.finishedFrames++,t?(n=this.frames.indexOf(e),r=this.groups.get(e.data)[0],this.log("frame "+(n+1)+" is duplicate of "+r+" - "+this.activeWorkers.length+" active"),this.imageParts[n]={indexOfFirstInGroup:r}):(this.log("frame "+(e.index+1)+" finished - "+this.activeWorkers.length+" active"),this.emit("progress",this.finishedFrames/this.frames.length),this.imageParts[e.index]=e),!0===this.options.globalPalette&&!t&&(this.options.globalPalette=e.globalPalette,this.log("global palette analyzed"),this.frames.length>2))for(a=1,o=this.freeWorkers.length;1<=o?a<o:a>o;1<=o?++a:--a)this.renderNextFrame();return i.call(this.imageParts,null)>=0?this.renderNextFrame():this.finishRendering()},t.prototype.finishRendering=function(){var e,t,n,r,a,o,i,s,l,p,c,u,d,h,m,b,g,f,v,y;for(a=o=0,p=(g=this.imageParts).length;o<p;a=++o)(t=g[a]).indexOfFirstInGroup&&(this.imageParts[a]=this.imageParts[t.indexOfFirstInGroup]);for(l=0,i=0,c=(f=this.imageParts).length;i<c;i++)l+=((t=f[i]).data.length-1)*t.pageSize+t.cursor;for(l+=t.pageSize-t.cursor,this.log("rendering finished - filesize "+Math.round(l/1e3)+"kb"),e=new Uint8Array(l),m=0,s=0,u=(v=this.imageParts).length;s<u;s++)for(n=h=0,d=(y=(t=v[s]).data).length;h<d;n=++h)b=y[n],e.set(b,m),m+=n===t.data.length-1?t.cursor:t.pageSize;return r=new Blob([e],{type:"image/gif"}),this.emit("finished",r,e)},t.prototype.renderNextFrame=function(){var e,t,n,r;if(0===this.freeWorkers.length)throw new Error("No free workers");if(!(this.nextFrame>=this.frames.length))return e=this.frames[this.nextFrame++],(t=this.frames.indexOf(e))>0&&this.groups.has(e.data)&&this.groups.get(e.data)[0]!==t?void setTimeout(function(t){return function(){return t.frameFinished(e,!0)}}(this),0):(r=this.freeWorkers.shift(),n=this.getTask(e),this.log("starting frame "+(n.index+1)+" of "+this.frames.length),this.activeWorkers.push(r),r.postMessage(n))},t.prototype.getContextData=function(e){return e.getImageData(0,0,this.options.width,this.options.height).data},t.prototype.getImageData=function(e){var t;return null==this._canvas&&(this._canvas=document.createElement("canvas"),this._canvas.width=this.options.width,this._canvas.height=this.options.height),(t=this._canvas.getContext("2d")).setFill=this.options.background,t.fillRect(0,0,this.options.width,this.options.height),t.drawImage(e,0,0),this.getContextData(t)},t.prototype.getTask=function(e){var t,n;if(n={index:t=this.frames.indexOf(e),last:t===this.frames.length-1,delay:e.delay,transparent:e.transparent,width:this.options.width,height:this.options.height,quality:this.options.quality,dither:this.options.dither,globalPalette:this.options.globalPalette,repeat:this.options.repeat,canTransfer:!0},null!=e.data)n.data=e.data;else if(null!=e.context)n.data=this.getContextData(e.context);else{if(null==e.image)throw new Error("Invalid frame");n.data=this.getImageData(e.image)}return n},t.prototype.log=function(e){if(this.options.debug)return console.log(e)},t}(r),e.exports=a},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,l,p;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(o(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),i=(p=n.slice()).length,l=0;l<i;l++)p[l].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(i=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),a||(a=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var a=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,o,i,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=i;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){o=s;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){var n,r,a,o,i;i=navigator.userAgent.toLowerCase(),o=navigator.platform.toLowerCase(),a="ie"===(n=i.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0])[1]&&document.documentMode,(r={name:"version"===n[1]?n[3]:n[1],version:a||parseFloat("opera"===n[1]&&n[4]?n[4]:n[2]),platform:{name:i.match(/ip(?:ad|od|hone)/)?"ios":(i.match(/(?:webos|android)/)||o.match(/mac|win|linux/)||["other"])[0]}})[r.name]=!0,r[r.name+parseInt(r.version,10)]=!0,r.platform[r.platform.name]=!0,e.exports=r}])},function(e,t,n){var r=n(8),a=n(106);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,"#inspector-host{position:absolute;right:0px;top:0px;bottom:0px}#__resizable_base__{display:none}#actionTabs{background:#333333;height:100%;margin:0;padding:0;display:grid;grid-template-rows:auto 1fr;font:14px \"Arial\";overflow:hidden}#actionTabs .hoverIcon:hover{opacity:0.8}#actionTabs #header{height:30px;font-size:16px;color:white;background:#222222;grid-row:1;text-align:center;display:grid;grid-template-columns:30px 1fr 50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#actionTabs #header #logo{grid-column:1;width:24px;height:24px;display:flex;align-self:center;justify-self:center}#actionTabs #header #back{grid-column:1;display:grid;align-self:center;justify-self:center;cursor:pointer}#actionTabs #header #title{grid-column:2;display:grid;align-items:center;text-align:center}#actionTabs #header #commands{grid-column:3;display:grid;align-items:center;grid-template-columns:1fr 1fr}#actionTabs #header #commands .expand{grid-column:1;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs #header #commands .close{grid-column:2;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabs{display:grid;grid-row:2;grid-template-rows:40px 1fr;font:14px \"Arial\";overflow:hidden}#actionTabs .tabs .labels{grid-row:1;display:flex;align-items:center;justify-items:center;border-bottom:1px solid #ffffff;margin:0;padding:0}#actionTabs .tabs .labels .label{font-size:24px;color:white;width:40px;display:flex;align-content:center;justify-content:center;border:1px solid transparent;border-bottom:none;background:#333333;padding:5px;height:28px;cursor:pointer}#actionTabs .tabs .labels .label.active{border-color:#ffffff;border-bottom:2px solid transparent;margin-bottom:-2px}#actionTabs .tabs .panes{grid-row:2;display:grid;grid-template-rows:100%;overflow:hidden}#actionTabs .tabs .panes .infoMessage{opacity:0.5;color:white;margin:15px 5px 0px 5px}#actionTabs .tabs .panes .gradient-step{display:grid;grid-template-rows:100%;grid-template-columns:20px 30px 40px auto 20px 30px;padding-top:5px;padding-left:5px;padding-bottom:5px;align-items:center}#actionTabs .tabs .panes .gradient-step .step{grid-row:1;grid-column:1}#actionTabs .tabs .panes .gradient-step .color1{height:100%}#actionTabs .tabs .panes .gradient-step .color2{height:100%;padding-left:5px}#actionTabs .tabs .panes .gradient-step .factor1{grid-row:1;grid-column:2;cursor:pointer}#actionTabs .tabs .panes .gradient-step .factor2{padding-left:5px;grid-row:1;grid-column:3;cursor:pointer}#actionTabs .tabs .panes .gradient-step .factor2 .grayed{background:gray;border-color:gray}#actionTabs .tabs .panes .gradient-step .numeric-input{width:calc(100% - 5px)}#actionTabs .tabs .panes .gradient-step .icon{cursor:pointer}#actionTabs .tabs .panes .gradient-step .step-value{margin-left:5px;grid-row:1;grid-column:3;text-align:right;margin-right:5px}#actionTabs .tabs .panes .gradient-step .step-slider{grid-row:1;grid-column:4;display:grid;justify-content:stretch;align-content:center;margin-right:12px}#actionTabs .tabs .panes .gradient-step .step-slider input{width:100%}#actionTabs .tabs .panes .gradient-step .step-slider .range:hover{opacity:1}#actionTabs .tabs .panes .gradient-step .step-slider .range{-webkit-appearance:none;height:6px;background:#d3d3d3;border-radius:5px;outline:none;opacity:0.7;-webkit-transition:.2s;transition:opacity .2s}#actionTabs .tabs .panes .gradient-step .step-slider .range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabs .panes .gradient-step .step-slider .range::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabs .panes .gradient-step .gradient-copy{grid-row:1;grid-column:5;display:grid;align-content:center;justify-content:center}#actionTabs .tabs .panes .gradient-step .gradient-copy .img{height:20px;width:20px}#actionTabs .tabs .panes .gradient-step .gradient-copy .img:hover{cursor:pointer}#actionTabs .tabs .panes .gradient-step .gradient-delete{grid-row:1;grid-column:6;display:grid;align-content:center;justify-content:center}#actionTabs .tabs .panes .gradient-step .gradient-delete .img{height:20px;width:20px}#actionTabs .tabs .panes .gradient-step .gradient-delete .img:hover{cursor:pointer}#actionTabs .tabs .panes .pane{color:white;overflow-x:hidden;overflow-y:auto;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#actionTabs .tabs .panes .pane .animation-info{border-left:greenyellow 3px solid;margin-left:5px;padding-left:5px !important}#actionTabs .tabs .panes .pane .underline{border-bottom:0.5px solid rgba(255,255,255,0.5)}#actionTabs .tabs .panes .pane .textureLinkLine{display:grid;grid-template-columns:auto 1fr}#actionTabs .tabs .panes .pane .textureLinkLine .debug{grid-column:1;margin-left:5px;margin-right:5px;display:block;align-items:center;justify-items:center;cursor:pointer;opacity:0.5}#actionTabs .tabs .panes .pane .textureLinkLine .debug.selected{opacity:1.0}#actionTabs .tabs .panes .pane .textureLinkLine .textLine{grid-column:2}#actionTabs .tabs .panes .pane .textureLinkLine .actionIcon{display:inline-block;margin-top:6px;margin-right:4px}#actionTabs .tabs .panes .pane .messageLine{text-align:center;font-size:12px;font-style:italic;opacity:0.6}#actionTabs .tabs .panes .pane .iconMessageLine{padding-left:2px;height:30px;display:grid;grid-template-columns:30px 1fr}#actionTabs .tabs .panes .pane .iconMessageLine .icon{grid-column:1;display:grid;align-items:center;justify-items:center}#actionTabs .tabs .panes .pane .iconMessageLine .value{grid-column:2;display:flex;align-items:center}#actionTabs .tabs .panes .pane .color-picker{height:calc(100% - 8px);margin:4px;width:100%}#actionTabs .tabs .panes .pane .color-picker .color-rect{height:calc(100% - 4px);border:2px white solid;cursor:pointer;min-height:18px}#actionTabs .tabs .panes .pane .color-picker .color-picker-cover{position:fixed;top:0px;right:0px;bottom:0px;left:0px;z-index:100}#actionTabs .tabs .panes .pane .color-picker .color-picker-float{position:absolute}#actionTabs .tabs .panes .pane .linkButtonLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto 20px}#actionTabs .tabs .panes .pane .linkButtonLine .link{grid-column:1;display:flex;align-items:center;text-decoration:underline;cursor:pointer}#actionTabs .tabs .panes .pane .linkButtonLine .link-button{grid-column:2}#actionTabs .tabs .panes .pane .linkButtonLine .link-button button{background:#222222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:white;padding:4px 5px;opacity:0.9;cursor:pointer}#actionTabs .tabs .panes .pane .linkButtonLine .link-button button:hover{opacity:1.0}#actionTabs .tabs .panes .pane .linkButtonLine .link-button button:active{background:#282828}#actionTabs .tabs .panes .pane .linkButtonLine .link-button button:focus{border:1px solid #337ab7;outline:0px}#actionTabs .tabs .panes .pane .linkButtonLine .link-icon{grid-column:3;display:grid;align-content:center}#actionTabs .tabs .panes .pane .textLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto}#actionTabs .tabs .panes .pane .textLine.indented{grid-template-columns:100%}#actionTabs .tabs .panes .pane .textLine.indented .link-value{grid-column:1;text-align:start;margin-left:20px;opacity:0.6;max-width:unset}#actionTabs .tabs .panes .pane .textLine.indented .value{grid-column:1;text-align:start;margin-left:20px;opacity:0.6;max-width:unset}#actionTabs .tabs .panes .pane .textLine.reduced-opacity{opacity:0.6;padding-left:25px}#actionTabs .tabs .panes .pane .textLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .textLine .link-value{grid-column:2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:end;opacity:0.8;margin:5px;margin-top:7px;max-width:140px;text-decoration:underline;cursor:pointer}#actionTabs .tabs .panes .pane .textLine .value{grid-column:2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:end;opacity:0.8;margin:5px;margin-top:7px;max-width:200px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}#actionTabs .tabs .panes .pane .textLine .value.check{color:green}#actionTabs .tabs .panes .pane .textLine .value.uncheck{color:red}#actionTabs .tabs .panes .pane .gradient-container{margin-top:3px}#actionTabs .tabs .panes .pane .gradient-container .gradient-label{height:30px;display:grid;align-content:center}#actionTabs .tabs .panes .pane .gradient-container .gradient-step{display:grid;grid-template-rows:100%;grid-template-columns:25px 50px 55px 40px auto 20px 5px;padding-top:5px;padding-left:5px;padding-bottom:5px;align-items:center;border-left:orange 3px solid}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .step{grid-row:1;grid-column:1}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .color1{height:100%}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .color2{height:100%;padding-left:5px}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .factor1{grid-row:1;grid-column:2;cursor:pointer}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .factor2{padding-left:5px;grid-row:1;grid-column:3;cursor:pointer}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .factor2 .grayed{background:gray;border-color:gray}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .numeric-input{width:calc(100% - 5px)}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .step-value{margin-left:5px;grid-row:1;grid-column:4;text-align:right;margin-right:5px}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .step-slider{grid-row:1;grid-column:5;display:grid;justify-content:stretch;align-content:center;margin-right:5px}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .step-slider input{width:100%}#actionTabs .tabs .panes .pane .gradient-container .gradient-step .gradient-delete{grid-row:1;grid-column:6;display:grid;align-content:center;justify-content:center}#actionTabs .tabs .panes .pane .textInputLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr 120px}#actionTabs .tabs .panes .pane .textInputLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .textInputLine .value{display:flex;align-items:center;grid-column:2}#actionTabs .tabs .panes .pane .textInputLine .value input{width:110px}#actionTabs .tabs .panes .pane .buttonLine{height:30px;display:grid;align-items:center;justify-items:stretch}#actionTabs .tabs .panes .pane .buttonLine input[type=\"file\"]{display:none}#actionTabs .tabs .panes .pane .buttonLine .file-upload{background:#222222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:white;padding:4px 5px;font-size:13px;opacity:0.9;cursor:pointer;text-align:center}#actionTabs .tabs .panes .pane .buttonLine .file-upload:hover{opacity:1.0}#actionTabs .tabs .panes .pane .buttonLine .file-upload:active{transform:scale(0.98);transform-origin:0.5 0.5}#actionTabs .tabs .panes .pane .buttonLine button{background:#222222;border:1px solid #337ab7;margin:5px 10px 5px 10px;color:white;padding:4px 5px;opacity:0.9;cursor:pointer}#actionTabs .tabs .panes .pane .buttonLine button:hover{opacity:1.0}#actionTabs .tabs .panes .pane .buttonLine button:active{background:#282828}#actionTabs .tabs .panes .pane .buttonLine button:focus{border:1px solid #337ab7;outline:0px}#actionTabs .tabs .panes .pane .radioLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr 24px}#actionTabs .tabs .panes .pane .radioLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .radioLine .radioContainer{display:flex;align-items:center}#actionTabs .tabs .panes .pane .radioLine .radioContainer .radio{grid-column:2;display:none}#actionTabs .tabs .panes .pane .radioLine .radioContainer .radio:checked+label:before{border-color:#337ab7}#actionTabs .tabs .panes .pane .radioLine .radioContainer .radio:checked+label:after{transform:scale(1)}#actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio{display:inline-block;height:14px;position:relative;padding:0 24px;margin-bottom:0;cursor:pointer;vertical-align:bottom}#actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:before,#actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:after{position:absolute;content:'';border-radius:50%;transition:all .3s ease;transition-property:transform, border-color}#actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:before{left:0px;top:0;width:16px;height:16px;border:2px solid white}#actionTabs .tabs .panes .pane .radioLine .radioContainer .labelForRadio:after{top:6px;left:6px;width:8px;height:8px;transform:scale(0);background:#337ab7}#actionTabs .tabs .panes .pane .vector3Line{padding-left:2px;display:grid}#actionTabs .tabs .panes .pane .vector3Line .firstLine{display:grid;grid-template-columns:1fr auto 20px;height:30px}#actionTabs .tabs .panes .pane .vector3Line .firstLine .label{grid-column:1;display:flex;align-items:center;white-space:nowrap;overflow:hidden}#actionTabs .tabs .panes .pane .vector3Line .firstLine .vector{grid-column:2;display:flex;align-items:center;text-align:right;opacity:0.8;padding-left:5px}#actionTabs .tabs .panes .pane .vector3Line .firstLine .expand{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabs .panes .pane .vector3Line .secondLine{display:grid;padding-right:5px;border-left:1px solid #337ab7}#actionTabs .tabs .panes .pane .vector3Line .secondLine .numeric{display:grid;grid-template-columns:1fr auto}#actionTabs .tabs .panes .pane .vector3Line .secondLine .numeric-label{text-align:right;grid-column:1;display:flex;align-items:center;justify-self:right;margin-right:10px}#actionTabs .tabs .panes .pane .vector3Line .secondLine .numeric-value{width:120px;grid-column:2;display:flex;align-items:center;border:1px solid #337ab7}#actionTabs .tabs .panes .pane .checkBoxLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto}#actionTabs .tabs .panes .pane .checkBoxLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .checkBoxLine .checkBox{grid-column:2;display:flex;align-items:center}#actionTabs .tabs .panes .pane .checkBoxLine .checkBox .lbl{position:relative;display:block;height:14px;width:34px;margin-right:5px;background:#898989;border-radius:100px;cursor:pointer;transition:all 0.3s ease}#actionTabs .tabs .panes .pane .checkBoxLine .checkBox .lbl:after{position:absolute;left:3px;top:2px;display:block;width:10px;height:10px;border-radius:100px;background:#fff;box-shadow:0px 3px 3px rgba(0,0,0,0.05);content:'';transition:all 0.15s ease}#actionTabs .tabs .panes .pane .checkBoxLine .checkBox .lbl:active:after{transform:scale(1.15, 0.85)}#actionTabs .tabs .panes .pane .checkBoxLine .checkBox .cbx:checked ~ label{background:#337ab7}#actionTabs .tabs .panes .pane .checkBoxLine .checkBox .cbx:checked ~ label:after{left:20px;background:#164975}#actionTabs .tabs .panes .pane .checkBoxLine .checkBox .hidden{display:none}#actionTabs .tabs .panes .pane .textureLine{display:grid;grid-template-rows:30px auto}#actionTabs .tabs .panes .pane .textureLine .control{margin-top:2px;grid-row:1;display:grid;grid-template-columns:1fr 40px 40px 40px 40px 40px 1fr}#actionTabs .tabs .panes .pane .textureLine .control .red{grid-column:2}#actionTabs .tabs .panes .pane .textureLine .control .green{grid-column:3}#actionTabs .tabs .panes .pane .textureLine .control .blue{grid-column:4}#actionTabs .tabs .panes .pane .textureLine .control .alpha{grid-column:5}#actionTabs .tabs .panes .pane .textureLine .control .all{grid-column:6}#actionTabs .tabs .panes .pane .textureLine .control3D{margin-top:2px;grid-row:1;display:grid;grid-template-columns:1fr 40px 40px 40px 40px 40px 40px 1fr}#actionTabs .tabs .panes .pane .textureLine .control3D .px{grid-column:2}#actionTabs .tabs .panes .pane .textureLine .control3D .nx{grid-column:3}#actionTabs .tabs .panes .pane .textureLine .control3D .py{grid-column:4}#actionTabs .tabs .panes .pane .textureLine .control3D .ny{grid-column:5}#actionTabs .tabs .panes .pane .textureLine .control3D .pz{grid-column:6}#actionTabs .tabs .panes .pane .textureLine .control3D .nz{grid-column:7}#actionTabs .tabs .panes .pane .textureLine .command{border:1px solid transparent;background:transparent;color:white}#actionTabs .tabs .panes .pane .textureLine .selected{border:1px solid #337ab7}#actionTabs .tabs .panes .pane .textureLine .preview{grid-row:2;display:grid;align-self:center;justify-self:center;height:256px;width:256px;margin-top:5px;margin-bottom:5px;border:1px solid white;background-size:32px 32px;background-color:white;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'%3E%3Cpath fill='rgba(1.0,1.0,1.0,0.3)' fill-rule='evenodd' d='M0 0h1v1H0V0zm1 1h1v1H1V1z'/%3E%3C/svg%3E\")}#actionTabs .tabs .panes .pane .gltf-extension-property{margin-left:30px;border-left:1px solid #337ab7}#actionTabs .tabs .panes .pane .floatLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr 120px}#actionTabs .tabs .panes .pane .floatLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .floatLine .value{grid-column:2;display:flex;align-items:center}#actionTabs .tabs .panes .pane .floatLine .value input{width:110px}#actionTabs .tabs .panes .pane .sliderLine{padding-left:2px;height:30px;display:grid;grid-template-rows:100%;grid-template-columns:1fr 50px auto}#actionTabs .tabs .panes .pane .sliderLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .sliderLine .withMargins{margin-left:5px}#actionTabs .tabs .panes .pane .sliderLine .floatLine{padding-left:2px}#actionTabs .tabs .panes .pane .sliderLine .floatLine .short{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .sliderLine .floatLine .short input{width:35px}#actionTabs .tabs .panes .pane .sliderLine .floatLine .short input::-webkit-outer-spin-button,#actionTabs .tabs .panes .pane .sliderLine .floatLine .short input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#actionTabs .tabs .panes .pane .sliderLine .floatLine .short input[type=number]{-moz-appearance:textfield}#actionTabs .tabs .panes .pane .sliderLine .slider{grid-column:3;grid-row:1;margin-right:5px;width:90%;display:flex;align-items:center}#actionTabs .tabs .panes .pane .sliderLine .slider .range{-webkit-appearance:none;width:100%;height:6px;background:#d3d3d3;border-radius:5px;outline:none;opacity:0.7;-webkit-transition:.2s;transition:opacity .2s}#actionTabs .tabs .panes .pane .sliderLine .slider .range:hover{opacity:1}#actionTabs .tabs .panes .pane .sliderLine .slider .range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabs .panes .pane .sliderLine .slider .range::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#337ab7;cursor:pointer}#actionTabs .tabs .panes .pane .color3Line{padding-left:2px;display:grid}#actionTabs .tabs .panes .pane .color3Line .firstLine{height:30px;display:grid;grid-template-columns:1fr auto 20px 20px}#actionTabs .tabs .panes .pane .color3Line .firstLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .color3Line .firstLine .color3{grid-column:2;width:50px;display:flex;align-items:center}#actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input[type=\"color\"]{-webkit-appearance:none;border:1px solid rgba(255,255,255,0.5);padding:0;width:30px;height:20px}#actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input[type=\"color\"]::-webkit-color-swatch-wrapper{padding:0}#actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input[type=\"color\"]::-webkit-color-swatch{border:none}#actionTabs .tabs .panes .pane .color3Line .firstLine .color3 input{margin-right:5px}#actionTabs .tabs .panes .pane .color3Line .firstLine .copy{grid-column:3;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabs .panes .pane .color3Line .firstLine .copy img{height:100%}#actionTabs .tabs .panes .pane .color3Line .firstLine .expand{grid-column:4;display:grid;align-items:center;justify-items:center;cursor:pointer}#actionTabs .tabs .panes .pane .color3Line .secondLine{display:grid;padding-right:5px;border-left:1px solid #337ab7}#actionTabs .tabs .panes .pane .color3Line .secondLine .numeric{display:grid;grid-template-columns:1fr auto}#actionTabs .tabs .panes .pane .color3Line .secondLine .numeric-label{text-align:right;grid-column:1;display:flex;align-items:center;justify-self:right;margin-right:10px}#actionTabs .tabs .panes .pane .color3Line .secondLine .numeric-value{width:120px;grid-column:2;display:flex;align-items:center;border:1px solid #337ab7}#actionTabs .tabs .panes .pane .listLine{padding-left:2px;height:30px;display:grid;grid-template-columns:1fr auto}#actionTabs .tabs .panes .pane .listLine .label{grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .listLine .options{grid-column:2;display:flex;align-items:center;margin-right:5px}#actionTabs .tabs .panes .pane .listLine .options select{width:115px}#actionTabs .tabs .panes .pane .paneContainer{margin-top:3px;display:grid;grid-template-rows:100%;grid-template-columns:100%}#actionTabs .tabs .panes .pane .paneContainer .paneList{border-left:3px solid transparent}#actionTabs .tabs .panes .pane .paneContainer:hover .paneList{border-left:3px solid rgba(51,122,183,0.8)}#actionTabs .tabs .panes .pane .paneContainer:hover .paneContainer-content .header .title{border-left:3px solid #337ab7}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-highlight-border{grid-row:1;grid-column:1;opacity:1;border:3px solid red;margin-bottom:-5px;z-index:100;transition:opacity 250ms;pointer-events:none}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-highlight-border.transparent{opacity:0}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-content{grid-row:1;grid-column:1}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header{display:grid;grid-template-columns:1fr auto;background:#555555;height:30px;padding-right:5px;cursor:pointer}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header .title{border-left:3px solid transparent;padding-left:5px;grid-column:1;display:flex;align-items:center}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header .collapse{grid-column:2;display:flex;align-items:center;justify-items:center;transform-origin:center}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .header .collapse.closed{transform:rotate(180deg)}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .paneList>div:not(:last-child){border-bottom:0.5px solid rgba(255,255,255,0.1)}#actionTabs .tabs .panes .pane .paneContainer .paneContainer-content .fragment>div:not(:last-child){border-bottom:0.5px solid rgba(255,255,255,0.1)}\n",""]),e.exports=t},function(e,t,n){var r=n(8),a=n(108);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,'#scene-explorer-host{position:absolute;left:0px;top:0px;bottom:0px}#scene-explorer-host:focus{outline:none}#__resizable_base__{display:none}.context-menu{background:#222222}.context-menu .react-contextmenu-item{padding:10px;cursor:pointer}.context-menu .react-contextmenu-item:hover{background:#555555}.react-contextmenu.context-menu.react-contextmenu--visible{z-index:99;transform:scale(1)}#sceneExplorer{background:#333333;height:100%;margin:0;padding:0;display:grid;grid-template-rows:auto 1fr;font:14px "Arial"}#sceneExplorer:focus{outline:none}#sceneExplorer #header{height:30px;font-size:16px;color:white;background:#222222;grid-row:1;text-align:center;display:grid;grid-template-columns:30px 1fr 50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#sceneExplorer #header #logo{position:relative;grid-column:1;width:24px;height:24px;left:0;display:flex;align-self:center;justify-self:center}#sceneExplorer #header #title{grid-column:2;display:grid;align-items:center;text-align:center}#sceneExplorer #header #commands{grid-column:3;display:grid;align-items:center;grid-template-columns:1fr 1fr}#sceneExplorer #header #commands .expand{grid-column:1;display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer #header #commands .close{grid-column:2;display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer #tree{grid-row:2;overflow-x:hidden;overflow-y:auto}#sceneExplorer .filter{display:flex;align-items:stretch}#sceneExplorer .filter input{width:100%;margin:10px 40px 5px 40px;display:block;border:none;padding:0;border-bottom:solid 1px #337ab7;background:linear-gradient(to bottom, rgba(255,255,255,0) 96%, #337ab7 4%);background-position:-1000px 0;background-size:1000px 100%;background-repeat:no-repeat;color:white}#sceneExplorer .filter input::placeholder{color:lightgray}#sceneExplorer .filter input:focus{box-shadow:none;outline:none;background-position:0 0}#sceneExplorer .groupContainer{margin-left:0px;color:white;margin-top:0px;margin-bottom:0px;height:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-self:center;display:grid;align-items:center}#sceneExplorer .groupContainer:hover{background:#444444}#sceneExplorer .groupContainer .expandableHeader{display:grid;grid-template-columns:1fr 20px}#sceneExplorer .groupContainer .expandableHeader .text{grid-column:1;display:grid;grid-template-columns:20px 1fr}#sceneExplorer .groupContainer .expandableHeader .text .arrow{grid-column:1;margin-left:0px;color:white;cursor:pointer;display:inline-block;margin-right:6px;opacity:0.5}#sceneExplorer .groupContainer .expandableHeader .text .text-value{grid-column:2;display:flex;align-items:center}#sceneExplorer .groupContainer .expandableHeader .expandAll{opacity:0.5;grid-column:2;margin-right:10px}#sceneExplorer .icon{display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer .itemContainer{margin-left:0px;color:white;margin-top:0px;margin-bottom:0px;height:24px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:grid;grid-template-columns:20px 1fr}#sceneExplorer .itemContainer:hover{background:#444444}#sceneExplorer .itemContainer.selected{background:#bbbbbb;color:black}#sceneExplorer .itemContainer .isNotActive{opacity:0.3}#sceneExplorer .itemContainer .arrow{grid-column:1;color:white;opacity:0.6}#sceneExplorer .itemContainer .popup{width:200px;visibility:hidden;background-color:#444444;color:#fff;border:1px solid rgba(255,255,255,0.5);position:absolute;z-index:1;margin-left:-180px;box-sizing:border-box}#sceneExplorer .itemContainer .popup.show{visibility:visible}#sceneExplorer .itemContainer .popup:focus{outline:none}#sceneExplorer .itemContainer .popup .popupMenu{padding:6px 5px 5px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:18px}#sceneExplorer .itemContainer .popup .popupMenu:hover{background:white;color:#333333}#sceneExplorer .itemContainer .sceneNode{grid-column:2;margin-left:-10px;display:grid;grid-template-columns:1fr 20px 20px 20px 20px 10px 20px 20px auto 5px;align-items:center;cursor:pointer}#sceneExplorer .itemContainer .sceneNode .sceneTitle{grid-column:1;margin-right:5px;display:flex;align-items:center;height:24px}#sceneExplorer .itemContainer .sceneNode .translation{grid-column:2;opacity:0.6}#sceneExplorer .itemContainer .sceneNode .translation.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .rotation{grid-column:3;opacity:0.6}#sceneExplorer .itemContainer .sceneNode .rotation.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .scaling{grid-column:4;opacity:0.6}#sceneExplorer .itemContainer .sceneNode .scaling.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .bounding{grid-column:5;opacity:0.6}#sceneExplorer .itemContainer .sceneNode .bounding.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .separator{grid-column:6;margin-left:5px;width:5px;display:flex;align-items:center;height:18px;border-left:solid 1px #337ab7}#sceneExplorer .itemContainer .sceneNode .pickingMode{grid-column:7;opacity:0.6}#sceneExplorer .itemContainer .sceneNode .pickingMode.selected{opacity:1}#sceneExplorer .itemContainer .sceneNode .refresh{grid-column:8}#sceneExplorer .itemContainer .sceneNode .extensions{width:20px;grid-column:9}#sceneExplorer .itemContainer .targetedAnimationTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .targetedAnimationTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .animationGroupTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .animationGroupTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .soundTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .soundTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .meshTools{grid-column:2;width:100%;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center;min-width:0}#sceneExplorer .itemContainer .meshTools .bounding-box{grid-column:2;opacity:0.5}#sceneExplorer .itemContainer .meshTools .bounding-box.selected{opacity:1}#sceneExplorer .itemContainer .meshTools .visibility{grid-column:3}#sceneExplorer .itemContainer .meshTools .extensions{width:20px;grid-column:4}#sceneExplorer .itemContainer .cameraTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .cameraTools .activeCamera{grid-column:2}#sceneExplorer .itemContainer .cameraTools .enableGizmo{grid-column:3}#sceneExplorer .itemContainer .cameraTools .extensions{width:20px;grid-column:4}#sceneExplorer .itemContainer .lightTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .lightTools .enableLight{grid-column:2}#sceneExplorer .itemContainer .lightTools .extensions{width:20px;grid-column:3}#sceneExplorer .itemContainer .spriteTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .spriteTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .spriteManagerTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .spriteManagerTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .materialTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .materialTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .materialTools .icon{display:grid;align-items:center;justify-items:center;cursor:pointer}#sceneExplorer .itemContainer .particleSystemTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .particleSystemTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .effectLayerTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .effectLayerTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .postProcessTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .postProcessTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .renderingPipelineTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .renderingPipelineTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .textureTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .textureTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .adtextureTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .adtextureTools .edit{grid-column:2}#sceneExplorer .itemContainer .adtextureTools .pickingMode{grid-column:3;opacity:0.6}#sceneExplorer .itemContainer .adtextureTools .pickingMode.selected{opacity:1}#sceneExplorer .itemContainer .adtextureTools .extensions{width:20px;grid-column:3}#sceneExplorer .itemContainer .controlTools{grid-column:2;display:grid;grid-template-columns:1fr 20px 20px auto 5px;align-items:center}#sceneExplorer .itemContainer .controlTools .highlight{grid-column:2}#sceneExplorer .itemContainer .controlTools .visibility{grid-column:3}#sceneExplorer .itemContainer .controlTools .extensions{width:20px;grid-column:4}#sceneExplorer .itemContainer .transformNodeTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .transformNodeTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .skeletonTools{grid-column:2;display:grid;grid-template-columns:1fr auto 5px;align-items:center}#sceneExplorer .itemContainer .skeletonTools .extensions{width:20px;grid-column:2}#sceneExplorer .itemContainer .title{grid-column:1;background:transparent;white-space:nowrap;overflow:hidden;min-width:0;margin-right:5px;display:grid;align-items:center;grid-template-columns:25px 1fr;height:24px;cursor:pointer}#sceneExplorer .itemContainer .title .titleIcon{grid-column:1;display:grid;align-items:center;justify-items:center}#sceneExplorer .itemContainer .title .titleText{grid-column:2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n',""]),e.exports=t},function(e,t,n){"use strict";n.r(t);var r="undefined"!=typeof window?window:null,a=null===r,o=a?void 0:r.document,i=function(){return!1},s=a?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=o.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String},p=function(e){if(l(e)){var t=o.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},c=function(e,t,n){var r=e[t];return void 0!==r?r:n},u=function(e,t,n,r){if(t){if("end"===r)return 0;if("center"===r)return e/2}else if(n){if("start"===r)return 0;if("center"===r)return e/2}return e},d=function(e,t){var n=o.createElement("div");return n.className="gutter gutter-"+t,n},h=function(e,t,n){var r={};return l(t)?r[e]=t:r[e]=s+"("+t+"% - "+n+"px)",r},m=function(e,t){var n;return(n={})[e]=t+"px",n};t.default=function(e,t){if(void 0===t&&(t={}),a)return{};var n,s,l,b,g,f,v=e;Array.from&&(v=Array.from(v));var y=p(v[0]).parentNode,C=getComputedStyle?getComputedStyle(y):null,E=C?C.flexDirection:null,x=c(t,"sizes")||v.map((function(){return 100/v.length})),O=c(t,"minSize",100),S=Array.isArray(O)?O:v.map((function(){return O})),_=c(t,"expandToMin",!1),w=c(t,"gutterSize",10),P=c(t,"gutterAlign","center"),T=c(t,"snapOffset",30),k=c(t,"dragInterval",1),N=c(t,"direction","horizontal"),M=c(t,"cursor","horizontal"===N?"col-resize":"row-resize"),A=c(t,"gutter",d),L=c(t,"elementStyle",h),R=c(t,"gutterStyle",m);function I(e,t,r,a){var o=L(n,t,r,a);Object.keys(o).forEach((function(t){e.style[t]=o[t]}))}function D(){return f.map((function(e){return e.size}))}function j(e){return"touches"in e?e.touches[0][s]:e[s]}function z(e){var t=f[this.a],n=f[this.b],r=t.size+n.size;t.size=e/this.size*r,n.size=r-e/this.size*r,I(t.element,t.size,this._b,t.i),I(n.element,n.size,this._c,n.i)}function F(e){var n,r=f[this.a],a=f[this.b];this.dragging&&(n=j(e)-this.start+(this._b-this.dragOffset),k>1&&(n=Math.round(n/k)*k),n<=r.minSize+T+this._b?n=r.minSize+this._b:n>=this.size-(a.minSize+T+this._c)&&(n=this.size-(a.minSize+this._c)),z.call(this,n),c(t,"onDrag",i)(D()))}function V(){var e=f[this.a].element,t=f[this.b].element,r=e.getBoundingClientRect(),a=t.getBoundingClientRect();this.size=r[n]+a[n]+this._b+this._c,this.start=r[l],this.end=r[b]}function U(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[g];return 0===n?null:n-="horizontal"===N?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(y);if(null===t)return e;if(S.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,r=[],a=e.map((function(a,o){var i=t*a/100,s=u(w,0===o,o===e.length-1,P),l=S[o]+s;return i<l?(n+=l-i,r.push(0),l):(r.push(i-l),i)}));return 0===n?e:a.map((function(e,a){var o=e;if(n>0&&r[a]-n>0){var i=Math.min(n,r[a]-n);n-=i,o=e-i}return o/t*100}))}function G(){var e=f[this.a].element,n=f[this.b].element;this.dragging&&c(t,"onDragEnd",i)(D()),this.dragging=!1,r.removeEventListener("mouseup",this.stop),r.removeEventListener("touchend",this.stop),r.removeEventListener("touchcancel",this.stop),r.removeEventListener("mousemove",this.move),r.removeEventListener("touchmove",this.move),this.stop=null,this.move=null,e.removeEventListener("selectstart",i),e.removeEventListener("dragstart",i),n.removeEventListener("selectstart",i),n.removeEventListener("dragstart",i),e.style.userSelect="",e.style.webkitUserSelect="",e.style.MozUserSelect="",e.style.pointerEvents="",n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",this.gutter.style.cursor="",this.parent.style.cursor="",o.body.style.cursor=""}function B(e){if(!("button"in e)||0===e.button){var n=f[this.a].element,a=f[this.b].element;this.dragging||c(t,"onDragStart",i)(D()),e.preventDefault(),this.dragging=!0,this.move=F.bind(this),this.stop=G.bind(this),r.addEventListener("mouseup",this.stop),r.addEventListener("touchend",this.stop),r.addEventListener("touchcancel",this.stop),r.addEventListener("mousemove",this.move),r.addEventListener("touchmove",this.move),n.addEventListener("selectstart",i),n.addEventListener("dragstart",i),a.addEventListener("selectstart",i),a.addEventListener("dragstart",i),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.MozUserSelect="none",n.style.pointerEvents="none",a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.MozUserSelect="none",a.style.pointerEvents="none",this.gutter.style.cursor=M,this.parent.style.cursor=M,o.body.style.cursor=M,V.call(this),this.dragOffset=j(e)-this.end}}"horizontal"===N?(n="width",s="clientX",l="left",b="right",g="clientWidth"):"vertical"===N&&(n="height",s="clientY",l="top",b="bottom",g="clientHeight"),x=U(x);var H=[];function W(e){var t=e.i===H.length,n=t?H[e.i-1]:H[e.i];V.call(n);var r=t?n.size-e.minSize-n._c:e.minSize+n._b;z.call(n,r)}return(f=v.map((function(e,t){var r,a={element:p(e),size:x[t],minSize:S[t],i:t};if(t>0&&((r={a:t-1,b:t,dragging:!1,direction:N,parent:y})._b=u(w,t-1==0,!1,P),r._c=u(w,!1,t===v.length-1,P),"row-reverse"===E||"column-reverse"===E)){var o=r.a;r.a=r.b,r.b=o}if(t>0){var i=A(t,N,a.element);!function(e,t,r){var a=R(n,t,r);Object.keys(a).forEach((function(t){e.style[t]=a[t]}))}(i,w,t),r._a=B.bind(r),i.addEventListener("mousedown",r._a),i.addEventListener("touchstart",r._a),y.insertBefore(i,a.element),r.gutter=i}return I(a.element,a.size,u(w,0===t,t===v.length-1,P),t),t>0&&H.push(r),a}))).forEach((function(e){var t=e.element.getBoundingClientRect()[n];t<e.minSize&&(_?W(e):e.minSize=t)})),{setSizes:function(e){var t=U(e);t.forEach((function(e,n){if(n>0){var r=H[n-1],a=f[r.a],o=f[r.b];a.size=t[n-1],o.size=e,I(a.element,a.size,r._b,a.i),I(o.element,o.size,r._c,o.i)}}))},getSizes:D,collapse:function(e){W(f[e])},destroy:function(e,t){H.forEach((function(r){if(!0!==t?r.parent.removeChild(r.gutter):(r.gutter.removeEventListener("mousedown",r._a),r.gutter.removeEventListener("touchstart",r._a)),!0!==e){var a=L(n,r.a.size,r._b);Object.keys(a).forEach((function(e){f[r.a].element.style[e]="",f[r.b].element.style[e]=""}))}}))},parent:y,pairs:H}}},function(e,t,n){var r=n(8),a=n(111);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var o={insert:"head",singleton:!1};r(a,o);e.exports=a.locals||{}},function(e,t,n){(t=n(9)(!1)).push([e.i,'#embed-host{position:absolute;right:0px;top:0px;bottom:0px;z-index:10}#__resizable_base__{display:none}#embed{background:#333333;height:100%;margin:0;padding:0;display:grid;grid-template-rows:30px 1fr;font:14px "Arial";overflow:hidden}#embed #header{font-size:16px;color:white;background:#222222;grid-row:1;text-align:center;display:grid;grid-template-columns:30px 1fr 50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#embed #header #logo{grid-column:1;width:24px;height:24px;display:flex;align-self:center;justify-self:center}#embed #header #back{grid-column:1;display:grid;align-self:center;justify-self:center;cursor:pointer}#embed #header #title{grid-column:2;display:grid;align-items:center;text-align:center}#embed #header #commands{grid-column:3;display:grid;align-items:center;grid-template-columns:1fr 1fr}#embed #header #commands .expand{grid-column:1;display:grid;align-items:center;justify-items:center;cursor:pointer}#embed #header #commands .close{grid-column:2;display:grid;align-items:center;justify-items:center;cursor:pointer}#embed #split{grid-row:2;overflow:hidden}#embed #split.splitPopup{display:grid;grid-template-rows:300px 2px 1fr}#embed #split.splitPopup .panes{margin-bottom:1px}#embed #split #topPart{grid-row:1;overflow:hidden;display:grid;grid-auto-rows:100%}#embed #split #separator{grid-row:2;background:white;opacity:0.1}#embed #split #bottomPart{overflow:hidden;grid-row:3;display:grid;grid-auto-rows:100%}#embed #split .gutter.gutter-vertical{background-image:none;background:#444444;cursor:row-resize}\n',""]),e.exports=t}])}));