react-planner-viewer
Version:
react-planner-viewer is a React Component for view plans builded with react-planner in 2D mode
1 lines • 569 kB
JavaScript
webpackJsonp([0],[,,,function(e,t,n){"use strict";function r(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,u],l=0;s=new Error(t.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}e.exports=r},,,function(e,t,n){"use strict";var r=n(23),o=r;e.exports=o},function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var a=arguments[o];if(null!=a){var i=Object(a);for(var u in i)r.call(i,u)&&(n[u]=i[u])}}return n}e.exports=r},,function(e,t,n){"use strict";n.d(t,"O",function(){return o}),n.d(t,"y",function(){return a}),n.d(t,"X",function(){return i}),n.d(t,"P",function(){return u}),n.d(t,"_7",function(){return s}),n.d(t,"_24",function(){return c}),n.d(t,"_16",function(){return l}),n.d(t,"_12",function(){return f}),n.d(t,"_14",function(){return p}),n.d(t,"_11",function(){return h}),n.d(t,"U",function(){return d}),n.d(t,"_21",function(){return g}),n.d(t,"W",function(){return v}),n.d(t,"_15",function(){return m}),n.d(t,"Q",function(){return y}),n.d(t,"v",function(){return b}),n.d(t,"_33",function(){return _}),n.d(t,"_35",function(){return w}),n.d(t,"_20",function(){return E}),n.d(t,"i",function(){return x}),n.d(t,"t",function(){return O}),n.d(t,"_18",function(){return C}),n.d(t,"_19",function(){return k}),n.d(t,"j",function(){return M}),n.d(t,"R",function(){return S}),n.d(t,"T",function(){return T}),n.d(t,"_9",function(){return P}),n.d(t,"_10",function(){return j}),n.d(t,"_8",function(){return I}),n.d(t,"_25",function(){return R}),n.d(t,"_5",function(){return A}),n.d(t,"_31",function(){return D}),n.d(t,"p",function(){return N}),n.d(t,"d",function(){return L}),n.d(t,"_27",function(){return V}),n.d(t,"l",function(){return U}),n.d(t,"h",function(){return F}),n.d(t,"_34",function(){return W}),n.d(t,"r",function(){return H}),n.d(t,"_0",function(){return q}),n.d(t,"Z",function(){return B}),n.d(t,"_1",function(){return G}),n.d(t,"_3",function(){return z}),n.d(t,"_6",function(){return K}),n.d(t,"g",function(){return Y}),n.d(t,"_32",function(){return X}),n.d(t,"q",function(){return $}),n.d(t,"_4",function(){return J}),n.d(t,"_30",function(){return Z}),n.d(t,"o",function(){return Q}),n.d(t,"e",function(){return ee}),n.d(t,"_28",function(){return te}),n.d(t,"m",function(){return ne}),n.d(t,"c",function(){return re}),n.d(t,"_26",function(){return oe}),n.d(t,"k",function(){return ae}),n.d(t,"_17",function(){return ie}),n.d(t,"f",function(){return ue}),n.d(t,"_29",function(){return se}),n.d(t,"n",function(){return ce}),n.d(t,"_13",function(){return le}),n.d(t,"a",function(){return fe}),n.d(t,"_2",function(){return pe}),n.d(t,"V",function(){return he}),n.d(t,"S",function(){return de}),n.d(t,"_37",function(){return ge}),n.d(t,"w",function(){return ve}),n.d(t,"u",function(){return me}),n.d(t,"x",function(){return ye}),n.d(t,"b",function(){return be}),n.d(t,"Y",function(){return _e}),n.d(t,"_36",function(){return we}),n.d(t,"K",function(){return Ee}),n.d(t,"A",function(){return xe}),n.d(t,"B",function(){return Oe}),n.d(t,"z",function(){return Ce}),n.d(t,"N",function(){return ke}),n.d(t,"F",function(){return Me}),n.d(t,"G",function(){return Se}),n.d(t,"E",function(){return Te}),n.d(t,"D",function(){return Pe}),n.d(t,"J",function(){return je}),n.d(t,"H",function(){return Ie}),n.d(t,"I",function(){return Re}),n.d(t,"L",function(){return Ae}),n.d(t,"M",function(){return De}),n.d(t,"C",function(){return Ne}),n.d(t,"_23",function(){return Le}),n.d(t,"_22",function(){return Ve}),n.d(t,"s",function(){return Ue});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="NEW_PROJECT",a="LOAD_PROJECT",i="SAVE_PROJECT",u="OPEN_CATALOG",s="SELECT_TOOL_EDIT",c="UNSELECT_ALL",l="SET_PROPERTIES",f="SET_ITEMS_ATTRIBUTES",p="SET_LINES_ATTRIBUTES",h="SET_HOLES_ATTRIBUTES",d="REMOVE",g="UNDO",v="ROLLBACK",m="SET_PROJECT_PROPERTIES",y="OPEN_PROJECT_CONFIGURATOR",b="INIT_CATALOG",_="UPDATE_MOUSE_COORDS",w="UPDATE_ZOOM_SCALE",E="TOGGLE_SNAP",x="CHANGE_CATALOG_PAGE",O="GO_BACK_TO_CATALOG_PAGE",C="THROW_ERROR",k="THROW_WARNING",M="COPY_PROPERTIES",S="PASTE_PROPERTIES",T="PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY",P="SELECT_TOOL_ZOOM_IN",j="SELECT_TOOL_ZOOM_OUT",I="SELECT_TOOL_PAN",R="UPDATE_2D_CAMERA",A="SELECT_TOOL_DRAWING_ITEM",D="UPDATE_DRAWING_ITEM",N="END_DRAWING_ITEM",L="BEGIN_DRAGGING_ITEM",V="UPDATE_DRAGGING_ITEM",U="END_DRAGGING_ITEM",F="BEGIN_ROTATING_ITEM",W="UPDATE_ROTATING_ITEM",H="END_ROTATING_ITEM",q="SELECT_HOLE",B="SELECT_AREA",G="SELECT_ITEM",z="SELECT_LINE",K="SELECT_TOOL_DRAWING_LINE",Y="BEGIN_DRAWING_LINE",X="UPDATE_DRAWING_LINE",$="END_DRAWING_LINE",J="SELECT_TOOL_DRAWING_HOLE",Z="UPDATE_DRAWING_HOLE",Q="END_DRAWING_HOLE",ee="BEGIN_DRAGGING_LINE",te="UPDATE_DRAGGING_LINE",ne="END_DRAGGING_LINE",re="BEGIN_DRAGGING_HOLE",oe="UPDATE_DRAGGING_HOLE",ae="END_DRAGGING_HOLE",ie="SHOW_HEAT_MAP_AREAS",ue="BEGIN_DRAGGING_VERTEX",se="UPDATE_DRAGGING_VERTEX",ce="END_DRAGGING_VERTEX",le="SET_LAYER_PROPERTIES",fe="ADD_LAYER",pe="SELECT_LAYER",he="REMOVE_LAYER",de={NEW_PROJECT:o,LOAD_PROJECT:a,SAVE_PROJECT:i,OPEN_CATALOG:u,SELECT_TOOL_EDIT:s,UNSELECT_ALL:c,SET_PROPERTIES:l,SET_ITEMS_ATTRIBUTES:f,SET_LINES_ATTRIBUTES:p,SET_HOLES_ATTRIBUTES:h,REMOVE:d,UNDO:g,ROLLBACK:v,SET_PROJECT_PROPERTIES:m,OPEN_PROJECT_CONFIGURATOR:y,INIT_CATALOG:b,UPDATE_MOUSE_COORDS:_,UPDATE_ZOOM_SCALE:w,TOGGLE_SNAP:E,CHANGE_CATALOG_PAGE:x,GO_BACK_TO_CATALOG_PAGE:O,THROW_ERROR:C,THROW_WARNING:k,COPY_PROPERTIES:M,PASTE_PROPERTIES:S,PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY:T},ge={SELECT_TOOL_ZOOM_IN:P,SELECT_TOOL_ZOOM_OUT:j,SELECT_TOOL_PAN:I,UPDATE_2D_CAMERA:R},ve={SELECT_ITEM:G,SELECT_TOOL_DRAWING_ITEM:A,UPDATE_DRAWING_ITEM:D,END_DRAWING_ITEM:N,BEGIN_DRAGGING_ITEM:L,UPDATE_DRAGGING_ITEM:V,END_DRAGGING_ITEM:U,BEGIN_ROTATING_ITEM:F,UPDATE_ROTATING_ITEM:W,END_ROTATING_ITEM:H},me={SELECT_HOLE:q,SELECT_TOOL_DRAWING_HOLE:J,UPDATE_DRAWING_HOLE:Z,END_DRAWING_HOLE:Q,BEGIN_DRAGGING_HOLE:re,UPDATE_DRAGGING_HOLE:oe,END_DRAGGING_HOLE:ae},ye={SELECT_LINE:z,SELECT_TOOL_DRAWING_LINE:K,BEGIN_DRAWING_LINE:Y,UPDATE_DRAWING_LINE:X,END_DRAWING_LINE:$,BEGIN_DRAGGING_LINE:ee,UPDATE_DRAGGING_LINE:te,END_DRAGGING_LINE:ne},be={SELECT_AREA:B,SHOW_HEAT_MAP_AREAS:ie},_e={ADD_LAYER:fe,SET_LAYER_PROPERTIES:le,SELECT_LAYER:pe,REMOVE_LAYER:he},we={BEGIN_DRAGGING_VERTEX:ue,UPDATE_DRAGGING_VERTEX:se,END_DRAGGING_VERTEX:ce},Ee=(r({},be,de,ge),"MODE_IDLE"),xe="MODE_2D_ZOOM_IN",Oe="MODE_2D_ZOOM_OUT",Ce="MODE_2D_PAN",ke="MODE_WAITING_DRAWING_LINE",Me="MODE_DRAGGING_LINE",Se="MODE_DRAGGING_VERTEX",Te="MODE_DRAGGING_ITEM",Pe="MODE_DRAGGING_HOLE",je="MODE_DRAWING_LINE",Ie="MODE_DRAWING_HOLE",Re="MODE_DRAWING_ITEM",Ae="MODE_ROTATING_ITEM",De="MODE_VIEWING_CATALOG",Ne="MODE_CONFIGURING_PROJECT",Le="cm",Ve=["mm",Le,"m","in","ft","mi"],Ue=1e-6},,,function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return a});var r={white:"#FFF",black:"#000"},o={main:"#28292D",alt:"#2E2F33",icon:"#C2C2C2",border:"1px solid #555",text_main:r.white,text_alt:"#EBEBEB"},a={main:"#1CA6FC",alt:"#005FAF",icon:"#1CA6FC",border:"1px solid #FFF"}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function a(e){var t=o(e);return t&&Y.getID(t)}function i(e){var t=u(e);if(t)if(F.hasOwnProperty(t)){var n=F[t];n!==e&&(f(n,t)&&N(!1),F[t]=e)}else F[t]=e;return t}function u(e){return e&&e.getAttribute&&e.getAttribute(U)||""}function s(e,t){var n=u(e);n!==t&&delete F[n],e.setAttribute(U,t),F[t]=e}function c(e){return F.hasOwnProperty(e)&&f(F[e],e)||(F[e]=Y.findReactNodeByID(e)),F[e]}function l(e){var t=k.get(e)._rootNodeID;return O.isNullComponentID(t)?null:(F.hasOwnProperty(t)&&f(F[t],t)||(F[t]=Y.findReactNodeByID(t)),F[t])}function f(e,t){if(e){u(e)!==t&&N(!1);var n=Y.findReactContainerForID(t);if(n&&A(n,e))return!0}return!1}function p(e){delete F[e]}function h(e){var t=F[e];if(!t||!f(t,e))return!1;z=t}function d(e){z=null,C.traverseAncestors(e,h);var t=z;return z=null,t}function g(e,t,n,r,o,a){E.useCreateElement&&(a=I({},a),n.nodeType===W?a[H]=n:a[H]=n.ownerDocument);var i=T.mountComponent(e,t,r,a);e._renderedComponent._topLevelWrapper=e,Y._mountImageIntoNode(i,n,o,r)}function v(e,t,n,r,o){var a=j.ReactReconcileTransaction.getPooled(r);a.perform(g,null,e,t,n,a,r,o),j.ReactReconcileTransaction.release(a)}function m(e,t){for(T.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=a(e);return!!t&&t!==C.getReactRootIDFromNodeID(t)}function b(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=u(e);if(t){var n,r=C.getReactRootIDFromNodeID(t),o=e;do{if(n=u(o),null==(o=o.parentNode))return null}while(n!==r);if(o===B[r])return e}}return null}var _=n(39),w=n(63),E=(n(26),n(150)),x=n(16),O=n(151),C=n(40),k=n(49),M=n(153),S=n(18),T=n(32),P=n(90),j=n(19),I=n(7),R=n(50),A=n(154),D=n(92),N=n(3),L=n(61),V=n(94),U=(n(95),n(6),_.ID_ATTRIBUTE_NAME),F={},W=9,H="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),q={},B={},G=[],z=null,K=function(){};K.prototype.isReactComponent={},K.prototype.render=function(){return this.props};var Y={TopLevelWrapper:K,_instancesByReactRootID:q,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return Y.scrollMonitor(n,function(){P.enqueueElementInternal(e,t),r&&P.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){(!t||1!==t.nodeType&&t.nodeType!==W&&11!==t.nodeType)&&N(!1),w.ensureScrollValueMonitoring();var n=Y.registerContainer(t);return q[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var o=D(e,null),a=Y._registerComponent(o,t);return j.batchedUpdates(v,o,a,t,n,r),o},renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||null==e._reactInternalInstance)&&N(!1),Y._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){x.isValidElement(t)||N(!1);var i=new x(K,null,null,null,null,null,t),s=q[a(n)];if(s){var c=s._currentElement,l=c.props;if(V(l,t)){var f=s._renderedComponent.getPublicInstance(),p=r&&function(){r.call(f)};return Y._updateRootComponent(s,i,n,p),f}Y.unmountComponentAtNode(n)}var h=o(n),d=h&&!!u(h),g=y(n),v=d&&!s&&!g,m=Y._renderNewRootComponent(i,n,v,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):R)._renderedComponent.getPublicInstance();return r&&r.call(m),m},render:function(e,t,n){return Y._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=a(e);return t&&(t=C.getReactRootIDFromNodeID(t)),t||(t=C.createReactRootID()),B[t]=e,t},unmountComponentAtNode:function(e){(!e||1!==e.nodeType&&e.nodeType!==W&&11!==e.nodeType)&&N(!1);var t=a(e),n=q[t];if(!n){var r=(y(e),u(e));r&&C.getReactRootIDFromNodeID(r);return!1}return j.batchedUpdates(m,n,e),delete q[t],delete B[t],!0},findReactContainerForID:function(e){var t=C.getReactRootIDFromNodeID(e),n=B[t];return n},findReactNodeByID:function(e){var t=Y.findReactContainerForID(e);return Y.findComponentRoot(t,e)},getFirstReactDOM:function(e){return b(e)},findComponentRoot:function(e,t){var n=G,r=0,o=d(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var a,i=n[r++];i;){var u=Y.getID(i);u?t===u?a=i:C.isAncestorIDOf(u,t)&&(n.length=r=0,n.push(i.firstChild)):n.push(i.firstChild),i=i.nextSibling}if(a)return n.length=0,a}n.length=0,N(!1)},_mountImageIntoNode:function(e,t,n,a){if((!t||1!==t.nodeType&&t.nodeType!==W&&11!==t.nodeType)&&N(!1),n){var i=o(t);if(M.canReuseMarkup(e,i))return;var u=i.getAttribute(M.CHECKSUM_ATTR_NAME);i.removeAttribute(M.CHECKSUM_ATTR_NAME);var s=i.outerHTML;i.setAttribute(M.CHECKSUM_ATTR_NAME,u);var c=e,l=r(c,s);c.substring(l-20,l+20),s.substring(l-20,l+20);t.nodeType===W&&N(!1)}if(t.nodeType===W&&N(!1),a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}else L(t,e)},ownerDocumentContextKey:H,getReactRootID:a,getID:i,setID:s,getNode:c,getNodeFromInstance:l,isValid:f,purgeID:p};S.measureMethods(Y,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=Y},,function(e,t,n){"use strict";var r=n(26),o=n(7),a=(n(64),"function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103),i={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,i,u){var s={$$typeof:a,type:e,key:t,ref:n,props:u,_owner:i};return s};u.createElement=function(e,t,n){var o,a={},s=null,c=null;if(null!=t){c=void 0===t.ref?null:t.ref,s=void 0===t.key?null:""+t.key,void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source;for(o in t)t.hasOwnProperty(o)&&!i.hasOwnProperty(o)&&(a[o]=t[o])}var l=arguments.length-2;if(1===l)a.children=n;else if(l>1){for(var f=Array(l),p=0;p<l;p++)f[p]=arguments[p+2];a.children=f}if(e&&e.defaultProps){var h=e.defaultProps;for(o in h)void 0===a[o]&&(a[o]=h[o])}return u(e,s,c,0,0,r.current,a)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){return u(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},u.cloneAndReplaceProps=function(e,t){var n=u(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},u.cloneElement=function(e,t,n){var a,s=o({},e.props),c=e.key,l=e.ref,f=(e._self,e._source,e._owner);if(null!=t){void 0!==t.ref&&(l=t.ref,f=r.current),void 0!==t.key&&(c=""+t.key);for(a in t)t.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(s[a]=t[a])}var p=arguments.length-2;if(1===p)s.children=n;else if(p>1){for(var h=Array(p),d=0;d<p;d++)h[d]=arguments[d+2];s.children=h}return u(e.type,c,l,0,0,f,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},e.exports=u},,function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};e.exports=o},function(e,t,n){"use strict";function r(){k.ReactReconcileTransaction&&_||v(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=k.ReactReconcileTransaction.getPooled(!1)}function a(e,t,n,o,a,i){r(),_.batchedUpdates(e,t,n,o,a,i)}function i(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==m.length&&v(!1),m.sort(i);for(var n=0;n<t;n++){var r=m[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,h.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;a<o.length;a++)e.callbackQueue.enqueue(o[a],r.getPublicInstance())}}function s(e){if(r(),!_.isBatchingUpdates)return void _.batchedUpdates(s,e);m.push(e)}function c(e,t){_.isBatchingUpdates||v(!1),y.enqueue(e,t),b=!0}var l=n(91),f=n(29),p=n(18),h=n(32),d=n(65),g=n(7),v=n(3),m=[],y=l.getPooled(),b=!1,_=null,w={initialize:function(){this.dirtyComponentsLength=m.length},close:function(){this.dirtyComponentsLength!==m.length?(m.splice(0,this.dirtyComponentsLength),O()):m.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[w,E];g(o.prototype,d.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,l.release(this.callbackQueue),this.callbackQueue=null,k.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return d.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(o);var O=function(){for(;m.length||b;){if(m.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(b){b=!1;var t=y;y=l.getPooled(),t.notifyAll(),l.release(t)}}};O=p.measure("ReactUpdates","flushBatchedUpdates",O);var C={injectReconcileTransaction:function(e){e||v(!1),k.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e||v(!1),"function"!=typeof e.batchedUpdates&&v(!1),"boolean"!=typeof e.isBatchingUpdates&&v(!1),_=e}},k={ReactReconcileTransaction:null,batchedUpdates:a,enqueueUpdate:s,flushBatchedUpdates:O,injection:C,asap:c};e.exports=k},function(e,t,n){"use strict";function r(e,t){return e.x===t.x?e.y-t.y:e.x-t.x}function o(e,t){return r(e,t)>0?t:e}function a(e,t){return r(e,t)>0?e:t}function i(e){return e.sort(r)}function u(e,t,n,r){var o=e-n,a=t-r;return Math.sqrt(o*o+a*a)}function s(e,t){return u(e.x,e.y,t.x,t.y)}function c(e){return{a:0,b:1,c:-e}}function l(e){return{a:1,b:0,c:-e}}function f(e,t,n,r,o){return Object(E.a)(e*r+t*o+n)/Math.sqrt(e*e+t*t)}function p(e,t,n,r,o){var a=e*e+t*t;return{x:(t*(t*r-e*o)-e*n)/a,y:(e*-t*r+e*o-t*n)/a}}function h(e,t,n,r,o,a){var i=t*r-e*o;if(0!==i){return{x:(n*o-t*a)/i,y:(e*a-n*r)/i}}}function d(e,t,n,r){var o=e.x,a=e.y,i=t.x,u=t.y,s=n.x,c=n.y,l=r.x,f=r.y,p=(f-c)*(i-o)-(l-s)*(u-a),h=(l-s)*(a-c)-(f-c)*(o-s),d=(i-o)*(a-c)-(u-a)*(o-s);if(Object(E.a)(p)<=x.s){if(Object(E.a)(h)<=x.s&&Object(E.a)(d)<=x.s){var g=function(e,t){return e.x===t.x?e.y-t.y:e.x-t.x},v=[e,t].sort(g),m=[n.toJS(),r.toJS()].sort(g),y=[v,m].sort(function(e,t){return g(e[0],t[0])}),b=O(y,2),_=b[0],w=b[1];return _[1].x===w[0].x?{type:w[0].y<=_[1].y?"colinear":"none"}:{type:w[0].x<=_[1].x?"colinear":"none"}}return{type:"parallel"}}var C=h/p,k=d/p;if(C>=0-x.s&&C<=1+x.s&&k>=0-x.s&&k<=1+x.s){return{type:"intersecting",point:{x:o+C*(i-o),y:a+C*(u-a)}}}return{type:"none"}}function g(e,t,n,r,o,a){var i=o-e,u=a-t,s=n-e,c=r-t,l=i*s+u*c,f=s*s+c*c,p=-1;0!=f&&(p=l/f);var h=void 0,d=void 0;p<0?(h=e,d=t):p>1?(h=n,d=r):(h=e+p*s,d=t+p*c);var g=o-h,v=a-d;return Math.sqrt(g*g+v*v)}function v(e,t,n,r,o,a){var i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:x.s;return g(e,t,n,r,o,a)<=i}function m(e,t,n,r,o,a){if(e===n)return{x:e,y:a};if(t===r)return{x:o,y:t};var i=(r-t)/(n-e),u=t-i*e,s=-1/i,c=a-s*o,l=(c-u)/(i-s);return{x:l,y:i*l+u}}function y(e,t,n,r,o,a){var i=u(e,t,n,r),s=u(e,t,o,a),c=s/i;return e>n&&(c=b(c,0,1,1,0)),c}function b(e,t,n,r,o){return r+(o-r)*(e-t)/(n-t)}function _(e,t,n,r){return 180*-Math.atan2(t-r,n-e)/Math.PI}function w(e,t){var n=e.x,r=e.y,o=t.x,a=t.y;return Object(E.a)(n-o)<=x.s&&Object(E.a)(r-a)<=x.s}t.k=o,t.j=a,t.l=i,t.n=u,t.q=s,t.f=c,t.p=l,t.d=f,t.b=p,t.h=h,t.g=d,t.e=g,t.i=v,t.c=m,t.m=y,t.a=_,t.o=w;var E=n(179),x=n(9),O=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},,function(e,t,n){"use strict";var r=n(59),o=n(268),a=n(139),i=n(140),u=n(269),s=n(270),c=n(271),l=n(272),f=n(273),p=n(275),h=n(276),d=n(347),g=n(84);n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return o.a}),n.d(t,"c",function(){return a.a}),n.d(t,"d",function(){return i.a}),n.d(t,"e",function(){return s.a}),n.d(t,"f",function(){return c.a}),n.d(t,"g",function(){return l.a}),n.d(t,"h",function(){return f.a}),n.d(t,"i",function(){return p.a}),n.d(t,"j",function(){return d.a}),n.d(t,"k",function(){return g.a}),t.l={Button:r.a,CancelButton:o.a,ContentContainer:a.a,ContentTitle:i.a,DeleteButton:u.a,FormBlock:s.a,FormColorInput:c.a,FormLabel:l.a,FormNumberInput:f.a,FormSelect:p.a,FormSlider:h.a,FormSubmitButton:d.a,FormTextInput:g.a}},function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},,,function(e,t,n){"use strict";var r={current:null};e.exports=r},function(e,t,n){"use strict";var r=n(60),o=r({bubbled:null,captured:null}),a=r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),i={topLevelTypes:a,PropagationPhases:o};e.exports=i},,function(e,t,n){"use strict";var r=n(3),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},s=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},c=function(e){var t=this;e instanceof t||r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=o,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=10),n.release=c,n},p={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:a,threeArgumentPooler:i,fourArgumentPooler:u,fiveArgumentPooler:s};e.exports=p},function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=r},function(e,t,n){"use strict";var r={width:"100%",borderSpacing:"2px 0",marginBottom:"2px"},o={width:"6em",textTransform:"capitalize"},a={tableStyle:r,firstTdStyle:o};t.a=a},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(289),a={mountComponent:function(e,t,n,o){var a=e.mountComponent(t,n,o);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),a},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var u=o.shouldUpdateRefs(i,t);u&&o.detachRefs(e,i),e.receiveComponent(t,n,a),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var a in o)if(o.hasOwnProperty(a)){var u=o[a];u?this[a]=u(n):"target"===a?this.target=r:this[a]=n[a]}var s=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;this.isDefaultPrevented=s?i.thatReturnsTrue:i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse}var o=n(29),a=n(7),i=n(23),u=(n(6),{type:null,target:null,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});a(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=i.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=i.thatReturnsTrue)},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);a(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=a({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t,n,r,o,a,i){var u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},s=void 0;return e=e.withMutations(function(e){var c=D.a.acquireID(),l=void 0,p=void 0,h=f(e,n,r,"lines",c);e=h.layer,l=h.vertex;var d=f(e,o,a,"lines",c);e=d.layer,p=d.vertex,s=i.factoryElement(t,{id:c,name:N.a.generateName("lines",i.getIn(["elements",t,"info","title"])),vertices:new R.List([l.id,p.id]),type:t},u),e.setIn(["lines",c],s)}),{layer:e,line:s}}function a(e,t,n,r,o){var a=e.getIn(["lines",t]),i=void 0;return e=e.withMutations(function(e){return e.withMutations(function(e){var u=a.vertices.get(n);g(e,"vertices",u),p(e,u,"lines",a.id);var s=f(e,r,o,"lines",a.id);e=s.layer,i=s.vertex,a=a.setIn(["vertices",n],i.id),e.setIn(["lines",t],a)})}),{layer:e,line:a,vertex:i}}function i(e,t,n){var r=W.a.chain(t).map("value").max().value(),o=W.a.chain(t).map("value").min().value();return r===o&&(o=0),e.areas.forEach(function(a){var i=t.find(function(e){return e.name===a.getIn(["properties","name"])}),u=a.get("id");if(void 0!==i){var s=i.value-o,c=r-o,l=s/c,f=q.a.scale(n),p=f(l).hex();e.setIn(["areas",u,"showHeatMap"],!0),e.setIn(["areas",u,"heatMapText"],i.value),e.setIn(["areas",u,"heatMapColor"],p)}else e.setIn(["areas",u,"showHeatMap"],!1)}),{layer:e}}function u(e,t){var n=e.getIn(["lines",t]);return e=e.withMutations(function(e){g(e,"lines",t),n.holes.forEach(function(t){return P(e,t)}),e.deleteIn(["lines",n.id]),n.vertices.forEach(function(t){return p(e,t,"lines",n.id)})}),{layer:e,line:n}}function s(e,t,n,r,a){var i=void 0,s=void 0;return e=e.withMutations(function(e){var c=e.getIn(["lines",t]),l=e.vertices.get(c.vertices.get(0)),f=e.vertices.get(c.vertices.get(1)),p=l.x,h=l.y,d=f.x,g=f.y,v=o(e,c.type,p,h,n,r,a,c.properties);i=v.line;var m=o(e,c.type,d,g,n,r,a,c.properties);s=m.line;var y=L.m(p,h,d,g,n,r),b=L.k(l,f);c.holes.forEach(function(t){var n=e.holes.get(t),r=n.offset;if(b.x===d&&b.y===g&&(y=1-y,r=1-n.offset),r<y){var o=r/y;b.x===d&&b.y===g&&(o=1-o),T(e,n.type,i.id,o,a,n.properties)}else{var u=(r-y)/(1-y);b.x===d&&b.y===g&&(u=1-u),T(e,n.type,s.id,u,a,n.properties)}}),u(e,t)}),{layer:e,lines:new R.List([i,s])}}function c(e,t,n,r,a,i){n=new R.List(n).sort(function(e,t){var n=e.x,r=e.y,o=t.x,a=t.y;return n===o?r-a:n-o});var u=n.zip(n.skip(1)).filterNot(function(e){var t=B(e,2),n=t[0],r=n.x,o=n.y,a=t[1],i=a.x,u=a.y;return r===i&&o===u}),s=(new R.List).withMutations(function(n){e=e.withMutations(function(e){u.forEach(function(u){var s=B(u,2),c=s[0],l=c.x,f=c.y,p=s[1],h=p.x,d=p.y,g=o(e,t,l,f,h,d,r,a),v=g.line;i&&i.forEach(function(t){var n=t.offsetPosition,o=n.x,a=n.y;if(L.i(l,f,h,d,o,a)){var i=L.m(l,f,h,d,o,a);i>=0&&i<=1&&T(e,t.hole.type,v.id,i,r,t.hole.properties)}}),n.push(v)})})});return{layer:e,lines:s}}function l(e,t,n,r,o,a,i,l,f){var p=[{x:n,y:r},{x:o,y:a}];return e=e.withMutations(function(e){var n=e.lines,r=e.vertices;n.forEach(function(t){var n=t.vertices.map(function(e){return r.get(e)}).toArray(),o=B(n,2),a=o[0],c=o[1],l=L.o(a,p[0])||L.o(a,p[1])||L.o(c,p[0])||L.o(c,p[1]),h=L.g(p[0],p[1],a,c);if("colinear"===h.type){f||(f=[]);var d=L.l(p);e.lines.get(t.id).holes.forEach(function(n){var r=e.holes.get(n),o=L.n(a.x,a.y,c.x,c.y),i=Math.atan2(d[1].y-d[0].y,d[1].x-d[0].x),u=r.offset;d[1].x===t.vertices.get(1).x&&d[1].y===t.vertices(1).y&&(u=1-u);var s=o*u*Math.cos(i)+a.x,l=o*u*Math.sin(i)+a.y;f.push({hole:r,offsetPosition:{x:s,y:l}})}),u(e,t.id),p.push(a,c)}"intersecting"!==h.type||l||(s(e,t.id,h.point.x,h.point.y,i),p.push(h.point))}),c(e,t,p,i,l,f)}),{layer:e}}function f(e,t,n,o,a){var i=e.vertices.find(function(e){return L.o(e,{x:t,y:n})});return i=i?i.update(o,function(e){return e.push(a)}):new A.e(r({id:D.a.acquireID(),name:"Vertex",x:t,y:n},o,new R.List([a]))),e=e.setIn(["vertices",i.id],i),{layer:e,vertex:i}}function p(e,t,n,r){var o=e.vertices.get(t);return o=o.update(n,function(e){var t=e.findIndex(function(e){return r===e});return e.delete(t)}),e=o.areas.size||o.lines.size?e.setIn(["vertices",o.id],o):e.deleteIn(["vertices",o.id]),{layer:e,vertex:o}}function h(e,t){var n=e.getIn(["vertices",t]),r=e.vertices.filter(function(e){return e.id!==t&&L.o(n,e)});if(r.isEmpty())return e;var o=void 0,a=void 0,i=void 0;return o=e.vertices.withMutations(function(n){a=e.lines.withMutations(function(o){i=e.areas.withMutations(function(e){r.forEach(function(r){r.lines.forEach(function(e){var a=o.get(e);a=a.update("vertices",function(e){return e.map(function(e){return e===r.id?t:e})}),o.set(e,a),n.updateIn([t,"lines"],function(t){return t.push(e)})}),r.areas.forEach(function(o){var a=e.get(o);a=a.update("vertices",function(e){return e.map(function(e){return e===r.id?t:e})}),e.set(o,a),n.updateIn([t,"areas"],function(e){return e.push(o)})}),n.remove(r.id)})})})}),e.merge({vertices:o,lines:a,areas:i})}function d(e,t,n){return e.withMutations(function(e){e.setIn([t,n,"selected"],!0),e.updateIn(["selected",t],function(e){return e.push(n)})})}function g(e,t,n){return e.withMutations(function(e){var r=e.getIn(["selected",t]);r=r.remove(r.indexOf(n));var o=r.some(function(e){return e===n});e.setIn(["selected",t],r),e.setIn([t,n,"selected"],o)})}function v(e,t,n,r){r=Object(R.fromJS)(r),e.mergeIn([t,n,"properties"],r)}function m(e,t,n,r){Object(R.fromJS)(r).forEach(function(r,o){e.hasIn([t,n,"properties",o])&&e.mergeIn([t,n,"properties",o],r)})}function y(e,t,n,r){r=Object(R.fromJS)(r),e.mergeIn([t,n],r)}function b(e,t,n,r,o){var a=r.toJS(),i=a.vertexOne,u=a.vertexTwo,s=a.lineLength;delete a.vertexOne,delete a.vertexTwo,delete a.lineLength,e=e.mergeIn([t,n],Object(R.fromJS)(a)).mergeIn(["vertices",i.id],{x:i.x,y:i.y}).mergeIn(["vertices",u.id],{x:u.x,y:u.y}).mergeDeepIn([t,n,"misc"],new R.Map({_unitLength:s._unit})),e=h(e,i.id),i.x!=u.x&&i.y!=u.y&&(e=h(e,u.id)),S(e,o)}function _(e,t,n,r){var o=r.toJS(),a=o.offsetA,i=o.offsetB,u=o.offset;delete o.offsetA,delete o.offsetB,delete o.offset;var s=new R.Map({_unitA:a._unit,_unitB:i._unit});e.mergeIn([t,n],Object(R.fromJS)(o)).mergeDeepIn([t,n],new R.Map({offset:u,misc:s}))}function w(e,t){return e.withMutations(function(e){var n=e.selected;n.lines.forEach(function(n){return v(e,"lines",n,t)}),n.holes.forEach(function(n){return v(e,"holes",n,t)}),n.areas.forEach(function(n){return v(e,"areas",n,t)}),n.items.forEach(function(n){return v(e,"items",n,t)})})}function E(e,t){return e.withMutations(function(e){var n=e.selected;n.lines.forEach(function(n){return m(e,"lines",n,t)}),n.holes.forEach(function(n){return m(e,"holes",n,t)}),n.areas.forEach(function(n){return m(e,"areas",n,t)}),n.items.forEach(function(n){return m(e,"items",n,t)})})}function x(e,t,n){return e.withMutations(function(e){var r=e.selected;r.lines.forEach(function(r){return b(e,"lines",r,t,n)}),r.holes.forEach(function(r){return _(e,"holes",r,t,n)}),r.items.forEach(function(r){return y(e,"items",r,t,n)})})}function O(e){e.get("selected");return e.withMutations(function(e){e.selected.forEach(function(t,n){t.forEach(function(t){return g(e,n,t)})})})}function C(e,t,n,r){var o=void 0;return e=e.withMutations(function(e){var a=D.a.acquireID(),i=n.map(function(t){return f(e,t.x,t.y,"areas",a).vertex.id});o=r.factoryElement(t,{id:a,name:N.a.generateName("areas",r.getIn(["elements",t,"info","title"])),type:t,prototype:"areas",vertices:i}),e.setIn(["areas",a],o)}),{layer:e,area:o}}function k(e,t){var n=e.getIn(["areas",t]);return e=e.withMutations(function(e){g(e,"areas",t),e.deleteIn(["areas",n.id]),n.vertices.forEach(function(t){return p(e,t,"areas",n.id)})}),{layer:e,area:n}}function M(e,t,n){var r=e.length>>1,o=void 0,a=void 0,i=e[2*r-3]-n,u=e[2*r-2]-t,s=e[2*r-1]-n;if(0===u&&0===s)return!1;for(var c=0;c<r;c++){if(o=u,i=s,u=e[2*c]-t,s=e[2*c+1]-n,0===u&&0===s)return!1;i!==s&&(a=s>i)}for(var l=0,f=0;f<r;f++)if(o=u,i=s,u=e[2*f]-t,s=e[2*f+1]-n,!(i<0&&s<0||i>0&&s>0||o<0&&u<0)){if(i===s&&Math.min(o,u)<0)return!0;if(i!==s){var p=o+(u-o)*-i/(s-i);if(0===p)return!1;p>0&&l++,0===i&&a&&s>i&&l--,0===i&&!a&&s<i&&l--,a=s>i}}return 1==(1&l)}function S(e,t){var n=[],r=void 0,o={},a={};e.vertices.forEach(function(e){var t=n.push([e.x,e.y]),r=t-1;o[e.id]=r,a[r]=e.id}),r=e.lines.map(function(e){return e.vertices.map(function(e){return o[e]}).toArray()});var i=Object(V.a)(n,r),u=i.map(function(e){return e.map(function(e){return a[e]})});u=u.map(function(t){return Object(V.b)(t.map(function(t){return e.vertices.get(t)}))?t.reverse():t});var s=[];return e=e.withMutations(function(e){e.areas.forEach(function(t){u.some(function(e){return G(e,t.vertices)})||k(e,t.id)}),u.forEach(function(n,r){var o=e.areas.find(function(e){return G(e.vertices,n)});if(o)s[r]=o.id,e.setIn(["areas",s[r],"holes"],new R.List);else{var a=n.map(function(t){return e.vertices.get(t)}),i=C(e,"area",a,t),u=i.area;s[r]=u.id}});var n=s.map(function(t){return{id:t,vertices:e.areas.get(t).vertices.map(function(t){return e.vertices.get(t)})}}),r=void 0,o=void 0;for(r=0;r<n.length;r++){var a=new R.List,i=n[r].vertices.flatten().toArray();for(o=0;o<n.length;o++)if(r!==o){var c=M(i,n[o].vertices.get(0).get(0),n[o].vertices.get(0).get(1));c&&(a=a.push(n[o].id))}e.setIn(["areas",n[r].id,"holes"],a)}s.forEach(function(t){var n=new Set,r=e.getIn(["areas",t,"holes"]);r.forEach(function(t){e.getIn(["areas",t,"holes"]).forEach(function(e){-1!==r.indexOf(e)&&n.add(e)})}),n.forEach(function(e){var t=r.indexOf(e);r=r.remove(t)}),e.setIn(["areas",t,"holes"],r)})}),{layer:e}}function T(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},i=void 0;return e=e.withMutations(function(e){var u=D.a.acquireID();i=o.factoryElement(t,{id:u,name:N.a.generateName("holes",o.getIn(["elements",t,"info","title"])),type:t,offset:r,line:n},a),e.setIn(["holes",u],i),e.updateIn(["lines",n,"holes"],function(e){return e.push(u)})}),{layer:e,hole:i}}function P(e,t){var n=e.getIn(["holes",t]);return e=e.withMutations(function(e){g(e,"holes",t),e.deleteIn(["holes",n.id]),e.updateIn(["lines",n.line,"holes"],function(e){var n=e.findIndex(function(e){return t===e});return e.remove(n)})}),{layer:e,hole:n}}function j(e,t,n,r,o,a,i,u){var s=void 0;return e=e.withMutations(function(e){var c=D.a.acquireID();s=u.factoryElement(t,{id:c,name:N.a.generateName("items",u.getIn(["elements",t,"info","title"])),type:t,height:a,width:o,x:n,y:r,rotation:i}),e.setIn(["items",c],s)}),{layer:e,item:s}}function I(e,t){var n=e.getIn(["items",t]);return e=e.withMutations(function(e){g(e,"items",t),e.deleteIn(["items",n.id])}),{layer:e,item:n}}t.c=o,t.j=a,t.n=i,t.i=u,t.d=l,t.f=h,t.k=d,t.o=g,t.m=w,t.q=E,t.l=x,t.p=O,t.e=S,t.a=T,t.g=P,t.b=j,t.h=I;var R=n(11),A=(n.n(R),n(41)),D=n(192),N=n(454),L=n(20),V=n(455),U=n(459),F=(n.n(U),n(83)),W=n.n(F),H=n(465),q=n.n(H),B=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),G=function(e,t){return e.size===t.size&&e.isSuperset(t)&&e.isSubset(t)}},,,,,function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(3),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{},c=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var f in n){u.properties.hasOwnProperty(f)&&o(!1);var p=f.toLowerCase(),h=n[f],d={attributeName:p,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseAttribute:r(h,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(h,t.MUST_USE_PROPERTY),hasSideEffects:r(h,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(h,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(h,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(h,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(h,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(d.mustUseAttribute&&d.mustUseProperty&&o(!1),!d.mustUseProperty&&d.hasSideEffects&&o(!1),d.hasBooleanValue+d.hasNumericValue+d.hasOverloadedBooleanValue<=1||o(!1),s.hasOwnProperty(f)){var g=s[f];d.attributeName=g}i.hasOwnProperty(f)&&(d.attributeNamespace=i[f]),c.hasOwnProperty(f)&&(d.propertyName=c[f]),l.hasOwnProperty(f)&&(d.mutationMethod=l[f]),u.properties[f]=d}}},i={},u={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<u._isCustomAttributeFunctions.length;t++){if((0,u._isCustomAttributeFunctions[t])(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=i[e];return r||(i[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:a};e.exports=u},function(e,t,n){"use strict";function r(e){return h+e.toString(36)}function o(e,t){return e.charAt(t)===h||t===e.length}function a(e){return""===e||e.charAt(0)===h&&e.charAt(e.length-1)!==h}function i(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function u(e){return e?e.substr(0,e.lastIndexOf(h)):""}function s(e,t){if(a(e)&&a(t)||p(!1),i(e,t)||p(!1),e===t)return e;var n,r=e.length+d;for(n=r;n<t.length&&!o(t,n);n++);return t.substr(0,n)}function c(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var r=0,i=0;i<=n;i++)if(o(e,i)&&o(t,i))r=i;else if(e.charAt(i)!==t.charAt(i))break;var u=e.substr(0,r);return a(u)||p(!1),u}function l(e,t,n,r,o,a){e=e||"",t=t||"",e===t&&p(!1);var c=i(t,e);c||i(e,t)||p(!1);for(var l=0,f=c?u:s,h=e;;h=f(h,t)){var d;if(o&&h===e||a&&h===t||(d=n(h,c,r)),!1===d||h===t)break;l++<g||p(!1)}}var f=n(152),p=n(3),h=".",d=h.length,g=1e4,v={createReactRootID:function(){return r(f.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===h&&e.length>1){var t=e.indexOf(h,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var a=c(e,t);a!==e&&l(e,a,n,r,!1,!0),a!==t&&l(a,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(l("",e,t,n,!0,!0),l(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},getFirstCommonAncestorID:c,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:h};e.exports=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}n.d(t,"e",function(){return v}),n.d(t,"b",function(){return w}),n.d(t,"c",function(){return x}),n.d(t,"a",function(){return C}),n.d(t,"d",function(){return k});var i=n(11),u=(n.n(i),n(9)),s=n(42),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(e,t,n){return e?new i.Map(e).map(function(e){return new t(e)}).toMap():n||new i.Map},p=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{properties:Object(i.fromJS)(e.properties||{})})))}return a(t,e),t}(Object(i.Record)({id:"",type:"",properties:Object(i.Map)()},"Guide")),h=new i.Map({h1:new p({id:"h1",type:"horizontal-streak",properties:{step:20,colors:["#808080","#ddd","#ddd","#ddd","#ddd"]}}),v1:new p({id:"v1",type:"vertical-streak",properties:{step:20,colors:["#808080","#ddd","#ddd","#ddd","#ddd"]}})}),d=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{vertices:new i.List(e.vertices||[]),lines:new i.List(e.lines||[]),holes:new i.List(e.holes||[]),areas:new i.List(e.areas||[]),items:new i.List(e.items||[])}))}return a(t,e),t}(Object(i.Record)({vertices:new i.List,lines:new i.List,holes:new i.List,areas:new i.List,items:new i.List},"ElementsSet")),g={id:"",type:"",prototype:"",name:"",misc:new i.Map,selected:!1,properties:new i.Map},v=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{lines:new i.List(e.lines||[]),areas:new i.List(e.areas||[])})))}return a(t,e),t}(Object(i.Record)(l({},g,{x:-1,y:-1,prototype:"vertices",lines:new i.List,areas:new i.List}),"Vertex")),m=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{properties:Object(i.fromJS)(e.properties||{}),vertices:new i.List(e.vertices||[]),holes:new i.List(e.holes||[])})))}return a(t,e),t}(Object(i.Record)(l({},g,{prototype:"lines",vertices:new i.List,holes:new i.List}),"Line")),y=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{properties:Object(i.fromJS)(e.properties||{})})))}return a(t,e),t}(Object(i.Record)(l({},g,{prototype:"holes",offset:-1,line:""}),"Hole")),b=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{properties:Object(i.fromJS)(e.properties||{}),vertices:new i.List(e.vertices||[])})))}return a(t,e),t}(Object(i.Record)(l({},g,{prototype:"areas",vertices:new i.List,holes:new i.List,showHeatMap:!1,heatMapText:"",heatMapColor:[],tooltip:{}}),"Area")),_=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{properties:Object(i.fromJS)(e.properties||{})})))}return a(t,e),t}(Object(i.Record)(l({},g,{prototype:"items",x:0,y:0,rotation:0}),"Item")),w=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{vertices:f(e.vertices,v),lines:f(e.lines,m),holes:f(e.holes,y),areas:f(e.areas,b),items:f(e.items,_),selected:new d(e.selected)})))}return a(t,e),t}(Object(i.Record)({id:"",altitude:0,order:0,opacity:1,name:"",visible:!0,vertices:new i.Map,lines:new i.Map,holes:new i.Map,areas:new i.Map,items:new i.Map,selected:new d},"Layer")),E=new i.Map({"layer-1":new w({id:"layer-1",name:"default"})}),x=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t);var n=f(e.layers,w,E);return o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{guides:f(e.guides,p,h),layers:n,selectedLayer:n.first().id,meta:e.meta?Object(i.fromJS)(e.meta):new i.Map})))}return a(t,e),t}(Object(i.Record)({unit:"cm",layers:new i.Map,guides:new i.Map,selectedLayer:null,fontSize:12,width:3e3,height:2e3,meta:new i.Map},"Scene")),O=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{info:Object(i.fromJS)(e.info),properties:Object(i.fromJS)(e.properties)})))}return a(t,e),t}(Object(i.Record)({name:"",prototype:"",info:new i.Map,properties:new i.Map},"CatalogElement")),C=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t);var n=f(e.elements,O);return o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{elements:n,ready:!n.isEmpty()}))}return a(t,e),c(t,[{key:"factoryElement",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.elements.has(e)){var r=this.elements.map(function(e){return e.name}).toArray();throw new Error("Element "+e+" does not exist in catalog "+r)}var o=this.elements.get(e),a=o.properties.map(function(e,t){return n[t]||e.get("defaultValue")});switch(o.prototype){case"lines":return new m(t).merge({properties:a});case"holes":return new y(t).merge({properties:a});case"areas":return new b(t).merge({properties:a});case"items":return new _(t).merge({properties:a});default:throw new Error("prototype not valid")}}}]),t}(Object(i.Record)({ready:!1,page:"root",path:new i.List,elements:new i.Map},"Catalog")),k=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t);var n=new x(e.scene);return o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l({},e,{scene:n,sceneHistory:e.sceneHistory?e.sceneHistory:new i.List([n]),catalog:new C(e.catalog||{}),viewer2D:new i.Map(e.viewer2D||{}),drawingSupport:new i.Map(e.drawingSupport||{}),draggingSupport:new i.Map(e.draggingSupport||{}),rotatingSupport:new i.Map(e.rotatingSupport||{}),misc:e.misc?Object(i.fromJS)(e.misc):new i.Map})))}return a(t,e),t}(Object(i.Record)({mode:u.K,scene:new x,sceneHistory:new i.List([new x]),catalog:new C,viewer2D:new i.Map,mouse:new i.Map({x:0,y:0}),zoom:0,areasText:new i.Map,snapMask:s.c,snapElements:new i.List,activeSnapElement:null,drawingSupport:new i.Map,draggingSupport:new i.Map,rotatingSupport:new i.Map,errors:new i.List,warnings:new i.List,clipboardProperties:null,selectedElementsHistory:new i.List,misc:new i.Map},"State"))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t,n,r){var o={point:r.get(g),line:r.get(v),"line-segment":r.get(m),grid:r.get(y)};return e.valueSeq().filter(function(e){return o[e.type]&&e.isNear(t,n,e.radius)}).map(function(e){return{snap:e,point:e.nearestPoint(t,n)}}).filter(function(e){var t=e.snap.radius;return e.point.distance<t}).min(function(e,t){var n=e.snap.priority,r=e.point.distance,o=t.snap.priority,a=t.point.distance;return n===o?r<a?-1:1:n>o?-1:1})}function u(e,t,n,r,o,a){return a=new f.List([a]),e.push(new _({x:t,y:n,radius:r,priority:o,related:a}))}function s(e,t,n,r,o,a,i){return i=new f.List([i]),e.withMutations(function(e){if(e.some(function(e){return"line"===e.type&&t===e.a&&n===e.b&&r===e.c}))return e;e.valueSeq().filter(function(e){return"line"===e.type}).map(function(e){return p.h(e.a,e.b,e.c,t,n,r)}).filter(function(e){return void 0!==e}).forEach(function(t){var n=t.x,r=t.y;return u(e,n,r,20,40)});e.push(new w({a:t,b:n,c:r,radius:o,priority:a,related:i}))})}function c(e,t,n,r,o,a,i,u){return u=new f.List([u]),e.push(new E({x1:t,y1:n,x2:r,y2:o,radius:a,priority:i,related:u}))}function l(e,t,n,r,o,a){return a=new f.List([a]),e.push(new x({x:t,y:n,radius:r,priority:o,related:a}))}n.d(t,"d",function(){return g}),n.d(t,"b",function(){return v}),n.d(t,"e",function(){return m}),n.d(t,"a",function(){return y}),n.d(t,"c",function(){return b}),t.j=i,t.i=u,t.h=s,t.g=c,t.f=l;var f=n(11),p=(n.n(f),n(20)),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g="SNAP_POINT",v="SNAP_LINE",m="SNAP_SEGMENT",y="SNAP_GRID",b=new f.Map({SNAP_POINT:!0,SNAP_LINE:!0,SNAP_SEGMENT:!0,SNAP_GRID:!1}),_=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),d(t,[{key:"nearest