!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-node-editor",["babylonjs"],t):"object"==typeof exports?exports["babylonjs-node-editor"]=t(require("babylonjs")):e.NODEEDITOR=t(e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));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=127)}([function(e,t,n){"use strict";e.exports=n(128)},function(t,n){t.exports=e},function(e,t,n){var r;window,r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=45)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports={Always:1,Never:2,IfAtMostOneObstacle:3,OnlyWhenNoObstacles:4}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-s&&(l-=s,e+=o),uMath.abs(e.y-t.y),o=r?n:0,i=r?0:n;return"M"+e.x+","+e.y+" C "+(e.x+o)+","+(e.y+i)+"\n "+(t.x-o)+","+(t.y-i)+" "+t.x+","+t.y},e.generateDynamicPath=function(e){var t=i();return t=t.moveto(e[0][0]*o.ROUTING_SCALING_FACTOR,e[0][1]*o.ROUTING_SCALING_FACTOR),e.slice(1).forEach(function(e){t=t.lineto(e[0]*o.ROUTING_SCALING_FACTOR,e[1]*o.ROUTING_SCALING_FACTOR)}),t.print()},e.TESTING=!1,e.TESTING_UID=0,e}();t.Toolkit=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.type=e}return e.prototype.getType=function(){return this.type},e}();t.AbstractFactory=r},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(0),s=function(e){function t(t,n){void 0===t&&(t="default");var r=e.call(this,t,n)||this;return r.x=0,r.y=0,r.extras={},r.ports={},r}return o(t,e),t.prototype.setPosition=function(e,t){var n=this.x,r=this.y;a.forEach(this.ports,function(o){a.forEach(o.getLinks(),function(i){var a=i.getPointForPort(o);a.x=a.x+e-n,a.y=a.y+t-r})}),this.x=e,this.y=t},t.prototype.getSelectedEntities=function(){var t=e.prototype.getSelectedEntities.call(this);return this.isSelected()&&a.forEach(this.ports,function(e){t=t.concat(a.map(e.getLinks(),function(t){return t.getPointForPort(e)}))}),t},t.prototype.deSerialize=function(t,n){var r=this;e.prototype.deSerialize.call(this,t,n),this.x=t.x,this.y=t.y,this.extras=t.extras,a.forEach(t.ports,function(e){var t=n.getPortFactory(e.type).getNewInstance();t.deSerialize(e,n),r.addPort(t)})},t.prototype.serialize=function(){return a.merge(e.prototype.serialize.call(this),{x:this.x,y:this.y,extras:this.extras,ports:a.map(this.ports,function(e){return e.serialize()})})},t.prototype.doClone=function(e,t){void 0===e&&(e={}),t.ports={},a.forEach(this.ports,function(n){t.addPort(n.clone(e))})},t.prototype.remove=function(){e.prototype.remove.call(this),a.forEach(this.ports,function(e){a.forEach(e.getLinks(),function(e){e.remove()})})},t.prototype.getPortFromID=function(e){for(var t in this.ports)if(this.ports[t].id===e)return this.ports[t];return null},t.prototype.getPort=function(e){return this.ports[e]},t.prototype.getPorts=function(){return this.ports},t.prototype.removePort=function(e){this.ports[e.name]&&(this.ports[e.name].setParent(null),delete this.ports[e.name])},t.prototype.addPort=function(e){return e.setParent(this),this.ports[e.name]=e,e},t.prototype.updateDimensions=function(e){var t=e.width,n=e.height;this.width=t,this.height=n},t}(i.BaseModel);t.NodeModel=s},function(e,t){e.exports={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},octile:function(e,t){var n=Math.SQRT2-1;return e=1)return a.values(this.links)[0];if(e>=this.maximumLinks)return null}return null},t.prototype.updateCoords=function(e){var t=e.x,n=e.y,r=e.width,o=e.height;this.x=t,this.y=n,this.width=r,this.height=o},t.prototype.canLinkToPort=function(e){return!0},t.prototype.isLocked=function(){return e.prototype.isLocked.call(this)||this.getParent().isLocked()},t}(i.BaseModel);t.PortModel=s},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n2&&this.points.splice(0,this.points.length-2)},t.prototype.addPoint=function(e,t){return void 0===t&&(t=1),e.setParent(this),this.points.splice(t,0,e),e},t.prototype.generatePoint=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),new s.PointModel(this,{x:e,y:t})},t}(a.BaseModel);t.LinkModel=u},function(e,t,n){var r=n(15),o=n(4),i=n(10),a=n(2);function s(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.diagonalMovement=e.diagonalMovement,this.heuristic=e.heuristic||i.manhattan,this.weight=e.weight||1,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=a.OnlyWhenNoObstacles:this.diagonalMovement=a.IfAtMostOneObstacle:this.diagonalMovement=a.Never),this.diagonalMovement===a.Never?this.heuristic=e.heuristic||i.manhattan:this.heuristic=e.heuristic||i.octile}s.prototype.findPath=function(e,t,n,i,a){var s,l,u,c,p,f,d,h,g=function(e,t){return e.f-t.f},m=new r(g),v=new r(g),y=a.getNodeAt(e,t),b=a.getNodeAt(n,i),w=this.heuristic,_=this.diagonalMovement,x=this.weight,k=Math.abs,E=Math.SQRT2;for(y.g=0,y.f=0,m.push(y),y.opened=1,b.g=0,b.f=0,v.push(b),b.opened=2;!m.empty()&&!v.empty();){for((s=m.pop()).closed=!0,c=0,p=(l=a.getNeighbors(s,_)).length;cthis.mouseX?this.mouseX:this.mouseX2,top:this.mouseY2>this.mouseY?this.mouseY:this.mouseY2,width:Math.abs(this.mouseX2-this.mouseX),height:Math.abs(this.mouseY2-this.mouseY),right:this.mouseX2o.left&&e*r+n.getOffsetX()o.top&&t*r+n.getOffsetY()0&&window.requestAnimationFrame(this.calculateAllLabelPosition.bind(this))},t.prototype.componentDidMount=function(){this.props.link.labels.length>0&&window.requestAnimationFrame(this.calculateAllLabelPosition.bind(this))},t.prototype.generatePoint=function(e){var t=this,n=this.props.link.points[e].x,r=this.props.link.points[e].y;return a.createElement("g",{key:"point-"+this.props.link.points[e].id},a.createElement("circle",{cx:n,cy:r,r:5,className:"point "+this.bem("__point")+(this.props.link.points[e].isSelected()?this.bem("--point-selected"):"")}),a.createElement("circle",{onMouseLeave:function(){t.setState({selected:!1})},onMouseEnter:function(){t.setState({selected:!0})},"data-id":this.props.link.points[e].id,"data-linkid":this.props.link.id,cx:n,cy:r,r:15,opacity:0,className:"point "+this.bem("__point")}))},t.prototype.generateLabel=function(e){var t=this,n=this.props.diagramEngine.canvas;return a.createElement("foreignObject",{key:e.id,className:this.bem("__label"),width:n.offsetWidth,height:n.offsetHeight},a.createElement("div",{ref:function(n){return t.refLabels[e.id]=n}},this.props.diagramEngine.getFactoryForLabel(e).generateReactWidget(this.props.diagramEngine,e)))},t.prototype.generateLink=function(e,t,n){var r=this,o=this.props,s=a.cloneElement(o.diagramEngine.getFactoryForLink(this.props.link).generateLinkSegment(this.props.link,this,this.state.selected||this.props.link.isSelected(),e),{ref:function(e){return e&&r.refPaths.push(e)}}),l=a.cloneElement(s,i({},t,{strokeLinecap:"round",onMouseLeave:function(){r.setState({selected:!1})},onMouseEnter:function(){r.setState({selected:!0})},ref:null,"data-linkid":this.props.link.getID(),strokeOpacity:this.state.selected?.1:0,strokeWidth:20,onContextMenu:function(){r.props.diagramEngine.isModelLocked(r.props.link)||(event.preventDefault(),r.props.link.remove())}}));return a.createElement("g",{key:"link-"+n},s,l)},t.prototype.isSmartRoutingApplicable=function(){var e=this.props,t=e.diagramEngine,n=e.link;return!!t.isSmartRoutingEnabled()&&(2===n.points.length&&(null!==n.sourcePort&&null!==n.targetPort))},t.prototype.render=function(){var e=this,t=this.props.diagramEngine;if(!t.nodesRendered)return null;var n=this.props.link.points,r=[];if(this.isSmartRoutingApplicable()){var o=this.pathFinding.calculateDirectPath(c.first(n),c.last(n)),s=t.getRoutingMatrix(),u=this.pathFinding.calculateLinkStartEndCoords(s,o);if(u){var p=u.start,f=u.end,d=u.pathToStart,h=u.pathToEnd,g=this.pathFinding.calculateDynamicPath(s,p,f,d,h);r.push(this.generateLink(l.Toolkit.generateDynamicPath(g),{onMouseDown:function(t){e.addPointToLink(t,1)}},"0"))}}if(0===r.length)if(2===n.length){var m=Math.abs(n[0].x-n[1].x)>Math.abs(n[0].y-n[1].y)?"x":"y";Math.abs(n[0][m]-n[1][m])<50&&5;var v=n[0],y=n[1];v[m]>y[m]&&(v=n[1],y=n[0]),r.push(this.generateLink(l.Toolkit.generateCurvePath(v,y,this.props.link.curvyness),{onMouseDown:function(t){e.addPointToLink(t,1)}},"0")),null===this.props.link.targetPort&&r.push(this.generatePoint(1))}else{for(var b=function(t){r.push(w.generateLink(l.Toolkit.generateLinePath(n[t],n[t+1]),{"data-linkid":w.props.link.id,"data-point":t,onMouseDown:function(n){e.addPointToLink(n,t+1)}},t))},w=this,_=0;_0&&(n=s.filter(s.uniq(n),function(t){return!!(s.includes(e,"node")&&t instanceof u.NodeModel)||(!!(s.includes(e,"link")&&t instanceof l.LinkModel)||(!!(s.includes(e,"port")&&t instanceof c.PortModel)||!!(s.includes(e,"point")&&t instanceof p.PointModel)))})),n},t.prototype.setZoomLevel=function(e){this.zoom=e,this.iterateListeners(function(t,n){t.zoomUpdated&&t.zoomUpdated(i({},n,{zoom:e}))})},t.prototype.setOffset=function(e,t){this.offsetX=e,this.offsetY=t,this.iterateListeners(function(n,r){n.offsetUpdated&&n.offsetUpdated(i({},r,{offsetX:e,offsetY:t}))})},t.prototype.setOffsetX=function(e){var t=this;this.offsetX=e,this.iterateListeners(function(n,r){n.offsetUpdated&&n.offsetUpdated(i({},r,{offsetX:e,offsetY:t.offsetY}))})},t.prototype.setOffsetY=function(e){var t=this;this.offsetY=e,this.iterateListeners(function(e,n){e.offsetUpdated&&e.offsetUpdated(i({},n,{offsetX:t.offsetX,offsetY:t.offsetY}))})},t.prototype.getOffsetY=function(){return this.offsetY},t.prototype.getOffsetX=function(){return this.offsetX},t.prototype.getZoomLevel=function(){return this.zoom},t.prototype.getNode=function(e){return e instanceof u.NodeModel?e:this.nodes[e]?this.nodes[e]:null},t.prototype.getLink=function(e){return e instanceof l.LinkModel?e:this.links[e]?this.links[e]:null},t.prototype.addAll=function(){for(var e=this,t=[],n=0;n10&&n.setZoomLevel(n.getZoomLevel()+i);var a=n.getZoomLevel()/100,s=r.currentTarget.getBoundingClientRect(),l=s.width,u=s.height,c=l*a-l*o,p=u*a-u*o,f=r.clientX-s.left,d=r.clientY-s.top,h=(f-n.getOffsetX())/o/l,g=(d-n.getOffsetY())/o/u;n.setOffset(n.getOffsetX()-c*h,n.getOffsetY()-p*g),t.enableRepaintEntities([]),e.forceUpdate()}},onMouseDown:function(r){e.setState(i({},e.state,{wasMoved:!1})),t.clearRepaintEntities();var o=e.getMouseElement(r);if(null===o)if(r.shiftKey){var a=t.getRelativePoint(r.clientX,r.clientY);e.startFiringAction(new d.SelectingAction(a.x,a.y))}else n.clearSelection(),e.startFiringAction(new p.MoveCanvasAction(r.clientX,r.clientY,n));else if(o.model instanceof m.PortModel)if(e.props.diagramEngine.isModelLocked(o.model))n.clearSelection();else{a=t.getRelativeMousePoint(r);var s=o.model,l=s.createLinkModel();l.setSourcePort(s),l&&(l.removeMiddlePoints(),l.getSourcePort()!==s&&l.setSourcePort(s),l.setTargetPort(null),l.getFirstPoint().updateLocation(a),l.getLastPoint().updateLocation(a),n.clearSelection(),l.getLastPoint().setSelected(!0),n.addLink(l),e.startFiringAction(new f.MoveItemsAction(r.clientX,r.clientY,t)))}else r.shiftKey||o.model.isSelected()||n.clearSelection(),o.model.setSelected(!0),e.startFiringAction(new f.MoveItemsAction(r.clientX,r.clientY,t));e.state.document.addEventListener("mousemove",e.onMouseMove),e.state.document.addEventListener("mouseup",e.onMouseUp)}}),this.state.renderedNodes&&a.createElement(l.LinkLayerWidget,{diagramEngine:t,pointAdded:function(r,o){e.state.document.addEventListener("mousemove",e.onMouseMove),e.state.document.addEventListener("mouseup",e.onMouseUp),o.stopPropagation(),n.clearSelection(r),e.setState({action:new f.MoveItemsAction(o.clientX,o.clientY,t)})}}),a.createElement(u.NodeLayerWidget,{diagramEngine:t}),this.state.action instanceof d.SelectingAction&&this.drawSelectionBox())},t.defaultProps={diagramEngine:null,allowLooseLinks:!0,allowCanvasTranslation:!0,allowCanvasZoom:!0,inverseZoom:!1,maxNumberPointsPerLink:1/0,smartRouting:!1,deleteKeys:[46,8]},t}(n(3).BaseWidget);t.DiagramWidget=v},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(38),a=n(1),s=n(35),l=function(e){function t(){return e.call(this,"default")||this}return o(t,e),t.prototype.generateReactWidget=function(e,t){return a.createElement(s.DefaultNodeWidget,{node:t,diagramEngine:e})},t.prototype.getNewInstance=function(e){return new i.DefaultNodeModel},t}(n(32).AbstractNodeFactory);t.DefaultNodeFactory=l},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=n(37),s=n(36),l=n(19),u=function(e){function t(){return e.call(this,"default")||this}return o(t,e),t.prototype.generateReactWidget=function(e,t){return i.createElement(a.DefaultLinkWidget,{link:t,diagramEngine:e})},t.prototype.getNewInstance=function(e){return new l.DefaultLinkModel},t.prototype.generateLinkSegment=function(e,t,n,r){return i.createElement("path",{className:n?t.bem("--path-selected"):"",strokeWidth:e.width,stroke:e.color,d:r})},t}(s.AbstractLinkFactory);t.DefaultLinkFactory=u},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),a=n(44),s=n(0),l=n(9),u=n(5),c=n(45),p=n(16),f=n(43),d=n(41),h=n(7),g=function(e){function t(){var t=e.call(this)||this;return t.canvasMatrix=[],t.routingMatrix=[],t.hAdjustmentFactor=0,t.vAdjustmentFactor=0,t.calculateMatrixDimensions=function(){var e=s.values(t.diagramModel.nodes).map(function(e){return{x:e.x,width:e.width,y:e.y,height:e.height}}),n=s.values(t.diagramModel.links),r=s.flatMap(n.map(function(e){return[e.sourcePort,e.targetPort]})).filter(function(e){return null!==e}).map(function(e){return{x:e.x,width:e.width,y:e.y,height:e.height}}),o=s.flatMap(n.map(function(e){return e.points})).map(function(e){return{x:e.x,width:0,y:e.y,height:0}}),i=t.canvas,a=Math.floor(Math.min(s.minBy(s.concat(e,r,o),function(e){return e.x}).x,0)/p.ROUTING_SCALING_FACTOR)*p.ROUTING_SCALING_FACTOR,l=s.maxBy(s.concat(e,r,o),function(e){return e.x+e.width}),u=Math.max(l.x+l.width,i.offsetWidth),c=Math.floor(Math.min(s.minBy(s.concat(e,r,o),function(e){return e.y}).y,0)/p.ROUTING_SCALING_FACTOR)*p.ROUTING_SCALING_FACTOR,f=s.maxBy(s.concat(e,r,o),function(e){return e.y+e.height}),d=Math.max(f.y+f.height,i.offsetHeight);return{width:Math.ceil(Math.abs(a)+u),hAdjustmentFactor:Math.abs(a)/p.ROUTING_SCALING_FACTOR+1,height:Math.ceil(Math.abs(c)+d),vAdjustmentFactor:Math.abs(c)/p.ROUTING_SCALING_FACTOR+1}},t.markNodes=function(e){s.values(t.diagramModel.nodes).forEach(function(n){for(var r=Math.floor(n.x/p.ROUTING_SCALING_FACTOR),o=Math.ceil((n.x+n.width)/p.ROUTING_SCALING_FACTOR),i=Math.floor(n.y/p.ROUTING_SCALING_FACTOR),a=Math.ceil((n.y+n.height)/p.ROUTING_SCALING_FACTOR),s=r-1;s<=o+1;s++)for(var l=i-1;l=-n&&e.vec[0]*r>=-n;var i=t.vec[0]*e.vec[1]-t.vec[1]*e.vec[0];if(0===i)return!1;var a=(o*t.vec[0]-r*t.vec[1])/i,s=(o*e.vec[0]-r*e.vec[1])/i;return a>=-n&&s>=n||a>=n&&s>=-n},matrixTransform:function(e,t){return e.map(function(e){return{x:e.x*t[0]+e.y*t[2]+t[4],y:e.x*t[1]+e.y*t[3]+t[5]}})},transformEllipse:function(e,t,n,r){var o=Math.PI/180,i=Math.cos(n*o),a=Math.sin(n*o),s=[e*(r[0]*i+r[2]*a),e*(r[1]*i+r[3]*a),t*(-r[0]*a+r[2]*i),t*(-r[1]*a+r[3]*i)],l=s[0]*s[0]+s[2]*s[2],u=s[1]*s[1]+s[3]*s[3],c=((s[0]-s[3])*(s[0]-s[3])+(s[2]+s[1])*(s[2]+s[1]))*((s[0]+s[3])*(s[0]+s[3])+(s[2]-s[1])*(s[2]-s[1])),p=(l+u)/2;if(c<1e-10*p)return{rx:Math.sqrt(p),ry:Math.sqrt(p),ax:0,isDegenerate:!1};var f=s[0]*s[1]+s[2]*s[3],d=p+(c=Math.sqrt(c))/2,h=p-c/2,g=void 0,m=void 0,v=void 0;return(g=Math.abs(f)<1e-10&&Math.abs(d-u)<1e-10?90:180*Math.atan(Math.abs(f)>Math.abs(d-u)?(d-l)/f:f/(d-u))/Math.PI)>=0?(m=Math.sqrt(d),v=Math.sqrt(h)):(g+=90,m=Math.sqrt(h),v=Math.sqrt(d)),{rx:m,ry:v,ax:g,isDegenerate:m<1e-10*v||v<1e-10*m}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(50),i=function e(t){var n=t||[],i=function(e){return e.command+" "+e.params.map(function(e){return t=6,function(e,t){for(var n=e.length;"0"===e.charAt(n-1);)n-=1;return"."===e.charAt(n-1)&&(n-=1),e.substr(0,n)}(e.toFixed(t));var t}).join(" ")},a=function(e,t){var n=e.command,r=e.params;switch(n){case"M":case"L":return[r[0],r[1]];case"H":return[r[0],t[1]];case"V":return[t[0],r[0]];case"Z":return null;case"C":return[r[4],r[5]];case"S":case"Q":return[r[2],r[3]];case"T":return[r[0],r[1]];case"A":return[r[5],r[6]]}},s=function(e,t,n){var r=e.params,i={V:function(e,t,n){var i=[{x:n[0],y:r[1]}],a=(0,o.matrixTransform)(i,t);return a[0].x===(0,o.matrixTransform)([{x:n[0],y:n[1]}])[0].x?{command:"V",params:[a[0].y]}:{command:"L",params:[a[0].x,a[0].y]}},H:function(e,t,n){var i=[{x:r[0],y:n[1]}],a=(0,o.matrixTransform)(i,t);return a[0].y===(0,o.matrixTransform)([{x:n[0],y:n[1]}])[0].y?{command:"H",params:[a[0].x]}:{command:"L",params:[a[0].x,a[0].y]}},A:function(e,t,n){var i=(0,o.transformEllipse)(r[0],r[1],r[2],t),a=r[4];t[0]*t[3]-t[1]*t[2]<0&&(a=a?"0":"1");var s=[{x:r[5],y:r[6]}],l=(0,o.matrixTransform)(s,t);return i.isDegenerate?{command:"L",params:[l[0].x,l[0].y]}:{command:"A",params:[i.rx,i.ry,i.ax,r[3],a,l[0].x,l[0].y]}},C:function(e,t,n){var i=[{x:r[0],y:r[1]},{x:r[2],y:r[3]},{x:r[4],y:r[5]}],a=(0,o.matrixTransform)(i,t);return{command:"C",params:[a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y]}},Z:function(e,t,n){return{command:"Z",params:[]}},default:function(e,t,n){var i=[{x:r[0],y:r[1]}],a=(0,o.matrixTransform)(i,t),s=e.params.slice(0,e.params.length);return s.splice(0,2,a[0].x,a[0].y),{command:e.command,params:s}}};return i[e.command]?i[e.command](e,t,n):i.default(e,t,n)},l=function(e,t){return function(n){var r="object"==typeof n?e.map(function(e){return n[e]}):arguments;return t.apply(null,r)}},u=function(t){return e((o=t,(i=(r=n).slice(0,r.length)).push(o),i));var r,o,i};return{moveto:l(["x","y"],function(e,t){return u({command:"M",params:[e,t]})}),lineto:l(["x","y"],function(e,t){return u({command:"L",params:[e,t]})}),hlineto:l(["x"],function(e){return u({command:"H",params:[e]})}),vlineto:l(["y"],function(e){return u({command:"V",params:[e]})}),closepath:function(){return u({command:"Z",params:[]})},curveto:l(["x1","y1","x2","y2","x","y"],function(e,t,n,r,o,i){return u({command:"C",params:[e,t,n,r,o,i]})}),smoothcurveto:l(["x2","y2","x","y"],function(e,t,n,r){return u({command:"S",params:[e,t,n,r]})}),qcurveto:l(["x1","y1","x","y"],function(e,t,n,r){return u({command:"Q",params:[e,t,n,r]})}),smoothqcurveto:l(["x","y"],function(e,t){return u({command:"T",params:[e,t]})}),arc:l(["rx","ry","xrot","largeArcFlag","sweepFlag","x","y"],function(e,t,n,r,o,i,a){return u({command:"A",params:[e,t,n,r,o,i,a]})}),translate:l(["dx","dy"],function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(0===t&&0===t)return e(n);var o,i,l,u=(o=[0,0],i=[1,0,0,1,t,r],l=n.map(function(e){var t=s(e,i,o);return o=a(e,o),t}),{v:e(l)});return"object"==typeof u?u.v:void 0}),rotate:l(["angle","rx","ry"],function(t){var r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],o=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(0===t)return e(n);var i=function(){var i=void 0,l=void 0,u=n;0!==r&&0!==o&&(i=[0,0],l=[1,0,0,1,-r,-o],u=u.map(function(e){var t=s(e,l,i);return i=a(e,i),t}));var c=t*Math.PI/180,p=Math.cos(c),f=Math.sin(c);return i=[0,0],l=[p,f,-f,p,0,0],u=u.map(function(e){var t=s(e,l,i);return i=a(e,i),t}),0!==r&&0!==o&&(i=[0,0],l=[1,0,0,1,r,o],u=u.map(function(e){var t=s(e,l,i);return i=a(e,i),t})),{v:e(u)}}();return"object"==typeof i?i.v:void 0}),scale:l(["sx","sy"],function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],r=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return function(){if(1===t&&1===r)return e(n);var o,i,l,u=(o=[0,0],i=[t,0,0,r,0,0],l=n.map(function(e){var t=s(e,i,o);return o=a(e,o),t}),{v:e(l)});return"object"==typeof u?u.v:void 0}()}),shearX:l(["angle"],function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];if(0===t)return e(n);var r,o,i,l=(r=[0,0],o=[1,0,Math.tan(t*Math.PI/180),1,0,0],i=n.map(function(e){var t=s(e,o,r);return r=a(e,r),t}),{v:e(i)});return"object"==typeof l?l.v:void 0}),shearY:l(["angle"],function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];if(0===t)return e(n);var r,o,i,l=(r=[0,0],o=[1,Math.tan(t*Math.PI/180),0,1,0,0],i=n.map(function(e){var t=s(e,o,r);return r=a(e,r),t}),{v:e(i)});return"object"==typeof l?l.v:void 0}),print:function(){return n.map(i).join(" ")},toString:function(){return(void 0).print()},points:function(){var e=[],t=[0,0],r=!0,o=!1,i=void 0;try{for(var s,l=n[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var u=s.value,c=a(u,t);t=c,c&&e.push(c)}}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return e},instructions:function(){return n.slice(0,n.length)},connect:function(t){var o,i,a,s,l,u,c,p=this.points(),f=p[p.length-1],d=t.points()[0],h=void 0;return"Z"!==n[n.length-1].command?(h=t.instructions().slice(1),o=d,i=r(f,2),a=i[0],s=i[1],l=r(o,2),u=l[0],c=l[1],(a!==u||s!==c)&&h.unshift({command:"L",params:d})):h=t.instructions(),e(this.instructions().concat(h))}}};t.default=function(){return i()},e.exports=t.default},function(e,t,n){var r=n(14),o=n(2);function i(e){r.call(this,e)}i.prototype=new r,i.prototype.constructor=i,i.prototype._jump=function(e,t,n,r){var o=this.grid,i=e-n,a=t-r;if(!o.isWalkableAt(e,t))return null;if(!0===this.trackJumpRecursion&&(o.getNodeAt(e,t).tested=!0),o.getNodeAt(e,t)===this.endNode)return[e,t];if(0!==i&&0!==a){if(o.isWalkableAt(e-i,t+a)&&!o.isWalkableAt(e-i,t)||o.isWalkableAt(e+i,t-a)&&!o.isWalkableAt(e,t-a))return[e,t];if(this._jump(e+i,t,e,t)||this._jump(e,t+a,e,t))return[e,t]}else if(0!==i){if(o.isWalkableAt(e+i,t+1)&&!o.isWalkableAt(e,t+1)||o.isWalkableAt(e+i,t-1)&&!o.isWalkableAt(e,t-1))return[e,t]}else if(o.isWalkableAt(e+1,t+a)&&!o.isWalkableAt(e+1,t)||o.isWalkableAt(e-1,t+a)&&!o.isWalkableAt(e-1,t))return[e,t];return o.isWalkableAt(e+i,t)||o.isWalkableAt(e,t+a)?this._jump(e+i,t+a,e,t):null},i.prototype._findNeighbors=function(e){var t,n,r,i,a,s,l,u,c=e.parent,p=e.x,f=e.y,d=this.grid,h=[];if(c)t=c.x,n=c.y,r=(p-t)/Math.max(Math.abs(p-t),1),i=(f-n)/Math.max(Math.abs(f-n),1),0!==r&&0!==i?(d.isWalkableAt(p,f+i)&&h.push([p,f+i]),d.isWalkableAt(p+r,f)&&h.push([p+r,f]),(d.isWalkableAt(p,f+i)||d.isWalkableAt(p+r,f))&&h.push([p+r,f+i]),!d.isWalkableAt(p-r,f)&&d.isWalkableAt(p,f+i)&&h.push([p-r,f+i]),!d.isWalkableAt(p,f-i)&&d.isWalkableAt(p+r,f)&&h.push([p+r,f-i])):0===r?d.isWalkableAt(p,f+i)&&(h.push([p,f+i]),d.isWalkableAt(p+1,f)||h.push([p+1,f+i]),d.isWalkableAt(p-1,f)||h.push([p-1,f+i])):d.isWalkableAt(p+r,f)&&(h.push([p+r,f]),d.isWalkableAt(p,f+1)||h.push([p+r,f+1]),d.isWalkableAt(p,f-1)||h.push([p+r,f-1]));else for(l=0,u=(a=d.getNeighbors(e,o.IfAtMostOneObstacle)).length;l0&&(new Date).getTime()-u>1e3*this.timeLimit)return 1/0;var s,l,f,h,g=t+c(e,d)*this.weight;if(g>n)return g;if(e==d)return r[a]=[e.x,e.y],e;var m,v,y=i.getNeighbors(e,this.diagonalMovement);for(f=0,s=1/0;h=y[f];++f){if(this.trackRecursion&&(h.retainCount=h.retainCount+1||1,!0!==h.tested&&(h.tested=!0)),(l=p(h,t+(v=h,(m=e).x===v.x||m.y===v.y?1:Math.SQRT2),n,r,a+1))instanceof o)return r[a]=[e.x,e.y],l;this.trackRecursion&&0==--h.retainCount&&(h.tested=!1),l=0&&e=0&&tt?1:0},u=function(e,t,o,i,a){var s;if(null==o&&(o=0),null==a&&(a=n),o<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);on;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;ig;0<=g?++f:--f)m.push(i(e,r));return m},h=function(e,t,r,o){var i,a,s;for(null==o&&(o=n),i=e[r];r>t&&o(i,a=e[s=r-1>>1])<0;)e[r]=a,r=s;return e[r]=i},g=function(e,t,r){var o,i,a,s,l;for(null==r&&(r=n),i=e.length,l=t,a=e[t],o=2*t+1;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0||!Array.isArray(t)&&t?u({},e,t):{}}function v(e){return null===e?null:"object"===l(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 y(e){var t=e.icon,n=e.mask,o=e.symbol,i=e.className,a=e.title,s=v(t),l=m("classes",[].concat(f(function(e){var t,n=(u(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-inverse":e.inverse,"fa-border":e.border,"fa-li":e.listItem,"fa-flip-horizontal":"horizontal"===e.flip||"both"===e.flip,"fa-flip-vertical":"vertical"===e.flip||"both"===e.flip},"fa-".concat(e.size),null!==e.size),u(t,"fa-rotate-".concat(e.rotation),null!==e.rotation),u(t,"fa-pull-".concat(e.pull),null!==e.pull),t);return Object.keys(n).map(function(e){return n[e]?e:null}).filter(function(e){return e})}(e)),f(i.split(" ")))),p=m("transform","string"==typeof e.transform?r.b.transform(e.transform):e.transform),d=m("mask",v(n)),h=Object(r.a)(s,c({},l,p,d,{symbol:o,title:a}));if(!h)return function(){var e;!g&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",s),null;var w=h.abstract,_={};return Object.keys(e).forEach(function(t){y.defaultProps.hasOwnProperty(t)||(_[t]=e[t])}),b(w[0],_)}y.displayName="FontAwesomeIcon",y.propTypes={border:i.a.bool,className:i.a.string,mask:i.a.oneOfType([i.a.object,i.a.array,i.a.string]),fixedWidth:i.a.bool,inverse:i.a.bool,flip:i.a.oneOf(["horizontal","vertical","both"]),icon:i.a.oneOfType([i.a.object,i.a.array,i.a.string]),listItem:i.a.bool,pull:i.a.oneOf(["right","left"]),pulse:i.a.bool,rotation:i.a.oneOf([90,180,270]),size:i.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:i.a.bool,symbol:i.a.oneOfType([i.a.bool,i.a.string]),title:i.a.string,transform:i.a.oneOfType([i.a.string,i.a.object])},y.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};var b=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var o=(n.children||[]).map(function(n){return e(t,n)}),i=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=r.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n,r=t.indexOf(":"),o=h.camelize(t.slice(0,r)),i=t.slice(r+1).trim();return o.startsWith("webkit")?e[(n=o,n.charAt(0).toUpperCase()+n.slice(1))]=i:e[o]=i,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[h.camelize(t)]=r}return e},{attrs:{}}),a=r.style,s=void 0===a?{}:a,l=p(r,["style"]);return i.attrs.style=c({},i.attrs.style,s),t.apply(void 0,[n.tag,c({},i.attrs,l)].concat(f(o)))}.bind(null,s.a.createElement)}).call(this,n(16))},function(e,t,n){e.exports=n(136)()},function(e,t,n){var r;try{r={cloneDeep:n(259),constant:n(63),defaults:n(260),each:n(92),filter:n(95),find:n(261),flatten:n(122),forEach:n(93),forIn:n(266),has:n(106),isUndefined:n(107),last:n(267),map:n(108),mapValues:n(268),max:n(269),merge:n(271),min:n(277),minBy:n(278),now:n(279),pick:n(280),range:n(285),reduce:n(110),sortBy:n(288),uniqueId:n(293),values:n(115),zipObject:n(294)}}catch(e){}r||(r=window._),e.exports=r},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=n(5),o=n(10).Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){return r.max(r.map(e.nodes(),function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n}))}e.exports={addDummyNode:i,simplify:function(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t},asNonCompoundGraph:function(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t},successorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,l=e.width/2,u=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*l>Math.abs(a)*u?(s<0&&(u=-u),n=u*a/s,r=u):(a<0&&(l=-l),n=l,r=l*s/a);return{x:o+n,y:i+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),function(){return[]});return r.forEach(e.nodes(),function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)}),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank}));r.forEach(e.nodes(),function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)})},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank})),n=[];r.forEach(e.nodes(),function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)});var o=0,i=e.graph().nodeRankFactor;r.forEach(n,function(t,n){r.isUndefined(t)&&n%i!=0?--o:o&&r.forEach(t,function(t){e.node(t).rank+=o})})},addBorderNode:function(e,t,n,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=n,o.order=r);return i(e,"border",o,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},function(e,t,n){var r;try{r={clone:n(147),constant:n(63),each:n(92),filter:n(95),has:n(106),isArray:n(6),isEmpty:n(223),isFunction:n(29),isUndefined:n(107),keys:n(15),map:n(108),reduce:n(110),size:n(226),transform:n(232),union:n(233),values:n(115)}}catch(e){}r||(r=window._),e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r;try{r=n(145)}catch(e){}r||(r=window.graphlib),e.exports=r},function(e,t,n){var r=n(75),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(29),o=n(57);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(203),o=n(213),i=n(19),a=n(6),s=n(220);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(78),o=n(59),i=n(13);e.exports=function(e){return i(e)?r(e):o(e)}},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){var r=n(158),o=n(163);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(23),o=n(159),i=n(160),a="[object Null]",s="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:l&&l in Object(e)?o(e):i(e)}},function(e,t){e.exports=function(e){return e}},function(e,t){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 o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&c.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=l||(l=m(t)),r=_.bind(null,n,a,!1),o=_.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=p(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){g(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 o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return f(n,t),function(e){for(var r=[],o=0;o-1&&e%1==0&&e0?o=".dds":e.name.toLowerCase().indexOf(".env")>0&&(o=".env"),n.updateURL(r,o,function(){return t.updateAfterTextureLoad()})}},void 0,!0)}},t.prototype.replaceTextureWithUrl=function(e){var t=this;this._prepareTexture();var n=this.props.node.texture;if(n.isCube||this.props.node instanceof re){var r=void 0;e.toLowerCase().indexOf(".dds")>0?r=".dds":e.toLowerCase().indexOf(".env")>0&&(r=".env"),n.updateURL(e,r,function(){return t.updateAfterTextureLoad()})}else n.updateURL(e,null,function(){return t.updateAfterTextureLoad()})},t.prototype.render=function(){var e=this,t="",n=this.props.node.texture;n&&n.name&&"data"!==n.name.substring(0,4)&&(t=n.name),t=t.replace(/\?nocache=\d+/,"");var r=this.props.node instanceof re,i=[{label:"Cubic",value:a.Texture.CUBIC_MODE},{label:"Equirectangular",value:a.Texture.EQUIRECTANGULAR_MODE},{label:"Explicit",value:a.Texture.EXPLICIT_MODE},{label:"Fixed equirectangular",value:a.Texture.FIXED_EQUIRECTANGULAR_MODE},{label:"Fixed mirrored equirectangular",value:a.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE},{label:"Planar",value:a.Texture.PLANAR_MODE},{label:"Projection",value:a.Texture.PROJECTION_MODE},{label:"Skybox",value:a.Texture.SKYBOX_MODE},{label:"Spherical",value:a.Texture.SPHERICAL_MODE}];return o.createElement("div",null,o.createElement(z,{title:"GENERAL"},o.createElement(w,{label:"Type",value:this.props.node.block.getClassName()}),o.createElement(U,{globalState:this.props.globalState,label:"Name",propertyName:"name",target:this.props.node.block,onChange:function(){return e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})),o.createElement(z,{title:"PROPERTIES"},o.createElement(W,{label:"Auto select UV",propertyName:"autoSelectUV",target:this.props.node.block,onValueChanged:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&r&&o.createElement(oe,{label:"Reflection mode",options:i,target:n,propertyName:"coordinatesMode",onSelect:function(t){n.coordinatesMode=t,e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(W,{label:"Gamma space",propertyName:"gammaSpace",target:n,onValueChanged:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(W,{label:"Clamp U",isSelected:function(){return n.wrapU===a.Texture.CLAMP_ADDRESSMODE},onSelect:function(t){n.wrapU=t?a.Texture.CLAMP_ADDRESSMODE:a.Texture.WRAP_ADDRESSMODE,e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(W,{label:"Clamp V",isSelected:function(){return n.wrapV===a.Texture.CLAMP_ADDRESSMODE},onSelect:function(t){n.wrapV=t?a.Texture.CLAMP_ADDRESSMODE:a.Texture.WRAP_ADDRESSMODE,e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(ne,{label:"Offset U",target:n,propertyName:"uOffset",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(ne,{label:"Offset V",target:n,propertyName:"vOffset",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(ne,{label:"Scale U",target:n,propertyName:"uScale",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(ne,{label:"Scale V",target:n,propertyName:"vScale",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(te,{label:"Rotation U",target:n,propertyName:"uAng",minimum:0,maximum:2*Math.PI,useEuler:!0,step:.1,onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(te,{label:"Rotation V",target:n,propertyName:"vAng",minimum:0,maximum:2*Math.PI,useEuler:!0,step:.1,onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(te,{label:"Rotation W",target:n,propertyName:"wAng",minimum:0,maximum:2*Math.PI,useEuler:!0,step:.1,onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})),o.createElement(z,{title:"SOURCE"},o.createElement(W,{label:"Embed static texture",isSelected:function(){return e.state.isEmbedded},onSelect:function(t){e.setState({isEmbedded:t}),e.props.node.texture=null,e.updateAfterTextureLoad()}}),r&&o.createElement(W,{label:"Load as cube texture",isSelected:function(){return e.state.loadAsCubeTexture},onSelect:function(t){return e.setState({loadAsCubeTexture:t})}}),this.state.isEmbedded&&o.createElement(Z,{label:"Upload",onClick:function(t){return e.replaceTexture(t)},accept:".jpg, .png, .tga, .dds, .env"}),!this.state.isEmbedded&&o.createElement(U,{label:"Link",globalState:this.props.globalState,value:t,onChange:function(t){return e.replaceTextureWithUrl(t)}}),!this.state.isEmbedded&&t&&o.createElement(X,{label:"Refresh",onClick:function(){return e.replaceTextureWithUrl(t+"?nocache="+e._generateRandomForCache())}}),n&&o.createElement(X,{label:"Remove",onClick:function(){return e.removeTexture()}})))},t}(o.Component),ae=function(e){function t(){return e.call(this,"texture")||this}return c(t,e),Object.defineProperty(t.prototype,"texture",{get:function(){return this._block.texture},set:function(e){this._block.texture=e},enumerable:!0,configurable:!0}),t.prototype.renderProperties=function(e){return o.createElement(ie,{globalState:e,node:this})},t.prototype.prepare=function(t,n,r,o){this._block=t.nodeMaterialBlock,e.prototype.prepare.call(this,t,n,r,o)},t}(b),se=function(e){function t(t){var n=e.call(this,"texture")||this;return n._globalState=t,n}return c(t,e),t.prototype.generateReactWidget=function(e,t){return o.createElement(ee,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new ae},t}(f.AbstractNodeFactory),le=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={value:n.props.value.toFixed(3)},n}return c(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this._localChange?(this._localChange=!1,!0):e.value.toString()!==t.value&&(t.value=e.value.toFixed(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.render=function(){var e=this;return o.createElement("div",{className:"numeric"},this.props.label&&o.createElement("div",{className:"numeric-label"},this.props.label+": "),o.createElement("input",{type:"number",step:this.props.step,className:"numeric-input",value:this.state.value,onChange:function(t){return e.updateValue(t)}}))},t.defaultProps={step:1},t}(o.Component),ue=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 c(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?o.createElement(_.a,{icon:O}):o.createElement(_.a,{icon:B});return o.createElement("div",{className:"vector3Line"},o.createElement("div",{className:"firstLine"},o.createElement("div",{className:"label"},this.props.label),o.createElement("div",{className:"vector"},"X: "+this.state.value.x.toFixed(2)+", Y: "+this.state.value.y.toFixed(2)),o.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&o.createElement("div",{className:"secondLine"},o.createElement(le,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),o.createElement(le,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}})))},t.defaultProps={step:.001},t}(o.Component),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(ue,{label:"Value",target:this.props.inputBlock,propertyName:"value",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})},t}(o.Component),pe=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 c(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.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?o.createElement(_.a,{icon:O}):o.createElement(_.a,{icon:B});return o.createElement("div",{className:"vector3Line"},o.createElement("div",{className:"firstLine"},o.createElement("div",{className:"label"},this.props.label),o.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)),o.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&o.createElement("div",{className:"secondLine"},o.createElement(le,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),o.createElement(le,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}}),o.createElement(le,{label:"z",step:this.props.step,value:this.state.value.z,onChange:function(t){return e.updateStateZ(t)}})))},t.defaultProps={step:.001},t}(o.Component),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(pe,{label:"Value",target:this.props.inputBlock,propertyName:"value",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})},t}(o.Component),de=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,color:n.props.target[n.props.propertyName].clone()},n}return c(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=e.target[e.propertyName];return!(n.equals(t.color)&&!this._localChange)&&(t.color=n.clone(),this._localChange=!1,!0)},t.prototype.onChange=function(e){this._localChange=!0;var t=a.Color3.FromHexString(e);this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:t,initialValue:this.state.color}),"Color4"===this.props.target[this.props.propertyName].getClassName()?this.props.target[this.props.propertyName]=new a.Color4(t.r,t.g,t.b,1):this.props.target[this.props.propertyName]=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.props.target[this.props.propertyName].x=e,this.state.color.r=e,this.props.target[this.props.propertyName]=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.props.target[this.props.propertyName].g=e,this.state.color.g=e,this.props.target[this.props.propertyName]=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.props.target[this.props.propertyName].b=e,this.state.color.b=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?o.createElement(_.a,{icon:O}):o.createElement(_.a,{icon:B}),n="Color3"===this.state.color.getClassName()?this.state.color:new a.Color3(this.state.color.r,this.state.color.g,this.state.color.b);return o.createElement("div",{className:"color3Line"},o.createElement("div",{className:"firstLine"},o.createElement("div",{className:"label"},this.props.label),o.createElement("div",{className:"color3"},o.createElement("input",{type:"color",value:n.toHexString(),onChange:function(t){return e.onChange(t.target.value)}})),o.createElement("div",{className:"copy hoverIcon",onClick:function(){return e.copyToClipboard()},title:"Copy to clipboard"},o.createElement(_.a,{icon:S})),o.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&o.createElement("div",{className:"secondLine"},o.createElement(le,{label:"r",value:this.state.color.r,onChange:function(t){return e.updateStateR(t)}}),o.createElement(le,{label:"g",value:this.state.color.g,onChange:function(t){return e.updateStateG(t)}}),o.createElement(le,{label:"b",value:this.state.color.b,onChange:function(t){return e.updateStateB(t)}})))},t}(o.Component),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(de,{label:"Value",target:this.props.inputBlock,propertyName:"value",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})},t}(o.Component),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(ne,{label:"Value",target:this.props.inputBlock,propertyName:"value",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})},t}(o.Component),me=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,value:(n.props.value||n.props.target[n.props.propertyName]).clone()},n}return c(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=e.value||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.propertyName&&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.value||this.props.target[this.props.propertyName]).clone();this.props.value?this.props.value.copyFrom(this.state.value):this.props.target[this.props.propertyName]=this.state.value,this.forceUpdate(),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?o.createElement(_.a,{icon:O}):o.createElement(_.a,{icon:B});return o.createElement("div",{className:"vector3Line"},o.createElement("div",{className:"firstLine"},o.createElement("div",{className:"label"},this.props.label),o.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)),o.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&o.createElement("div",{className:"secondLine"},o.createElement(le,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),o.createElement(le,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}}),o.createElement(le,{label:"z",step:this.props.step,value:this.state.value.z,onChange:function(t){return e.updateStateZ(t)}}),o.createElement(le,{label:"w",step:this.props.step,value:this.state.value.w,onChange:function(t){return e.updateStateW(t)}})))},t.defaultProps={step:.001},t}(o.Component),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(me,{label:"Value",target:this.props.inputBlock,propertyName:"value",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})},t}(o.Component),ye=function(e){function t(t){var n=e.call(this,t)||this;n._localChange=!1;var r=n.props.target[n.props.propertyName].clone(),o=0;if(n.props.mode){var i=new a.Quaternion;r.decompose(void 0,i);var s=i.toEulerAngles();switch(n.props.mode){case 1:o=s.x;break;case 2:o=s.y;break;case 3:o=s.z}}return n.state={value:r,mode:n.props.mode||0,angle:o},n}return c(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.mode!==this.state.mode||t.angle!==this.state.angle},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.updateMatrix=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.updateRow=function(e,t){this._localChange=!0,this.state.value.setRow(t,e),this.updateMatrix()},t.prototype.updateBasedOnMode=function(e){switch(this.state.mode){case 1:a.Matrix.RotationXToRef(this.state.angle,this.state.value);break;case 2:a.Matrix.RotationYToRef(this.state.angle,this.state.value);break;case 3:a.Matrix.RotationZToRef(this.state.angle,this.state.value)}this.updateMatrix(),this.setState({angle:e})},t.prototype.render=function(){var e=this;return o.createElement("div",{className:"vector3Line"},o.createElement("div",{className:"firstLine"},o.createElement("div",{className:"label"},this.props.label)),o.createElement("div",{className:"secondLine"},o.createElement(oe,{label:"Mode",className:"no-right-margin",options:[{label:"User-defined",value:0},{label:"Rotation over X axis",value:1},{label:"Rotation over Y axis",value:2},{label:"Rotation over Z axis",value:3}],target:this,noDirectUpdate:!0,getSelection:function(){return e.state.mode},onSelect:function(t){e.props.target[e.props.propertyName]=a.Matrix.Identity(),a.Matrix.IdentityToRef(e.state.value),e.setState({mode:t,angle:0}),e.updateMatrix(),e.props.onModeChange&&e.props.onModeChange(t)}})),0===this.state.mode&&o.createElement("div",{className:"secondLine"},o.createElement(me,{label:"Row #0",value:this.state.value.getRow(0),onChange:function(t){return e.updateRow(t,0)}}),o.createElement(me,{label:"Row #1",value:this.state.value.getRow(1),onChange:function(t){return e.updateRow(t,1)}}),o.createElement(me,{label:"Row #2",value:this.state.value.getRow(2),onChange:function(t){return e.updateRow(t,2)}}),o.createElement(me,{label:"Row #3",value:this.state.value.getRow(3),onChange:function(t){return e.updateRow(t,3)}})),0!==this.state.mode&&o.createElement("div",{className:"secondLine"},o.createElement(te,{label:"Angle",minimum:0,maximum:2*Math.PI,useEuler:!0,step:.1,directValue:this.state.angle,onChange:function(t){return e.updateBasedOnMode(t)}})))},t}(o.Component),be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(ye,{label:"Value",target:this.props.inputBlock,propertyName:"value",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()},mode:this.props.inputBlock.matrixMode,onModeChange:function(t){e.props.inputBlock.matrixMode=t}})},t}(o.Component),we=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.renderValue=function(e){var t=this,n=this.props.inputNode.inputBlock;switch(n.type){case a.NodeMaterialBlockConnectionPointTypes.Float:var r=isNaN(n.min)||isNaN(n.max)||n.min===n.max;return o.createElement(o.Fragment,null,o.createElement(ne,{label:"Min",target:n,propertyName:"min",onChange:function(){t.forceUpdate()}}),o.createElement(ne,{label:"Max",target:n,propertyName:"max",onChange:function(){t.forceUpdate()}}),r&&o.createElement(ge,{globalState:e,inputBlock:n}),!r&&o.createElement(te,{label:"Value",target:n,propertyName:"value",step:(n.max-n.min)/100,minimum:n.min,maximum:n.max,onChange:function(){t.props.globalState.onUpdateRequiredObservable.notifyObservers()}}));case a.NodeMaterialBlockConnectionPointTypes.Vector2:return o.createElement(ce,{globalState:e,inputBlock:n});case a.NodeMaterialBlockConnectionPointTypes.Color3:case a.NodeMaterialBlockConnectionPointTypes.Color4:return o.createElement(he,{globalState:e,inputBlock:n});case a.NodeMaterialBlockConnectionPointTypes.Vector3:return o.createElement(fe,{globalState:e,inputBlock:n});case a.NodeMaterialBlockConnectionPointTypes.Vector4:return o.createElement(ve,{globalState:e,inputBlock:n});case a.NodeMaterialBlockConnectionPointTypes.Matrix:return o.createElement(be,{globalState:e,inputBlock:n})}return null},t.prototype.setDefaultValue=function(){this.props.inputNode.inputBlock.setDefaultValue()},t.prototype.render=function(){var e=this,t=this.props.inputNode.inputBlock,n=[],r=[],i=[];switch(t.type){case a.NodeMaterialBlockConnectionPointTypes.Float:i=[{label:"None",value:a.AnimatedInputBlockTypes.None},{label:"Time",value:a.AnimatedInputBlockTypes.Time}],n=[{label:"Delta time",value:a.NodeMaterialSystemValues.DeltaTime}];break;case a.NodeMaterialBlockConnectionPointTypes.Matrix:n=[{label:"World",value:a.NodeMaterialSystemValues.World},{label:"World x View",value:a.NodeMaterialSystemValues.WorldView},{label:"World x ViewxProjection",value:a.NodeMaterialSystemValues.WorldViewProjection},{label:"View",value:a.NodeMaterialSystemValues.View},{label:"View x Projection",value:a.NodeMaterialSystemValues.ViewProjection},{label:"Projection",value:a.NodeMaterialSystemValues.Projection}];break;case a.NodeMaterialBlockConnectionPointTypes.Color3:n=[{label:"Fog color",value:a.NodeMaterialSystemValues.FogColor}];break;case a.NodeMaterialBlockConnectionPointTypes.Color4:r=[{label:"color",value:"color"}];break;case a.NodeMaterialBlockConnectionPointTypes.Vector2:r=[{label:"uv",value:"uv"},{label:"uv2",value:"uv2"}];break;case a.NodeMaterialBlockConnectionPointTypes.Vector3:n=[{label:"Camera position",value:a.NodeMaterialSystemValues.CameraPosition}],r=[{label:"position",value:"position"},{label:"normal",value:"normal"},{label:"tangent",value:"tangent"}];break;case a.NodeMaterialBlockConnectionPointTypes.Vector4:r=[{label:"matricesIndices",value:"matricesIndices"},{label:"matricesWeights",value:"matricesWeights"}]}var s=[{label:"User-defined",value:0}];return r.length>0&&s.push({label:"Mesh attribute",value:1}),n.length>0&&s.push({label:"System value",value:2}),o.createElement("div",null,o.createElement(z,{title:"GENERAL"},!t.isAttribute&&o.createElement(U,{globalState:this.props.globalState,label:"Name",propertyName:"name",target:t,onChange:function(){return e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),o.createElement(w,{label:"Type",value:H.GetBaseType(t.type)})),o.createElement(z,{title:"PROPERTIES"},t.isUniform&&!t.isSystemValue&&t.animationType===a.AnimatedInputBlockTypes.None&&o.createElement(W,{label:"Visible in the Inspector",target:t,propertyName:"visibleInInspector"}),t.isUniform&&!t.isSystemValue&&t.animationType===a.AnimatedInputBlockTypes.None&&o.createElement(W,{label:"IsConstant",target:t,propertyName:"isConstant",onValueChanged:function(){e.props.globalState.onRebuildRequiredObservable.notifyObservers(),e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),o.createElement(oe,{label:"Mode",options:s,target:t,noDirectUpdate:!0,getSelection:function(e){return e.isAttribute?1:e.isSystemValue?2:0},onSelect:function(o){switch(o){case 0:t.isUniform=!0,t.setAsSystemValue(null),e.setDefaultValue();break;case 1:t.setAsAttribute(r[0].value);break;case 2:t.setAsSystemValue(n[0].value)}e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.isAttribute&&o.createElement(oe,{label:"Attribute",valuesAreStrings:!0,options:r,target:t,propertyName:"name",onSelect:function(n){t.setAsAttribute(n),e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.isUniform&&i.length>0&&o.createElement(oe,{label:"Animation type",options:i,target:t,propertyName:"animationType",onSelect:function(t){e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.isUniform&&!t.isSystemValue&&t.animationType===a.AnimatedInputBlockTypes.None&&this.renderValue(this.props.globalState),t.isUniform&&t.isSystemValue&&o.createElement(oe,{label:"System value",options:n,target:t,propertyName:"systemValue",onSelect:function(n){t.setAsSystemValue(n),e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(o.Component),_e=function(e){function t(){return e.call(this,"input")||this}return c(t,e),Object.defineProperty(t.prototype,"inputBlock",{get:function(){return this.block},enumerable:!0,configurable:!0}),t.prototype.renderProperties=function(e){return o.createElement(we,{globalState:e,inputNode:this})},t}(b),xe=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.props.node&&n.props.node.addListener({selectionChanged:function(){var e=n.props.node.selected;n.props.globalState.onSelectionChangedObservable.notifyObservers(e?n.props.node:null)}}),n}return c(t,e),t.prototype.renderValue=function(e){return""!==e?o.createElement("div",{className:"value-text"},e):null},t.prototype.render=function(){var e=g.GenerateOutputPorts(this.props.node,!0),t=this.props.node.inputBlock,n="",r=t.name+" ("+H.GetBaseType(t.output.type)+")",i="";if(t)if(t.isAttribute)n="mesh."+t.name,r=H.GetBaseType(t.output.type);else if(t.isSystemValue)switch(t.systemValue){case a.NodeMaterialSystemValues.World:n="World";break;case a.NodeMaterialSystemValues.WorldView:n="World x View";break;case a.NodeMaterialSystemValues.WorldViewProjection:n="World x View x Projection";break;case a.NodeMaterialSystemValues.View:n="View";break;case a.NodeMaterialSystemValues.ViewProjection:n="View x Projection";break;case a.NodeMaterialSystemValues.Projection:n="Projection";break;case a.NodeMaterialSystemValues.CameraPosition:n="Camera position";break;case a.NodeMaterialSystemValues.FogColor:n="Fog color";break;case a.NodeMaterialSystemValues.DeltaTime:n="Delta time"}else{if(!t||!t.isUniform)return null;switch(t.type){case a.NodeMaterialBlockConnectionPointTypes.Float:n=t.animationType!==a.AnimatedInputBlockTypes.None?a.AnimatedInputBlockTypes[t.animationType]:t.value.toFixed(2);break;case a.NodeMaterialBlockConnectionPointTypes.Vector2:var s=t.value;n="("+s.x.toFixed(2)+", "+s.y.toFixed(2)+")";break;case a.NodeMaterialBlockConnectionPointTypes.Vector3:var l=t.value;n="("+l.x.toFixed(2)+", "+l.y.toFixed(2)+", "+l.z.toFixed(2)+")";break;case a.NodeMaterialBlockConnectionPointTypes.Vector4:var u=t.value;n="("+u.x.toFixed(2)+", "+u.y.toFixed(2)+", "+u.z.toFixed(2)+", "+u.w.toFixed(2)+")";break;case a.NodeMaterialBlockConnectionPointTypes.Color3:case a.NodeMaterialBlockConnectionPointTypes.Color4:i=t.value.toHexString()}}else r="Not connected input";return o.createElement("div",{className:"diagramBlock input"+(t?" "+a.NodeMaterialBlockConnectionPointTypes[t.type]:"")+(t&&t.isConstant?" constant":""),style:{background:i}},o.createElement("div",{className:"header"},r),o.createElement("div",{className:"outputs"},e),o.createElement("div",{className:"value"},this.renderValue(n)))},t}(o.Component),ke=function(e){function t(t){var n=e.call(this,"input")||this;return n._globalState=t,n}return c(t,e),t.prototype.generateReactWidget=function(e,t){return o.createElement(xe,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new _e},t}(f.AbstractNodeFactory);n(143);var Ee=function(e,t){this.message=e,this.isError=t},Ce=function(e){function t(t){var n=e.call(this,t)||this;return n.state={logs:[]},n}return c(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.globalState.onLogRequiredObservable.add(function(t){var n=e.state.logs;n.push(t),e.setState({logs:n})})},t.prototype.componentDidUpdate=function(){var e=i.findDOMNode(this.refs["log-console"]);e&&(e.scrollTop=e.scrollHeight)},t.prototype.render=function(){var e=new Date,t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return o.createElement("div",{id:"log-console",ref:"log-console"},this.state.logs.map(function(e,i){return o.createElement("div",{key:i,className:"log"+(e.isError?" error":"")},t+":"+n+":"+r+": "+e.message)}))},t}(o.Component),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this,t=this.props.globalState.nodeMaterial.getScene(),n=t.lights.map(function(e){return{label:e.name,value:e.name}});return n.splice(0,0,{label:"All",value:""}),o.createElement("div",null,o.createElement(z,{title:"GENERAL"},o.createElement(w,{label:"Type",value:"LightBlock"}),o.createElement(U,{globalState:this.props.globalState,label:"Name",propertyName:"name",target:this.props.node.block,onChange:function(){return e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})),o.createElement(z,{title:"PROPERTIES"},o.createElement(oe,{label:"Light",defaultIfNull:0,noDirectUpdate:!0,valuesAreStrings:!0,options:n,target:this.props.node.light,propertyName:"name",onSelect:function(n){e.props.node.light=""===n?null:t.getLightByName(n),e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(o.Component),Ne=function(e){function t(){return e.call(this,"light")||this}return c(t,e),Object.defineProperty(t.prototype,"light",{get:function(){return this._block.light},set:function(e){this._block.light=e},enumerable:!0,configurable:!0}),t.prototype.renderProperties=function(e){return o.createElement(Se,{globalState:e,node:this})},t.prototype.prepare=function(t,n,r,o){this._block=t.nodeMaterialBlock,e.prototype.prepare.call(this,t,n,r,o)},t}(b),Pe=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.props.node&&n.props.node.addListener({selectionChanged:function(){var e=n.props.node.selected;n.props.globalState.onSelectionChangedObservable.notifyObservers(e?n.props.node:null)}}),n}return c(t,e),t.prototype.render=function(){var e=g.GenerateOutputPorts(this.props.node,!1),t=g.GenerateInputPorts(this.props.node);return o.createElement("div",{className:"diagramBlock"},o.createElement("div",{className:"header"},this.props.node.block.name),o.createElement("div",{className:"inputs"},t),o.createElement("div",{className:"outputs"},e))},t}(o.Component),Me=function(e){function t(t){var n=e.call(this,"light")||this;return n._globalState=t,n}return c(t,e),t.prototype.generateReactWidget=function(e,t){return o.createElement(Pe,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new Ne},t}(f.AbstractNodeFactory),Te=function(e){function t(t){var n=e.call(this,t)||this;return n.state={message:"",isError:!1},n.props.globalState.onErrorMessageDialogRequiredObservable.add(function(e){n.setState({message:e,isError:!0})}),n}return c(t,e),t.prototype.render=function(){var e=this;return this.state.message?o.createElement("div",{className:"dialog-container"},o.createElement("div",{className:"dialog"},o.createElement("div",{className:"dialog-message"},this.state.message),o.createElement("div",{className:"dialog-buttons"},o.createElement("div",{className:"dialog-button-ok"+(this.state.isError?" error":""),onClick:function(){return e.setState({message:""})}},"OK")))):null},t}(o.Component),Oe=function(e){function t(){var t=e.call(this)||this;return t.type="advanced",t}return c(t,e),t.prototype.getNewInstance=function(e){return new v},t.prototype.generateLinkSegment=function(e,t,n,r){var i=(e.getTargetPort()||e.getSourcePort()).connection.type,a=h.GetColorFromConnectionNodeType(i);return o.createElement("path",{className:n?t.bem("--path-selected"):"",strokeWidth:3,stroke:a,d:r})},t}(f.DefaultLinkFactory),Le=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.forceRebuild=function(){this.props.globalState.onUpdateRequiredObservable.notifyObservers(),this.props.globalState.onRebuildRequiredObservable.notifyObservers()},t.prototype.render=function(){var e=this,t=this.props.remapNode.remapBlock;return o.createElement("div",null,o.createElement(z,{title:"GENERAL"},o.createElement(U,{globalState:this.props.globalState,label:"Name",propertyName:"name",target:t,onChange:function(){return e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),o.createElement(w,{label:"Type",value:t.getClassName()})),o.createElement(z,{title:"PROPERTIES"},o.createElement(ue,{label:"From",propertyName:"sourceRange",target:t,onChange:function(){return e.forceRebuild()}}),o.createElement(ue,{label:"To",propertyName:"targetRange",target:t,onChange:function(){return e.forceRebuild()}})))},t}(o.Component),Ae=function(e){function t(){return e.call(this,"remap")||this}return c(t,e),Object.defineProperty(t.prototype,"remapBlock",{get:function(){return this.block},enumerable:!0,configurable:!0}),t.prototype.renderProperties=function(e){return o.createElement(Le,{globalState:e,remapNode:this})},t}(b),Be=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.props.node&&n.props.node.addListener({selectionChanged:function(){var e=n.props.node.selected;n.props.globalState.onSelectionChangedObservable.notifyObservers(e?n.props.node:null)}}),n}return c(t,e),t.prototype.renderValue=function(e){return e?o.createElement("div",{className:"value-text"},e):null},t.prototype.extractInputValue=function(e){var t=e.connectedPoint.ownerBlock;if(t.isInput){var n=t;if(n.isUniform&&!n.isSystemValue)return n.value}return"?"},t.prototype.render=function(){var e=g.GenerateInputPorts(this.props.node,void 0,!1),t=g.GenerateOutputPorts(this.props.node,!1),n=this.props.node.block,r=n.sourceMin.isConnected?this.extractInputValue(n.sourceMin):n.sourceRange.x,i=n.sourceMax.isConnected?this.extractInputValue(n.sourceMax):n.sourceRange.y,a=n.targetMin.isConnected?this.extractInputValue(n.targetMin):n.targetRange.x,s=n.targetMax.isConnected?this.extractInputValue(n.targetMax):n.targetRange.y;return o.createElement("div",{className:"diagramBlock remap"},o.createElement("div",{className:"header"},n.name),o.createElement("div",{className:"inputs"},e),o.createElement("div",{className:"outputs"},t),o.createElement("div",{className:"value"},"["+r+", "+i+"] -> ["+a+", "+s+"]"))},t}(o.Component),je=function(e){function t(t){var n=e.call(this,"remap")||this;return n._globalState=t,n}return c(t,e),t.prototype.generateReactWidget=function(e,t){return o.createElement(Be,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new Ae},t}(f.AbstractNodeFactory),Ie=n(72),Re=function(){function e(){}return e.DistributeGraph=function(e){var t=this._MapElements(e),n=this._MapEdges(e),r=new Ie.graphlib.Graph;return r.setGraph({}),r.setDefaultEdgeLabel(function(){return{}}),r.graph().rankdir="LR",t.forEach(function(e){r.setNode(e.id,e.metadata)}),n.forEach(function(e){e.from&&e.to&&r.setEdge(e.from.id,e.to.id)}),Ie.layout(r),r.nodes().map(function(e){return r.node(e)})},e._MapElements=function(e){var t=[];for(var n in e.nodes){var r=e.nodes[n],o={width:200|r.width,height:100|r.height};t.push({id:r.id,metadata:p(p({},o),{id:r.id})})}return t},e._MapEdges=function(e){var t=[];for(var n in e.links){var r=e.links[n];t.push({from:r.sourcePort.parent,to:r.targetPort.parent})}return t},e}(),De=function(){function e(e,t){var n=this;this._nodeMaterial=t.nodeMaterial,this._globalState=t,this._onBuildObserver=this._nodeMaterial.onBuildObservable.add(function(e){var t=e.serialize();n._updatePreview(t)}),this._onPreviewCommandActivatedObserver=t.onPreviewCommandActivated.add(function(){n._refreshPreviewMesh()}),this._onLightUpdatedObserver=t.onLightUpdated.add(function(){n._prepareLights()}),this._onUpdateRequiredObserver=t.onUpdateRequiredObservable.add(function(){var e=n._nodeMaterial.serialize();n._updatePreview(e)}),this._onPreviewBackgroundChangedObserver=t.onPreviewBackgroundChanged.add(function(){n._scene.clearColor=n._globalState.backgroundColor}),this._onAnimationCommandActivatedObserver=t.onAnimationCommandActivated.add(function(){n._handleAnimations()}),this._onBackFaceCullingChangedObserver=t.onBackFaceCullingChanged.add(function(){n._material.backFaceCulling=n._globalState.backFaceCulling}),this._onDepthPrePassChangedObserver=t.onDepthPrePassChanged.add(function(){n._material.needDepthPrePass=n._globalState.depthPrePass}),this._engine=new a.Engine(e,!0),this._scene=new a.Scene(this._engine),this._camera=new a.ArcRotateCamera("Camera",0,.8,4,a.Vector3.Zero(),this._scene),this._camera.lowerRadiusLimit=3,this._camera.upperRadiusLimit=10,this._camera.wheelPrecision=20,this._camera.minZ=.1,this._camera.attachControl(e,!1),this._lightParent=new a.TransformNode("LightParent",this._scene),this._refreshPreviewMesh(),this._engine.runRenderLoop(function(){n._engine.resize(),n._scene.render()});var r=void 0;this._scene.onPointerObservable.add(function(e){if(!n._globalState.controlCamera)if(e.type!==a.PointerEventTypes.POINTERUP){if(1===e.event.buttons){void 0===r&&(r=e.event.offsetX);var t=.01*(r-e.event.offsetX);n._lightParent.rotation.y+=t,r=e.event.offsetX}}else r=void 0})}return e.prototype._handleAnimations=function(){if(this._scene.stopAllAnimations(),this._globalState.rotatePreview)for(var e=0,t=this._scene.rootNodes;e-1&&(t.colorSteps.splice(n,1),this.forceRebuild(),this.forceUpdate())},t.prototype.addNewStep=function(){var e=this.props.gradientNode.gradientBlock,t=new a.GradientBlockColorStep(1,a.Color3.White());e.colorSteps.push(t),this.forceRebuild(),this.forceUpdate()},t.prototype.render=function(){var e=this,t=this.props.gradientNode.gradientBlock;return o.createElement("div",null,o.createElement(z,{title:"GENERAL"},o.createElement(U,{globalState:this.props.globalState,label:"Name",propertyName:"name",target:t,onChange:function(){return e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),o.createElement(w,{label:"Type",value:t.getClassName()})),o.createElement(z,{title:"STEPS"},o.createElement(X,{label:"Add new step",onClick:function(){return e.addNewStep()}}),t.colorSteps.map(function(t,n){return o.createElement(Je,{globalState:e.props.globalState,onUpdateStep:function(){return e.forceRebuild()},key:t.step,lineIndex:n,step:t,onDelete:function(){return e.deleteStep(t)}})})))},t}(o.Component),tt=function(e){function t(){return e.call(this,"gradient")||this}return c(t,e),Object.defineProperty(t.prototype,"gradientBlock",{get:function(){return this.block},enumerable:!0,configurable:!0}),t.prototype.renderProperties=function(e){return o.createElement(et,{globalState:e,gradientNode:this})},t}(b),nt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.props.node&&n.props.node.addListener({selectionChanged:function(){var e=n.props.node.selected;n.props.globalState.onSelectionChangedObservable.notifyObservers(e?n.props.node:null)}}),n}return c(t,e),t.prototype.renderValue=function(e){return e?o.createElement("div",{className:"value-text"},e):null},t.prototype.render=function(){var e=g.GenerateInputPorts(this.props.node,void 0,!0),t=g.GenerateOutputPorts(this.props.node,!0),n=this.props.node.block,r=n.colorSteps.map(function(e){return"rgb("+255*e.color.r+", "+255*e.color.g+", "+255*e.color.b+") "+100*e.step+"%"}),i={background:r.length?"linear-gradient(90deg, "+r.join(", ")+")":"black"};return o.createElement("div",{className:"diagramBlock gradient",style:i},o.createElement("div",{className:"header"},n.name),o.createElement("div",{className:"inputs"},e),o.createElement("div",{className:"outputs"},t),o.createElement("div",{className:"value"}))},t}(o.Component),rt=function(e){function t(t){var n=e.call(this,"gradient")||this;return n._globalState=t,n}return c(t,e),t.prototype.generateReactWidget=function(e,t){return o.createElement(nt,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new tt},t}(f.AbstractNodeFactory),ot=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.props.node&&n.props.node.addListener({selectionChanged:function(){var e=n.props.node.selected;n.props.globalState.onSelectionChangedObservable.notifyObservers(e?n.props.node:null)}}),n}return c(t,e),t.prototype.render=function(){var e=g.GenerateOutputPorts(this.props.node,!1),t=g.GenerateInputPorts(this.props.node);return o.createElement("div",{className:"diagramBlock texture-block"},o.createElement("div",{className:"header"},this.props.node.block.name),o.createElement("div",{className:"inputs"},t),o.createElement("div",{className:"outputs"},e),this.props.node&&this.props.node.texture&&o.createElement(J,{ref:"textureView",width:140,height:140,texture:this.props.node.texture,hideChannelSelect:!0}))},t}(o.Component),it=function(e){function t(t){var n=e.call(this,"reflectiontexture")||this;return n._globalState=t,n}return c(t,e),t.prototype.generateReactWidget=function(e,t){return o.createElement(ot,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new re},t}(f.AbstractNodeFactory);n(319),n(321),n(323);var at=function(e){function t(t){var n=e.call(this,t)||this;return n.NodeWidth=100,n._leftWidth=s.ReadNumber("LeftWidth",200),n._rightWidth=s.ReadNumber("RightWidth",300),n._nodes=new Array,n._blocks=new Array,n._copiedNodes=[],n._mouseLocationX=0,n._mouseLocationY=0,n._altKeyIsPressed=!1,n._oldY=-1,n._toAdd=[],n._engine=new f.DiagramEngine,n._engine.installDefaultFactories(),n._engine.registerNodeFactory(new G(n.props.globalState)),n._engine.registerNodeFactory(new se(n.props.globalState)),n._engine.registerNodeFactory(new Me(n.props.globalState)),n._engine.registerNodeFactory(new ke(n.props.globalState)),n._engine.registerNodeFactory(new je(n.props.globalState)),n._engine.registerNodeFactory(new Ve(n.props.globalState)),n._engine.registerNodeFactory(new Xe(n.props.globalState)),n._engine.registerNodeFactory(new Qe(n.props.globalState)),n._engine.registerNodeFactory(new rt(n.props.globalState)),n._engine.registerNodeFactory(new it(n.props.globalState)),n._engine.registerLinkFactory(new Oe),n.props.globalState.onRebuildRequiredObservable.add(function(){n.props.globalState.nodeMaterial&&n.buildMaterial()}),n.props.globalState.onResetRequiredObservable.add(function(){n.build(!1),n.props.globalState.nodeMaterial&&n.buildMaterial()}),n.props.globalState.onUpdateRequiredObservable.add(function(){n._engine.repaintCanvas()}),n.props.globalState.onZoomToFitRequiredObservable.add(function(){n.zoomToFit()}),n.props.globalState.onReOrganizedRequiredObservable.add(function(){n.reOrganize()}),n.props.globalState.onGetNodeFromBlock=function(e){return n._nodes.filter(function(t){return t.block===e})[0]},n.props.globalState.hostDocument.addEventListener("keydown",function(e){if(n._altKeyIsPressed=e.altKey,e.ctrlKey)if("c"===e.key){var t=n._engine.diagramModel.getSelectedItems();if(!t.length)return;if(!t[0].block)return;n._copiedNodes=t.map(function(e){return e})}else if("v"===e.key){if(!n._copiedNodes.length)return;for(var r=n.props.globalState.hostDocument.querySelector(".diagram-container"),o=n._engine.diagramModel.getZoomLevel()/100,i=(n._mouseLocationX-r.offsetLeft-n._engine.diagramModel.getOffsetX()-n.NodeWidth)/o,a=(n._mouseLocationY-r.offsetTop-n._engine.diagramModel.getOffsetY()-20)/o,s=null,l=0,u=n._copiedNodes;l5&&(e._engine.diagramModel.setZoomLevel(e._engine.diagramModel.getZoomLevel()+r),e._engine.repaintCanvas(),e._oldY=t.pageY)}else n(t)};var r=t.onMouseUp;t.onMouseUp=function(t){e._oldY=-1,r(t)},this._previewManager=new De(this.props.globalState.hostDocument.getElementById("preview-canvas"),this.props.globalState)}-1!==navigator.userAgent.indexOf("Mobile")&&((this.props.globalState.hostDocument||document).querySelector(".blocker").style.visibility="visible")},t.prototype.componentWillUnmount=function(){this.props.globalState.hostDocument&&this.props.globalState.hostDocument.removeEventListener("keyup",this._onWidgetKeyUpPointer,!1),this._previewManager&&this._previewManager.dispose()},t.prototype.zoomToFit=function(e){var t=this;void 0===e&&(e=0);var n=this._engine.canvas.clientWidth/this._engine.canvas.scrollWidth,r=this._engine.canvas.clientHeight/this._engine.canvas.scrollHeight,o=n-1&&t.props.globalState.nodeMaterial.attachedBlocks.splice(r,1),n.isFinalMerger&&t.props.globalState.nodeMaterial.removeOutputNode(n);var o=t._blocks.indexOf(n);o>-1&&t._blocks.splice(o,1)}t.props.globalState.onSelectionChangedObservable.notifyObservers(null)}},linksUpdated:function(e){if(e.isCreated)e.link.addListener({sourcePortChanged:function(){},targetPortChanged:function(n){var r=y.SortInputOutput(e.link.sourcePort,e.link.targetPort);if(r){if(r.output.connection&&r.input.connection){var o="FragmentOutputBlock"===r.input.connection.ownerBlock.getClassName();for(var i in r.input.links){var s=r.input.links[i],l=s.getSourcePort().connection,u=s.getTargetPort().connection;l!==r.output.connection&&u!==r.output.connection&&s.remove()}var c=r.output.connection.checkCompatibilityState(r.input.connection);if(c===a.NodeMaterialConnectionPointCompatibilityStates.Compatible)o&&t.applyFragmentOutputConstraints(r.input),r.output.connection.connectTo(r.input.connection);else{n.entity.remove();var p="";switch(c){case a.NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible:p="Cannot connect two different connection types";break;case a.NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible:p="Source block can only work in fragment shader whereas destination block is currently aimed for the vertex shader"}t.props.globalState.onErrorMessageDialogRequiredObservable.notifyObservers(p)}t.forceUpdate()}t.props.globalState.nodeMaterial&&t.buildMaterial()}else e.link.remove()}});else{t.props.globalState.onSelectionChangedObservable.notifyObservers(null);var n=e.link.sourcePort,r=y.SortInputOutput(n,e.link.targetPort);if(r)r.input.connection&&r.output.connection&&r.input.connection.connectedPoint&&(r.output.connection.disconnectFrom(r.input.connection),r.input.syncWithNodeMaterialConnectionPoint(r.input.connection),r.output.syncWithNodeMaterialConnectionPoint(r.output.connection),t.props.globalState.onRebuildRequiredObservable.notifyObservers());else if(!e.link.targetPort&&e.link.sourcePort&&"input"===e.link.sourcePort.position&&!e.link.sourcePort.connection.isConnected){var o=e.link.sourcePort;if(o.connection.type==a.NodeMaterialBlockConnectionPointTypes.AutoDetect)return;var i=t.addValueNode(h.GetStringFromConnectionNodeType(o.connection.type)),s=i.ports.output.link(o);i.x=e.link.points[1].x-t.NodeWidth,i.y=e.link.points[1].y,setTimeout(function(){t._model.addLink(s),o.syncWithNodeMaterialConnectionPoint(o.connection),i.ports.output.syncWithNodeMaterialConnectionPoint(i.ports.output.connection),"FragmentOutputBlock"===o.parent.block.getClassName()&&t.applyFragmentOutputConstraints(o),t.forceUpdate()},1),i.ports.output.connection.connectTo(o.connection),t.props.globalState.onRebuildRequiredObservable.notifyObservers()}t.forceUpdate()}}}),this.props.globalState.nodeMaterial){var r=this.props.globalState.nodeMaterial;r._vertexOutputNodes.forEach(function(e){t.createNodeFromObject({nodeMaterialBlock:e})}),r._fragmentOutputNodes.forEach(function(e){t.createNodeFromObject({nodeMaterialBlock:e})}),r.attachedBlocks.forEach(function(e){t.createNodeFromObject({nodeMaterialBlock:e})})}setTimeout(function(){var e;t._toAdd&&(e=t._model).addAll.apply(e,t._toAdd),t._toAdd=null,t._engine.setDiagramModel(t._model),t.forceUpdate(),t.reOrganize(n)},e?500:1)},t.prototype.reOrganize=function(e){var t=this;if(void 0===e&&(e=null),e)for(var n=0,r=e;nl){var u=s;s=l,l=u}return s+a+l+a+(r.isUndefined(i)?o:i)}function p(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}function f(e,t){return c(e,t.v,t.w,t.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._in[t])})},s.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._out[t])})},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,function(e){n.length>1?o.setNode(e,t):o.setNode(e)}),this},s.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return r.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},s.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),r.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var o={};return this._isCompound&&r.each(t.nodes(),function(e){t.setParent(e,function e(r){var i=n.parent(r);return void 0===i||t.hasNode(i)?(o[r]=i,i):i in o?o[i]:e(i)}(e))}),t},s.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r}),this},s.prototype.setEdge=function(){var e,t,n,o,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,n=a.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var s=c(this._isDirected,e,t,n);if(r.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?o:this._defaultEdgeLabelFn(e,t,n);var u=p(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[s]=u,l(this._preds[t],e),l(this._sucs[e],t),this._in[t][s]=u,this._out[e][s]=u,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?f(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):c(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],u(this._preds[t],e),u(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.v===t}):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.w===t}):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(17)(n(11),"Map");e.exports=r},function(e,t,n){var r=n(164),o=n(171),i=n(173),a=n(174),s=n(175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=n}},function(e,t,n){(function(e){var r=n(75),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(34)(e))},function(e,t,n){var r=n(44),o=n(181),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(82),o=n(83),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n0&&i(c)?n>1?e(c,n-1,i,a,s):r(s,c):a||(s[s.length]=c)}return s}},function(e,t,n){var r=n(27);e.exports=function(e,t,n){for(var o=-1,i=e.length;++o-1;o--){var i=n[o],a=(i.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=i)}return m.head.insertBefore(t,r),e}}var J="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function ee(){for(var e=12,t="";e-- >0;)t+=J[62*Math.random()|0];return t}function te(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function ne(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n],";")},"")}function re(e){return e.size!==Q.size||e.x!==Q.x||e.y!==Q.y||e.rotate!==Q.rotate||e.flipX||e.flipY}function oe(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},i="translate(".concat(32*t.x,", ").concat(32*t.y,") "),a="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:o,inner:{transform:"".concat(i," ").concat(a," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}var ie={x:0,y:0,width:"100%",height:"100%"};function ae(e){var t=e.icons,n=t.main,r=t.mask,o=e.prefix,i=e.iconName,a=e.transform,l=e.symbol,u=e.title,c=e.extra,p=e.watchable,f=void 0!==p&&p,d=r.found?r:n,h=d.width,g=d.height,m="fa-w-".concat(Math.ceil(h/g*16)),v=[S.replacementClass,i?"".concat(S.familyPrefix,"-").concat(i):"",m].filter(function(e){return-1===c.classes.indexOf(e)}).concat(c.classes).join(" "),y={children:[],attributes:s({},c.attributes,{"data-prefix":o,"data-icon":i,class:v,role:c.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h," ").concat(g)})};f&&(y.attributes[_]=""),u&&y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-".concat(ee())},children:[u]});var b=s({},y,{prefix:o,iconName:i,main:n,mask:r,transform:a,symbol:l,styles:c.styles}),w=r.found&&n.found?function(e){var t=e.children,n=e.attributes,r=e.main,o=e.mask,i=e.transform,a=r.width,l=r.icon,u=o.width,c=o.icon,p=oe({transform:i,containerWidth:u,iconWidth:a}),f={tag:"rect",attributes:s({},ie,{fill:"white"})},d={tag:"g",attributes:s({},p.inner),children:[{tag:"path",attributes:s({},l.attributes,p.path,{fill:"black"})}]},h={tag:"g",attributes:s({},p.outer),children:[d]},g="mask-".concat(ee()),m="clip-".concat(ee()),v={tag:"defs",children:[{tag:"clipPath",attributes:{id:m},children:[c]},{tag:"mask",attributes:s({},ie,{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,h]}]};return t.push(v,{tag:"rect",attributes:s({fill:"currentColor","clip-path":"url(#".concat(m,")"),mask:"url(#".concat(g,")")},ie)}),{children:t,attributes:n}}(b):function(e){var t=e.children,n=e.attributes,r=e.main,o=e.transform,i=ne(e.styles);if(i.length>0&&(n.style=i),re(o)){var a=oe({transform:o,containerWidth:r.width,iconWidth:r.width});t.push({tag:"g",attributes:s({},a.outer),children:[{tag:"g",attributes:s({},a.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:s({},r.icon.attributes,a.path)}]}]})}else t.push(r.icon);return{children:t,attributes:n}}(b),x=w.children,k=w.attributes;return b.children=x,b.attributes=k,l?function(e){var t=e.prefix,n=e.iconName,r=e.children,o=e.attributes,i=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:s({},o,{id:!0===i?"".concat(t,"-").concat(S.familyPrefix,"-").concat(n):i}),children:r}]}]}(b):function(e){var t=e.children,n=e.main,r=e.mask,o=e.attributes,i=e.styles,a=e.transform;if(re(a)&&n.found&&!r.found){var l={x:n.width/n.height/2,y:.5};o.style=ne(s({},i,{"transform-origin":"".concat(l.x+a.x/16,"em ").concat(l.y+a.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}(b)}var se=function(){},le=(S.measurePerformance&&v&&v.mark&&v.measure,function(e,t,n,r){var o,i,a,s=Object.keys(e),l=s.length,u=void 0!==r?function(e,t){return function(n,r,o,i){return e.call(t,n,r,o,i)}}(t,r):t;for(void 0===n?(o=1,a=e[s[0]]):(o=0,a=n);o2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,r=void 0!==n&&n,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 P.hooks.addPack||r?P.styles[e]=s({},P.styles[e]||{},o):P.hooks.addPack(e,o),"fas"===e&&ue("fa",t)}var ce=P.styles,pe=P.shims,fe=function(){var e=function(e){return le(ce,function(t,n,r){return t[r]=le(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 ce;le(pe,function(e,n){var r=n[0],o=n[1],i=n[2];return"far"!==o||t||(o="fas"),e[r]={prefix:o,iconName:i},e},{})};fe();P.styles;function de(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}function he(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,o=e.children,i=void 0===o?[]:o;return"string"==typeof e?te(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(te(e[n]),'" ')},"").trim()}(r),">").concat(i.map(he).join(""),"")}var ge=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],o=n.slice(1).join("-");if(r&&"h"===o)return e.flipX=!0,e;if(r&&"v"===o)return e.flipY=!0,e;if(o=parseFloat(o),isNaN(o))return e;switch(r){case"grow":e.size=e.size+o;break;case"shrink":e.size=e.size-o;break;case"left":e.x=e.x-o;break;case"right":e.x=e.x+o;break;case"up":e.y=e.y-o;break;case"down":e.y=e.y+o;break;case"rotate":e.rotate=e.rotate+o}return e},t):t};function me(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}me.prototype=Object.create(Error.prototype),me.prototype.constructor=me;var ve={fill:"currentColor"},ye={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},be={tag:"path",attributes:s({},ve,{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"})},we=s({},ye,{attributeName:"opacity"});s({},ve,{cx:"256",cy:"364",r:"28"}),s({},ye,{attributeName:"r",values:"28;14;28;28;14;28;"}),s({},we,{values:"1;0;1;1;0;1;"}),s({},ve,{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({},we,{values:"1;0;0;0;0;1;"}),s({},ve,{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({},we,{values:"0;0;1;1;0;0;"}),P.styles;P.styles;var _e='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}';function xe(){var e=b,t=w,n=S.familyPrefix,r=S.replacementClass,o=_e;if(n!==e||r!==t){var i=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");o=o.replace(i,".".concat(n,"-")).replace(a,".".concat(r))}return o}function ke(e){return{found:!0,width:e[0],height:e[1],icon:{tag:"path",attributes:{fill:"currentColor",d:e.slice(4)[0]}}}}function Ee(){S.autoAddCss&&!Me&&(K(xe()),Me=!0)}function Ce(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return he(e)})}}),Object.defineProperty(e,"node",{get:function(){if(y){var t=m.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function Se(e){var t=e.prefix,n=void 0===t?"fa":t,r=e.iconName;if(r)return de(Pe.definitions,n,r)||de(P.styles,n,r)}var Ne,Pe=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;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?Q:n,o=t.symbol,i=void 0!==o&&o,a=t.mask,l=void 0===a?null:a,u=t.title,c=void 0===u?null:u,p=t.classes,f=void 0===p?[]:p,d=t.attributes,h=void 0===d?{}:d,g=t.styles,m=void 0===g?{}:g;if(e){var v=e.prefix,y=e.iconName,b=e.icon;return Ce(s({type:"icon"},e),function(){return Ee(),S.autoA11y&&(c?h["aria-labelledby"]="".concat(S.replacementClass,"-title-").concat(ee()):(h["aria-hidden"]="true",h.focusable="false")),ae({icons:{main:ke(b),mask:l?ke(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:v,iconName:y,transform:s({},Q,r),symbol:i,title:c,extra:{attributes:h,styles:m,classes:f}})})}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e||{}).icon?e:Se(e||{}),r=t.mask;return r&&(r=(r||{}).icon?r:Se(r||{})),Ne(n,s({},t,{mask:r}))})}).call(this,n(16),n(133).setImmediate)},function(e,t,n){e.exports={graphlib:n(10),layout:n(258),debug:n(317),util:{time:n(7).time,notime:n(7).notime},version:n(318)}},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(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=a(e),u=1;uf))return!1;var h=c.get(e);if(h&&c.get(t))return h==t;var g=-1,m=!0,v=n&s?new r:void 0;for(c.set(e,t),c.set(t,e);++g0&&(i=l.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(u);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},function(e,t,n){var r=n(8);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(e){return e.key})},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n>1].priorityA.length&&A.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,o){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 i:case a:l=!0}}if(l)return r(o,t,""===n?"."+R(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;uthis.eventPool.length&&this.eventPool.push(e)}function pe(e){e.eventPool=[],e.getPooled=ue,e.release=ce}o(le.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:se,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=se,this._dispatchInstances=this._dispatchListeners=null}}),le.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},le.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,pe(n),n},pe(le);var fe=le.extend({data:null}),de=le.extend({data:null}),he=[9,13,27,32],ge=Y&&"CompositionEvent"in window,me=null;Y&&"documentMode"in document&&(me=document.documentMode);var ve=Y&&"TextEvent"in window&&!me,ye=Y&&(!ge||me&&8=me),be=String.fromCharCode(32),we={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(" ")}},_e=!1;function xe(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ee=!1;var Ce={eventTypes:we,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(ge)e:{switch(e){case"compositionstart":o=we.compositionStart;break e;case"compositionend":o=we.compositionEnd;break e;case"compositionupdate":o=we.compositionUpdate;break e}o=void 0}else Ee?xe(e,n)&&(o=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=we.compositionStart);return o?(ye&&"ko"!==n.locale&&(Ee||o!==we.compositionStart?o===we.compositionEnd&&Ee&&(i=ie()):(re="value"in(ne=r)?ne.value:ne.textContent,Ee=!0)),o=fe.getPooled(o,t,n,r),i?o.data=i:null!==(i=ke(n))&&(o.data=i),G(o),i=o):i=null,(e=ve?function(e,t){switch(e){case"compositionend":return ke(t);case"keypress":return 32!==t.which?null:(_e=!0,be);case"textInput":return(e=t.data)===be&&_e?null:e;default:return null}}(e,n):function(e,t){if(Ee)return"compositionend"===e||!ge&&xe(e,t)?(e=ie(),oe=re=ne=null,Ee=!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