(window.webpackJsonp=window.webpackJsonp||[]).push([["object-tree-dialog"],{"+5L9":function(e,t){e.exports=''},"+KIV":function(e,t){e.exports=''},"02pg":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("q1tI"),o=n("TSYQ"),i=n("XiJV");function s(e){return r.createElement("div",{className:o(i.separator,e.className)})}},"20cQ":function(e,t){e.exports=''},"2FdS":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("hFf1");t.TaskFactory=class{create(e){const t=this.freeTasks,n=t.length?t.pop():new r.RawTask(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}},"4/GM":function(e,t,n){e.exports={dialog:"dialog-3q1-PXu-",button:"button-3q1-PXu-"}},"4c+U":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"4ceR":function(e,t,n){e.exports={dropTargetInside:"dropTargetInside-3UxYcxls",dropTarget:"dropTarget-3UxYcxls",before:"before-3UxYcxls",after:"after-3UxYcxls"}},ASyk:function(e,t,n){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 428px)"}},"B6/a":function(e,t){e.exports=''},DGxW:function(e,t,n){e.exports={separator:"separator-3U2Wf-wc",tree:"tree-3U2Wf-wc",overlayScrollWrap:"overlayScrollWrap-3U2Wf-wc",listContainer:"listContainer-3U2Wf-wc"}},EqDG:function(e,t,n){"use strict";var r=n("aKzv"),o="dnd-core/INIT_COORDS",i="dnd-core/BEGIN_DRAG",s="dnd-core/PUBLISH_DRAG_SOURCE",a="dnd-core/HOVER",c="dnd-core/DROP",u="dnd-core/END_DRAG";function l(e,t){return{type:o,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){
return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t,n){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e)}function f(e,t){return e.filter((function(e){return e!==t}))}function p(e){return"object"===d(e)}function g(e,t){var n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var o=[];return n.forEach((function(e,t){1===e&&o.push(t)})),o}var v={type:o,payload:{clientOffset:null,sourceClientOffset:null}};function b(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},r=n.publishSource,o=void 0===r||r,s=n.clientOffset,a=n.getSourceClientOffset,c=e.getMonitor(),u=e.getRegistry();e.dispatch(l(s)),m(t,c,u);var d=S(t,c);if(null!==d){var h=null;if(s){if(!a)throw new Error("getSourceClientOffset must be defined");y(a),h=a(d)}e.dispatch(l(s,h));var f=u.getSource(d),p=f.beginDrag(c,d);if(null!=p){O(p),u.pinSource(d);var g=u.getSourceType(d);return{type:i,payload:{itemType:g,item:p,sourceId:d,clientOffset:s||null,sourceClientOffset:h||null,isSourcePublic:!!o}}}}else e.dispatch(v)}}function m(e,t,n){Object(r.a)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Object(r.a)(n.getSource(e),"Expected sourceIds to be registered.")}))}function y(e){Object(r.a)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function O(e){Object(r.a)(p(e),"Item must be an object.")}function S(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function w(e){return function(){if(e.getMonitor().isDragging())return{type:s}}}function _(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function C(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clientOffset;T(t);var o=t.slice(0),i=e.getMonitor(),s=e.getRegistry();E(o,i,s);var c=i.getItemType();return j(o,s,c),D(o,i,s),{type:a,payload:{targetIds:o,clientOffset:r||null}}}}function T(e){Object(r.a)(Array.isArray(e),"Expected targetIds to be an array.")}function E(e,t,n){Object(r.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(r.a)(!t.didDrop(),"Cannot call hover after drop.");for(var o=0;o=0;r--){var o=e[r];_(t.getTargetType(o),n)||e.splice(r,1)}}function D(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();N(n);var o=A(n);o.forEach((function(o,i){var s=P(o,i,r,n),a={type:c,payload:{dropResult:k(k({},t),s)}};e.dispatch(a)}))}}function N(e){Object(r.a)(e.isDragging(),"Cannot call drop while not dragging."),Object(r.a)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function P(e,t,n,o){var i=n.getTarget(e),s=i?i.drop(o,e):void 0;return function(e){Object(r.a)(void 0===e||p(e),"Drop result must either be an object or undefined.")}(s),void 0===s&&(s=0===t?{}:o.getDropResult()),s}function A(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function L(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){Object(r.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var o=t.getSourceId();null!=o&&(n.getSource(o,!0).endDrag(t,o),n.unpinSource());return{type:u}}}function R(e,t){for(var n=0;n0;r.backend&&(e&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!e&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}var t,n,r;return t=e,(n=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,n=function(e){return{beginDrag:b(e),publishDragSource:w(e),hover:C(e),drop:x(e),endDrag:L(e)}}(this);return Object.keys(n).reduce((function(r,o){var i,s=n[o];return r[o]=(i=s,function(){for(var n=arguments.length,r=new Array(n),o=0;o2&&void 0!==arguments[2]?arguments[2]:H;if(e.length!==t.length)return!1;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case o:case i:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case a:return z(e.clientOffset,n.clientOffset)?e:V(V({},e),{},{clientOffset:n.clientOffset});case u:case c:return W;default:return e}}var Y="dnd-core/ADD_SOURCE",Z="dnd-core/ADD_TARGET",J="dnd-core/REMOVE_SOURCE",X="dnd-core/REMOVE_TARGET";function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:te,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case i:return $($({},e),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case s:return $($({},e),{},{isSourcePublic:!0});case a:return $($({},e),{},{targetIds:n.targetIds});case X:return-1===e.targetIds.indexOf(n.targetId)?e:$($({},e),{},{targetIds:f(e.targetIds,n.targetId)});case c:return $($({},e),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case u:return $($({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Y:case Z:return e+1;case J:case X:return e-1;default:return e}}var oe=[],ie=[];function se(e,t){return e!==oe&&(e===ie||void 0===t||(n=e,t.filter((function(e){return n.indexOf(e)>-1}))).length>0);var n}function ae(){
var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case a:break;case Y:case Z:case X:case J:return oe;case i:case s:case u:case c:default:return ie}var t=e.payload,n=t.targetIds,r=void 0===n?[]:n,o=t.prevTargetIds,l=void 0===o?[]:o,d=g(r,l),h=d.length>0||!U(r,l);if(!h)return oe;var f=l[l.length-1],p=r[r.length-1];return f!==p&&(f&&d.push(f),p&&d.push(p)),d}function ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ae(e.dirtyHandlerIds,{type:t.type,payload:le(le({},t.payload),{},{prevTargetIds:h(e,"dragOperation.targetIds",[])})}),dragOffset:q(e.dragOffset,t),refCount:re(e.refCount,t),dragOperation:ne(e.dragOperation,t),stateId:ce(e.stateId)}}function fe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pe(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},o=n.handlerIds;Object(r.a)("function"==typeof e,"listener must be a function."),Object(r.a)(void 0===o||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,s=function(){var n=t.store.getState(),r=n.stateId;try{r===i||r===i+1&&!se(n.dirtyHandlerIds,o)||e()}finally{i=r}};return this.store.subscribe(s)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Object(r.a)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return Object(r.a)(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e)
;return Object(r.a)(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&_(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return Object(r.a)(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!_(r,o))return!1;var i=this.getTargetIds();if(!i.length)return!1;var s=i.indexOf(e);return n?s===i.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,r=e.clientOffset,o=e.initialClientOffset,i=e.initialSourceClientOffset,r&&o&&i?fe((n=i,{x:(t=r).x+n.x,y:t.y+n.y}),o):null;var e,t,n,r,o,i}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,n=e.initialClientOffset,t&&n?fe(t,n):null;var e,t,n}}])&&pe(t.prototype,n),o&&pe(t,o),e}(),be=0;function me(e){return(me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){t&&Array.isArray(e)?e.forEach((function(e){return ye(e,!1)})):Object(r.a)("string"==typeof e||"symbol"===me(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ge||(ge={}));var Oe=n("LuQ6");function Se(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1];Object(r.a)(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,o=n?this.pinnedSource:this.dragSources.get(e);return o}},{key:"getTarget",value:function(e){return Object(r.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){
return Object(r.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Object(r.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Te(e)===ge.SOURCE}},{key:"isTargetId",value:function(e){return Te(e)===ge.TARGET}},{key:"removeSource",value:function(e){var t=this;Object(r.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:J,payload:{sourceId:e}}}(e)),Object(Oe.asap)((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){Object(r.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:X,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Object(r.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Object(r.a)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,n){var r=Ce(e);return this.types.set(r,t),e===ge.SOURCE?this.dragSources.set(r,n):e===ge.TARGET&&this.dropTargets.set(r,n),r}}])&&Se(t.prototype,n),o&&Se(t,o),e}();function De(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Ie(r),i=new ve(o,new je(o)),s=new B(o,i),a=e(s,t,n);return s.receiveBackend(a),s}function Ie(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Object(F.e)(he,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}n.d(t,"a",(function(){return De}))},EvtC:function(e,t,n){e.exports={button:"button-2YcRd2gv"}},FadI:function(e,t,n){"use strict";function r(e){if(!s(e))throw e}function o(e){return(null==e?void 0:e.aborted)?Promise.reject(i()):new Promise((t,n)=>{null==e||e.addEventListener("abort",()=>n(i()),{once:!0})})}function i(){return new DOMException("Aborted","AbortError")}function s(e){return e instanceof Error&&"AbortError"===e.name}function a(e,t){return Promise.race([o(e),t])}async function c(e,t){let n;try{await a(e,new Promise(e=>{n=setTimeout(e,t)}))}finally{clearTimeout(n)}}n.d(t,"c",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return c}))},GjMU:function(e,t){e.exports=''},ItnF:function(e,t,n){e.exports={
dialog:"dialog-2cMrvu9r",wrapper:"wrapper-2cMrvu9r",separator:"separator-2cMrvu9r"}},JEhF:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var r=n("nKUr"),o=n("q1tI"),i=n("EqDG"),s=n("p/5y");function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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}var l=0,d=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),h=Object(o.memo)((function(e){var t=e.children,n=a(function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;o[d]||(o[d]={dragDropManager:Object(i.a)(e,t,n,r)});return o[d]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(u(e,["children"])),2),c=n[0],h=n[1];return Object(o.useEffect)((function(){if(h){var e=f();return++l,function(){0==--l&&(e[d]=null)}}}),[]),Object(r.jsx)(s.a.Provider,Object.assign({value:c},{children:t}),void 0)}));function f(){return void 0!==e?e:window}}).call(this,n("yLpj"))},LuQ6:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=c(n("eFQ1"));Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var i=c(n("4c+U"));Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=c(n("dYZt"));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){
return s[e]}}))}));var a=c(n("2FdS"));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}))},NhaM:function(e,t){e.exports=''},"U+QY":function(e,t){e.exports=''},Vbka:function(e,t){e.exports=''},WcWV:function(e,t,n){e.exports={button:"button-2zRC9WmY",disabled:"disabled-2zRC9WmY"}},XiJV:function(e,t,n){e.exports={separator:"separator-3No0pWrk"}},Z3xJ:function(e,t){e.exports=''},
aKzv:function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;oObject(c.t)("{drawingsCount} drawing",{plural:"{drawingsCount} drawings",count:e}).format({drawingsCount:e.toString()});Object(u.getLogger)("Chart.ManageDrawings");class m extends r.PureComponent{constructor(e){super(e),this._totalCount=0,this._model=null,this._symbolDrawingsMap=null,this._storageContentLoadingPromise=null,this._onItemClick=e=>{""!==e&&(this.props.chartWidget.setSymbol(e),null!==this._model&&this.setState({currentSymbol:e}),this.props.onClose&&this.props.onClose())},this._onRemove=async e=>{if(this._model&&this._symbolDrawingsMap){const t=this._symbolDrawingsMap.get(e);if(t){const n=Array.from(t).map(e=>Object(o.ensureNotNull)(this._model).model().dataSourceForId(e)).filter(h.notNull);if(n.length>0){const t=Object(c.t)("Remove all line tools for")+" "+e;this._model.removeSources(n,!1,t)}this._updateItems()}}},this._updateItems=async()=>{if(null!==this._model){const e=await this._getItems(this._model.model().dataSources());this.setState({items:e})}},this._updateTheme=()=>{const e=a.watchedTheme.value();this.setState({theme:e})},this.state={currentSymbol:null,items:null,theme:a.watchedTheme.value()}}componentDidMount(){this.props.chartWidget.withModel(this,async()=>{this._model=this.props.chartWidget.model(),this._model.model().dataSourceCollectionChanged().subscribe(this,this._updateItems);const e=await this._getItems(this._model.model().dataSources());this.setState({currentSymbol:this._model.mainSeries().symbol(),items:e},()=>{var e,t;return null===(t=(e=this.props).onInitialized)||void 0===t?void 0:t.call(e)})}),a.watchedTheme.subscribe(this._updateTheme)}componentWillUnmount(){a.watchedTheme.unsubscribe(this._updateTheme),null!==this._model&&this._model.model().dataSourceCollectionChanged().unsubscribe(this,this._updateItems)}render(){const{isMobile:e}=this.props,{currentSymbol:t,items:n}=this.state,o=this._symbolDrawingsMap?this._symbolDrawingsMap.size:0,i=`${s=o,Object(c.t)("{symbolsCount} symbol",{plural:"{symbolsCount} symbols",context:"symbols_and_drawings_count",count:s}).format({symbolsCount:s.toString()})} ${(e=>Object(c.t)("with {drawingsCount} drawing",{plural:"with {drawingsCount} drawings",context:"symbols_and_drawings_count",count:e}).format({drawingsCount:e.toString()}))(this._totalCount)}`;var s;return r.createElement(r.Fragment,null,r.createElement("div",{className:v.title
},i),null===n||0===n.length?this._renderEmptyContent():n.map(n=>r.createElement(d.a,{key:n.symbol,title:n.symbol,subtitle:b(n.drawingsCount),removeBtnLabel:Object(c.t)("Remove all drawings for this symbol"),isActive:n.symbol===t,isMobile:e,onClick:this._onItemClick.bind(this,n.symbol),onClickRemove:this._onRemove.bind(this,n.symbol),showFavorite:!1})))}_renderEmptyContent(){const{theme:e}=this.state,t=e===s.a.Dark?g:p;return null===this._symbolDrawingsMap?r.createElement(f.a,null):r.createElement("div",{className:v.empty},r.createElement(i.a,{className:v.image,icon:t}),r.createElement("span",null,Object(c.t)("No drawings yet")))}async _getStorageContent(){return new Map}async _getItems(e){const t=[],n=this._getSymbolDrawingsMap(e);return(await this._getStorageContent()).forEach((e,t)=>{const r=n.get(t)||new Set;e.forEach(e=>r.add(e)),n.set(t,r)}),this._symbolDrawingsMap=n,this._totalCount=0,this._symbolDrawingsMap.forEach((e,n)=>{t.push({symbol:n,drawingsCount:e.size}),this._totalCount=this._totalCount+e.size}),t.sort((e,t)=>e.drawingsCount===t.drawingsCount?e.symbol.localeCompare(t.symbol):e.drawingsCount>t.drawingsCount?-1:1)}_getSymbolDrawingsMap(e){const t=new Map;return e.forEach(e=>{var n;if(Object(l.isLineTool)(e)&&e.showInObjectTree()){const r=null!==(n=e.symbol())&&void 0!==n?n:"",o=t.get(r)||new Set;o.add(e.id()),t.set(r,o)}}),t}}},co4r:function(e,t,n){e.exports={wrap:"wrap-1a1_EyKG",selected:"selected-1a1_EyKG",childOfSelected:"childOfSelected-1a1_EyKG",disabled:"disabled-1a1_EyKG",expandHandle:"expandHandle-1a1_EyKG",expanded:"expanded-1a1_EyKG"}},dDxv:function(e,t){e.exports=''},dYZt:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("yY3h");t.AsapQueue=class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,n=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=r.makeRequestCall(this.flush),this.requestErrorThrow=r.makeRequestCallFromTimer(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}},eFQ1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=function(e){i.enqueueTask(s.create(e))};var r=n("dYZt"),o=n("2FdS");const i=new r.AsapQueue,s=new o.TaskFactory(i.registerPendingError)},ffaL:function(e,t){
e.exports=''},g89m:function(e,t,n){"use strict";var r=n("q1tI"),o=n.n(r),i=n("Eyy1"),s=n("TSYQ"),a=n.n(s),c=n("/3z9"),u=n("d700"),l=n("WXjp"),d=n("02pg"),h=n("uhCe"),f=n("/KDZ"),p=n("pafz"),g=n("ZjKI"),v=n("FQhm"),b=n("Iivm");const m=o.a.createContext({setHideClose:()=>{}});var y=n("zztK"),O=n("px1m");function S(e){const{title:t,subtitle:n,showCloseIcon:i=!0,onClose:s,renderBefore:c,renderAfter:u,draggable:l,className:d,unsetAlign:h}=e,[f,p]=Object(r.useState)(!1);return o.a.createElement(m.Provider,{value:{setHideClose:p}},o.a.createElement("div",{className:a()(O.container,d,(n||h)&&O.unsetAlign)},c,o.a.createElement("div",{"data-dragg-area":l,className:O.title},o.a.createElement("div",{className:O.ellipsis},t),n&&o.a.createElement("div",{className:a()(O.ellipsis,O.subtitle)},n)),u,i&&!f&&o.a.createElement(b.a,{className:O.close,icon:y,onClick:s,"data-name":"close","data-role":"button"})))}var w=n("ItnF");n.d(t,"a",(function(){return T}));const _={vertical:20},C={vertical:0};class T extends o.a.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleClose=()=>{this.props.onClose()},this._handleKeyDown=e=>{var t;if(!e.defaultPrevented)switch(this.props.onKeyDown&&this.props.onKeyDown(e),Object(c.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return void this._handleClose();const{activeElement:n}=document,r=Object(i.ensureNotNull)(this._reference);if(null!==n){if(e.preventDefault(),"true"===(t=n).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if(Object(u.b)(n))return void r.focus()
;if(r.contains(n))return void this._handleClose()}}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()}}componentDidMount(){v.subscribe(g.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)}componentWillUnmount(){v.unsubscribe(g.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)}focus(){Object(i.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,n;return null!==(n=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==n&&n}render(){const{className:e,headerClassName:t,isOpened:n,title:r,dataName:i,onClickOutside:s,additionalElementPos:c,additionalHeaderElement:u,backdrop:g,shouldForceFocus:v=!0,showSeparator:b,subtitle:m,draggable:y=!0,fullScreen:O=!1,showCloseIcon:T=!0,rounded:E=!0,isAnimationEnabled:j,growPoint:D,dialogTooltip:I,unsetHeaderAlign:k}=this.props,M="after"!==c?u:void 0,x="after"===c?u:void 0;return o.a.createElement(f.a,{rule:h.a.SmallHeight},c=>o.a.createElement(f.a,{rule:h.a.TabletSmall},u=>o.a.createElement(l.a,{rounded:!(u||O)&&E,className:a()(w.dialog,e),isOpened:n,reference:this._handleReference,onKeyDown:this._handleKeyDown,onClickOutside:s,onClickBackdrop:s,fullscreen:u||O,guard:c?C:_,boundByScreen:u||O,shouldForceFocus:v,backdrop:g,draggable:y,isAnimationEnabled:j,growPoint:D,name:this.props.dataName,dialogTooltip:I},o.a.createElement("div",{className:w.wrapper,"data-name":i,"data-dialog-name":"string"==typeof r?r:""},void 0!==r&&o.a.createElement(S,{draggable:y&&!(u||O),onClose:this._handleClose,renderAfter:x,renderBefore:M,subtitle:m,title:r,showCloseIcon:T,className:t,unsetAlign:k}),b&&o.a.createElement(d.a,{className:w.separator}),o.a.createElement(p.a.Consumer,null,e=>this._renderChildren(e,u||O))))))}}},gSe6:function(e,t,n){e.exports={wrap:"wrap-3Onbn19L",dialog:"dialog-3Onbn19L",offset:"offset-3Onbn19L",title:"title-3Onbn19L",main:"main-3Onbn19L",disabled:"disabled-3Onbn19L",icon:"icon-3Onbn19L",textIcon:"textIcon-3Onbn19L",rightButtons:"rightButtons-3Onbn19L",twoButtons:"twoButtons-3Onbn19L",button:"button-3Onbn19L",viewButton:"viewButton-3Onbn19L",threeButtons:"threeButtons-3Onbn19L",lockButton:"lockButton-3Onbn19L",removeButton:"removeButton-3Onbn19L",warn:"warn-3Onbn19L",hover:"hover-3Onbn19L",expandHandle:"expandHandle-3Onbn19L",selected:"selected-3Onbn19L",childOfSelected:"childOfSelected-3Onbn19L",renameInput:"renameInput-3Onbn19L"}},gla1:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI");const o=()=>{const[,e]=Object(r.useReducer)((e,t)=>e+1,0);return e}},h5pj:function(e,t,n){e.exports={wrap:"wrap-3jZ5H2Ul",space:"space-3jZ5H2Ul",tree:"tree-3jZ5H2Ul"}},hFf1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.RawTask=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}},jPOK:function(e,t,n){"use strict"
;n.d(t,"a",(function(){return s}));var r=n("q1tI"),o=n("TSYQ"),i=n("Owlf");n("SzKR");function s(e){const t=o("tv-spinner","tv-spinner--shown","tv-spinner--size_"+(e.size||i.a));return r.createElement("div",{className:t,style:e.style,role:"progressbar"},r.createElement("div",{className:"tv-spinner__spinner-layer"},r.createElement("div",{className:"tv-spinner__background tv-spinner__width_element"}),r.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--left"}),r.createElement("div",{className:"tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--right"})))}},leHx:function(e,t){e.exports=''},nkjW:function(e,t,n){e.exports={title:"title-2PJRtZNU",withoutIcon:"withoutIcon-2PJRtZNU",buttons:"buttons-2PJRtZNU",button:"button-2PJRtZNU",disabled:"disabled-2PJRtZNU"}},"p/5y":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}))
;var r=n("q1tI"),o=Object(r.createContext)({dragDropManager:void 0})},"p0W+":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("q1tI"),o=n("TSYQ"),i=n("tU7i"),s=n("EvtC");const a=r.forwardRef((e,t)=>{const{className:n,...a}=e;return r.createElement(i.b,{...a,ref:t,className:o(n,s.button)})})},px1m:function(e,t,n){e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-2sL5JydP",unsetAlign:"unsetAlign-2sL5JydP",title:"title-2sL5JydP",subtitle:"subtitle-2sL5JydP",ellipsis:"ellipsis-2sL5JydP",close:"close-2sL5JydP"}},rlH3:function(e,t){e.exports=''},tyJc:function(e,t){e.exports=''},uhCe:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("ASyk");const o={SmallHeight:r["small-height-breakpoint"],
TabletSmall:r["tablet-small-breakpoint"],TabletNormal:r["tablet-normal-breakpoint"]}},"x0D+":function(e,t,n){var r,o,i;o=[t],void 0===(i="function"==typeof(r=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tPromise.resolve())}var u=n("txPx");const l=Object(u.getLogger)("DataSourcesIcons");let d=null;function h(){const e=n.c.zxD0;return e?Promise.resolve(e.exports.lineToolsIcons):n.e("line-tools-icons").then(n.bind(null,"zxD0")).then(e=>e.lineToolsIcons)}function f(){const e=n.c.EsZh;return e?Promise.resolve(e.exports.SERIES_ICONS):n.e("series-icons-map").then(n.bind(null,"EsZh")).then(e=>e.SERIES_ICONS)}let p=null;function g(){return null===p&&(p=function(){const e=c(h,2).then(e=>e).catch(e=>(l.logWarn(e),{})),t=c(f,2).then(e=>e).catch(e=>(l.logWarn(e),{}));return Promise.all([e,t])}()),p.then(e=>(d={linetool:e[0],series:e[1]},d))}var v=n("Sn4D"),b=n("mkWe"),m=n("/KDZ"),y=n("YFKU"),O=n("g89m"),S=n("uhCe"),w=n("b4AZ");var _=n("cvc5"),C=n.n(_),T=n("5rFJ"),E=n("8+VR"),j=n("Eyy1"),D=n("TSYQ"),I=n.n(D),k=n("Iivm"),M=n("N5tr"),x=n("82wv"),N=n("gla1");const P=o.createContext(null);var A=n("p0W+"),L=n("+KIV"),R=n("Z3xJ"),B=n("B6/a"),F=n("nkjW"),H=n("JWMC");function z(e){const{viewModel:t}=Object(j.ensureNotNull)(Object(o.useContext)(P)),n=Object(N.a)(),r=t.selection();Object(o.useEffect)(()=>{const e={};return t.onChange().subscribe(e,()=>n()),()=>{t.onChange().unsubscribeAll(e)}},[t]),Object(o.useEffect)(()=>{const e={};return r.onChange().subscribe(e,()=>n()),()=>{r.onChange().unsubscribeAll(e)}},[r]);const s=!t.canSelectionBeUnmerged(),a=t.isSelectionCopiable(),c=t.isSelectionCloneable(),u=!a&&!c,l=t.canSelectionBeGrouped();return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:D(F.title,F.withoutIcon)},Object(y.t)("Object tree"),!1),i.a.createElement("div",{className:F.buttons},i.a.createElement(A.a,{className:D(F.button,!l&&F.disabled),icon:B,onClick:function(){t.createGroupFromSelection()},isDisabled:!l,title:Object(y.t)("Create a group of drawings"),"data-name":"group-button"}),i.a.createElement(x.a,{className:D(F.button,u&&F.disabled),isDisabled:u,content:i.a.createElement(k.a,{icon:L}),title:Object(y.t)("Clone, Copy"),arrow:!1,isShowTooltip:!0,"data-name":"copy-clone-button"},a&&i.a.createElement(M.b,{"data-name":"copy",label:Object(y.t)("Copy"),onClick:function(){t.copySelection()}}),c&&i.a.createElement(M.b,{"data-name":"clone",label:Object(y.t)("Clone"),onClick:function(){t.cloneSelection()}})),i.a.createElement(x.a,{className:D(F.button,s&&F.disabled),isDisabled:s,content:i.a.createElement(k.a,{icon:R}),title:Object(y.t)("Move to"),arrow:!1,isShowTooltip:!0,"data-name":"move-to-button"},i.a.createElement(M.b,{"data-name":"new-pane-above",label:Object(y.t)("New pane above"),onClick:function(){t.unmergeSelectionUp()}}),i.a.createElement(M.b,{"data-name":"new-pane-below",label:Object(y.t)("New pane below"),onClick:function(){t.unmergeSelectionDown()}}))))}
var U=n("rRWa"),G=n("/MKj");function V(e){var t=null;return function(){return null==t&&(t=e()),t}}function K(e,t){for(var n=0;n0}},{key:"leave",value:function(e){var t,n,r=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),n=e,t.filter((function(e){return e!==n}))),r>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&K(t.prototype,n),r&&K(t,r),e}(),q=V((function(){return/firefox/i.test(navigator.userAgent)})),Y=V((function(){return Boolean(window.safari)}));function Z(e,t){for(var n=0;ne))return n[a];u=a-1}}var d=e-t[s=Math.max(0,u)],h=d*d;return n[s]+r[s]*d+o[s]*h+i[s]*d*h}}])&&Z(t.prototype,n),r&&Z(t,r),e}();function X(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function Q(e){return{x:e.clientX,y:e.clientY}}function $(e,t,n,r,o){var i,s,a,c="IMG"===(i=t).nodeName&&(q()||!(null!==(s=document.documentElement)&&void 0!==s&&s.contains(i))),u=X(c?e:t),l={x:n.x-u.x,y:n.y-u.y},d=e.offsetWidth,h=e.offsetHeight,f=r.anchorX,p=r.anchorY,g=function(e,t,n,r){var o=e?t.width:n,i=e?t.height:r;return Y()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}
}(c,t,d,h),v=g.dragPreviewWidth,b=g.dragPreviewHeight,m=o.offsetX,y=o.offsetY,O=0===y||y;return{x:0===m||m?m:new J([0,.5,1],[l.x,l.x/d*v,l.x+v-d]).interpolate(f),y:O?y:(a=new J([0,.5,1],[l.y,l.y/h*b,l.y+b-h]).interpolate(p),Y()&&c&&(a+=(window.devicePixelRatio-1)*b),a)}}var ee,te="__NATIVE_FILE__",ne="__NATIVE_URL__",re="__NATIVE_TEXT__",oe="__NATIVE_HTML__";function ie(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=r?r:n}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=(se(ee={},te,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),se(ee,oe,{exposeProperties:{html:function(e,t){return ie(e,t,"")}},matchesTypes:["Html","text/html"]}),se(ee,ne,{exposeProperties:{urls:function(e,t){return ie(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),se(ee,re,{exposeProperties:{text:function(e,t){return ie(e,t,"")}},matchesTypes:["Text","text/plain"]}),ee);function ce(e,t){for(var n=0;n-1}))}))[0]||null}function de(e,t){for(var n=0;n0&&o.actions.hover(t,{clientOffset:Q(e)}),t.some((function(e){return o.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){o.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=o.dragOverTargetIds;if(o.dragOverTargetIds=[],!o.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));o.altKeyPressed=e.altKey,o.actions.hover(t||[],{clientOffset:Q(e)}),(t||[]).some((function(e){return o.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())):o.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){o.isDraggingNativeItem()&&e.preventDefault(),o.enterLeaveCounter.leave(e.target)&&o.isDraggingNativeItem()&&setTimeout((function(){return o.endDragNativeItem()}),0)},this.handleTopDropCapture=function(e){var t;(o.dropTargetIds=[],o.isDraggingNativeItem())&&(e.preventDefault(),null===(t=o.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));o.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=o.dropTargetIds;o.dropTargetIds=[],o.actions.hover(t,{clientOffset:Q(e)}),o.actions.drop({dropEffect:o.getCurrentDropEffect()}),o.isDraggingNativeItem()?o.endDragNativeItem():o.monitor.isDragging()&&o.actions.endDrag()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new he(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new W(this.isNodeInDocument)}var t,n,o;return t=e,(n=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,
dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:"teardown",value:function(){var e,t=this.rootElement;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var o=function(t){return r.handleDragStart(t,e)},i=function(e){return r.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",i),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},o=function(t){return n.handleDragOver(t,e)},i=function(t){return n.handleDrop(t,e)};return t.addEventListener("dragenter",r),t.addEventListener("dragover",o),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",r),t.removeEventListener("dragover",o),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),
e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return pe({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return pe({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(r).some((function(t){return r[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var n=new ue(ae[e]);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}])&&ve(t.prototype,n),o&&ve(t,o),e}(),ye=function(e,t,n){return new me(e,t,n)},Oe=n("aKzv");!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(be||(be={}));var Se=1,we=0;function _e(e){return void 0===e.button||e.button===we}function Ce(e){return!!e.targetTouches}function Te(e,t){return Ce(e)?function(e,t){return 1===e.targetTouches.length?Te(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?Te(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}var Ee=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(e){}return e}();function je(e,t){
for(var n=0;n=o[s].start)&&(null==o[s].end||i<=o[s].end))return!0;return!1
}(o._mouseClientOffset.x||0,o._mouseClientOffset.y||0,u.x,u.y,o.options.scrollAngleRanges))o._isScrolling=!0;else if(!o.monitor.isDragging()&&o._mouseClientOffset.hasOwnProperty("x")&&s&&(t=o._mouseClientOffset.x||0,n=o._mouseClientOffset.y||0,r=u.x,i=u.y,Math.sqrt(Math.pow(Math.abs(r-t),2)+Math.pow(Math.abs(i-n),2))>(o.options.touchSlop?o.options.touchSlop:0))&&(o.moveStartSourceIds=void 0,o.actions.beginDrag(s,{clientOffset:o._mouseClientOffset,getSourceClientOffset:o.getSourceClientOffset,publishSource:!1})),o.monitor.isDragging()){var l=o.sourceNodes.get(o.monitor.getSourceId());o.installSourceNodeRemovalObserver(l),o.actions.publishDragSource(),e.cancelable&&e.preventDefault();var d=(a||[]).map((function(e){return o.targetNodes.get(e)})).filter((function(e){return!!e})),h=o.options.getDropTargetElementsAtPoint?o.options.getDropTargetElementsAtPoint(u.x,u.y,d):o.document.elementsFromPoint(u.x,u.y),f=[];for(var p in h)if(h.hasOwnProperty(p)){var g=h[p];for(f.push(g);g;)(g=g.parentElement)&&-1===f.indexOf(g)&&f.push(g)}var v=f.filter((function(e){return d.indexOf(e)>-1})).map((function(e){return o._getDropTargetId(e)})).filter((function(e){return!!e})).filter((function(e,t,n){return n.indexOf(e)===t}));if(c)for(var b in o.targetNodes){var m=o.targetNodes.get(b);if(l&&m&&m.contains(l)&&-1===v.indexOf(b)){v.unshift(b);break}}v.reverse(),o.actions.hover(v,{clientOffset:u})}}},this._getDropTargetId=function(e){for(var t=o.targetNodes.keys(),n=t.next();!1===n.done;){var r=n.value;if(e===o.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=function(e){o._isScrolling=!1,o.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0==(e.buttons&Se)}(e)&&(o.monitor.isDragging()&&!o.monitor.didDrop()?(e.cancelable&&e.preventDefault(),o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.drop(),o.actions.endDrag()):o.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&o.monitor.isDragging()&&(o._mouseClientOffset={},o.uninstallSourceNodeRemovalObserver(),o.actions.endDrag())},this.options=new Ie(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(be.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(be.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(be.keyboard)}var t,n,r;return t=e,(n=[{key:"profile",value:function(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}},{key:"document",get:function(){return this.options.document}},{key:"setup",value:function(){
this.document&&(Object(Oe.a)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.document,"start",this.getTopMoveStartHandler()),this.addEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.document,"move",this.handleTopMove),this.addEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(this.document,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.document&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.document,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.document,"start",this.handleTopMoveStart),this.removeEventListener(this.document,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.document,"move",this.handleTopMove),this.removeEventListener(this.document,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.document,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.document,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,t,n,r){var o=Ee?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=xe[r][t];i&&e.addEventListener(i,n,o)}))}},{key:"removeEventListener",value:function(e,t,n,r){var o=Ee?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=xe[r][t];i&&e.removeEventListener(i,n,o)}))}},{key:"connectDragSource",value:function(e,t){var n=this,r=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",r),function(){n.sourceNodes.delete(e),n.removeEventListener(t,"start",r)}}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDropTarget",value:function(e,t){var n=this;if(!this.document)return function(){};var r=function(r){if(n.document&&n.monitor.isDragging()){var o;switch(r.type){case xe.mouse.move:o={x:r.clientX,y:r.clientY};break;case xe.touch.move:o={x:r.touches[0].clientX,y:r.touches[0].clientY}}var i=null!=o?n.document.elementFromPoint(o.x,o.y):void 0,s=i&&t.contains(i);return i===t||s?n.handleMove(r,e):void 0}};return this.addEventListener(this.document.body,"move",r),this.targetNodes.set(e,t),function(){n.document&&(n.targetNodes.delete(e),n.removeEventListener(n.document.body,"move",r))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{
key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}}])&&ke(t.prototype,n),r&&ke(t,r),e}(),Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Ne(e,t,n)},Ae=n("JEhF");const Le=(Re="OBJECT_TREE",e=>Re+"__"+e);var Re;const Be=Le("SET_NODES"),Fe=Le("SYNC_NODES"),He=Le("UPDATE_NODE"),ze=Le("UPDATE_NODES"),Ue=Le("RESET_TREE"),Ge=Le("SET_SELECTED_IDS"),Ve=Le("DROP_SELECTION"),Ke=Le("SELECT_PREVIOUS"),We=Le("SELECT_NEXT"),qe=Le("MULTI_SELECT_PREVIOUS"),Ye=Le("MULTI_SELECT_NEXT"),Ze=Le("PROCESS_DROP_TARGET"),Je=Le("UPDATE_DROP_TARGET"),Xe=Le("HIDE_DROP_TARGET"),Qe=Le("START_MULTI_SELECT"),$e=Le("STOP_MULTI_SELECT"),et=(Le("REMOVE_NODE"),Le("SET_FOCUSED_NODE")),tt=Le("SCROLL_TO_ID"),nt=Le("SET_IS_SELECTED"),rt=Le("SET_IS_EXPANDED"),ot=Le("SET_DISABLED_NODES"),it=Le("MOVE_NODES"),st=(Le("START_DRAG"),Le("END_DRAG")),at=()=>({type:Ke}),ct=()=>({type:We}),ut=()=>({type:qe}),lt=()=>({type:Ye}),dt=(e,t,n,r,o)=>({type:Ze,dropTarget:e,dropType:t,isHoveredLeft:n,boundBox:r,isLastChild:o}),ht=()=>({type:Ve}),ft=e=>({type:Ge,ids:e}),pt=(e,t,n)=>({type:it,ids:e,targetId:t,dropType:n}),gt=()=>({type:Qe}),vt=()=>({type:$e}),bt=e=>({type:et,nodeId:e}),mt=e=>({type:tt,nodeId:e}),yt=(e,t,n=0)=>({type:nt,nodeId:e,isSelected:t,mode:n}),Ot=(e,t)=>({type:rt,nodeId:e,isExpanded:t}),St=e=>({type:ot,ids:e}),wt=()=>({type:st});var _t=n("G4qV");const Ct=e=>e.nodes,Tt=e=>e.selection,Et=e=>e.dropTarget,jt=e=>e.expanded,Dt=e=>e.scrollToId,It=(e,t)=>t,kt=Object(_t.a)([Ct,It],(e,t)=>e[t]),Mt=Object(_t.a)([Tt,It],(e,t)=>e.ids.includes(t)),xt=Object(_t.a)([jt,It],(e,t)=>e.includes(t)),Nt=Object(_t.a)([e=>e.disabled,Tt,It],(e,t,n)=>!t.ids.includes(n)&&e.includes(n)),Pt=Object(_t.a)(Ct,e=>Object.keys(e)),At=Object(_t.a)(Tt,({ids:e})=>e),Lt=Object(_t.a)(Tt,({lastFocusedNodeId:e})=>e),Rt=Object(_t.a)(Tt,({isMultiSelecting:e})=>e),Bt=Object(_t.a)([Ct,At],(e,t)=>t.map(t=>e[t])),Ft=Object(_t.a)(Ct,e=>Object.values(e).filter(e=>0===e.level)),Ht=Object(_t.a)([Ct,Ft],(e,t)=>t.reduce((t,n)=>[...t,...zt(e,Object(j.ensureDefined)(n))],[]));function zt(e,t){const n=[];for(const r of t.children)n.push(e[r]),n.push(...zt(e,e[r]));return n}const Ut=Object(_t.a)([Ct,Ft,jt],(e,t,n)=>{
const r=new Set(n);return t.reduce((t,n)=>[...t,...Vt(e,Object(j.ensureDefined)(n),r)],[])}),Gt=Object(_t.a)([Ct,At,jt],(e,t,n)=>{const r=new Set(n);return[{id:"drag-list",level:-1,children:t}].reduce((t,n)=>[...t,...Vt(e,Object(j.ensureDefined)(n),r)],[])});function Vt(e,t,n){const r=[];for(const o of t.children){const t=e[o];void 0!==t&&(r.push(t),n.has(o)&&r.push(...Vt(e,t,n)))}return r}function*Kt(e){const{selectedIds:t,nodes:n}=yield Object(T.b)(e),r=n.reduce((e,t)=>({...e,[t.id]:t}),{});yield Object(T.e)((e=>({type:Be,nodes:e}))(r)),yield Object(T.e)(ft(t));!Lt(yield Object(T.f)())&&t.length>0&&(yield Object(T.e)(bt(t[0])),yield Object(T.e)(mt(t[0])))}function*Wt(e){for(;;){if((yield Object(T.g)([Qe,$e])).type===Qe){const t=Pt(yield Object(T.f)()).filter(t=>!e(t));yield Object(T.e)(St(t))}else yield Object(T.e)(St([]))}}function*qt(){for(;;){const{type:e}=yield Object(T.g)([Ye,qe]),t=yield Object(T.f)(),n=Ht(t),r=n.length,o=Lt(t),i=n.findIndex(e=>e.id===o),s=[...At(t)];if(e===qe&&0===i||e===Ye&&i===r-1)continue;const a=en(t,e===Ye?"next":"previous",n,i),{id:c}=a;s.includes(c)&&o?(yield Object(T.e)(yt(o,!1,1)),yield Object(T.e)(bt(c))):yield Object(T.e)(yt(c,!0,1)),yield Object(T.e)(mt(c))}}function*Yt(e,t){for(;;){const{type:n}=yield Object(T.g)([We,Ke]),r=yield Object(T.f)(),o=Ht(r),i=Lt(r),s=o.findIndex(e=>e.id===i),a=n===We?"next":"previous",c=en(r,a,o,s),{id:u}=c;e?e([u],a):yield Object(T.e)(ft([u])),t&&t(u),yield Object(T.e)(bt(u))}}function*Zt(e,t=(()=>!0)){for(;;){const{mode:n,nodeId:r,isSelected:o}=yield Object(T.g)(nt);let i=[...At(yield Object(T.f)())];const s=Ht(yield Object(T.f)());if(1===n)o?i.push(r):i.splice(i.indexOf(r),1);else if(2===n&&i.length>0){const e=Lt(yield Object(T.f)());let n=s.findIndex(t=>t.id===e);-1===n&&(n=s.reduce((e,t,n)=>i.includes(t.id)?n:e,-1));const o=s.findIndex(e=>e.id===r);if(n!==o)for(let e=Math.min(n,o);e<=Math.max(n,o);e++){const n=s[e].id;!i.includes(n)&&t(n)&&i.push(n)}}else i=r?[r]:[];const a=new Set(i);i=s.reduce((e,t)=>(a.has(t.id)&&e.push(t.id),e),[]),e?e(i):yield Object(T.e)(ft(i)),yield Object(T.e)(bt(r))}}function*Jt(e=(()=>!0),t){const{dropTarget:n,dropType:r,isHoveredLeft:o,boundBox:i,isLastChild:s}=t,a=Et(yield Object(T.f)()),c=kt(yield Object(T.f)(),Object(j.ensureDefined)(n.parentId)),u=s&&"after"===r,l=Bt(yield Object(T.f)()),d=!u||!o&&e(l,n,r)?n:c,h=a.node&&a.node.id!==d.id||a.dropType!==r;l.map(e=>e.id).includes(d.id)?yield Object(T.e)({type:Xe}):h&&e(l,d,r)&&(yield Object(T.e)(((e,t,n)=>({type:Je,node:e,dropType:t,boundBox:n}))(d,r,i)))}function*Xt(e){yield Object(T.h)(0,Ze,Jt,e)}function*Qt(e){for(;;){yield Object(T.g)(Ve);const t=Bt(yield Object(T.f)()),{node:n,dropType:r}=Et(yield Object(T.f)());if(n&&r){const o=new CustomEvent("tree-node-drop",{detail:{nodes:t,target:n.id,type:r}});if(e&&e(o),!o.defaultPrevented){const e=At(yield Object(T.f)());yield Object(T.e)(pt(e,n.id,r))}}}}function*$t(e){for(;;){yield Object(T.g)(it);e(Ct(yield Object(T.f)()))}}function en(e,t,n,r){const o=n.length;let i,s=0
;for(;!i||Math.abs(s)1&&!xt(e,Object(j.ensureDefined)(a.parentId)));)s+="next"===t?1:-1,i=n[(r+s+o)%o];var a;return i}function*tn(e={}){const{saga:t,onDrop:n,canMove:r,onMove:o,onSelect:i,onKeyboardSelect:s,initState:a,canBeAddedToSelection:c}=e,u=[Object(T.d)(Xt,r),Object(T.d)(Qt,n),Object(T.d)(Zt,i,c),Object(T.d)(Yt,i,s),Object(T.d)(qt)];for(t&&u.push(Object(T.d)(t)),o&&u.push(Object(T.d)($t,o)),c&&u.push(Object(T.d)(Wt,c));;){a&&(yield Object(T.b)(Kt,a));const e=yield Object(T.a)(u);yield Object(T.g)(Ue);for(const t of e)yield Object(T.c)(t)}}var nn=n("ANjH"),rn=n("ogJP");const on=Object(u.getLogger)("Platform.GUI.ObjectTree.CallApi");const sn={ids:[],lastFocusedNodeId:void 0,isMultiSelecting:!1};const an={node:void 0,dropType:void 0,boundBox:void 0};const cn=Object(nn.c)({nodes:function(e={},t){switch(t.type){case Be:return t.nodes;case Fe:{const{nodes:n}=t,r=n.map(e=>e.id),o={...e};for(const t of Object.keys(e))if(!r.includes(t)){const{parentId:e}=o[t];e&&(o[e]={...o[e],children:o[e].children.filter(e=>e!==t)}),delete o[t]}for(const e of n){const t=e.id;if(o.hasOwnProperty(t)){!Object(rn.deepEquals)(o[t].children,e.children)[0]&&(o[t]={...o[t],children:[...e.children]})}else{o[t]=e;const{parentId:n}=e;if(n&&!o[n].children.includes(t))throw new Error("Not implemented")}}return o}case He:{const{type:n,nodeId:r,...o}=t;return{...e,[r]:{...e[r],...o}}}case ze:{const{nodes:n}=t,r={...e};return Object.keys(n).forEach(e=>{r[e]={...r[e],...n[e]}}),{...e,...r}}case it:{const{ids:n,targetId:r,dropType:o}=t,i=Object(j.ensureDefined)(e[r].parentId),s=e[i],a={};for(const t of n){const n=e[t];if(n.parentId){const r=a[n.parentId]||e[n.parentId];a[n.parentId]={...r,children:r.children.filter(e=>e!==t)}}a[t]={...n,parentId:i,level:s.level+1}}const c=s.children.filter(e=>!n.includes(e));return c.splice(((e,t,n)=>{switch(n){case"before":return e.indexOf(Object(j.ensureDefined)(t));case"inside":return e.length;case"after":return e.indexOf(Object(j.ensureDefined)(t))+1;default:return 0}})(c,r,o),0,...n),a[i]={...e[i],children:c,isExpanded:!0},{...e,...a}}default:return e}},selection:function(e=sn,t){switch(t.type){case Ge:{const{ids:n}=t;return{...e,ids:n,lastFocusedNodeId:n.length>0?e.lastFocusedNodeId:void 0}}case Qe:return{...e,isMultiSelecting:!0};case $e:return{...e,isMultiSelecting:!1};case et:return{...e,lastFocusedNodeId:t.nodeId};case Fe:{const n=new Set(t.nodes.map(e=>e.id));return e.lastFocusedNodeId&&!n.has(e.lastFocusedNodeId)&&delete e.lastFocusedNodeId,{...e,ids:e.ids.filter(e=>n.has(e))}}default:return e}},dropTarget:function(e=an,t){switch(t.type){case Je:{const{node:n,dropType:r,boundBox:o}=t;return{...e,node:n,dropType:r,boundBox:o}}case Xe:case st:case Ue:return{...an};default:return e}},expanded:function(e=[],t){switch(t.type){case rt:{const{nodeId:n,isExpanded:r}=t;if(r)return[...e,n];const o=[...e];return o.splice(e.indexOf(n),1),o}default:return e}},disabled:function(e=[],t){switch(t.type){case ot:return[...t.ids];default:return e}},scrollToId:function(e=null,t){switch(t.type){case tt:
return null===t.nodeId?null:{id:t.nodeId};default:return e}}});function un(e,t,n){var r=n.getRegistry(),o=r.addTarget(e,t);return[o,function(){return r.removeTarget(o)}]}function ln(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}function dn(e,t){for(var n=0;n, or turn it into a ")+"drag source or a drop target itself.")}}function vn(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var i=function(e){return function(){
var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Object(o.isValidElement)(t)){var r=t;return e(r,n),r}var i=t;gn(i);var s=n?function(t){return e(t,n)}:e;return mn(i,s)}}(r);t[n]=function(){return i}}})),t}function bn(e,t){"function"==typeof e?e(t):e.current=t}function mn(e,t){var n=e.ref;return Object(Oe.a)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?Object(o.cloneElement)(e,{ref:function(e){bn(n,e),bn(t,e)}}):Object(o.cloneElement)(e,{ref:t})}function yn(e){return(yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function On(e){return null!==e&&"object"===yn(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function Sn(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',Jn.join(", "),t),Object(Oe.a)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,n){return new Xn(e,t,n)}}function $n(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(Oe.a)(In(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),o=function(){return e}),Object(Oe.a)(Dn(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var i=Qn(t);return Object(Oe.a)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),Object(Oe.a)(Dn(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(e){return Yn({containerDisplayName:"DropTarget",createHandler:i,registerHandler:un,createMonitor:function(e){return new fn(e)},createConnector:function(e){return new wn(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}var er=n("iR1w"),tr=n("qFKp");function nr(e,t){for(var n=0;n-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',lr.join(", "),t),Object(Oe.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),dr.forEach((function(t){Object(Oe.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,n){return new hr(e,t,n)}}var pr=n("/3z9"),gr=n("3F0O"),vr=n("8d0Q");const br=o.createContext({size:0,smallSizeTreeNodeAction:1}),mr={[pr.Modifiers.Mod]:1,[pr.Modifiers.Shift]:2};var yr=n("+5L9"),Or=n("co4r");const Sr=()=>{};class wr extends i.a.PureComponent{constructor(){super(...arguments),this._ref=null,this._handleRef=e=>{this._ref=e;const{connectDragSource:t,connectDropTarget:n,connectDragPreview:r}=this.props;Object(j.ensureDefined)(n)(this._ref),Object(j.ensureDefined)(t)(this._ref),Object(j.ensureDefined)(r)((ur||((ur=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ur),{captureDraggingState:!0})},this._handleTouchStart=e=>{const t=(e,t)=>{const n=function(e,t){try{const n=document.createEvent("TouchEvent");return n.initTouchEvent(e,!0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.touches,t.targetTouches,t.changedTouches),n}catch(e){return null}}(e,t);if(n)return n;const r=Array.from(t.changedTouches),o=Array.from(t.touches),i=Array.from(t.targetTouches);return new TouchEvent(e,{bubbles:!0,changedTouches:r,touches:o,targetTouches:i})},n=e.target;if(n instanceof Element){const e=e=>{const r=e;if(!n.isConnected){r.preventDefault();const e=t("touchmove",r);document.body.dispatchEvent(e)}},r=o=>{const i=o;if(!n.isConnected){i.preventDefault()
;const e=t("touchend",i);document.body.dispatchEvent(e)}n.removeEventListener("touchend",r),n.removeEventListener("touchmove",e)};n.addEventListener("touchend",r),n.addEventListener("touchmove",e)}}}componentDidMount(){var e;null===(e=this._ref)||void 0===e||e.addEventListener("touchstart",this._handleTouchStart)}componentWillUnmount(){var e;null===(e=this._ref)||void 0===e||e.removeEventListener("touchstart",this._handleTouchStart)}render(){return i.a.createElement(_r,{...this.props,reference:this._handleRef})}getNode(){return Object(j.ensureNotNull)(this._ref)}}const _r=e=>{const{id:t,isSelected:n,isOffset:r,isExpandable:s,setIsSelected:a,isDisabled:c,isExpanded:u,onClick:l,parentId:d,setIsExpanded:h,reference:f,isFirstListItem:p,isLastListItem:g,nodeRenderer:v,isChildOfSelected:b=!1}=e,{size:m,smallSizeTreeNodeAction:y}=Object(o.useContext)(br),O=Object(o.useRef)(null),S=Object(gr.a)(e=>O.current=e,f);let[w,_]=Object(vr.c)();return tr.CheckMobile.any()&&(w=n,_={onMouseOut:Sr,onMouseOver:Sr}),i.a.createElement("div",{className:D(Or.wrap,n&&Or.selected,b&&Or.childOfSelected,c&&Or.disabled,s&&Or.expandable),onClick:1===m&&0===y?C:function(e){if(e.defaultPrevented)return;const r=mr[Object(pr.modifiersFromEvent)(e)]||0;!c&&a&&a(t,!n,r);l&&0===r&&l(e,t)},onContextMenu:C,ref:S,..._},s&&i.a.createElement(k.a,{icon:yr,className:D(Or.expandHandle,u&&Or.expanded),onClick:function(e){e.preventDefault(),s&&h(t,!u)},onMouseDown:function(e){e.preventDefault()}}),v({id:t,isOffset:r,parentId:d,isDisabled:c,isSelected:n,isChildOfSelected:b,isHovered:w,isExpanded:u,isFirstListItem:p,isLastListItem:g}));function C(){c||n||!a||a(t,!0)}},Cr=i.a.createContext({});function Tr(e,t){const{id:n}=t,r=kt(e,n),o=Mt(e,n);let i=!1,s=r.parentId;for(;s&&!i;)i=Mt(e,s),s=kt(e,s).parentId;return{...r,isSelected:o,isChildOfSelected:i,isExpanded:r.children.length>0&&xt(e,n),isExpandable:r.children.length>0,isDisabled:Nt(e,n)}}function Er(e){return Object(nn.b)({setIsExpanded:Ot,processDropTarget:dt,dropSelection:ht,selectNext:ct,selectPrevious:at,setIsSelected:yt,endDrag:wt},e)}const jr=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(Oe.a)(In(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),o=function(){return e}),Object(Oe.a)(Dn(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var i=fr(t);return Object(Oe.a)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),
Object(Oe.a)(Dn(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function(e){return Yn({containerDisplayName:"DragSource",createHandler:i,registerHandler:ln,createConnector:function(e){return new rr(e)},createMonitor:function(e){return new ar(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}("node",{beginDrag:e=>{const{id:t,isDisabled:n,isSelected:r}=e;return n||r||e.setIsSelected(t,!0),e},endDrag:e=>e.endDrag()},e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()})),Dr=$n("node",{hover:(e,t,n)=>{if(!n)return;const r=n.getNode(),o=r.getBoundingClientRect(),i=o.bottom-o.top,s=t.getClientOffset();if(s){const t=s.y-o.top;let n,a;if(n=0===e.children.length?t=i/3&&t<2*i/3?"inside":"after",void 0!==e.getContainerElement){const t=e.getContainerElement().getBoundingClientRect();a={top:o.top-t.top,left:o.left-t.left,bottom:o.top-t.top+o.height,right:o.left-t.left+o.width,height:o.height,width:o.width}}else a={top:r.offsetTop,left:r.offsetLeft,bottom:r.offsetTop+r.offsetHeight,right:r.offsetLeft+r.offsetWidth,height:r.offsetHeight,width:r.offsetWidth};e.processDropTarget(e,n,s.x-o.left<48,a,e.isLastChild)}}},e=>({connectDropTarget:e.dropTarget()})),Ir=Object(G.b)(Tr,Er,null,{context:Cr})(jr(Dr(wr))),kr=Object(G.b)(Tr,Er,null,{context:Cr})(_r);var Mr=n("d700");function xr(e){return(xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pr(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return Object(Oe.a)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",e),Object(Oe.a)(Dn(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',t),function(n){var r=n,i=t.arePropsEqual,s=void 0===i?pn:i,a=r.displayName||r.name||"Component",c=function(t){Lr(i,t);var n=Br(i);function i(){var e;return Nr(this,i),(e=n.apply(this,arguments)).isCurrentlyMounted=!1,e.ref=Object(o.createRef)(),e.handleChange=function(){if(e.isCurrentlyMounted){var t=e.getCurrentState();pn(t,e.state)||e.setState(t)}},e}return Ar(i,[{key:"getDecoratedComponentInstance",value:function(){return Object(Oe.a)(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current}},{key:"shouldComponentUpdate",value:function(e,t){return!s(e,this.props)||!pn(t,this.state)}},{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)}},{key:"render",value:function(){var e=this;return Object(kn.jsx)(Mn.a.Consumer,{children:function(t){var n=t.dragDropManager;return void 0===n?null:(e.receiveDragDropManager(n),e.isCurrentlyMounted?Object(kn.jsx)(r,Object.assign({},e.props,e.state,{ref:Tn(r)?e.ref:null}),void 0):null)}},void 0)}},{key:"receiveDragDropManager",value:function(e){if(void 0===this.manager){this.manager=e,Object(Oe.a)("object"===xr(e),"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",a,a);var t=this.manager.getMonitor();this.unsubscribeFromOffsetChange=t.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=t.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function(){if(!this.manager)return{};var t=this.manager.getMonitor();return e(t,this.props)}}]),i}(o.Component);return c.displayName="DragLayer(".concat(a,")"),c.DecoratedComponent=n,Fn()(c,n)}}var Ur=n("AiMB");function Gr(e){const t=e(),n=Object(o.useRef)(t);n.current=t;const[r,i]=Object(o.useState)(n.current),s=Object(o.useRef)(null);return Object(o.useEffect)(()=>{
null===s.current&&(s.current=requestAnimationFrame(()=>{s.current=null,i(n.current)}))}),Object(o.useEffect)(()=>()=>{s.current&&cancelAnimationFrame(s.current)},[]),r}function Vr(e){const{dropTargetOffset:t,mousePosition:n}=e;if(!t)return{display:"none"};const{x:r,y:o}=t,i=n&&t?n.y-t.y:0,s=`translate(${r+(n&&t?n.x-t.x:0)}px, ${o+i}px)`;return{transform:s,WebkitTransform:s}}const Kr={top:0,left:0,position:"fixed",pointerEvents:"none",zIndex:100,opacity:.5,width:300,backgroundColor:"red"};const Wr=zr((function(e){return{isDragging:e.isDragging()&&"node"===e.getItemType(),mousePosition:e.getClientOffset(),dropTargetOffset:e.getSourceClientOffset()}}))(Object(G.b)((function(e){return{items:Gt(e)}}),null,null,{context:Cr})((function(e){const{items:t,isDragging:n,nodeRenderer:r,dragPreviewRenderer:o}=e;return Gr((function(){return n?i.a.createElement(Ur.a,null,i.a.createElement("div",{style:{...Kr,...Vr(e)}},t.map(e=>{if(o){const t=o;return i.a.createElement(t,{key:e.id,...e})}return i.a.createElement(kr,{id:e.id,key:e.id,nodeRenderer:r,isDragPreview:!0,isOffset:e.level>1})}))):null}))})));var qr=n("0lNN"),Yr=n("n9z6");const Zr=i.a.forwardRef((e,t)=>{const n=Object(o.useRef)(null);return e.connectDropTarget(n),Object(o.useImperativeHandle)(t,()=>({getNode:()=>Object(j.ensureNotNull)(n.current)}),[]),i.a.createElement("div",{ref:n,style:{height:"100%",width:"100%"}})}),Jr=$n("node",{hover:(e,t,n)=>{if(!n)return;const r=t.getClientOffset();if(null===r)return;const o=e.getOrderedNodes();if(0===o.length)return;const i=n.getNode().getBoundingClientRect(),s=e.getContainerElement().getBoundingClientRect();if("first"===e.type){const t={top:i.top-s.top+i.height,left:i.left-s.left,bottom:i.top-s.top+i.height,right:i.left-s.left+i.width,height:0,width:i.width};e.processDropTarget(o[0],"before",!1,t,!1)}if("last"===e.type){const t=r.x-i.left<48,n=o[o.length-1],a=t&&2===n.level?Object(j.ensureDefined)(o.find(e=>e.id===n.parentId)):n,c={top:i.top-s.top,left:i.left-s.left,bottom:i.top-s.top,right:i.left-s.left+i.width,height:i.height,width:i.width};e.processDropTarget(a,"after",t,c,!1)}}},e=>({connectDropTarget:e.dropTarget()}))(Zr),Xr=i.a.createContext({isOver:!1,transform:void 0});var Qr=n("4ceR");function $r(e){const{dropType:t,boundBox:n}=e,{top:r,bottom:o,left:i}=Object(j.ensureDefined)(n);return[i,"before"===t||"inside"===t?r:o]}const eo=zr((function(e){return{isDragging:e.isDragging()}}))(Object(G.b)((function(e){const{boundBox:t,dropType:n,node:r}=Et(e);return{boundBox:t,dropType:n,level:r?r.level:void 0}}),null,null,{context:Cr})((function(e){const{dropType:t,boundBox:n,isDragging:r,level:i,transform:s=$r}=e;return Gr((function(){if(!r||!t||!n)return null;const a={[Qr.dropTarget]:"inside"!==t,[Qr.dropTargetInside]:"inside"===t},{width:c,height:u}=n,[l,d]=s(e),h=`translate(${l}px, ${d}px)`;return o.createElement("div",{className:D(a),style:{position:"absolute",transform:h,WebkitTransform:h,top:0,left:2===i?"46px":0,width:2===i?c-46+"px":c,height:"inside"===t?u:"2px"}})}))}))),to=i.a.forwardRef((e,t)=>{
const n=Object(o.useContext)(Xr);return i.a.createElement("div",{...e,ref:t},e.children,n.isOver&&i.a.createElement(eo,{transform:n.transform}))});var no=n("Ialn"),ro=n("DGxW");const oo=38+pr.Modifiers.Shift,io=40+pr.Modifiers.Shift;const so=i.a.forwardRef((function(e,t){const{navigationKeys:n,renderList:r,stopMultiSelect:s,startMultiSelect:a,isMultiSelecting:c,nodeRenderer:u,dragPreviewRenderer:l,className:d,connectDropTarget:h,readOnly:f,onClick:p,dropLayerTransform:g,setFocusedNode:v,scrollToId:b,rowHeight:m,onMultiSelectPrevious:y,onMultiSelectNext:O,onMoveCursorToNext:S,onMoveCursorToPrevious:w,outerRef:_,width:C,height:T,isOver:E,processDropTarget:D}=e,k=Object(o.useContext)(P),M=Object(o.useRef)(null);Object(o.useEffect)(()=>{const e=e=>{[pr.Modifiers.Mod,pr.Modifiers.Shift].includes(Object(pr.modifiersFromEvent)(e))&&a()},t=e=>{c&&![pr.Modifiers.Mod,pr.Modifiers.Shift].includes(Object(pr.modifiersFromEvent)(e))&&s()};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),document.addEventListener("mousemove",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t),document.removeEventListener("mousemove",t)}},[c]),function(e){Object(o.useEffect)(()=>{if(tr.isEdge){let t=null;const n=Object(j.ensureNotNull)(e.current),r=e=>{if(e.target instanceof Element){const n=Object(j.ensureNotNull)(e.target.closest("[draggable]"));n instanceof HTMLElement&&(n.style.opacity="0",t=requestAnimationFrame(()=>n.style.opacity="1"))}};return n.addEventListener("dragstart",r),()=>{n.removeEventListener("dragstart",r),null!==t&&cancelAnimationFrame(t)}}return()=>{}},[])}(M);const x=Object(o.useCallback)(()=>Object(j.ensureNotNull)(W.current),[]),N=Object(o.useCallback)(()=>r,[r]),A=Object(o.useMemo)(()=>{const e=f?kr:Ir,t=[];let n;t.push({type:"padding",node:i.a.createElement(Jr,{type:"first",key:"padding-top",getContainerElement:x,getOrderedNodes:N,processDropTarget:D})});for(let o=0;o0,nodeRenderer:u,readOnly:f,onClick:p,isOffset:s.level>1,getContainerElement:x})})}return t.push({type:"padding",node:i.a.createElement(Jr,{type:"last",key:"padding-bottom",getContainerElement:x,getOrderedNodes:N,processDropTarget:D})}),t},[r]),L=Object(o.useRef)([]);L.current=A;const R=Object(o.useCallback)(e=>{let{style:t}=e;const{index:n}=e;return n===L.current.length-1&&(t={...t,bottom:0,minHeight:t.height},delete t.height),i.a.createElement("div",{style:t},L.current[n].node)},[]),B=Object(o.useCallback)(e=>{const t=L.current[e];return"padding"===t.type?6:"function"==typeof m?m(e,t):m},[m]),F=Object(o.useCallback)(e=>Object(j.ensure)(L.current[e].node.key),[]),H=Object(o.useMemo)(()=>null===b?{index:-1}:{index:L.current.findIndex(e=>e.node.key===b.id)},[b])
;h(M);const[z,U,G,V]=Object(Yr.a)(),K=Object(o.useRef)(null);Object(o.useEffect)(()=>Object(j.ensureNotNull)(K.current).resetAfterIndex(0,!0),[A]),Object(o.useEffect)(()=>Object(j.ensureNotNull)(K.current).scrollToItem(H.index),[H]);const W=Object(o.useRef)(null),q=Object(o.useMemo)(()=>({isOver:E,transform:g}),[E,g]),Y=Object(o.useRef)(null),Z=Object(o.useRef)({startScroll(e){const t=()=>{null!==G.current&&(Y.current=requestAnimationFrame(t),G.current.scrollBy({top:e}))};this.stopScroll(),t()},stopScroll(){null!==Y.current&&(cancelAnimationFrame(Y.current),Y.current=null)},getListElement:()=>G.current});return Object(o.useImperativeHandle)(t,()=>Z.current,[]),Object(o.useEffect)(()=>()=>Z.current.stopScroll(),[E]),i.a.createElement(Xr.Provider,{value:q},i.a.createElement("div",{...U,className:I()(ro.tree,d),ref:M,tabIndex:-1,onKeyDown:function(e){const t=Object(pr.hashFromEvent)(e);if(e.defaultPrevented||Object(Mr.a)(t,e.target))return;k||t!==oo||(e.preventDefault(),y());k||t!==io||(e.preventDefault(),O());(38===t||void 0!==n&&"previous"===n[t])&&(e.preventDefault(),w());(40===t||void 0!==n&&"next"===n[t])&&(e.preventDefault(),S());if((8===t||46===t)&&k){const{viewModel:e}=k,t=e.selection(),n=t.selected();if(1!==n.length)return;const r=e.getNextNodeIdAfterRemove(n[0]);if(null===r)return;e.onChange().subscribe(null,()=>{if(t.selected().length)return;const n=e.entity(r);n&&(t.set([n]),v(r))},!0)}}},i.a.createElement(qr.a,{...z,className:ro.overlayScrollWrap}),i.a.createElement(er.b,{ref:function(e){K.current=e},className:ro.listContainer,width:C,height:T,itemCount:A.length,itemSize:B,children:R,itemKey:F,outerRef:function(e){G.current=e,_&&_(e)},innerRef:function(e){W.current=e},innerElementType:to,onItemsRendered:function(){V()},overscanCount:20,direction:Object(no.isRtl)()?"rtl":"ltr"}),i.a.createElement(Wr,{dragPreviewRenderer:l,nodeRenderer:u})))})),ao=$n("node",{drop:(e,t,n)=>{("touch"===e.drag||tr.isFF)&&n.stopScroll(),t.getItem().dropSelection()},hover:(e,t,n)=>{if("touch"!==e.drag&&!tr.isFF)return;const r=t.getClientOffset();if(null===r)return;const o=n.getListElement();if(null===o)return;const i=o.getBoundingClientRect();((t,r,o)=>{const i=Math.abs(t-o),s=Math.abs(t-r);if(s>40&&i>40||i<=40&&s<=40)return void n.stopScroll();var a,c,u,l;a=s>20&&s<=40,u=i<=20,l=s<=20,(c=i>20&&i<=40)||a?"touch"===e.drag?n.startScroll(c?-5:5):n.startScroll(c?-2:2):(u||l)&&("touch"===e.drag?n.startScroll(u?-10:10):n.startScroll(u?-5:5))})(r.y,i.bottom,i.top)}},(e,t)=>({connectDropTarget:e.dropTarget(),isOver:t.isOver()}))(so);const co=Object(G.b)((function(e){return{renderList:Ut(e),orderedNodes:Ht(e),isMultiSelecting:Rt(e),selectedIds:At(e),scrollToId:Dt(e)}}),(function(e){return Object(nn.b)({startMultiSelect:gt,stopMultiSelect:vt,setFocusedNode:bt,processDropTarget:dt,onMoveCursorToNext:ct,onMoveCursorToPrevious:at,onMultiSelectPrevious:ut,onMultiSelectNext:lt},e)}),null,{context:Cr})(ao),uo={delayTouchStart:100};function lo(e){
const{canBeAddedToSelection:t,initState:n,onSelect:r,canMove:s,onDrop:a,onMove:c,nodes:u,selectedIds:l,onKeyboardSelect:d,saga:h,lastFocusedNodeObject:f,lastSyncTimestampRef:p,scrollToId:g,...v}=e,[b,m]=Object(o.useState)(null);return Object(o.useEffect)(()=>{const e=Object(U.b)();m(function(e){const t=Object(nn.a)(e);return Object(nn.e)(cn,t)}(e));const o=e.run(tn,{initState:n,onKeyboardSelect:d,saga:h,canMove:s,onMove:c,onDrop:a,onSelect:r,canBeAddedToSelection:t});return()=>o.cancel()},[]),Object(o.useEffect)(()=>(null!==b&&u&&(p&&(p.current=performance.now()),b.dispatch((e=>({type:Fe,nodes:e}))(u))),()=>{}),[b,u]),Object(o.useEffect)(()=>{null!==b&&l&&b.dispatch(ft(l))},[b,l]),Object(o.useEffect)(()=>{null!==b&&(null==f?void 0:f.id)&&b.dispatch(bt(f.id))},[b,f]),null===b?null:i.a.createElement(ho,{store:b,scrollToId:g,...v})}const ho=i.a.memo((function(e){const{store:t,scrollToId:n,...r}=e,s="touch"===e.drag?Pe:ye;return Object(o.useEffect)(()=>{var e;t.dispatch(mt(null!==(e=null==n?void 0:n.id)&&void 0!==e?e:null))},[n]),i.a.createElement(Ae.a,{backend:s,options:uo},i.a.createElement(G.a,{store:t,context:Cr},i.a.createElement(co,{...r})))}));function fo(e,t){Object(H.trackEvent)("Object Tree",e,t)}function po(e){return e.length>1?"Multi select":e[0].gaLabel()}function go(e){return Object(U.c)(t=>{const n={};return e.onChange().subscribe(n,()=>t({type:Ue})),e.onGroupCreated().subscribe(n,e=>t(Ot(e,!0))),e.selection().onChange().subscribe(n,e=>t(ft(e))),()=>{e.onChange().unsubscribeAll(n),e.selection().onChange().unsubscribeAll(n),e.onGroupCreated().unsubscribeAll(n)}},U.a.expanding())}function*vo(){for(;;)yield Object(T.g)([We,Ke]),fo("Select","Arrow")}function*bo(){for(;;){const{mode:e}=yield Object(T.g)(nt);1===e&&fo("Multi select","Ctrl"),2===e&&fo("Multi select","Shift")}}function*mo(e){for(;;){yield Object(T.g)(Ve);const{node:t,dropType:n}=Et(yield Object(T.f)());if(t){const r=Bt(yield Object(T.f)()),o=r.map(t=>Object(j.ensureNotNull)(e.entity(t.id)));let i="Drag";1===t.level&&"inside"!==n&&r.some(e=>2===e.level)?i="From the group":2!==t.level&&"inside"!==n||!r.some(e=>1===e.level)?1===r.length&&r[0].parentId!==t.parentId&&(i="Existing pane"):i="To the group",fo(i,po(o))}}}function*yo(e){yield Object(T.d)(vo),yield Object(T.d)(bo),yield Object(T.d)(mo,e)}function*Oo(e){yield Object(T.d)(yo,e);const t=yield Object(T.b)(go,e);on.logNormal("Opened object tree data source channel");try{for(;;){const e=yield Object(T.g)(t);yield Object(T.e)(e)}}finally{on.logNormal("Closed object tree data source channel"),t.close()}}var So=n("5VQP");const wo=o.createContext(null);var _o=n("XAms"),Co=n("9S1y"),To=n("h5pj");const Eo=E.mobiletouch?"touch":"native";function jo(e){const{viewModel:t,showHeader:n=!0,nodeRenderer:r,isDialog:s=!1}=e,a=Object(o.useRef)(null),c=function(e){const[t,n]=Object(o.useState)(e.getChartId()),r=Object(o.useRef)(t);return r.current=t,Object(o.useEffect)(()=>{return e.onChange().subscribe(null,t),()=>{e.onChange().unsubscribe(null,t)};function t(){const t=e.getChartId();r.current!==t&&n(t)}},[]),t
}(t),[u,l]=Object(Co.a)(),[d,h]=Object(o.useState)(null),f=Object(o.useMemo)(()=>({isTouch:E.touch,isDialog:s}),[s]);return i.a.createElement(wo.Provider,{value:f},i.a.createElement(P.Provider,{value:{viewModel:t}},i.a.createElement("div",{className:To.wrap,onContextMenu:_o.b},n&&i.a.createElement(z,null),i.a.createElement(C.a,{onMeasure:u},i.a.createElement("div",{className:To.space,onClick:function(e){if(e.defaultPrevented)return;if(!(e.target instanceof Element)||null===a.current)return;e.target===a.current&&t.selection().set([])}},null!==l&&i.a.createElement(lo,{key:c,height:l.height,width:l.width,canBeAddedToSelection:function(e){const n=t.entity(e);return t.selection().canBeAddedToSelection(n)},nodeRenderer:r,initState:function(){const{nodes:e,selection:n}=t.getState();return{selectedIds:n,nodes:e}},canMove:function(e,n,r){return t.isSelectionDropable(n.id,r)},drag:Eo,rowHeight:Do,onSelect:function(e){const n=e.map(e=>t.entity(e)).filter(e=>null!==e);t.selection().set(n);const r=So.ContextMenuManager.getShown();r&&r.hide()},onDrop:function(e){e.preventDefault();const{detail:{target:n,type:r}}=e;t.insertSelection(n,r)},scrollToId:d,saga:function*(){yield Object(T.d)(Oo,t)},onKeyboardSelect:function(e){h({id:e})},outerRef:function(e){a.current=e}}))))))}function Do(e,t){switch(t.type){case"node":return 38;case"separator":return 13}}var Io,ko=n("Kxc7");!function(e){e.Svg="svg",e.Text="text"}(Io||(Io={}));var Mo=n("wHCJ"),xo=n("WcWV");function No(e){const{className:t,disabled:n,...r}=e;return i.a.createElement(k.a,{className:I()(xo.button,n&&xo.disabled,t),...r})}var Po=n("To8B"),Ao=n("tyJc"),Lo=n("20cQ"),Ro=n("zn4F"),Bo=n("U+QY"),Fo=n("gSe6");function Ho(e){const{id:t}=e,n=Object(o.useContext)(P),{viewModel:r}=Object(j.ensureNotNull)(n),s=r.entity(t);return null===s?null:i.a.createElement(zo,{...e,entity:s})}function zo(e){const{id:t,isOffset:n,isDisabled:r,isSelected:s,isChildOfSelected:a,isHovered:c,parentId:u,entity:l,isExpanded:d}=e,h=Object(o.useContext)(P),f=Object(o.useContext)(wo),{size:p}=Object(o.useContext)(br),[g,v]=Object(o.useState)(!1),b=Object(o.useRef)(null),[m,O]=Object(o.useState)(l.title()),[S,w]=Object(o.useState)(l.isLocked()),[_,C]=Object(o.useState)(l.isVisible()),[T,E]=Object(o.useState)(l.isActualInterval()),[I,M]=Object(o.useState)(!1),[x,N]=Object(o.useState)(!1),A=Object(o.useRef)(null);Object(o.useEffect)(()=>{const e={};l.onLockChanged().subscribe(e,()=>w(l.isLocked())),l.onVisibilityChanged().subscribe(e,()=>C(l.isVisible()));const t=l.onTitleChanged();return t&&t.subscribe(e,()=>O(l.title())),l.onIsActualIntervalChange().subscribe(e,()=>E(l.isActualInterval())),()=>{l.onIsActualIntervalChange().unsubscribeAll(e),l.onLockChanged().unsubscribeAll(e),l.onVisibilityChanged().unsubscribeAll(e),t&&t.unsubscribeAll(e),A.current&&clearTimeout(A.current)}},[l]),Object(o.useEffect)(()=>{g&&b.current&&(b.current.focus(),b.current.setSelectionRange(0,m.length))},[g]),Object(o.useEffect)(()=>{const e={};return L.hoveredObjectChanged().subscribe(e,Z),()=>{
L.hoveredObjectChanged().unsubscribeAll(e)}},[d]),Object(o.useEffect)(()=>{L.setHoveredObject(c?t:null)},[c]),Object(o.useEffect)(()=>{!s&&A.current&&(clearTimeout(A.current),A.current=null),v(!1)},[s]);const{viewModel:L}=Object(j.ensureNotNull)(h),R=!_||S,B=l.getIcon(),F={};if(u){const e=L.entity(u);e&&(F["data-parent-name"]=e.title()),F["data-type"]=l.hasChildren()?"group":"data-source"}const H=ko.enabled("test_show_object_tree_debug")?`<${l.id()}> (${l.zOrder()})`:l.title(),z=c||I,U=g&&s,G=!!f&&f.isTouch,V=!!f&&f.isDialog,K=T&&_?Ro:Bo,W=l.hasChildren()?y.t("Group is hidden on current interval"):y.t("Drawing is hidden on current interval");return i.a.createElement("span",{className:D(Fo.wrap,R&&Fo.modifier,r&&Fo.disabled,s&&Fo.selected,n&&Fo.offset,a&&Fo.childOfSelected,I&&!r&&!s&&!a&&Fo.hover,V&&!r&&!s&&!a&&Fo.dialog),onMouseDown:function(e){g&&!Object(j.ensureNotNull)(b.current).contains(e.target)&&N(!0)},onClick:1===p?q:function(e){if(e.defaultPrevented)return;if(0!==Object(pr.modifiersFromEvent)(e))return;if(A.current)e.preventDefault(),clearTimeout(A.current),A.current=null,L.openProperties(l),N(!1);else{const e=L.selection().selected();A.current=setTimeout(()=>{A.current=null,s&&!x&&1===e.length&&L.rename(l,()=>v(!0)),N(!1)},500)}},onContextMenu:G?void 0:q},!U&&i.a.createElement(o.Fragment,null,B&&B.type===Io.Svg&&i.a.createElement(k.a,{icon:B.content||"",className:Fo.icon}),B&&B.type===Io.Text&&i.a.createElement("span",{className:D(Fo.icon,Fo.textIcon)},B.content),i.a.createElement("span",{className:D(Fo.title,L.isMain(l)&&Fo.main,(!l.isVisible()||!T)&&Fo.disabled),...F},H),(z||S||!_||G||!T)&&i.a.createElement("span",{className:D(Fo.rightButtons,l.canBeRemoved()&&Fo.twoButtons,l.canBeLocked()&&(z||S)&&Fo.threeButtons)},l.canBeLocked()&&(z||S)&&i.a.createElement(No,{icon:S?Ao:Lo,className:D(Fo.button,Fo.lockButton),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),L.setIsLocked(t,!l.isLocked())},"data-role":"button","data-name":"lock","data-active":S}),(z||!_||!T)&&i.a.createElement(No,{icon:K,className:D(Fo.button,Fo.viewButton,!T&&[Fo.warn,"apply-common-tooltip"]),onClick:T?function(e){if(e.defaultPrevented)return;e.preventDefault(),L.setIsVisible(t,!l.isVisible())}:void 0,title:T?void 0:W,disabled:!T,"data-role":"button","data-name":"hide","data-active":!_}),l.canBeRemoved()&&(G||z)&&i.a.createElement(No,{icon:Po,className:D(Fo.button,Fo.removeButton),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),e.stopPropagation(),L.remove(t)},"data-role":"button","data-name":"remove"}))),U&&i.a.createElement(Mo.a,{value:m,onChange:function(e){O(e.currentTarget.value)},onClick:_o.a,className:Fo.renameInput,onKeyDown:function(e){27===Object(pr.hashFromEvent)(e)?(e.preventDefault(),O(l.title()),v(!1)):13===Object(pr.hashFromEvent)(e)&&(e.preventDefault(),Y())},reference:function(e){b.current=e},onBlur:Y,onDragStart:function(e){e.preventDefault(),e.stopPropagation()},draggable:!0,stretch:!0}));function q(e){e.defaultPrevented||g||(e.preventDefault(),e.persist(),
L.openContextMenu(l,()=>v(!0),e))}function Y(){""!==m&&l.setName(m),O(l.title()),v(!1)}function Z(e){if(l.hasChildren()&&!d){const t=null!==e&&l.childrenIds().has(e);M(t)}else M(t===e)}}var Uo=n("4/GM");class Go extends i.a.PureComponent{constructor(e){super(e),this._isMounted=!1,this._dialogRef=i.a.createRef(),this._renderChildren=e=>i.a.createElement(Vo,{isSmallTablet:e,viewModel:this.props.viewModel}),this._handleMediaChange=()=>{this.state.showDrawer&&!window.matchMedia(S.a.TabletSmall).matches&&this.setState({showDrawer:!1})},this._onManageDrawings=e=>{throw new Error("not supported")},this._closeDrawer=()=>{this.setState({showDrawer:!1})},this._handleContextMenuOpened=e=>{this.setState({isContextMenuOpened:e})},this._matchMedia=window.matchMedia(S.a.TabletSmall),this.state={showDrawer:!1,showDialog:!1,isContextMenuOpened:!1}}componentDidMount(){this._isMounted=!0,this._matchMedia.addListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().subscribe(this._handleContextMenuOpened)}componentWillUnmount(){this._isMounted=!1,this._matchMedia.removeListener(this._handleMediaChange),this.props.viewModel.isContextMenuOpened().unsubscribe(this._handleContextMenuOpened)}render(){return i.a.createElement(i.a.Fragment,null,i.a.createElement(m.a,{rule:S.a.TabletSmall},e=>i.a.createElement(O.a,{additionalElementPos:"after",additionalHeaderElement:!1,className:Uo.dialog,dataName:"object-tree-dialog",isOpened:!0,onClickOutside:this.state.showDialog||e||this.state.isContextMenuOpened?()=>{}:this.props.onClose,onClose:this.props.onClose,ref:this._dialogRef,render:()=>this._renderChildren(e),title:Object(y.t)("Object tree"),showSeparator:!0})),i.a.createElement(b.b,null,this.state.showDrawer&&i.a.createElement(v.a,{onClose:this._closeDrawer,position:"Bottom"},i.a.createElement(w.a,{onClose:this._closeDrawer,chartWidget:this.props.activeChartWidget,isMobile:!0}))))}}function Vo(e){const{isSmallTablet:t,viewModel:n}=e,r=Object(o.useMemo)(()=>({size:t?1:0,smallSizeTreeNodeAction:0}),[t]);return i.a.createElement(br.Provider,{value:r},i.a.createElement(jo,{nodeRenderer:Ho,showHeader:!1,viewModel:n,isDialog:!0}))}var Ko=n("eqEH"),Wo=n("vPbs"),qo=n("aIyQ"),Yo=n.n(qo);function Zo(e){return e}var Jo=n("QrSB");function Xo(e,t){return`${e}:${t}`}class Qo{constructor(e){this._onChange=new Yo.a,this._recalculate=()=>{const e=this._groupModel.groups().map(e=>Xo(e.id,e.instanceId)),t=this._selectionApi.allSources();this._selected=this._selected.filter(n=>e.includes(n)||t.includes(n)),this._onChange.fire(this._selected)},this._model=e,this._selectionApi=new Jo.SelectionApi(this._model),this._groupModel=this._model.lineToolsGroupModel(),this._selected=this._getSelectedIds(),this._selectionApi.onChanged().subscribe(this,()=>{this._selected=this._getSelectedIds(),this._onChange.fire(this._selected)}),this._groupModel.onChanged().subscribe(this,this._recalculate)}destroy(){this._selectionApi.onChanged().unsubscribeAll(this),this._groupModel.onChanged().unsubscribeAll(this)}set(e){const t=[];let n=e.map(e=>e.id())
;for(const r of e)if(r.hasChildren()){const e=r.childrenIds();t.push(...Array.from(e.values()).map(Zo)),n=n.filter(t=>!e.has(t))}else t.push(r.id());this._selectionApi.set(t),this._selected=n,this._onChange.fire(this._selected)}canBeAddedToSelection(e){return null!==e&&e.canBeAddedToSelection()}onChange(){return this._onChange}selected(){return this._selected}_getSelectedIds(){return this._selectionApi.allSources().filter(e=>{const t=this._model.dataSourceForId(e);return null!==t&&t.showInObjectTree()})}}class $o{constructor(e,t){this._controller=e,this._facade=t,this._groupModel=e.model().lineToolsGroupModel()}buildTree(){const e={};for(const t of this._controller.model().panes()){const n=t.sourcesByGroup().all().filter(e=>e.showInObjectTree());e[t.id()]=ei(t.id(),0);for(const n of this._groupModel.groups()){const r=Xo(n.id,n.instanceId),o=Object(j.ensureNotNull)(this._facade.getObjectById(r));if(o.pane()===t){const r=[...n.lineTools()].sort((e,t)=>e.zorder()>t.zorder()?-1:1).map(e=>e.id());e[o.id()]=ei(o.id(),1,t.id(),r),e[t.id()].children.push(o.id());for(const t of r)e[t]=ei(t,2,o.id())}}for(const r of n)e[r.id()]||(e[r.id()]=ei(r.id(),1,t.id()),e[t.id()].children.push(r.id()));e[t.id()].children.sort((e,t)=>{const n=Object(j.ensureNotNull)(this._facade.getObjectById(e)),r=Object(j.ensureNotNull)(this._facade.getObjectById(t));return Object(j.ensureNotNull)(r.zOrder())-Object(j.ensureNotNull)(n.zOrder())})}return this._facade.invalidateCache(new Set(Object.keys(e))),e}}function ei(e,t,n,r=[]){return{id:e,level:t,parentId:n,children:r}}var ti=n("CW80"),ni=n("3ClC"),ri=n("fgLi"),oi=n("HZKX"),ii=n("Vbka"),si=n("dDxv"),ai=n("NhaM");const ci=Object(y.t)("Show {sourceTitle}"),ui=Object(y.t)("Hide {sourceTitle}"),li=Object(y.t)("Lock {sourceTitle}"),di=Object(y.t)("Unlock {sourceTitle}"),hi=Object(y.t)("Change {sourceType} title to {newSourceTitle}");function fi(e,t){return t.every(t=>!(t.pane()!==e&&!t.allowsMovingbetweenPanes()))}function pi(e){return e instanceof ri.DataSource&&e.showInObjectTree()?e.id():null}const gi=new Yo.a;class vi{constructor(e,t){this._syncStateChanged=new Yo.a,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._dataSource=t,Object(ti.isLineTool)(this._dataSource)&&this._dataSource.linkKey().subscribe(this._linkKeyChangedBound)}destroy(){Object(ti.isLineTool)(this._dataSource)&&this._dataSource.linkKey().unsubscribe(this._linkKeyChangedBound)}id(){return this._dataSource.id()}title(){return Object(ti.isLineTool)(this._dataSource)?this._dataSource.properties().title.value()||this._dataSource.translatedType():this._dataSource.title()}gaLabel(){return Object(ni.isStudy)(this._dataSource)?"Study":Object(ti.isLineTool)(this._dataSource)?"Drawing":"Symbol"}canBeLocked(){return Object(ti.isLineTool)(this._dataSource)&&this._dataSource.userEditEnabled()}canBeRemoved(){return this._undoModel.mainSeries()!==this._dataSource&&this._dataSource.isUserDeletable()}canBeHidden(){return this._dataSource.canBeHidden()}canBeRenamed(){return Object(ti.isLineTool)(this._dataSource)}
isVisible(){return this._dataSource.properties().visible.value()}isActualInterval(){return!Object(ti.isLineTool)(this._dataSource)&&!Object(ni.isStudy)(this._dataSource)||this._dataSource.isActualInterval()}onIsActualIntervalChange(){return Object(ti.isLineTool)(this._dataSource)||Object(ni.isStudy)(this._dataSource)?this._dataSource.onIsActualIntervalChange():gi}isLocked(){return!!Object(ti.isLineTool)(this._dataSource)&&this._dataSource.properties().frozen.value()}onVisibilityChanged(){return this._dataSource.properties().visible.listeners()}onLockChanged(){return Object(ti.isLineTool)(this._dataSource)?this._dataSource.properties().frozen.listeners():gi}getIcon(){const e=d,t=this._dataSource.getSourceIcon(),n=Object(ni.isStudyStrategy)(this._dataSource);let r={type:Io.Svg,content:n?ii:si};if(e&&t)if("loadSvg"===t.type){const[n,o]=t.svgId.split("."),i="linetool"===n?e.linetool[o]:e.series[Number(o)];r={type:Io.Svg,content:i||si}}else"text"===t.type&&(r={type:Io.Text,content:t.text});return r}setVisible(e){const t=(e?ci:ui).format({sourceTitle:this._dataSource.title()});this._undoModel.setProperty(this._dataSource.properties().visible,e,t)}setLocked(e){if(Object(ti.isLineTool)(this._dataSource)){const t=(e?li:di).format({sourceTitle:this._dataSource.translatedType()});this._undoModel.setProperty(this._dataSource.properties().frozen,e,t)}}setName(e){if(Object(ti.isLineTool)(this._dataSource)){const t=hi.format({sourceType:this._dataSource.properties().title.value()||this._dataSource.title(),newSourceTitle:e});this._undoModel.setProperty(this._dataSource.properties().title,e,t)}}isCopiable(){return this._dataSource.copiable()}isClonable(){return this._dataSource.cloneable()}zOrder(){return this._dataSource.zorder()}remove(){this._undoModel.removeSource(this._dataSource,!1)}canBeAddedToSelection(){return this._undoModel.selection().canBeAddedToSelection(this._dataSource)}setAsSelection(){this._undoModel.model().selectionMacro(e=>{e.clearSelection(),e.addSourceToSelection(this._dataSource)})}addToSelection(){this._undoModel.model().selectionMacro(e=>{e.addSourceToSelection(this._dataSource)})}addSourcesToArray(e){return e.push(this._dataSource),e}insertSourcesBeforeThis(e){this._insertSources(e,e=>this._undoModel.insertBefore(e,this._dataSource))}insertSourcesAfterThis(e){this._insertSources(e,e=>this._undoModel.insertAfter(e,this._dataSource))}childrenIds(){return new Set}hasChildren(){return!1}pane(){return Object(j.ensureNotNull)(this._undoModel.model().paneForSource(this._dataSource))}allowsMovingbetweenPanes(){return!Object(ti.isLineTool)(this._dataSource)}canBeAddedToGroup(){return Object(ti.isLineTool)(this._dataSource)}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}detachFromParent(){if(Object(ti.isLineTool)(this._dataSource)){const e=this._undoModel.model(),t=this._undoModel.lineToolsGroupController(),n=e.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==n&&t.excludeLineToolFromGroup(n,this._dataSource)}}onTitleChanged(){
const e=this._dataSource.properties().title;return e?e.listeners():void 0}canBeSyncedInLayout(){return Object(ti.isLineTool)(this._dataSource)&&this._dataSource.isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(!this.canBeSyncedInLayout())return;const t=this._dataSource;switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.copyToOtherCharts([t])}}getDrawingSyncState(){return this.canBeSyncedInLayout()?null!==this._dataSource.linkKey().value()?1:0:null}_linkKeyChanged(){this._syncStateChanged.fire(Object(j.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){const t=this._undoModel.model();if(!fi(this.pane(),e))return!1;if(Object(ti.isLineTool)(this._dataSource)){if(null!==t.lineToolsGroupModel().groupForLineTool(this._dataSource)&&e.some(e=>!e.canBeAddedToGroup()))return!1}return!0}_insertSources(e,t){const n=this._undoModel.model(),r=this._undoModel.lineToolsGroupController();this._undoModel.beginUndoMacro("Insert source(s) after");const o=()=>{e.forEach(e=>e.detachFromParent())},i=e.reduce((e,t)=>t.addSourcesToArray(e),[]);if(Object(ti.isLineTool)(this._dataSource)){const t=n.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==t?(Object(j.assert)(!e.some(e=>e.hasChildren())),i.forEach(e=>{Object(ti.isLineTool)(e)&&(t.containsLineTool(e)||r.addLineToolToGroup(t,e))})):o()}else o();t(i),this._undoModel.endUndoMacro()}}class bi{constructor(e,t){this._onTitleChanged=new Yo.a,this._onVisibilityChanged=new Yo.a,this._onLockChanged=new Yo.a,this._onIsActualIntervalChanged=new Yo.a,this._syncStateChanged=new Yo.a,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._group=t,this._lineTools=t.lineTools(),this._paneId=Object(j.ensureNotNull)(e.model().paneForSource(this._lineTools[0])).id();const n=()=>{this._lineTools.forEach(e=>{e.properties().visible.listeners().subscribe(this,()=>this._onVisibilityChanged.fire()),e.properties().frozen.listeners().subscribe(this,()=>this._onLockChanged.fire()),e.onIsActualIntervalChange().subscribe(this,()=>this._onIsActualIntervalChanged.fire())}),this._lineTools.length>0&&this._lineTools[0].linkKey().subscribe(this._linkKeyChangedBound)};this._group.onChanged().subscribe(this,e=>{this._unsubscribeFromAllLineTools(),this._lineTools=this._group.lineTools(),n(),e.lockedChanged&&this._onLockChanged.fire(),e.visibilityChanged&&this._onVisibilityChanged.fire(),e.titleChanged&&this._onTitleChanged.fire(),e.isActualIntervalChanged&&this._onIsActualIntervalChanged.fire()}),n(),this._lastActualZOrder=this.zOrder(),this._lastIsVisible=this.isVisible(),this._lastIsActualInterval=this.isActualInterval(),this._lastIsLocked=this.isLocked()}destroy(){this._unsubscribeFromAllLineTools(),this._group.onChanged().unsubscribeAll(this)}id(){return Xo(this._group.id,this._group.instanceId)}title(){return this._group.name()}gaLabel(){return"Group"}getIcon(){return{type:Io.Svg,content:ai}}canBeRemoved(){return!0
}canBeHidden(){return!0}canBeLocked(){return!0}canBeRenamed(){return!0}isVisible(){return this._group.lineTools().length>0&&(this._lastIsVisible="Invisible"!==this._group.visibility()),this._lastIsVisible}isActualInterval(){return this._group.lineTools().length>0&&(this._lastIsActualInterval=this._group.lineTools().some(e=>e.isActualInterval())),this._lastIsActualInterval}onIsActualIntervalChange(){return this._onIsActualIntervalChanged}isLocked(){return this._group.lineTools().length>0&&(this._lastIsLocked="Locked"===this._group.locked()),this._lastIsLocked}onTitleChanged(){return this._onTitleChanged}onVisibilityChanged(){return this._onVisibilityChanged}onLockChanged(){return this._onLockChanged}setVisible(e){this._undoModel.lineToolsGroupController().setGroupVisibility(this._group,e)}setLocked(e){this._undoModel.lineToolsGroupController().setGroupLock(this._group,e)}setName(e){this._undoModel.lineToolsGroupController().setGroupName(this._group,e)}isCopiable(){return!1}isClonable(){return!1}zOrder(){return this._group.lineTools().length>0&&(this._lastActualZOrder=this._group.lineTools()[0].zorder()),this._lastActualZOrder}remove(){this._undoModel.lineToolsGroupController().removeGroup(this._group)}canBeAddedToSelection(){const e=this._undoModel.model();return this._lineTools.every(t=>e.selection().canBeAddedToSelection(t))}setAsSelection(){this._undoModel.model().selectionMacro(e=>{e.clearSelection(),this._lineTools.forEach(t=>e.addSourceToSelection(t))})}addToSelection(){this._undoModel.model().selectionMacro(e=>{this._lineTools.forEach(t=>e.addSourceToSelection(t))})}addSourcesToArray(e){return e.push(...this._lineTools),e}detachFromParent(){}insertSourcesBeforeThis(e){const t=this._insertBeforeTarget();this._insertSources(e,e=>this._undoModel.insertBefore(e,t))}insertSourcesAfterThis(e){const t=this._insertAfterTarget();this._insertSources(e,e=>this._undoModel.insertAfter(e,t))}childrenIds(){const e=[...this._lineTools];return e.sort((e,t)=>t.zorder()-e.zorder()),new Set(e.map(e=>e.id()))}hasChildren(){return!0}pane(){return Object(j.ensureDefined)(this._undoModel.model().panes().find(e=>e.id()===this._paneId))}allowsMovingbetweenPanes(){return!1}canBeAddedToGroup(){return!1}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}canBeSyncedInLayout(){return this._lineTools.length>0&&this._lineTools[0].isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(!this.canBeSyncedInLayout())return;const t=this._lineTools[0];switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return;this._undoModel.copyToOtherCharts([t])}}getDrawingSyncState(){if(!this.canBeSyncedInLayout())return null;return null!==this._lineTools[0].linkKey().value()?1:0}_linkKeyChanged(){this._syncStateChanged.fire(Object(j.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){return fi(this.pane(),e)}_insertSources(e,t){
this._undoModel.beginUndoMacro("Insert source(s) after");const n=e.reduce((e,t)=>t.addSourcesToArray(e),[]);e.forEach(e=>e.detachFromParent()),t(n),this._undoModel.endUndoMacro()}_insertBeforeTarget(){return Object(j.ensureNotNull)(this._lineTools.reduce((e,t)=>null===e?t:e.zorder()null===e?t:e.zorder()>t.zorder()?e:t,null))}_unsubscribeFromAllLineTools(){this._lineTools.forEach(e=>{e.properties().visible.listeners().unsubscribeAll(this),e.properties().frozen.listeners().unsubscribeAll(this),e.onIsActualIntervalChange().unsubscribeAll(this)}),this._lineTools.length>0&&this._lineTools[0].linkKey().unsubscribe(this._linkKeyChangedBound)}}class mi{constructor(e){this._hoveredObjectChanged=new Yo.a,this._entitiesCache=new Map,this._undoModel=e,this._undoModel.model().hoveredSourceChanged().subscribe(this,this._onModelHoveredSourceChanged)}destroy(){for(const e of this._entitiesCache.values())null==e||e.destroy()}getObjectById(e){if(this._entitiesCache.has(e))return Object(j.ensureDefined)(this._entitiesCache.get(e));const t=this._createObjectById(e);return this._entitiesCache.set(e,t),t}invalidateCache(e){Array.from(this._entitiesCache.keys()).forEach(t=>{var n;e.has(t)||(null===(n=this._entitiesCache.get(t))||void 0===n||n.destroy(),this._entitiesCache.delete(t))})}canBeGroupped(e){if(0===e.length||1===e.length&&e[0].hasChildren())return!1;const t=[];if(e.forEach(e=>e.addSourcesToArray(t)),t.some(e=>!Object(ti.isLineTool)(e)))return!1;const n=this._undoModel.model(),r=t.map(e=>n.paneForSource(e));return new Set(r).size<2}contextMenuActions(e,t,n){const r=new oi.ActionsProvider(e,n),o=[];return t.forEach(e=>e.addSourcesToArray(o)),r.contextMenuActionsForSources(o)}insertBefore(e,t){t.insertSourcesAfterThis(e)}insertAfter(e,t){t.insertSourcesBeforeThis(e)}setHoveredObject(e){const t=this._undoModel.model();if(null===e)return void t.setHoveredSource(null,null);const n=t.dataSourceForId(e);null!==n&&t.setHoveredSource(n,null)}hoveredObjectId(){return pi(this._undoModel.model().hoveredSource())}hoveredObjectChanged(){return this._hoveredObjectChanged}_onModelHoveredSourceChanged(e){this._hoveredObjectChanged.fire(pi(e))}_createObjectById(e){const t=function(e){return 2===e.split(":").length}(e)?function(e){const t=e.split(":");return{persistentId:t[0],instanceId:t[1]}}(e).persistentId:e,n=this._undoModel.model(),r=n.dataSourceForId(t);if(null!==r)return new vi(this._undoModel,r);const o=n.lineToolsGroupModel().groupForId(t);return null!==o?new bi(this._undoModel,o):null}}var yi=n("7ktv"),Oi=n("7KDR"),Si=n("zRdu"),wi=n("hY0g"),_i=n.n(wi),Ci=n("fs3R"),Ti=n("qckB"),Ei=n("dmHa"),ji=n("ffaL"),Di=n("GjMU"),Ii=n("aVjL");const ki=Object(u.getLogger)("Platform.GUI.ObjectTree");function Mi(e){return e instanceof yi.PriceDataSource}class xi{constructor(e){this._nodes={},this._onChange=new Yo.a,this._onGroupCreated=new Yo.a,this._subscriptions=[],this._removeSourcesPromise=null,this._timeout=null,this._objects=[],this._options={
general:!0,mainSeries:!0,mainSeriesTrade:!0,esdStudies:!0,fundamentals:!0,studies:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!1,chartEvents:!0,objectTree:!1,gotoLineTool:!0},this._isContextMenuOpened=new _i.a(!1),this._getObjectsToModify=e=>{const t=this.selection().selected();return t.find(t=>t===e)?t.map(this._ensuredEntity):[this._ensuredEntity(e)]},this._onActiveChartChanged=()=>{this._cleanup(),this._init()},this._cleanup=()=>{null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._subscriptions.forEach(e=>{e.unsubscribeAll(this)}),this._selection.destroy(),this._chart.unsubscribe(this._onActiveChartChanged),null!==this._removeSourcesPromise&&this._removeSourcesPromise.cancel(),this._facade.destroy()},this._init=()=>{this._controller=this._chart.value().model(),this._groupController=this._controller.lineToolsGroupController(),this._model=this._controller.model(),this._groupModel=this._model.lineToolsGroupModel(),this._facade=new mi(this._controller),this._subscriptions=[this._model.mainSeries().onStyleChanged(),this._model.mainSeries().dataEvents().symbolResolved(),this._model.mainSeries().onIntervalChanged(),this._model.panesCollectionChanged(),this._model.dataSourceCollectionChanged(),this._groupModel.onChanged()],this._subscriptions.forEach(e=>{e.subscribe(this,this._update)}),this._chart.subscribe(this._onActiveChartChanged),this._selection=new Qo(this._model),this._update()},this._update=()=>{null===this._timeout&&(this._timeout=setTimeout(()=>{this._recalculateTree(),this._onChange.fire(),this._timeout=null}))},this._ensuredEntity=e=>Object(j.ensureNotNull)(this._getEntityById(e)),this._chart=e,this._init()}destroy(){this._cleanup()}getState(){return{nodes:Object.values(this._nodes),selection:this._selection.selected()}}getChartId(){return this._chart.value().id()}insertSelection(e,t){const n=this._facade,r=this.selection().selected().map(this._ensuredEntity),[o,i]=this._normalizeTargetAndDropType(e,t);this._controller.withMacro(Object(y.t)("Move objects"),()=>{switch(i){case"before":n.insertBefore(r,o);break;case"after":n.insertAfter(r,o)}}),this._update()}entity(e){return this._facade.getObjectById(e)}isMain(e){return e.id()===this._controller.mainSeries().id()}selection(){return this._selection}setIsLocked(e,t){const n=this._getObjectsToModify(e),r=(t?Object(y.t)("Lock"):Object(y.t)("Unlock"))+" "+Object(y.t)("objects");this._controller.withMacro(r,()=>{for(const e of n)e.setLocked(t)}),fo("Lock",po(n))}setIsVisible(e,t){const n=this._getObjectsToModify(e),r=(t?Object(y.t)("Show"):Object(y.t)("Hide"))+" "+Object(y.t)("objects");this._controller.withMacro(r,()=>{for(const e of n)e.setVisible(t)}),fo("Hide",po(n))}remove(e){const t=()=>{this._controller.withMacro(Object(y.t)("Remove objects"),()=>{for(const e of n)e.remove()}),fo("Delete",po(n)),this._update()},n=this._getObjectsToModify(e);t()}canSelectionBeGrouped(){const e=this._getSelectedEntities();return this._facade.canBeGroupped(e)}createGroupFromSelection(){
const e=this._groupController.createGroupFromSelection();fo("Create Group");const t=Xo(e.id,e.instanceId);this.selection().set([this._ensuredEntity(t)]),this._onGroupCreated.fire(t),this._update()}isSelectionDropable(e,t){const n=this.selection().selected().map(this._ensuredEntity),[r,o]=this._normalizeTargetAndDropType(e,t);switch(o){case"after":return r.canInsertAfterThis(n);case"before":return r.canInsertBeforeThis(n)}}onChange(){return this._onChange}onGroupCreated(){return this._onGroupCreated}isSelectionCloneable(){const e=this._getSelectedEntities();return e.length>0&&e.every(e=>e.isClonable())}isSelectionCopiable(){const e=this._getSelectedEntities();return e.length>0&&e.every(e=>e.isCopiable())}openProperties(e){const t=this._model.dataSourceForId(e.id());this.selection().set([e]),null!==t&&(this._controller.mainSeries()===t?this._chart.value().showGeneralChartProperties():(Object(ti.isLineTool)(t)||Object(ni.isStudy)(t))&&this._chart.value().showChartPropertiesForSource(t))}canSelectionBeUnmerged(){const e=this._getSelectedEntities();return 1===e.length&&this.canNodeWithIdBeUnmerged(e[0].id())}canNodeWithIdBeUnmerged(e){const t=this._model.dataSourceForId(e);return null!==t&&Mi(t)&&this._model.isUnmergeAvailableForSource(t)}unmergeSelectionUp(){this._unmergeSelection(0)}unmergeSelectionDown(){this._unmergeSelection(1)}copySelection(){const e=this._getSelectedEntities(),t=e.map(e=>Object(j.ensureNotNull)(this._model.dataSourceForId(e.id())));this._chart.value().chartWidgetCollection().clipboard.uiRequestCopy(t),fo("Copy",po(e))}cloneSelection(){const e=this._getSelectedEntities(),t=e.map(e=>Object(j.ensureNotNull)(this._model.dataSourceForId(e.id())));t.every(ti.isLineTool)&&(this._controller.cloneLineTools([...t],!1),fo("Clone",po(e)))}rename(e,t){const n=this._getObjectsToModify(e.id());1===n.length&&n.some(e=>e.canBeRenamed())&&(t(),fo("Rename",po(n)))}async openContextMenu(e,t,n){this._objects=this._getObjectsToModify(e.id());const r=this._facade.canBeGroupped(this._objects);let o;if(this._objects.some(e=>e.hasChildren()))o=this._getActionsForGroupItem(e,t,r);else{const e=await this._facade.contextMenuActions(this._chart.value(),this._objects,this._options);if(o=Array.from(e).filter((e,t,n)=>e.type!==Si.a.Separator||!n[t+1]||n[t+1].type!==Si.a.Separator),1===this._objects.length&&this._objects[0].canBeRenamed()){const e=o.findIndex(e=>"Copy"===e.id);o.splice(-1===e?o.length:e+1,0,this._getRenameAction(t))}if(r){const e=o.findIndex(e=>"Clone"===e.id);o.splice(-1===e?0:e,0,this._getGroupAction())}}o.length>0&&(this._chart.value().updateActions(),So.ContextMenuManager.createMenu(o,{takeFocus:!0,returnFocus:!0},()=>{this._isContextMenuOpened.setValue(!1)}).then(e=>{e.show(n),this._isContextMenuOpened.setValue(!0)}))}setHoveredObject(e){this._facade.setHoveredObject(e)}hoveredObjectChanged(){return this._facade.hoveredObjectChanged()}getNextNodeIdAfterRemove(e){var t;const{nodes:n}=this.getState(),r=n.find(t=>t.id===e),o=this.entity(e);if(!(r&&r.parentId&&o&&o.canBeRemoved()))return null
;if((null===(t=o.pane().mainDataSource())||void 0===t?void 0:t.id())===e&&!this.canNodeWithIdBeUnmerged(e)){const e=n.filter(e=>0===e.level).map(e=>e.id),t=this._takeNextOrPrevElement(e,r.parentId);return Object(j.ensureDefined)(n.find(e=>e.id===t)).children[0]}const i=Object(j.ensureDefined)(n.find(e=>e.id===r.parentId)).children;return 1===i.length?this.getNextNodeIdAfterRemove(r.parentId):this._takeNextOrPrevElement(i,e)}isContextMenuOpened(){return this._isContextMenuOpened.readonly()}_takeNextOrPrevElement(e,t){const n=e.indexOf(t);return e[n===e.length-1?n-1:n+1]}_getGroupAction(){return new Oi.Action({label:Object(y.t)("Create a group of drawings"),icon:B,onExecute:()=>{this.createGroupFromSelection()}})}_getRenameAction(e){return new Oi.Action({label:Object(y.t)("Rename"),icon:Di,onExecute:()=>{e(),fo("Context menu rename",po(this._objects))}})}_getActionsForGroupItem(e,t,n){const r=[new Oi.Action({label:e.isLocked()?Object(y.t)("Unlock"):Object(y.t)("Lock"),icon:e.isLocked()?Ci:Ti,onExecute:()=>this.setIsLocked(e.id(),!e.isLocked())}),new Oi.Action({label:e.isVisible()?Object(y.t)("Hide"):Object(y.t)("Show"),icon:e.isVisible()?Ei:ji,onExecute:()=>this.setIsVisible(e.id(),!e.isVisible())}),new Oi.Action({label:Object(y.t)("Remove"),icon:Ii,onExecute:()=>this.remove(e.id()),hotkeyHash:pr.isMacKeyboard?8:46})];return 1===this._objects.length&&(r.unshift(new Oi.Separator),r.unshift(this._getRenameAction(t))),n&&(r.unshift(new Oi.Separator),r.unshift(this._getGroupAction())),r}_unmergeSelection(e){const t=this._getSelectedEntities();if(1!==t.length)throw new Error("Only one object can be unmerged");const n=t[0],r=Object(j.ensureNotNull)(this._model.dataSourceForId(n.id()));if(!Mi(r))throw new Error("Entity is not IPriceDataSource");(0===e?this._controller.unmergeSourceUp:this._controller.unmergeSourceDown).call(this._controller,r);fo(0===e?"New pane above":"New pane below",po([n]))}_recalculateTree(){const e=new $o(this._controller,this._facade);this._nodes=e.buildTree()}_normalizeTargetAndDropType(e,t){let n=this._ensuredEntity(e);return"inside"===t&&(t="before",n=Object(j.ensureNotNull)(this.entity([...n.childrenIds()].shift()||""))),[n,t]}_getSelectedEntities(){const{selected:e,removed:t}=this._selection.selected().reduce((e,t)=>{const n=this._getEntityById(t);return n?(e.selected.push(n),e):(e.removed.push(t),e)},{selected:[],removed:[]});return t.length&&ki.logWarn("Detected dangling sources in selection. They will be ignored: "+JSON.stringify(t)),e}_getEntityById(e){return this._facade.getObjectById(e)}}var Ni=n("sQaR");n.d(t,"ObjectTreeDialogRenderer",(function(){return Pi}));class Pi extends Ni.a{constructor(){super(),this._handleClose=()=>{s.unmountComponentAtNode(this._container),this._setVisibility(!1),null!==this._viewModel&&(this._viewModel.destroy(),this._viewModel=null)};const e=Object(Ko.service)(Wo.CHART_WIDGET_COLLECTION_SERVICE);this._activeChartWidget=e.activeChartWidget.value(),this._viewModel=new xi(e.activeChartWidget)}hide(){this._handleClose()}isVisible(){return this.visible().value()}
show(){g().then(()=>{null!==this._viewModel&&(s.render(o.createElement(Go,{onClose:this._handleClose,viewModel:this._viewModel,activeChartWidget:this._activeChartWidget}),this._container),this._setVisibility(!0))})}}},yY3h:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.makeRequestCallFromTimer=o,t.makeRequestCallFromMutationObserver=i,t.makeRequestCall=void 0;const n=void 0!==e?e:self,r=n.MutationObserver||n.WebKitMutationObserver;function o(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function i(e){let t=1;const n=new r(e),o=document.createTextNode("");return n.observe(o,{characterData:!0}),function(){t=-t,o.data=t}}const s="function"==typeof r?i:o;t.makeRequestCall=s}).call(this,n("yLpj"))},zn4F:function(e,t){e.exports=''},zztK:function(e,t){e.exports=''}}]);