dash-tree-components 0.0.2__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/PKG-INFO +1 -1
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components/Tree.py +13 -4
- dash_tree_components-0.0.4/dash_tree_components/dash_tree_components.min.js +3 -0
- dash_tree_components-0.0.4/dash_tree_components/dash_tree_components.min.js.map +1 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components/metadata.json +30 -1
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components/package-info.json +1 -1
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components.egg-info/PKG-INFO +1 -1
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/package.json +1 -1
- dash_tree_components-0.0.2/dash_tree_components/dash_tree_components.min.js +0 -3
- dash_tree_components-0.0.2/dash_tree_components/dash_tree_components.min.js.map +0 -1
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/LICENSE +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/MANIFEST.in +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/README.md +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components/__init__.py +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components/_imports_.py +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components.egg-info/SOURCES.txt +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components.egg-info/dependency_links.txt +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/dash_tree_components.egg-info/top_level.txt +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/setup.cfg +0 -0
- {dash_tree_components-0.0.2 → dash_tree_components-0.0.4}/setup.py +0 -0
|
@@ -17,7 +17,7 @@ Keyword arguments:
|
|
|
17
17
|
- className (string; optional):
|
|
18
18
|
Class name of the tree.
|
|
19
19
|
|
|
20
|
-
-
|
|
20
|
+
- collapse_icon_color (string; default '#888888'):
|
|
21
21
|
Color of collapse icons.
|
|
22
22
|
|
|
23
23
|
- data (list; required):
|
|
@@ -29,9 +29,15 @@ Keyword arguments:
|
|
|
29
29
|
- indent (number; optional):
|
|
30
30
|
Indent of the Tree.
|
|
31
31
|
|
|
32
|
+
- node_icon_color (string; default '#424242'):
|
|
33
|
+
Color of collapse icons.
|
|
34
|
+
|
|
32
35
|
- open_by_default (boolean; default True):
|
|
33
36
|
Open Tree by default.
|
|
34
37
|
|
|
38
|
+
- overscan_count (number; optional):
|
|
39
|
+
Overscan count.
|
|
40
|
+
|
|
35
41
|
- padding (number; optional):
|
|
36
42
|
Padding.
|
|
37
43
|
|
|
@@ -47,6 +53,9 @@ Keyword arguments:
|
|
|
47
53
|
- row_height (number; optional):
|
|
48
54
|
The height of the rows.
|
|
49
55
|
|
|
56
|
+
- searchable (boolean; default True):
|
|
57
|
+
Whether to include a search bar.
|
|
58
|
+
|
|
50
59
|
- width (number; optional):
|
|
51
60
|
The width of the Tree."""
|
|
52
61
|
_children_props = []
|
|
@@ -54,10 +63,10 @@ Keyword arguments:
|
|
|
54
63
|
_namespace = 'dash_tree_components'
|
|
55
64
|
_type = 'Tree'
|
|
56
65
|
@_explicitize_args
|
|
57
|
-
def __init__(self, id=Component.UNDEFINED, data=Component.REQUIRED, width=Component.UNDEFINED, height=Component.UNDEFINED, row_height=Component.UNDEFINED, indent=Component.UNDEFINED, padding_top=Component.UNDEFINED, padding_bottom=Component.UNDEFINED, padding=Component.UNDEFINED,
|
|
58
|
-
self._prop_names = ['id', 'className', '
|
|
66
|
+
def __init__(self, id=Component.UNDEFINED, data=Component.REQUIRED, width=Component.UNDEFINED, height=Component.UNDEFINED, row_height=Component.UNDEFINED, overscan_count=Component.UNDEFINED, indent=Component.UNDEFINED, padding_top=Component.UNDEFINED, padding_bottom=Component.UNDEFINED, padding=Component.UNDEFINED, collapse_icon_color=Component.UNDEFINED, node_icon_color=Component.UNDEFINED, open_by_default=Component.UNDEFINED, searchable=Component.UNDEFINED, className=Component.UNDEFINED, rowClassName=Component.UNDEFINED, **kwargs):
|
|
67
|
+
self._prop_names = ['id', 'className', 'collapse_icon_color', 'data', 'height', 'indent', 'node_icon_color', 'open_by_default', 'overscan_count', 'padding', 'padding_bottom', 'padding_top', 'rowClassName', 'row_height', 'searchable', 'width']
|
|
59
68
|
self._valid_wildcard_attributes = []
|
|
60
|
-
self.available_properties = ['id', 'className', '
|
|
69
|
+
self.available_properties = ['id', 'className', 'collapse_icon_color', 'data', 'height', 'indent', 'node_icon_color', 'open_by_default', 'overscan_count', 'padding', 'padding_bottom', 'padding_top', 'rowClassName', 'row_height', 'searchable', 'width']
|
|
61
70
|
self.available_wildcard_properties = []
|
|
62
71
|
_explicit_args = kwargs.pop('_explicit_args')
|
|
63
72
|
_locals = locals()
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see dash_tree_components.min.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var e={405:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(354),i=r.n(n),o=r(314),s=r.n(o)()(i());s.push([e.id,'[role="treeitem"] {\n transition: top 0.2s ease-in;\n}\n\n.tree-node-text, .tree-collapse, .tree-node-container, .tree-node-content, .tree-file-folder-icon, .tree-collapse {\n height: inherit;\n align-items: center;\n display: flex;\n}\n\n.tree-file-folder-icon {\n margin-left: 3px;\n margin-right: 3px;\n}\n\na.tree-node-leaf-text {\n text-decoration: none;\n}\n\n.tree-search-input {\n border-radius: 10px;\n}\n',"",{version:3,sources:["webpack://./src/lib/styles.css"],names:[],mappings:"AAAA;EACE,4BAA4B;AAC9B;;AAEA;IACI,eAAe;IACf,mBAAmB;IACnB,aAAa;AACjB;;AAEA;IACI,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,mBAAmB;AACvB",sourcesContent:['[role="treeitem"] {\n transition: top 0.2s ease-in;\n}\n\n.tree-node-text, .tree-collapse, .tree-node-container, .tree-node-content, .tree-file-folder-icon, .tree-collapse {\n height: inherit;\n align-items: center;\n display: flex;\n}\n\n.tree-file-folder-icon {\n margin-left: 3px;\n margin-right: 3px;\n}\n\na.tree-node-leaf-text {\n text-decoration: none;\n}\n\n.tree-search-input {\n border-radius: 10px;\n}\n'],sourceRoot:""}]);const a=s},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&s[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},354:e=>{e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),o="/*# ".concat(i," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},17:e=>{e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},20:(e,t,r)=>{var n=r(609),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,o={},c=null,l=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,n)&&!u.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:c,ref:l,props:o,_owner:s.current}}t.jsx=c,t.jsxs=c},848:(e,t,r)=>{e.exports=r(20)},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},s=[],a=0;a<e.length;a++){var u=e[a],c=n.base?u[0]+n.base:u[0],l=o[c]||0,d="".concat(c," ").concat(l);o[c]=l+1;var f=r(d),h={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==f)t[f].references++,t[f].updater(h);else{var p=i(h,n);n.byIndex=a,t.splice(a,0,{identifier:d,updater:p,references:1})}s.push(d)}return s}function i(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var o=n(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=r(o[s]);t[a].references--}for(var u=n(e,i),c=0;c<o.length;c++){var l=r(o[c]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}o=u}}},659:e=>{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},63:(e,t,r)=>{var n=r(609),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,s=n.useEffect,a=n.useLayoutEffect,u=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return a((function(){i.value=r,i.getSnapshot=t,c(i)&&l({inst:i})}),[e,r,t]),s((function(){return c(i)&&l({inst:i}),e((function(){c(i)&&l({inst:i})}))}),[e]),u(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},888:(e,t,r)=>{e.exports=r(63)},609:e=>{e.exports=window.React}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n,i=function(){var e=document.currentScript;if(!e){for(var t=document.getElementsByTagName("script"),r=[],n=0;n<t.length;n++)r.push(t[n]);e=(r=r.filter((function(e){return!e.async&&!e.text&&!e.textContent}))).slice(-1)[0]}return e};if(Object.defineProperty(r,"p",{get:(n=i().src.split("/").slice(0,-1).join("/")+"/",function(){return n})}),"undefined"!=typeof jsonpScriptSrc){var o=jsonpScriptSrc;jsonpScriptSrc=function(e){var t,r=(t=i(),/\/_dash-component-suites\//.test(t.src)),n=o(e);if(!r)return n;var s=n.split("/"),a=s.slice(-1)[0].split(".");return a.splice(1,0,"v0_0_3m1729080829"),s.splice(-1,1,a.join(".")),s.join("/")}}r.nc=void 0;var s={};r.r(s),r.d(s,{Tree:()=>Qi});var a={};r.r(a),r.d(a,{T_:()=>k,$s:()=>w,as:()=>x,Mi:()=>j,IO:()=>N,ES:()=>L,Bf:()=>H,ls:()=>R,yQ:()=>A,qh:()=>T,Lx:()=>I,K9:()=>E,WZ:()=>S,J4:()=>D,FS:()=>_,fm:()=>M,GG:()=>C});var u={};r.r(u),r.d(u,{FILE:()=>gr,HTML:()=>mr,TEXT:()=>yr,URL:()=>vr});var c=r(609),l=r.n(c);const d=window.PropTypes;var f=r.n(d),h=r(848),p=r(888);const g=(0,c.createContext)(null);function v(){const e=(0,c.useContext)(g);if(null===e)throw new Error("No Tree Api Provided");return e}const y=(0,c.createContext)(null),m=(0,c.createContext)(null),b=(0,c.createContext)(0);function O(){(0,c.useContext)(b)}function w(e,t,r){return Math.max(Math.min(e,r),t)}function S(e){return e&&e.isLeaf}function I(e){return e&&e.isInternal&&!e.isOpen}function D(e){var t;return e&&e.isOpen&&!(null===(t=e.children)||void 0===t?void 0:t.length)}const E=(e,t)=>{let r=e;for(;r;){if(r.id===t.id)return!0;r=r.parent}return!1},T=e=>{if(!e.parent)throw Error("Node does not have a parent");return e.parent.children.findIndex((t=>t.id===e.id))};function x(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let r of e.children){const e=x(r,t);if(e)return e}return null}function C(e,t){if(t(e),e.children)for(let r of e.children)C(r,t)}function j(e){const t=P(e);let r;for(let o=0;o<t.length;++o)if(t[o]===e){r=(i=o)+1<(n=t).length?n[i+1]:n[0];break}var n,i;null==r||r.focus()}function N(e){const t=P(e);let r;for(let o=0;o<t.length;++o)if(t[o]===e){n=t,r=(i=o)-1>=0?n[i-1]:n[n.length-1];break}var n,i;null==r||r.focus()}function P(e){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter((t=>t===e||!e.contains(t)))}function k(e,t){return"boolean"==typeof t?t:"string"==typeof t?e[t]:t(e)}function A(e){return null===e?null:R(e)}function R(e){return"string"==typeof e?e:e.id}function _(e,...t){if(e)return e(...t)}function M(e){return new Promise(((t,r)=>{let n=0;!function i(){n+=1,100===n&&r(),e()?t():setTimeout(i,10)}()}))}function L(e){var t,r;const n=e.focusedNode;return n?n.isOpen?0:n.parent?n.childIndex+1:0:null!==(r=null===(t=e.root.children)||void 0===t?void 0:t.length)&&void 0!==r?r:0}function H(e){const t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}const F={display:"flex",alignItems:"center",zIndex:1},B={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},U={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},z=l().memo((function({top:e,left:t,indent:r}){const n={position:"absolute",pointerEvents:"none",top:e-2+"px",left:t+"px",right:r+"px"};return(0,h.jsxs)("div",{style:Object.assign(Object.assign({},F),n),children:[(0,h.jsx)("div",{style:Object.assign({},U)}),(0,h.jsx)("div",{style:Object.assign({},B)})]})}));function W({node:e,attrs:t,innerRef:r,children:n}){return(0,h.jsx)("div",Object.assign({},t,{ref:r,onFocus:e=>e.stopPropagation(),onClick:e.handleClick,children:n}))}function V(e){return(0,h.jsxs)("div",{ref:e.dragHandle,style:e.style,children:[(0,h.jsx)("span",{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?"🌳":e.node.isOpen?"🗁":"🗀"})," ",e.node.isEditing?(0,h.jsx)(K,Object.assign({},e)):(0,h.jsx)(G,Object.assign({},e))]})}function G(e){return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("span",{children:e.node.data.name})})}function K({node:e}){const t=(0,c.useRef)();return(0,c.useEffect)((()=>{var e,r;null===(e=t.current)||void 0===e||e.focus(),null===(r=t.current)||void 0===r||r.select()}),[]),(0,h.jsx)("input",{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:r=>{var n;"Escape"===r.key&&e.reset(),"Enter"===r.key&&e.submit((null===(n=t.current)||void 0===n?void 0:n.value)||"")}})}function q(e){return{type:"EDIT",id:e}}function Y(e){return{type:"FOCUS",id:e}}class ${constructor(e){this.handleClick=e=>{e.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():e.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===X}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return!this.isLeaf&&this.tree.isOpen(this.id)}get isClosed(){return!this.isLeaf&&!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(null===(e=this.prev)||void 0===e?void 0:e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(null===(e=this.next)||void 0===e?void 0:e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex((e=>e.id===this.id)):-1}get next(){return null===this.rowIndex?null:this.tree.at(this.rowIndex+1)}get prev(){return null===this.rowIndex?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,t;const r=this.childIndex;return null!==(t=null===(e=this.parent)||void 0===e?void 0:e.children[r+1])&&void 0!==t?t:null}isAncestorOf(e){if(!e)return!1;let t=e;for(;t;){if(t.id===this.id)return!0;t=t.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new $(Object.assign({},this))}edit(){return this.tree.edit(this)}}const X="__REACT_ARBORIST_INTERNAL_ROOT__";function J(e){var t;function r(t,n,i){const o=e.accessId(t),s=new $({tree:e,data:t,level:n,parent:i,id:o,children:null,isDraggable:e.isDraggable(t),rowIndex:null}),a=e.accessChildren(t);return a&&(s.children=a.map((e=>r(e,n+1,s)))),s}const n=new $({tree:e,id:X,data:{id:X},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=null!==(t=e.props.data)&&void 0!==t?t:[];return n.children=i.map((e=>r(e,0,n))),n}const Q=(e,t)=>({type:"VISIBILITY_OPEN",id:e,filtered:t}),Z=(e,t)=>({type:"VISIBILITY_CLOSE",id:e,filtered:t}),ee=e=>({type:"VISIBILITY_CLEAR",filtered:e});function te(e={},t){if("VISIBILITY_OPEN"===t.type)return Object.assign(Object.assign({},e),{[t.id]:!0});if("VISIBILITY_CLOSE"===t.type)return Object.assign(Object.assign({},e),{[t.id]:!1});if("VISIBILITY_TOGGLE"===t.type){const r=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!r})}return"VISIBILITY_CLEAR"===t.type?{}:e}const re=e=>{var t;return{nodes:{open:{filtered:{},unfiltered:null!==(t=null==e?void 0:e.initialOpenState)&&void 0!==t?t:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},ne=e=>({type:"SELECTION_ADD",ids:(Array.isArray(e)?e:[e]).map(R)}),ie=e=>({type:"SELECTION_REMOVE",ids:(Array.isArray(e)?e:[e]).map(R)}),oe=e=>({type:"SELECTION_MOST_RECENT",id:null===e?null:R(e)}),se=e=>({type:"SELECTION_ANCHOR",id:null===e?null:R(e)}),ae=e=>({type:"DND_CURSOR",cursor:e}),ue=(e,t)=>({type:"DND_DRAG_START",id:e,dragIds:t}),ce=()=>({type:"DND_DRAG_END"}),le=(e,t)=>({type:"DND_HOVERING",parentId:e,index:t}),de={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},fe=e=>{if(!e)return{display:"none"};const{x:t,y:r}=e;return{transform:`translate(${t}px, ${r}px)`}},he=e=>{if(!e)return{display:"none"};const{x:t,y:r}=e;return{transform:`translate(${t+10}px, ${r+10}px)`}};function pe({offset:e,mouse:t,id:r,dragIds:n,isDragging:i}){return(0,h.jsxs)(ge,{isDragging:i,children:[(0,h.jsx)(ve,{offset:e,children:(0,h.jsx)(me,{id:r,dragIds:n})}),(0,h.jsx)(ye,{mouse:t,count:n.length})]})}const ge=(0,c.memo)((function(e){return e.isDragging?(0,h.jsx)("div",{style:de,children:e.children}):null}));function ve(e){return(0,h.jsx)("div",{className:"row preview",style:fe(e.offset),children:e.children})}function ye(e){const{count:t,mouse:r}=e;return t>1?(0,h.jsx)("div",{className:"selected-count",style:he(r),children:t}):null}const me=(0,c.memo)((function(e){const t=v(),r=t.get(e.id);return r?(0,h.jsx)(t.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*t.indent,opacity:.2,background:"transparent"},tree:t}):null}));function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},be.apply(null,arguments)}function Oe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},we(e,t)}var Se=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Ie(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!((n=e[r])===(i=t[r])||Se(n)&&Se(i)))return!1;var n,i;return!0}const De=function(e,t){var r;void 0===t&&(t=Ie);var n,i=[],o=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o&&r===this&&t(s,i)||(n=e.apply(this,s),o=!0,r=this,i=s),n}};var Ee="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Te(e){cancelAnimationFrame(e.id)}var xe=-1;function Ce(e){if(void 0===e&&(e=!1),-1===xe||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),xe=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return xe}var je=null;function Ne(e){if(void 0===e&&(e=!1),null===je||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?je="positive-descending":(t.scrollLeft=1,je=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),je}return je}var Pe=function(e,t){return e};function ke(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,a=e.getStopIndexForStartIndex,u=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=u(n.props,Oe(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:Oe(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=De((function(e,t,r,i){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:i})})),n._callOnScroll=void 0,n._callOnScroll=De((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,o=n.props,s=o.direction,a=o.itemSize,u=o.layout,c=n._getItemStyleCache(l&&a,l&&u,l&&s);if(c.hasOwnProperty(e))t=c[e];else{var d=r(n.props,e,n._instanceProps),f=i(n.props,e,n._instanceProps),h="horizontal"===s||"horizontal"===u,p="rtl"===s,g=h?d:0;c[e]=t={position:"absolute",left:p?void 0:g,right:p?g:void 0,top:h?0:d,height:h?"100%":f,width:h?f:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=De((function(e,t,r){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===i)return null;var t=n.props.direction,s=i;if("rtl"===t)switch(Ne()){case"negative":s=-i;break;case"positive-descending":s=o-r-i}return s=Math.max(0,Math.min(s,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<s?"forward":"backward",scrollOffset:s,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;n.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){var e,t,r,i;null!==n._resetIsScrollingTimeoutId&&Te(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=(e=n._resetIsScrolling,t=150,r=Ee(),i={id:requestAnimationFrame((function n(){Ee()-r>=t?e.call(null):i.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}var f,h;h=e,(f=t).prototype=Object.create(h.prototype),f.prototype.constructor=f,we(f,h),t.getDerivedStateFromProps=function(e,t){return Ae(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var r=this.props,n=r.itemCount,i=r.layout,s=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1));var a=0;if(this._outerRef){var u=this._outerRef;a="vertical"===i?u.scrollWidth>u.clientWidth?Ce():0:u.scrollHeight>u.clientHeight?Ce():0}this.scrollTo(o(this.props,e,t,s,this._instanceProps,a))},p.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===n?i.scrollLeft=r:i.scrollTop=r}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,i=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(Ne()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var s=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-s-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Te(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,r=e.className,i=e.direction,o=e.height,s=e.innerRef,a=e.innerElementType,u=e.innerTagName,l=e.itemCount,d=e.itemData,f=e.itemKey,h=void 0===f?Pe:f,p=e.layout,g=e.outerElementType,v=e.outerTagName,y=e.style,m=e.useIsScrolling,b=e.width,O=this.state.isScrolling,w="horizontal"===i||"horizontal"===p,S=w?this._onScrollHorizontal:this._onScrollVertical,I=this._getRangeToRender(),D=I[0],E=I[1],T=[];if(l>0)for(var x=D;x<=E;x++)T.push((0,c.createElement)(t,{data:d,key:h(x,d),index:x,isScrolling:m?O:void 0,style:this._getItemStyle(x)}));var C=n(this.props,this._instanceProps);return(0,c.createElement)(g||v||"div",{className:r,onScroll:S,ref:this._outerRefSetter,style:be({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},(0,c.createElement)(a||u||"div",{children:T,ref:s,style:{height:w?"100%":C,pointerEvents:O?"none":void 0,width:w?C:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],i=e[3];this._callOnItemsRendered(t,r,n,i)}if("function"==typeof this.props.onScroll){var o=this.state,s=o.scrollDirection,a=o.scrollOffset,u=o.scrollUpdateWasRequested;this._callOnScroll(s,a,u)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,i=n.isScrolling,o=n.scrollDirection,u=n.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,u,this._instanceProps),l=a(this.props,c,u,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,r),f=i&&"forward"!==o?1:Math.max(1,r);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,l+f)),c,l]},t}(c.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Ae=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Re=ke({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,r,n,i,o){var s=e.direction,a=e.height,u=e.itemCount,c=e.itemSize,l=e.layout,d=e.width,f="horizontal"===s||"horizontal"===l?d:a,h=Math.max(0,u*c-f),p=Math.min(h,t*c),g=Math.max(0,t*c-f+c+o);switch("smart"===r&&(r=n>=g-f&&n<=p+f?"auto":"center"),r){case"start":return p;case"end":return g;case"center":var v=Math.round(g+(p-g)/2);return v<Math.ceil(f/2)?0:v>h+Math.floor(f/2)?h:v;default:return n>=g&&n<=p?n:n<g?g:p}},getStartIndexForOffset:function(e,t){var r=e.itemCount,n=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getStopIndexForStartIndex:function(e,t,r){var n=e.direction,i=e.height,o=e.itemCount,s=e.itemSize,a=e.layout,u=e.width,c=t*s,l="horizontal"===n||"horizontal"===a?u:i,d=Math.ceil((l+r-c)/s);return Math.max(0,Math.min(o-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function _e(){var e,t;const r=v(),n=function(){const e=(0,c.useContext)(m);if(null===e)throw new Error("Provide a DnDContext");return e}().cursor;if(!n||"line"!==n.type)return null;const i=r.indent,o=r.rowHeight*n.index+(null!==(t=null!==(e=r.props.padding)&&void 0!==e?e:r.props.paddingTop)&&void 0!==t?t:0),s=i*n.level,a=r.renderCursor;return(0,h.jsx)(a,{top:o,left:s,indent:i})}const Me=(0,c.forwardRef)((function(e,t){const{children:r}=e,n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["children"]),i=v();return(0,h.jsxs)("div",Object.assign({ref:t},n,{onClick:e=>{e.currentTarget===e.target&&i.deselectAll()},children:[(0,h.jsx)(Le,{}),r]}))})),Le=()=>{const e=v();return(0,h.jsx)("div",{style:{height:e.visibleNodes.length*e.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:(0,h.jsx)(_e,{})})};const He=(0,c.forwardRef)((function(e,t){var r,n,i,o,{style:s}=e,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["style"]);const u=v(),c=null!==(n=null!==(r=u.props.padding)&&void 0!==r?r:u.props.paddingTop)&&void 0!==n?n:0,l=null!==(o=null!==(i=u.props.padding)&&void 0!==i?i:u.props.paddingBottom)&&void 0!==o?o:0;return(0,h.jsx)("div",Object.assign({ref:t,style:Object.assign(Object.assign({},s),{height:`${parseFloat(s.height)+c+l}px`})},a))}));var Fe="undefined"!=typeof window?c.useLayoutEffect:c.useEffect;function Be(e){return Be="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},Be(e)}function Ue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ze(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var We=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ze(this,"spec",void 0),ze(this,"monitor",void 0),ze(this,"connector",void 0),this.spec=t,this.monitor=r,this.connector=n}var t,r;return t=e,(r=[{key:"beginDrag",value:function(){var e,t=this.spec,r=this.monitor;return null!==(e="object"===Be(t.item)?t.item:"function"==typeof t.item?t.item(r):{})&&void 0!==e?e:null}},{key:"canDrag",value:function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}},{key:"isDragging",value:function(e,t){var r=this.spec,n=this.monitor,i=r.isDragging;return i?i(n):t===e.getSourceId()}},{key:"endDrag",value:function(){var e=this.spec,t=this.monitor,r=this.connector,n=e.end;n&&n(t.getItem(),t),r.reconnect()}}])&&Ue(t.prototype,r),e}();function Ve(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if(!e){var o;if(void 0===t)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(o=new Error(t.replace(/%s/g,(function(){return n[s++]})))).name="Invariant Violation"}throw o.framesToPop=1,o}}var Ge=(0,c.createContext)({dragDropManager:void 0});function Ke(){var e=(0,c.useContext)(Ge).dragDropManager;return Ve(null!=e,"Expected drag drop context"),e}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ye(e,t,r){var n=Ke(),i=function(e,t,r){var n=(0,c.useMemo)((function(){return new We(e,t,r)}),[t,r]);return(0,c.useEffect)((function(){n.spec=e}),[e]),n}(e,t,r),o=function(e){return(0,c.useMemo)((function(){var t=e.type;return Ve(null!=t,"spec.type must be defined"),t}),[e])}(e);Fe((function(){if(null!=o){var e=function(e,t,r){var n=r.getRegistry(),i=n.addSource(e,t);return[i,function(){return n.removeSource(i)}]}(o,i,n),s=(l=2,function(e){if(Array.isArray(e))return e}(c=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(c,l)||function(e,t){if(e){if("string"==typeof e)return qe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qe(e,t):void 0}}(c,l)||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.")}()),a=s[0],u=s[1];return t.receiveHandlerId(a),r.receiveHandlerId(a),u}var c,l}),[n,t,r,i,o])}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xe(e,t){var r,n=function(e){if(Array.isArray(e))return $e(e)}(r=t||[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return $e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$e(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return null==t&&"function"!=typeof e&&n.push(e),(0,c.useMemo)((function(){return"function"==typeof e?e():e}),n)}function Je(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ze=!1,et=!1,tt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qe(this,"internalMonitor",void 0),Qe(this,"sourceId",null),this.internalMonitor=t.getMonitor()}var t,r;return t=e,r=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){Ve(!Ze,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ze=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ze=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;Ve(!et,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return et=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{et=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}],r&&Je(t.prototype,r),e}();function rt(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{var i=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,c.isValidElement)(t)){var n=t;return e(n,r),n}var i=t;!function(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}(i);var o=r?function(t){return e(t,r)}:e;return function(e,t){var r=e.ref;return Ve("string"!=typeof r,"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 <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,c.cloneElement)(e,{ref:function(e){nt(r,e),nt(t,e)}}):(0,c.cloneElement)(e,{ref:t})}(i,o)}}(n);t[r]=function(){return i}}})),t}function nt(e,t){"function"==typeof e?e(t):e.current=t}function it(e){return it="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},it(e)}function ot(e){return null!==e&&"object"===it(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function st(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),u=0;u<o.length;u++){var c=o[u];if(!a(c))return!1;var l=e[c],d=t[c];if(!1===(i=r?r.call(n,l,d,c):void 0)||void 0===i&&l!==d)return!1}return!0}function at(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ut(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ct,lt=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ut(this,"hooks",rt({dragSource:function(e,t){r.clearDragSource(),r.dragSourceOptions=t||null,ot(e)?r.dragSourceRef=e:r.dragSourceNode=e,r.reconnectDragSource()},dragPreview:function(e,t){r.clearDragPreview(),r.dragPreviewOptions=t||null,ot(e)?r.dragPreviewRef=e:r.dragPreviewNode=e,r.reconnectDragPreview()}})),ut(this,"handlerId",null),ut(this,"dragSourceRef",null),ut(this,"dragSourceNode",void 0),ut(this,"dragSourceOptionsInternal",null),ut(this,"dragSourceUnsubscribe",void 0),ut(this,"dragPreviewRef",null),ut(this,"dragPreviewNode",void 0),ut(this,"dragPreviewOptionsInternal",null),ut(this,"dragPreviewUnsubscribe",void 0),ut(this,"lastConnectedHandlerId",null),ut(this,"lastConnectedDragSource",null),ut(this,"lastConnectedDragSourceOptions",null),ut(this,"lastConnectedDragPreview",null),ut(this,"lastConnectedDragPreviewOptions",null),ut(this,"backend",void 0),this.backend=t}var t,r;return t=e,r=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();t&&this.disconnectDragPreview(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!st(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!st(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}],r&&at(t.prototype,r),e}(),dt=r(17),ft=r.n(dt);function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function pt(e,t,r){var n,i,o=(n=(0,c.useState)((function(){return t(e)})),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(n,i)||function(e,t){if(e){if("string"==typeof e)return ht(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ht(e,t):void 0}}(n,i)||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.")}()),s=o[0],a=o[1],u=(0,c.useCallback)((function(){var n=t(e);ft()(s,n)||(a(n),r&&r())}),[s,e,r]);return Fe(u),[s,u]}function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vt(e,t,r){return function(e,t){var n,i,o=(n=pt(e,t,(function(){return r.reconnect()})),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(n,i)||function(e,t){if(e){if("string"==typeof e)return gt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gt(e,t):void 0}}(n,i)||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.")}()),s=o[0],a=o[1];return Fe((function(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(a,{handlerIds:[t]})}),[e,a]),s}(t,e||function(){return{}})}function yt(e){return(0,c.useMemo)((function(){return e.hooks.dragSource()}),[e])}function mt(e){return(0,c.useMemo)((function(){return e.hooks.dragPreview()}),[e])}function bt(e){const t=v(),r=t.selectedIds,[n,i,o]=function(e,t){var r=Xe(e,t);Ve(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var n,i=(n=Ke(),(0,c.useMemo)((function(){return new tt(n)}),[n])),o=function(e,t){var r=Ke(),n=(0,c.useMemo)((function(){return new lt(r.getBackend())}),[r]);return Fe((function(){return n.dragSourceOptions=e||null,n.reconnect(),function(){return n.disconnectDragSource()}}),[n,e]),Fe((function(){return n.dragPreviewOptions=t||null,n.reconnect(),function(){return n.disconnectDragPreview()}}),[n,t]),n}(r.options,r.previewOptions);return Ye(r,i,o),[vt(r.collect,i,o),yt(o),mt(o)]}((()=>({canDrag:()=>e.isDraggable,type:"NODE",item:()=>{const n=t.isSelected(e.id)?Array.from(r):[e.id];return t.dispatch(ue(e.id,n)),{id:e.id}},end:()=>{t.hideCursor();let{parentId:e,index:r,dragIds:n}=t.state.dnd;t.canDrop()&&(_(t.props.onMove,{dragIds:n,parentId:e===X?null:e,index:null===r?0:r,dragNodes:t.dragNodes,parentNode:t.get(e)}),t.open(e)),t.dispatch(ce())}})),[r,e]);return(0,c.useEffect)((()=>{o((ct||((ct=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ct))}),[o]),i}function Ot(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var St=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),wt(this,"spec",void 0),wt(this,"monitor",void 0),this.spec=t,this.monitor=r}var t,r;return t=e,(r=[{key:"canDrop",value:function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}},{key:"hover",value:function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}},{key:"drop",value:function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}}])&&Ot(t.prototype,r),e}();function It(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dt(e,t,r){var n=Ke(),i=function(e,t){var r=(0,c.useMemo)((function(){return new St(e,t)}),[t]);return(0,c.useEffect)((function(){r.spec=e}),[e]),r}(e,t),o=function(e){var t=e.accept;return(0,c.useMemo)((function(){return Ve(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]}),[t])}(e);Fe((function(){var e,s,a=function(e,t,r){var n=r.getRegistry(),i=n.addTarget(e,t);return[i,function(){return n.removeTarget(i)}]}(o,i,n),u=(s=2,function(e){if(Array.isArray(e))return e}(e=a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(e,s)||function(e,t){if(e){if("string"==typeof e)return It(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?It(e,t):void 0}}(e,s)||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.")}()),c=u[0],l=u[1];return t.receiveHandlerId(c),r.receiveHandlerId(c),l}),[n,t,i,r,o.map((function(e){return e.toString()})).join("|")])}function Et(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xt=!1,Ct=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Tt(this,"internalMonitor",void 0),Tt(this,"targetId",null),this.internalMonitor=t.getMonitor()}var t,r;return t=e,r=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;Ve(!xt,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return xt=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{xt=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}],r&&Et(t.prototype,r),e}();function jt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pt=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Nt(this,"hooks",rt({dropTarget:function(e,t){r.clearDropTarget(),r.dropTargetOptions=t,ot(e)?r.dropTargetRef=e:r.dropTargetNode=e,r.reconnect()}})),Nt(this,"handlerId",null),Nt(this,"dropTargetRef",null),Nt(this,"dropTargetNode",void 0),Nt(this,"dropTargetOptionsInternal",null),Nt(this,"unsubscribeDropTarget",void 0),Nt(this,"lastConnectedHandlerId",null),Nt(this,"lastConnectedDropTarget",null),Nt(this,"lastConnectedDropTargetOptions",null),Nt(this,"backend",void 0),this.backend=t}var t,r;return t=e,r=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!st(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}],r&&jt(t.prototype,r),e}();function kt(e){return(0,c.useMemo)((function(){return e.hooks.dropTarget()}),[e])}function At(e,t){var r,n=Xe(e,t),i=(r=Ke(),(0,c.useMemo)((function(){return new Ct(r)}),[r])),o=function(e){var t=Ke(),r=(0,c.useMemo)((function(){return new Pt(t.getBackend())}),[t]);return Fe((function(){return r.dropTargetOptions=e||null,r.reconnect(),function(){return r.disconnectDropTarget()}}),[e]),r}(n.options);return Dt(n,i,o),[vt(n.collect,i,o),kt(o)]}function Rt(e,t){return{parentId:e||null,index:t}}function _t(e,t){return{type:"line",index:e,level:t}}function Mt(e,t){var r;let n=e;for(;n.parent&&n.level>t;)n=n.parent;return{parentId:(null===(r=n.parent)||void 0===r?void 0:r.id)||null,index:T(n)+1}}function Lt(e){var t;const r=function(e,t){const r=e.getBoundingClientRect(),n=t.x-Math.round(r.x),i=t.y-Math.round(r.y),o=r.height,s=i<o/2,a=!s,u=o/4,c=i>u&&i<o-u;return{x:n,inTopHalf:s,inBottomHalf:a,inMiddle:c,atTop:!c&&s,atBottom:!c&&a}}(e.element,e.offset),n=e.indent,i=Math.round(Math.max(0,r.x-n)/n),{node:o,nextNode:s,prevNode:a}=e,[u,c]=function(e,t,r,n){return e?e.isInternal?n.atTop?[t,e]:n.inMiddle?[e,e]:[e,r]:n.inTopHalf?[t,e]:[e,r]:[t,null]}(o,a,s,r);if(o&&o.isInternal&&r.inMiddle)return{drop:Rt(o.id,null),cursor:(l=o.id,{type:"highlight",id:l})};var l;if(!u)return{drop:Rt(null===(t=null==c?void 0:c.parent)||void 0===t?void 0:t.id,0),cursor:_t(0,0)};if(S(u)){const e=w(i,(null==c?void 0:c.level)||0,u.level);return{drop:Mt(u,e),cursor:_t(u.rowIndex+1,e)}}if(I(u)){const e=w(i,(null==c?void 0:c.level)||0,u.level);return{drop:Mt(u,e),cursor:_t(u.rowIndex+1,e)}}if(D(u)){const e=w(i,0,u.level+1);return e>u.level?{drop:Rt(u.id,0),cursor:_t(u.rowIndex+1,e)}:{drop:Mt(u,e),cursor:_t(u.rowIndex+1,e)}}return{drop:Rt(null==u?void 0:u.id,0),cursor:_t(u.rowIndex+1,u.level+1)}}const Ht=l().memo((function({index:e,style:t}){O(),function(){if(null===(0,c.useContext)(y))throw new Error("Provide a NodesContext")}();const r=v(),n=function(e){const t=v(),r=t.at(e);if(!r)throw new Error(`Could not find node for index: ${e}`);return(0,c.useMemo)((()=>{const n=r.clone();return t.visibleNodes[e]=n,n}),[...Object.values(r.state),r])}(e),i=(0,c.useRef)(null),o=bt(n),s=function(e,t){const r=v(),[n,i]=At((()=>({accept:"NODE",canDrop:()=>r.canDrop(),hover:(n,i)=>{const o=i.getClientOffset();if(!e.current||!o)return;const{cursor:s,drop:a}=Lt({element:e.current,offset:o,indent:r.indent,node:t,prevNode:t.prev,nextNode:t.next});a&&r.dispatch(le(a.parentId,a.index)),i.canDrop()?s&&r.showCursor(s):r.hideCursor()},drop:(e,t)=>{if(!t.canDrop())return null}})),[t,e.current,r.props]);return i}(i,n),a=(0,c.useCallback)((e=>{i.current=e,s(e)}),[s]),u=r.indent*n.level,l=(0,c.useMemo)((()=>({paddingLeft:u})),[u]),d=(0,c.useMemo)((()=>{var e,n;return Object.assign(Object.assign({},t),{top:parseFloat(t.top)+(null!==(n=null!==(e=r.props.padding)&&void 0!==e?e:r.props.paddingTop)&&void 0!==n?n:0)})}),[t,r.props.padding,r.props.paddingTop]),f={role:"treeitem","aria-level":n.level+1,"aria-selected":n.isSelected,style:d,tabIndex:-1,className:r.props.rowClassName};(0,c.useEffect)((()=>{var e;!n.isEditing&&n.isFocused&&(null===(e=i.current)||void 0===e||e.focus({preventScroll:!0}))}),[n.isEditing,n.isFocused,i.current]);const p=r.renderNode,g=r.renderRow;return(0,h.jsx)(g,{node:n,innerRef:a,attrs:f,children:(0,h.jsx)(p,{node:n,tree:r,style:l,dragHandle:o})})}));let Ft="",Bt=null;function Ut(){O();const e=v();return(0,h.jsx)("div",{role:"tree",style:{height:e.height,width:e.width,minHeight:0,minWidth:0},onContextMenu:e.props.onContextMenu,onClick:e.props.onClick,tabIndex:0,onFocus:t=>{t.currentTarget.contains(t.relatedTarget)||e.onFocus()},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||e.onBlur()},onKeyDown:t=>{var r;if(e.isEditing)return;if("Backspace"===t.key){if(!e.props.onDelete)return;const t=Array.from(e.selectedIds);if(t.length>1){let r=e.mostRecentNode;for(;r&&r.isSelected;)r=r.nextSibling;r||(r=e.lastNode),e.focus(r,{scroll:!1}),e.delete(Array.from(t))}else{const t=e.focusedNode;if(t){const r=t.nextSibling,n=t.parent;e.focus(r||n,{scroll:!1}),e.delete(t)}}return}if("Tab"===t.key&&!t.shiftKey)return t.preventDefault(),void j(t.currentTarget);if("Tab"===t.key&&t.shiftKey)return t.preventDefault(),void N(t.currentTarget);if("ArrowDown"===t.key){t.preventDefault();const r=e.nextNode;if(t.metaKey)return e.select(e.focusedNode),void e.activate(e.focusedNode);if(!t.shiftKey||e.props.disableMultiSelection)return void e.focus(r);{if(!r)return;const t=e.focusedNode;return void(t?t.isSelected?e.selectContiguous(r):e.selectMulti(r):e.focus(e.firstNode))}}if("ArrowUp"===t.key){t.preventDefault();const r=e.prevNode;if(!t.shiftKey||e.props.disableMultiSelection)return void e.focus(r);{if(!r)return;const t=e.focusedNode;return void(t?t.isSelected?e.selectContiguous(r):e.selectMulti(r):e.focus(e.lastNode))}}if("ArrowRight"===t.key){const t=e.focusedNode;if(!t)return;return void(t.isInternal&&t.isOpen?e.focus(e.nextNode):t.isInternal&&e.open(t.id))}if("ArrowLeft"===t.key){const t=e.focusedNode;if(!t||t.isRoot)return;return void(t.isInternal&&t.isOpen?e.close(t.id):(null===(r=t.parent)||void 0===r?void 0:r.isRoot)||e.focus(t.parent))}if("a"===t.key&&t.metaKey&&!e.props.disableMultiSelection)return t.preventDefault(),void e.selectAll();if("a"===t.key&&!t.metaKey&&e.props.onCreate)return void e.createLeaf();if("A"===t.key&&!t.metaKey){if(!e.props.onCreate)return;return void e.createInternal()}if("Home"===t.key)return t.preventDefault(),void e.focus(e.firstNode);if("End"===t.key)return t.preventDefault(),void e.focus(e.lastNode);if("Enter"===t.key){const t=e.focusedNode;if(!t)return;if(!t.isEditable||!e.props.onRename)return;return void setTimeout((()=>{t&&e.edit(t)}))}if(" "===t.key){t.preventDefault();const r=e.focusedNode;if(!r)return;return void(r.isLeaf?(r.select(),r.activate()):r.toggle())}if("*"===t.key){const t=e.focusedNode;if(!t)return;return void e.openSiblings(t)}if("PageUp"===t.key)return t.preventDefault(),void e.pageUp();"PageDown"===t.key&&(t.preventDefault(),e.pageDown()),clearTimeout(Bt),Ft+=t.key,Bt=setTimeout((()=>{Ft=""}),600);const n=e.visibleNodes.find((e=>{const t=e.data.name;return"string"==typeof t&&t.toLowerCase().startsWith(Ft)}));n&&e.focus(n.id)},children:(0,h.jsx)(Re,{className:e.props.className,outerRef:e.listEl,itemCount:e.visibleNodes.length,height:e.height,width:e.width,itemSize:e.rowHeight,overscanCount:e.overscanCount,itemKey:t=>{var r;return(null===(r=e.visibleNodes[t])||void 0===r?void 0:r.id)||t},outerElementType:Me,innerElementType:He,onScroll:e.props.onScroll,onItemsRendered:e.onItemsRendered.bind(e),ref:e.list,children:Ht})})}function zt(e){return e.isFiltered?function(e,t){const r={},n=[];return function e(n){if(!n.isRoot&&t(n)){r[n.id]=!0;let e=n.parent;for(;e;)r[e.id]=!0,e=e.parent}if(n.children)for(let t of n.children)e(t)}(e),function e(t){var i;t.level>=0&&r[t.id]&&n.push(t),t.isOpen&&(null===(i=t.children)||void 0===i||i.forEach(e))}(e),n.forEach(Wt),n}(e.root,e.isMatch.bind(e)):function(e){const t=[];return function e(r){var n;r.level>=0&&t.push(r),r.isOpen&&(null===(n=r.children)||void 0===n||n.forEach(e))}(e),t.forEach(Wt),t}(e.root)}function Wt(e,t){e.rowIndex=t}const Vt=e=>e.reduce(((e,t,r)=>(e[t.id]=r,e)),{});var Gt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};const{FS:Kt,ls:qt,yQ:Yt}=a;class $t{constructor(e,t,r,n){this.store=e,this.props=t,this.list=r,this.listEl=n,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=J(this),this.visibleNodes=zt(this),this.idToIndex=Vt(this.visibleNodes)}update(e){this.props=e,this.root=J(this),this.visibleNodes=zt(this),this.idToIndex=Vt(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return null!==(e=this.props.width)&&void 0!==e?e:300}get height(){var e;return null!==(e=this.props.height)&&void 0!==e?e:500}get indent(){var e;return null!==(e=this.props.indent)&&void 0!==e?e:24}get rowHeight(){var e;return null!==(e=this.props.rowHeight)&&void 0!==e?e:24}get overscanCount(){var e;return null!==(e=this.props.overscanCount)&&void 0!==e?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const t=null!==(e=this.props.searchMatch)&&void 0!==e?e:(e,t)=>JSON.stringify(Object.values(e.data)).toLocaleLowerCase().includes(t.toLocaleLowerCase());return e=>t(e,this.searchTerm)}accessChildren(e){var t;return null!==(t=k(e,this.props.childrenAccessor||"children"))&&void 0!==t?t:null}accessId(e){const t=k(e,this.props.idAccessor||"id");if(!t)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return t}get firstNode(){var e;return null!==(e=this.visibleNodes[0])&&void 0!==e?e:null}get lastNode(){var e;return null!==(e=this.visibleNodes[this.visibleNodes.length-1])&&void 0!==e?e:null}get focusedNode(){var e;return null!==(e=this.get(this.state.nodes.focus.id))&&void 0!==e?e:null}get mostRecentNode(){var e;return null!==(e=this.get(this.state.nodes.selection.mostRecent))&&void 0!==e?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return null===e?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return null===e?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,t){var r;if(null===e||null===t)return[];const n=null!==(r=this.indexOf(e))&&void 0!==r?r:0,i=this.indexOf(t);if(null===i)return[];const o=Math.min(n,i),s=Math.max(n,i);return this.visibleNodes.slice(o,s+1)}indexOf(e){const t=A(e);return t?this.idToIndex[t]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(e={}){var t,r;return Gt(this,void 0,void 0,(function*(){const n=void 0===e.parentId?H(this):e.parentId,i=null!==(t=e.index)&&void 0!==t?t:L(this),o=null!==(r=e.type)&&void 0!==r?r:"leaf",s=yield Kt(this.props.onCreate,{type:o,parentId:n,index:i,parentNode:this.get(n)});s&&(this.focus(s),setTimeout((()=>{this.edit(s).then((()=>{this.select(s),this.activate(s)}))})))}))}delete(e){return Gt(this,void 0,void 0,(function*(){if(!e)return;const t=(Array.isArray(e)?e:[e]).map(qt),r=t.map((e=>this.get(e))).filter((e=>!!e));yield Kt(this.props.onDelete,{nodes:r,ids:t})}))}edit(e){const t=qt(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(t),this.dispatch(q(t)),new Promise((e=>{$t.editPromise=e}))}submit(e,t){return Gt(this,void 0,void 0,(function*(){if(!e)return;const r=qt(e);yield Kt(this.props.onRename,{id:r,name:t,node:this.get(r)}),this.dispatch(q(null)),this.resolveEdit({cancelled:!1,value:t}),setTimeout((()=>this.onFocus()))}))}reset(){this.dispatch(q(null)),this.resolveEdit({cancelled:!0}),setTimeout((()=>this.onFocus()))}activate(e){const t=this.get(Yt(e));t&&Kt(this.props.onActivate,t)}resolveEdit(e){const t=$t.editPromise;t&&t(e),$t.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let t of Array.from(this.selectedIds)){const r=this.get(t);r&&e.push(r)}return e}focus(e,t={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Y(qt(e))),!1!==t.scroll&&this.scrollTo(e),this.focusedNode&&Kt(this.props.onFocus,this.focusedNode)))}pageUp(){var e,t;const r=this.visibleStartIndex,n=this.visibleStopIndex-r;let i=null!==(t=null===(e=this.focusedNode)||void 0===e?void 0:e.rowIndex)&&void 0!==t?t:0;i=i>r?r:Math.max(r-n,0),this.focus(this.at(i))}pageDown(){var e,t;const r=this.visibleStartIndex,n=this.visibleStopIndex,i=n-r;let o=null!==(t=null===(e=this.focusedNode)||void 0===e?void 0:e.rowIndex)&&void 0!==t?t:0;o=o<n?n:Math.min(o+i,this.visibleNodes.length-1),this.focus(this.at(o))}select(e,t={}){if(!e)return;const r=!1!==t.focus,n=qt(e);r&&this.dispatch(Y(n)),this.dispatch((e=>({type:"SELECTION_ONLY",id:R(e)}))(n)),this.dispatch(se(n)),this.dispatch(oe(n)),this.scrollTo(n,t.align),this.focusedNode&&r&&Kt(this.props.onFocus,this.focusedNode),Kt(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const t=qt(e);this.dispatch(ie(t))}selectMulti(e){const t=this.get(Yt(e));t&&(this.dispatch(Y(t.id)),this.dispatch(ne(t.id)),this.dispatch(se(t.id)),this.dispatch(oe(t.id)),this.scrollTo(t),this.focusedNode&&Kt(this.props.onFocus,this.focusedNode),Kt(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const t=qt(e),{anchor:r,mostRecent:n}=this.state.nodes.selection;this.dispatch(Y(t)),this.dispatch(ie(this.nodesBetween(r,n))),this.dispatch(ne(this.nodesBetween(r,Yt(t)))),this.dispatch(oe(t)),this.scrollTo(t),this.focusedNode&&Kt(this.props.onFocus,this.focusedNode),Kt(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),Kt(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Y(null===(e=this.lastNode)||void 0===e?void 0:e.id)),this.focusedNode&&Kt(this.props.onFocus,this.focusedNode),Kt(this.props.onSelect,this.selectedNodes)}setSelection(e){var t;const r=new Set(null===(t=e.ids)||void 0===t?void 0:t.map(qt)),n=Yt(e.anchor),i=Yt(e.mostRecent);this.dispatch((e=>Object.assign({type:"SELECTION_SET"},e))({ids:r,anchor:n,mostRecent:i})),Kt(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;return"highlight"===e.type?e.id:null}get cursorOverFolder(){return"highlight"===this.state.dnd.cursor.type}get dragNodes(){return this.state.dnd.dragIds.map((e=>this.get(e))).filter((e=>!!e))}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const t=null!==(e=this.get(this.state.dnd.parentId))&&void 0!==e?e:this.root,r=this.dragNodes,n=this.props.disableDrop;for(const e of r){if(!e)return!1;if(!t)return!1;if(e.isInternal&&E(t,e))return!1}return"function"==typeof n?!n({parentNode:t,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):"string"==typeof n?!t.data[n]:"boolean"!=typeof n||!n}hideCursor(){this.dispatch(ae({type:"none"}))}showCursor(e){this.dispatch(ae(e))}open(e){const t=Yt(e);t&&(this.isOpen(t)||(this.dispatch(Q(t,this.isFiltered)),Kt(this.props.onToggle,t)))}close(e){const t=Yt(e);t&&this.isOpen(t)&&(this.dispatch(Z(t,this.isFiltered)),Kt(this.props.onToggle,t))}toggle(e){const t=Yt(e);if(t)return this.isOpen(t)?this.close(t):this.open(t)}openParents(e){const t=Yt(e);if(!t)return;const r=x(this.root,t);let n=null==r?void 0:r.parent;for(;n;)this.open(n.id),n=n.parent}openSiblings(e){const t=e.parent;if(t){if(t.children){const r=e.isOpen;for(let e of t.children)e.isInternal&&(r?this.close(e.id):this.open(e.id));this.scrollTo(this.focusedNode)}}else this.toggle(e.id)}openAll(){C(this.root,(e=>{e.isInternal&&e.open()}))}closeAll(){C(this.root,(e=>{e.isInternal&&e.close()}))}scrollTo(e,t="smart"){if(!e)return;const r=qt(e);return this.openParents(r),M((()=>r in this.idToIndex)).then((()=>{var e;const n=this.idToIndex[r];void 0!==n&&(null===(e=this.list.current)||void 0===e||e.scrollToItem(n,t))})).catch((()=>{}))}get isEditing(){return null!==this.state.nodes.edit.id}get isFiltered(){var e;return!!(null===(e=this.props.searchTerm)||void 0===e?void 0:e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return 0===this.state.nodes.selection.ids.size}get hasOneSelection(){return 1===this.state.nodes.selection.ids.size}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return!!e&&this.state.nodes.selection.ids.has(e)}isOpen(e){var t,r,n;if(!e)return!1;if(e===X)return!0;const i=null===(t=this.props.openByDefault)||void 0===t||t;return this.isFiltered?null===(r=this.state.nodes.open.filtered[e])||void 0===r||r:null!==(n=this.state.nodes.open.unfiltered[e])&&void 0!==n?n:i}isEditable(e){var t;return null===(t=!k(e,this.props.disableEdit||(()=>!1)))||void 0===t||t}isDraggable(e){var t;return null===(t=!k(e,this.props.disableDrag||(()=>!1)))||void 0===t||t}isDragging(e){const t=Yt(e);return!!t&&this.state.nodes.drag.id===t}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const t=Yt(e);if(!t)return!1;const{destinationParentId:r,destinationIndex:n}=this.state.nodes.drag;return t===r&&null===n}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Y(e.id))}onBlur(){this.dispatch({type:"TREE_BLUR"})}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||Ut}get renderRow(){return this.props.renderRow||W}get renderNode(){return this.props.children||V}get renderDragPreview(){return this.props.renderDragPreview||pe}get renderCursor(){return this.props.renderCursor||z}}function Xt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Jt=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Qt=()=>Math.random().toString(36).substring(7).split("").join("."),Zt={INIT:`@@redux/INIT${Qt()}`,REPLACE:`@@redux/REPLACE${Qt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qt()}`};function er(e,t,r){if("function"!=typeof e)throw new Error(Xt(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(Xt(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(Xt(1));return r(er)(e,t)}let n=e,i=t,o=new Map,s=o,a=0,u=!1;function c(){s===o&&(s=new Map,o.forEach(((e,t)=>{s.set(t,e)})))}function l(){if(u)throw new Error(Xt(3));return i}function d(e){if("function"!=typeof e)throw new Error(Xt(4));if(u)throw new Error(Xt(5));let t=!0;c();const r=a++;return s.set(r,e),function(){if(t){if(u)throw new Error(Xt(6));t=!1,c(),s.delete(r),o=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(Xt(7));if(void 0===e.type)throw new Error(Xt(8));if("string"!=typeof e.type)throw new Error(Xt(17));if(u)throw new Error(Xt(9));try{u=!0,i=n(i,e)}finally{u=!1}return(o=s).forEach((e=>{e()})),e}return f({type:Zt.INIT}),{dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Xt(10));n=e,f({type:Zt.REPLACE})},[Jt]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Xt(11));function r(){const e=t;e.next&&e.next(l())}return r(),{unsubscribe:e(r)}},[Jt](){return this}}}}}function tr(e){const t=Object.keys(e),r={};for(let n=0;n<t.length;n++){const i=t[n];"function"==typeof e[i]&&(r[i]=e[i])}const n=Object.keys(r);let i;try{!function(e){Object.keys(e).forEach((t=>{const r=e[t];if(void 0===r(void 0,{type:Zt.INIT}))throw new Error(Xt(12));if(void 0===r(void 0,{type:Zt.PROBE_UNKNOWN_ACTION()}))throw new Error(Xt(13))}))}(r)}catch(e){i=e}return function(e={},t){if(i)throw i;let o=!1;const s={};for(let i=0;i<n.length;i++){const a=n[i],u=r[a],c=e[a],l=u(c,t);if(void 0===l)throw t&&t.type,new Error(Xt(14));s[a]=l,o=o||l!==c}return o=o||n.length!==Object.keys(e).length,o?s:e}}const rr=tr({nodes:tr({focus:function(e={id:null,treeFocused:!1},t){return"FOCUS"===t.type?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):"TREE_BLUR"===t.type?Object.assign(Object.assign({},e),{treeFocused:!1}):e},edit:function(e={id:null},t){return"EDIT"===t.type?Object.assign(Object.assign({},e),{id:t.id}):e},open:function(e={filtered:{},unfiltered:{}},t){return t.type.startsWith("VISIBILITY")?t.filtered?Object.assign(Object.assign({},e),{filtered:te(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:te(e.unfiltered,t)}):e},selection:function(e=re().nodes.selection,t){const r=e.ids;switch(t.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},e),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case"SELECTION_ADD":return 0===t.ids.length?e:(t.ids.forEach((e=>r.add(e))),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_REMOVE":return 0===t.ids.length?e:(t.ids.forEach((e=>r.delete(e))),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_SET":return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},e),{mostRecent:t.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}},drag:function(e=re().nodes.drag,t){switch(t.type){case"DND_DRAG_START":return Object.assign(Object.assign({},e),{id:t.id,selectedIds:t.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},e),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return t.parentId!==e.destinationParentId||t.index!=e.destinationIndex?Object.assign(Object.assign({},e),{destinationParentId:t.parentId,destinationIndex:t.index}):e;default:return e}}}),dnd:function(e=re().dnd,t){switch(t.type){case"DND_CURSOR":return Object.assign(Object.assign({},e),{cursor:t.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case"DND_DRAG_END":return re().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}});function nr(e){var t=null;return function(){return null==t&&(t=e()),t}}function ir(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function or(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var sr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),or(this,"entered",[]),or(this,"isNodeInDocument",void 0),this.isNodeInDocument=t}var t,r;return t=e,(r=[{key:"enter",value:function(e){var t=this,r=this.entered.length;return this.entered=function(e,t){var r=new Set,n=function(e){return r.add(e)};e.forEach(n),t.forEach(n);var i=[];return r.forEach((function(e){return i.push(e)})),i}(this.entered.filter((function(r){return t.isNodeInDocument(r)&&(!r.contains||r.contains(e))})),[e]),0===r&&this.entered.length>0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&ir(t.prototype,r),e}(),ar=nr((function(){return/firefox/i.test(navigator.userAgent)})),ur=nr((function(){return Boolean(window.safari)}));function cr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var dr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),lr(this,"xs",void 0),lr(this,"ys",void 0),lr(this,"c1s",void 0),lr(this,"c2s",void 0),lr(this,"c3s",void 0);for(var n=t.length,i=[],o=0;o<n;o++)i.push(o);i.sort((function(e,r){return t[e]<t[r]?-1:1}));for(var s,a,u=[],c=[],l=[],d=0;d<n-1;d++)s=t[d+1]-t[d],a=r[d+1]-r[d],c.push(s),u.push(a),l.push(a/s);for(var f=[l[0]],h=0;h<c.length-1;h++){var p=l[h],g=l[h+1];if(p*g<=0)f.push(0);else{s=c[h];var v=c[h+1],y=s+v;f.push(3*y/((y+v)/p+(y+s)/g))}}f.push(l[l.length-1]);for(var m,b=[],O=[],w=0;w<f.length-1;w++){m=l[w];var S=f[w],I=1/c[w],D=S+f[w+1]-m-m;b.push((m-S-D)*I),O.push(D*I*I)}this.xs=t,this.ys=r,this.c1s=f,this.c2s=b,this.c3s=O}var t,r;return t=e,(r=[{key:"interpolate",value:function(e){var t=this.xs,r=this.ys,n=this.c1s,i=this.c2s,o=this.c3s,s=t.length-1;if(e===t[s])return r[s];for(var a,u=0,c=o.length-1;u<=c;){var l=t[a=Math.floor(.5*(u+c))];if(l<e)u=a+1;else{if(!(l>e))return r[a];c=a-1}}var d=e-t[s=Math.max(0,c)],f=d*d;return r[s]+n[s]*d+i[s]*f+o[s]*d*f}}])&&cr(t.prototype,r),e}();function fr(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function hr(e){return{x:e.clientX,y:e.clientY}}var pr,gr="__NATIVE_FILE__",vr="__NATIVE_URL__",yr="__NATIVE_TEXT__",mr="__NATIVE_HTML__";function br(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function Or(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wr=(Or(pr={},gr,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Or(pr,mr,{exposeProperties:{html:function(e,t){return br(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Or(pr,vr,{exposeProperties:{urls:function(e,t){return br(e,t,"").split("\n")},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Or(pr,yr,{exposeProperties:{text:function(e,t){return br(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),pr);function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ir(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Dr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ir(this,"item",void 0),Ir(this,"config",void 0),this.config=t,this.item={},this.initializeExposedProperties()}var t,r;return t=e,(r=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var r={};Object.keys(this.config.exposeProperties).forEach((function(n){r[n]={value:t.config.exposeProperties[n](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,r)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&Sr(t.prototype,r),e}();function Er(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(wr).filter((function(e){return wr[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function Tr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Cr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),xr(this,"ownerDocument",null),xr(this,"globalContext",void 0),xr(this,"optionsArgs",void 0),this.globalContext=t,this.optionsArgs=r}var t,r;return t=e,(r=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var e;return null!==(e=this.globalContext)&&void 0!==e&&e.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}}])&&Tr(t.prototype,r),e}();function jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(r),!0).forEach((function(t){kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ar=function(){function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),kr(this,"options",void 0),kr(this,"actions",void 0),kr(this,"monitor",void 0),kr(this,"registry",void 0),kr(this,"enterLeaveCounter",void 0),kr(this,"sourcePreviewNodes",new Map),kr(this,"sourcePreviewNodeOptions",new Map),kr(this,"sourceNodes",new Map),kr(this,"sourceNodeOptions",new Map),kr(this,"dragStartSourceIds",null),kr(this,"dropTargetIds",[]),kr(this,"dragEnterTargetIds",[]),kr(this,"currentNativeSource",null),kr(this,"currentNativeHandle",null),kr(this,"currentDragSourceNode",null),kr(this,"altKeyPressed",!1),kr(this,"mouseMoveTimeoutTimer",null),kr(this,"asyncEndDragFrameId",null),kr(this,"dragOverTargetIds",null),kr(this,"lastClientOffset",null),kr(this,"hoverRafId",null),kr(this,"getSourceClientOffset",(function(e){var t=i.sourceNodes.get(e);return t&&fr(t)||null})),kr(this,"endDragNativeItem",(function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)})),kr(this,"isNodeInDocument",(function(e){return Boolean(e&&i.document&&i.document.body&&i.document.body.contains(e))})),kr(this,"endDragIfSourceWasRemovedFromDOM",(function(){var e=i.currentDragSourceNode;null==e||i.isNodeInDocument(e)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()})),kr(this,"handleTopDragStartCapture",(function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]})),kr(this,"handleTopDragStart",(function(e){if(!e.defaultPrevented){var t=i.dragStartSourceIds;i.dragStartSourceIds=null;var r=hr(e);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:r});var n=e.dataTransfer,o=Er(n);if(i.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){var s=i.monitor.getSourceId(),a=i.sourceNodes.get(s),u=i.sourcePreviewNodes.get(s)||a;if(u){var c=i.getCurrentSourcePreviewNodeOptions(),l=function(e,t,r,n,i){var o,s,a,u="IMG"===(o=t).nodeName&&(ar()||!(null!==(s=document.documentElement)&&void 0!==s&&s.contains(o))),c=fr(u?e:t),l={x:r.x-c.x,y:r.y-c.y},d=e.offsetWidth,f=e.offsetHeight,h=n.anchorX,p=n.anchorY,g=function(e,t,r,n){var i=e?t.width:r,o=e?t.height:n;return ur()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(u,t,d,f),v=g.dragPreviewWidth,y=g.dragPreviewHeight,m=i.offsetX,b=i.offsetY,O=0===b||b;return{x:0===m||m?m:new dr([0,.5,1],[l.x,l.x/d*v,l.x+v-d]).interpolate(h),y:O?b:(a=new dr([0,.5,1],[l.y,l.y/f*y,l.y+y-f]).interpolate(p),ur()&&u&&(a+=(window.devicePixelRatio-1)*y),a)}}(a,u,r,{anchorX:c.anchorX,anchorY:c.anchorY},{offsetX:c.offsetX,offsetY:c.offsetY});n.setDragImage(u,l.x,l.y)}}try{null==n||n.setData("application/json",{})}catch(e){}i.setCurrentDragSourceNode(e.target),i.getCurrentSourcePreviewNodeOptions().captureDraggingState?i.actions.publishDragSource():setTimeout((function(){return i.actions.publishDragSource()}),0)}else if(o)i.beginDragNativeItem(o);else{if(n&&!n.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}})),kr(this,"handleTopDragEndCapture",(function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()})),kr(this,"handleTopDragEnterCapture",(function(e){if(i.dragEnterTargetIds=[],i.enterLeaveCounter.enter(e.target)&&!i.monitor.isDragging()){var t=e.dataTransfer,r=Er(t);r&&i.beginDragNativeItem(r,t)}})),kr(this,"handleTopDragEnter",(function(e){var t=i.dragEnterTargetIds;i.dragEnterTargetIds=[],i.monitor.isDragging()&&(i.altKeyPressed=e.altKey,t.length>0&&i.actions.hover(t,{clientOffset:hr(e)}),t.some((function(e){return i.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())))})),kr(this,"handleTopDragOverCapture",(function(){i.dragOverTargetIds=[]})),kr(this,"handleTopDragOver",(function(e){var t=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));i.altKeyPressed=e.altKey,i.lastClientOffset=hr(e),null===i.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(i.hoverRafId=requestAnimationFrame((function(){i.monitor.isDragging()&&i.actions.hover(t||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}))),(t||[]).some((function(e){return i.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))})),kr(this,"handleTopDragLeaveCapture",(function(e){i.isDraggingNativeItem()&&e.preventDefault(),i.enterLeaveCounter.leave(e.target)&&i.isDraggingNativeItem()&&setTimeout((function(){return i.endDragNativeItem()}),0)})),kr(this,"handleTopDropCapture",(function(e){var t;i.dropTargetIds=[],i.isDraggingNativeItem()?(e.preventDefault(),null===(t=i.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):Er(e.dataTransfer)&&e.preventDefault(),i.enterLeaveCounter.reset()})),kr(this,"handleTopDrop",(function(e){var t=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(t,{clientOffset:hr(e)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()})),kr(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 Cr(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new sr(this.isNodeInDocument)}var t,r;return t=e,r=[{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,r){var n=this;return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),function(){n.sourcePreviewNodes.delete(e),n.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,r){var n=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);var i=function(t){return n.handleDragStart(t,e)},o=function(e){return n.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",i),t.addEventListener("selectstart",o),function(){n.sourceNodes.delete(e),n.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",i),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},i=function(t){return r.handleDragOver(t,e)},o=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",i),t.addEventListener("drop",o),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",i),t.removeEventListener("drop",o)}}},{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 Nr({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 Nr({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(u).some((function(t){return u[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var r=new Dr(wr[e]);return r.loadDataTransfer(t),r}(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)}}],r&&Pr(t.prototype,r),e}(),Rr=function(e,t,r){return new Ar(e,t,r)},_r="dnd-core/INIT_COORDS",Mr="dnd-core/BEGIN_DRAG",Lr="dnd-core/PUBLISH_DRAG_SOURCE",Hr="dnd-core/HOVER",Fr="dnd-core/DROP",Br="dnd-core/END_DRAG";function Ur(e,t){return{type:_r,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function zr(e){return zr="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},zr(e)}function Wr(e){return"object"===zr(e)}var Vr={type:_r,payload:{clientOffset:null,sourceClientOffset:null}};function Gr(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,i=void 0===n||n,o=r.clientOffset,s=r.getSourceClientOffset,a=e.getMonitor(),u=e.getRegistry();e.dispatch(Ur(o)),function(e,t,r){Ve(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Ve(r.getSource(e),"Expected sourceIds to be registered.")}))}(t,a,u);var c=function(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,a);if(null!==c){var l=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");!function(e){Ve("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(s),l=s(c)}e.dispatch(Ur(o,l));var d=u.getSource(c).beginDrag(a,c);if(null!=d){!function(e){Ve(Wr(e),"Item must be an object.")}(d),u.pinSource(c);var f=u.getSourceType(c);return{type:Mr,payload:{itemType:f,item:d,sourceId:c,clientOffset:o||null,sourceClientOffset:l||null,isSourcePublic:!!i}}}}else e.dispatch(Vr)}}function Kr(e){return function(){if(e.getMonitor().isDragging())return{type:Lr}}}function qr(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function Yr(e){return function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset;!function(e){Ve(Array.isArray(e),"Expected targetIds to be an array.")}(t);var n=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,r){Ve(t.isDragging(),"Cannot call hover while not dragging."),Ve(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var i=e[n];Ve(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array."),Ve(r.getTarget(i),"Expected targetIds to be registered.")}}(n,i,o),function(e,t,r){for(var n=e.length-1;n>=0;n--){var i=e[n];qr(t.getTargetType(i),r)||e.splice(n,1)}}(n,o,i.getItemType()),function(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}(n,i,o),{type:Hr,payload:{targetIds:n,clientOffset:r||null}}}}function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(r),!0).forEach((function(t){Jr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qr(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();!function(e){Ve(e.isDragging(),"Cannot call drop while not dragging."),Ve(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r);var i=function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);i.forEach((function(i,o){var s=function(e,t,r,n){var i=r.getTarget(e),o=i?i.drop(n,e):void 0;return function(e){Ve(void 0===e||Wr(e),"Drop result must either be an object or undefined.")}(o),void 0===o&&(o=0===t?{}:n.getDropResult()),o}(i,o,n,r),a={type:Fr,payload:{dropResult:Xr(Xr({},t),s)}};e.dispatch(a)}))}}function Zr(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){Ve(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var n=t.getSourceId();return null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:Br}}}function en(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var rn=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),tn(this,"store",void 0),tn(this,"monitor",void 0),tn(this,"backend",void 0),tn(this,"isSetUp",!1),tn(this,"handleRefCountChange",(function(){var e=n.store.getState().refCount>0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))})),this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}var t,r;return t=e,r=[{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,r=function(e){return{beginDrag:Gr(e),publishDragSource:Kr(e),hover:Yr(e),drop:Qr(e),endDrag:Zr(e)}}(this);return Object.keys(r).reduce((function(n,i){var o,s=r[i];return n[i]=(o=s,function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=o.apply(e,n);void 0!==s&&t(s)}),n}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}],r&&en(t.prototype,r),e}();function nn(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var on="function"==typeof Symbol&&Symbol.observable||"@@observable",sn=function(){return Math.random().toString(36).substring(7).split("").join(".")},an={INIT:"@@redux/INIT"+sn(),REPLACE:"@@redux/REPLACE"+sn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sn()}};function un(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(nn(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(nn(1));return r(un)(e,t)}if("function"!=typeof e)throw new Error(nn(2));var i=e,o=t,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function l(){if(u)throw new Error(nn(3));return o}function d(e){if("function"!=typeof e)throw new Error(nn(4));if(u)throw new Error(nn(5));var t=!0;return c(),a.push(e),function(){if(t){if(u)throw new Error(nn(6));t=!1,c();var r=a.indexOf(e);a.splice(r,1),s=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(nn(7));if(void 0===e.type)throw new Error(nn(8));if(u)throw new Error(nn(9));try{u=!0,o=i(o,e)}finally{u=!1}for(var t=s=a,r=0;r<t.length;r++)(0,t[r])();return e}return f({type:an.INIT}),(n={dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(nn(10));i=e,f({type:an.REPLACE})}})[on]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(nn(11));function r(){e.next&&e.next(l())}return r(),{unsubscribe:t(r)}}})[on]=function(){return this},e},n}var cn=function(e,t){return e===t};function ln(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(r),!0).forEach((function(t){fn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ln(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function fn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var hn={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function pn(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hn,n=arguments.length>1?arguments[1]:void 0,i=n.payload;switch(n.type){case _r:case Mr:return{initialSourceClientOffset:i.sourceClientOffset,initialClientOffset:i.clientOffset,clientOffset:i.clientOffset};case Hr:return e=r.clientOffset,t=i.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?r:dn(dn({},r),{},{clientOffset:i.clientOffset});case Br:case Fr:return hn;default:return r}}var gn="dnd-core/ADD_SOURCE",vn="dnd-core/ADD_TARGET",yn="dnd-core/REMOVE_SOURCE",mn="dnd-core/REMOVE_TARGET";function bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function On(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(r),!0).forEach((function(t){wn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Sn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function In(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Sn,n=arguments.length>1?arguments[1]:void 0,i=n.payload;switch(n.type){case Mr:return On(On({},r),{},{itemType:i.itemType,item:i.item,sourceId:i.sourceId,isSourcePublic:i.isSourcePublic,dropResult:null,didDrop:!1});case Lr:return On(On({},r),{},{isSourcePublic:!0});case Hr:return On(On({},r),{},{targetIds:i.targetIds});case mn:return-1===r.targetIds.indexOf(i.targetId)?r:On(On({},r),{},{targetIds:(e=r.targetIds,t=i.targetId,e.filter((function(e){return e!==t})))});case Fr:return On(On({},r),{},{dropResult:i.dropResult,didDrop:!0,targetIds:[]});case Br:return On(On({},r),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}}function Dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case gn:case vn:return e+1;case yn:case mn:return e-1;default:return e}}var En=[],Tn=[];function xn(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Hr:break;case gn:case vn:case mn:case yn:return En;default:return Tn}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,i=t.prevTargetIds,o=void 0===i?[]:i,s=function(e,t){var r=new Map,n=function(e){r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var i=[];return r.forEach((function(e,t){1===e&&i.push(t)})),i}(n,o),a=s.length>0||!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cn;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}(n,o);if(!a)return En;var u=o[o.length-1],c=n[n.length-1];return u!==c&&(u&&s.push(u),c&&s.push(c)),s}function Cn(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}function jn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jn(Object(r),!0).forEach((function(t){Pn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kn(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:xn(r.dirtyHandlerIds,{type:n.type,payload:Nn(Nn({},n.payload),{},{prevTargetIds:(e=r,t=[],"dragOperation.targetIds".split(".").reduce((function(e,r){return e&&e[r]?e[r]:t||null}),e))})}),dragOffset:pn(r.dragOffset,n),refCount:Dn(r.refCount,n),dragOperation:In(r.dragOperation,n),stateId:Cn(r.stateId)}}function An(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}En.__IS_NONE__=!0,Tn.__IS_ALL__=!0;var Mn,Ln=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),_n(this,"store",void 0),_n(this,"registry",void 0),this.store=t,this.registry=r}var t,r;return t=e,r=[{key:"subscribeToStateChange",value:function(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0}).handlerIds;Ve("function"==typeof e,"listener must be a function."),Ve(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var n=this.store.getState().stateId;return this.store.subscribe((function(){var i=t.store.getState(),o=i.stateId;try{var s=o===n||o===n+1&&!function(e,t){return e!==En&&(e===Tn||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}(i.dirtyHandlerIds,r);s||e()}finally{n=o}}))}},{key:"subscribeToOffsetChange",value:function(e){var t=this;Ve("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe((function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return Ve(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 Ve(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&qr(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 Ve(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){if(!e)return!1;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1}).shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),n=this.getItemType();if(n&&!qr(r,n))return!1;var i=this.getTargetIds();if(!i.length)return!1;var o=i.indexOf(e);return t?o===i.length-1:o>-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 n=(e=this.store.getState().dragOffset).clientOffset,i=e.initialClientOffset,o=e.initialSourceClientOffset,n&&i&&o?An((r=o,{x:(t=n).x+r.x,y:t.y+r.y}),i):null;var e,t,r,n,i,o}},{key:"getDifferenceFromInitialOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,t&&r?An(t,r):null;var e,t,r}}],r&&Rn(t.prototype,r),e}(),Hn=0;function Fn(e){return Fn="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},Fn(e)}function Bn(e,t){t&&Array.isArray(e)?e.forEach((function(e){return Bn(e,!1)})):Ve("string"==typeof e||"symbol"===Fn(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"}(Mn||(Mn={}));const Un="undefined"!=typeof global?global:self,zn=Un.MutationObserver||Un.WebKitMutationObserver;function Wn(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const Vn="function"==typeof zn?function(e){let t=1;const r=new zn(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:Wn;class Gn{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}}const Kn=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),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.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,r=e.length-this.index;t<r;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Vn(this.flush),this.requestErrorThrow=Wn((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},qn=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new Gn(this.onError,(e=>t[t.length]=e));return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(Kn.registerPendingError);function Yn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jn(e){switch(e[0]){case"S":return Mn.SOURCE;case"T":return Mn.TARGET;default:Ve(!1,"Cannot parse handler ID: ".concat(e))}}function Qn(e,t){var r,n,i=e.entries(),o=!1;do{var s=i.next(),a=s.done;if((r=s.value,n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(r,n)||function(e,t){if(e){if("string"==typeof e)return Xn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xn(e,t):void 0}}(r,n)||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.")}())[1]===t)return!0;o=!!a}while(!o);return!1}var Zn=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$n(this,"types",new Map),$n(this,"dragSources",new Map),$n(this,"dropTargets",new Map),$n(this,"pinnedSourceId",null),$n(this,"pinnedSource",null),$n(this,"store",void 0),this.store=t}var t,r;return t=e,r=[{key:"addSource",value:function(e,t){Bn(e),function(e){Ve("function"==typeof e.canDrag,"Expected canDrag to be a function."),Ve("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Ve("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var r=this.addHandler(Mn.SOURCE,e,t);return this.store.dispatch(function(e){return{type:gn,payload:{sourceId:e}}}(r)),r}},{key:"addTarget",value:function(e,t){Bn(e,!0),function(e){Ve("function"==typeof e.canDrop,"Expected canDrop to be a function."),Ve("function"==typeof e.hover,"Expected hover to be a function."),Ve("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var r=this.addHandler(Mn.TARGET,e,t);return this.store.dispatch(function(e){return{type:vn,payload:{targetId:e}}}(r)),r}},{key:"containsHandler",value:function(e){return Qn(this.dragSources,e)||Qn(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Ve(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:"getTarget",value:function(e){return Ve(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return Ve(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return Ve(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Jn(e)===Mn.SOURCE}},{key:"isTargetId",value:function(e){return Jn(e)===Mn.TARGET}},{key:"removeSource",value:function(e){var t,r=this;Ve(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:yn,payload:{sourceId:e}}}(e)),t=function(){r.dragSources.delete(e),r.types.delete(e)},Kn.enqueueTask(qn.create(t))}},{key:"removeTarget",value:function(e){Ve(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:mn,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);Ve(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){Ve(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var n=function(e){var t=(Hn++).toString();switch(e){case Mn.SOURCE:return"S".concat(t);case Mn.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(n,t),e===Mn.SOURCE?this.dragSources.set(n,r):e===Mn.TARGET&&this.dropTargets.set(n,r),n}}],r&&Yn(t.prototype,r),e}();function ei(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(t=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__,un(kn,t&&r&&r({name:"dnd-core",instanceId:"dnd-core"}))),s=new Ln(o,new Zn(o)),a=new rn(o,s),u=e(a,n,i);return a.receiveBackend(u),a}var ti=["children"];function ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ni=0,ii=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),oi=(0,c.memo)((function(e){var t,r,n=e.children,i=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]:si(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=t;return i[ii]||(i[ii]={dragDropManager:ei(e,t,r,n)}),i[ii]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ti)),o=(r=2,function(e){if(Array.isArray(e))return e}(t=i)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return ri(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ri(e,t):void 0}}(t,r)||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.")}()),s=o[0],a=o[1];return(0,c.useEffect)((function(){if(a){var e=si();return++ni,function(){0==--ni&&(e[ii]=null)}}}),[]),(0,h.jsx)(Ge.Provider,Object.assign({value:s},{children:n}),void 0)}));function si(){return void 0!==r.g?r.g:window}const ai=re();function ui({treeProps:e,imperativeHandle:t,children:r}){const n=(0,c.useRef)(null),i=(0,c.useRef)(null),o=(0,c.useRef)(er(rr,re(e))),s=(0,p.useSyncExternalStore)(o.current.subscribe,o.current.getState,(()=>ai)),a=(0,c.useMemo)((()=>new $t(o.current,e,n,i)),[]),u=(0,c.useRef)(0);return(0,c.useMemo)((()=>{u.current+=1,a.update(e)}),[...Object.values(e),s.nodes.open]),(0,c.useImperativeHandle)(t,(()=>a)),(0,c.useEffect)((()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()}),[a.props.selection]),(0,c.useEffect)((()=>{a.props.searchTerm||o.current.dispatch(ee(!0))}),[a.props.searchTerm]),(0,h.jsx)(g.Provider,{value:a,children:(0,h.jsx)(b.Provider,{value:u.current,children:(0,h.jsx)(y.Provider,{value:s.nodes,children:(0,h.jsx)(m.Provider,{value:s.dnd,children:(0,h.jsx)(oi,Object.assign({backend:Rr,options:{rootElement:a.props.dndRootElement||void 0}},e.dndManager&&{manager:e.dndManager},{children:r}))})})})})}function ci(e){return function(){const e=v(),[,t]=At((()=>({accept:"NODE",canDrop:(t,r)=>!!r.isOver({shallow:!0})&&e.canDrop(),hover:(t,r)=>{if(!r.isOver({shallow:!0}))return;const n=r.getClientOffset();if(!e.listEl.current||!n)return;const{cursor:i,drop:o}=Lt({element:e.listEl.current,offset:n,indent:e.indent,node:null,prevNode:e.visibleNodes[e.visibleNodes.length-1],nextNode:null});o&&e.dispatch(le(o.parentId,o.index)),r.canDrop()?i&&e.showCursor(i):e.hideCursor()}})),[e]);t(e.listEl)}(),e.children}function li(){const e=v().props.renderContainer||Ut;return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(e,{})})}function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fi(){const e=v(),{offset:t,mouse:r,item:n,isDragging:i}=(a=e=>({offset:e.getSourceClientOffset(),mouse:e.getClientOffset(),item:e.getItem(),isDragging:e.isDragging()}),u=Ke().getMonitor(),o=pt(u,a),s=2,d=(l=function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}}(o,s)||function(e,t){if(e){if("string"==typeof e)return di(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?di(e,t):void 0}}(o,s)||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.")}())[0],f=l[1],(0,c.useEffect)((function(){return u.subscribeToOffsetChange(f)})),(0,c.useEffect)((function(){return u.subscribeToStateChange(f)})),d);var o,s,a,u,l,d,f;const p=e.props.renderDragPreview||pe;return(0,h.jsx)(p,{offset:t,mouse:r,id:(null==n?void 0:n.id)||null,dragIds:(null==n?void 0:n.dragIds)||[],isDragging:i})}class hi{constructor(e){this.root=function(e){const t=new gi({id:"ROOT"},null);return t.children=e.map((e=>pi(e,t))),t}(e)}get data(){var e,t;return null!==(t=null===(e=this.root.children)||void 0===e?void 0:e.map((e=>e.data)))&&void 0!==t?t:[]}create(e){const t=e.parentId?this.find(e.parentId):this.root;if(!t)return null;t.addChild(e.data,e.index)}move(e){const t=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;t&&r&&(r.addChild(t.data,e.index),t.drop())}update(e){const t=this.find(e.id);t&&t.update(e.changes)}drop(e){const t=this.find(e.id);t&&t.drop()}find(e,t=this.root){if(!t)return null;if(t.id===e)return t;if(t.children){for(let r of t.children){const t=this.find(e,r);if(t)return t}return null}return null}}function pi(e,t){const r=new gi(e,t);return e.children&&(r.children=e.children.map((e=>pi(e,r)))),r}class gi{constructor(e,t){this.data=e,this.parent=t,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,t){var r,n;const i=pi(e,this);this.children=null!==(r=this.children)&&void 0!==r?r:[],this.children.splice(t,0,i),this.data.children=null!==(n=this.data.children)&&void 0!==n?n:[],this.data.children.splice(t,0,e)}removeChild(e){var t,r;null===(t=this.children)||void 0===t||t.splice(e,1),null===(r=this.data.children)||void 0===r||r.splice(e,1)}update(e){if(this.hasParent()){const t=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),t),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let vi=0;const yi=(0,c.forwardRef)((function(e,t){const r=function(e){if(e.initialData&&e.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(e.initialData&&(e.onCreate||e.onDelete||e.onMove||e.onRename))throw new Error("React Arborist Tree => You passed the initialData prop along with a data handler.\nUse the data prop if you want to provide your own handlers.");if(e.initialData){const[t,r]=function(e){const[t,r]=(0,c.useState)(e),n=(0,c.useMemo)((()=>new hi(t)),[t]),i={onMove:e=>{for(const t of e.dragIds)n.move({id:t,parentId:e.parentId,index:e.index});r(n.data)},onRename:({name:e,id:t})=>{n.update({id:t,changes:{name:e}}),r(n.data)},onCreate:({parentId:e,index:t,type:i})=>{const o={id:"simple-tree-id-"+vi++,name:""};return"internal"===i&&(o.children=[]),n.create({parentId:e,index:t,data:o}),r(n.data),o},onDelete:e=>{e.ids.forEach((e=>n.drop({id:e}))),r(n.data)}};return[t,i]}(e.initialData);return Object.assign(Object.assign(Object.assign({},e),r),{data:t})}return e}(e);return(0,h.jsxs)(ui,{treeProps:r,imperativeHandle:t,children:[(0,h.jsx)(ci,{children:(0,h.jsx)(li,{})}),(0,h.jsx)(fi,{})]})}));var mi={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},bi=c.createContext&&c.createContext(mi),Oi=["attr","size","title"];function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wi.apply(this,arguments)}function Si(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ii(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Si(Object(r),!0).forEach((function(t){var n,i,o,s;n=e,i=t,o=r[t],(i="symbol"==typeof(s=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i))?s:s+"")in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Di(e){return e&&e.map(((e,t)=>c.createElement(e.tag,Ii({key:t},e.attr),Di(e.child))))}function Ei(e){return t=>c.createElement(Ti,wi({attr:Ii({},e.attr)},t),Di(e.child))}function Ti(e){var t=t=>{var r,{attr:n,size:i,title:o}=e,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Oi),a=i||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),c.createElement("svg",wi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,s,{className:r,style:Ii(Ii({color:e.color||t.color},t.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&c.createElement("title",null,o),e.children)};return void 0!==bi?c.createElement(bi.Consumer,null,(e=>t(e))):t(mi)}function xi(e){return Ei({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"},child:[]},{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"},child:[]}]})(e)}function Ci(e){return Ei({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"},child:[]},{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"},child:[]}]})(e)}function ji(e){return Ei({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M4 9h4v11H4zM16 13h4v7h-4zM10 4h4v16h-4z"},child:[]}]})(e)}function Ni(e){return Ei({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"},child:[]}]})(e)}const Pi=function(e){var t=e.node,r=e.style,n=e.tree,i="icon_color"in t.data?t.data.icon_color:n.props.node_icon_color;return l().createElement("div",{className:"tree-node-container",style:r},l().createElement("div",{className:"tree-node-content",onClick:function(){return t.isInternal&&t.toggle()}},t.isLeaf?l().createElement(l().Fragment,null,l().createElement("span",{className:"tree-collapse"}),l().createElement("span",{className:"tree-file-folder-icon"},l().createElement(ji,{color:i})),l().createElement("a",{className:"tree-node-leaf-text",href:t.data.href},t.data.name)):l().createElement(l().Fragment,null,l().createElement("span",{className:"tree-collapse"},t.isOpen?l().createElement(xi,{color:n.props.collapse_icon_color}):l().createElement(Ci,{color:n.props.collapse_icon_color})),l().createElement("span",{className:"tree-file-folder-icon"},l().createElement(Ni,{color:i})),l().createElement("p",{className:"tree-node-folder-text"},t.data.name))))};var ki=r(72),Ai=r.n(ki),Ri=r(825),_i=r.n(Ri),Mi=r(659),Li=r.n(Mi),Hi=r(56),Fi=r.n(Hi),Bi=r(540),Ui=r.n(Bi),zi=r(113),Wi=r.n(zi),Vi=r(405),Gi={};function Ki(e){return Ki="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},Ki(e)}function qi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yi(n.key),n)}}function Yi(e){var t=function(e){if("object"!=Ki(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ki(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ki(t)?t:t+""}function $i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($i=function(){return!!e})()}function Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xi(e)}function Ji(e,t){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ji(e,t)}Gi.styleTagTransform=Wi(),Gi.setAttributes=Fi(),Gi.insert=Li().bind(null,"head"),Gi.domAPI=_i(),Gi.insertStyleElement=Ui(),Ai()(Vi.A,Gi),Vi.A&&Vi.A.locals&&Vi.A.locals;var Qi=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=Xi(t),function(e,t){if(t&&("object"==Ki(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$i()?Reflect.construct(t,r||[],Xi(e).constructor):t.apply(e,r))}(this,t,[e])).state={term:""},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ji(e,t)}(t,e),r=t,n=[{key:"render",value:function(){var e=this;return l().createElement("div",{id:this.props.id},this.props.searchable?l().createElement("input",{type:"text",placeholder:"Search...",className:"tree-search-input",value:this.state.term,onChange:function(t){return e.setState({term:t.target.value})}}):l().createElement(l().Fragment,null),l().createElement(yi,{data:this.props.data,searchTerm:this.state.term,width:this.props.width,height:this.props.height,indent:this.props.indent,rowHeight:this.props.row_height,overscanCount:this.props.overscan_count,paddingTop:this.props.padding_top,paddingBottom:this.props.padding_bottom,padding:this.props.padding,openByDefault:this.props.open_by_default,className:this.props.className,rowClassName:this.props.rowClassName,disableDrag:!0,disableDrop:!0,disableEdit:!0,disableMultiSelection:!0,collapse_icon_color:this.props.collapse_icon_color,node_icon_color:this.props.node_icon_color},Pi))}}],n&&qi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(c.Component);Qi.defaultProps={open_by_default:!0,collapse_icon_color:"#888888",node_icon_color:"#424242",searchable:!0},Qi.propTypes={id:f().string,data:f().array.isRequired,width:f().number,height:f().number,row_height:f().number,overscan_count:f().number,indent:f().number,padding_top:f().number,padding_bottom:f().number,padding:f().number,collapse_icon_color:f().string,node_icon_color:f().string,open_by_default:f().bool,searchable:f().bool,className:f().string,rowClassName:f().string,setProps:f().func},window.dash_tree_components=s})();
|
|
3
|
+
//# sourceMappingURL=dash_tree_components.min.js.map
|