editable-antd-tree
Version:
This is an editable tree react component based on antd.
2 lines (1 loc) • 37.8 kB
JavaScript
;var e=require("antd"),t=require("react"),r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function n(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 o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function o(e,t,r,n){return new(r||(r=Promise))((function(o,a){function l(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(l,i)}c((n=n.apply(e,t||[])).next())}))}function a(e,t){var r,n,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(l=0)),l;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,n=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},c=t.createContext&&t.createContext(i),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},u=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 o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function d(e){return e&&e.map((function(e,r){return t.createElement(e.tag,s({key:r},e.attr),d(e.child))}))}function f(e){return function(r){return t.createElement(p,s({attr:s({},e.attr)},r),d(e.child))}}function p(e){var r=function(r){var n,o=e.attr,a=e.size,l=e.title,i=u(e,["attr","size","title"]),c=a||r.size||"1em";return r.className&&(n=r.className),e.className&&(n=(n?n+" ":"")+e.className),t.createElement("svg",s({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,i,{className:n,style:s(s({color:e.color||r.color},r.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),l&&t.createElement("title",null,l),e.children)};return void 0!==c?t.createElement(c.Consumer,null,(function(e){return r(e)})):r(i)}function b(e){return f({tag:"svg",attr:{t:"1569683586275",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M672 432c-120.3 0-219.9 88.5-237.3 204H320c-15.5 0-28-12.5-28-28V244h291c14.2 35.2 48.7 60 89 60 53 0 96-43 96-96s-43-96-96-96c-40.3 0-74.8 24.8-89 60H112v72h108v364c0 55.2 44.8 100 100 100h114.7c17.4 115.5 117 204 237.3 204 132.5 0 240-107.5 240-240S804.5 432 672 432z m128 266c0 4.4-3.6 8-8 8h-86v86c0 4.4-3.6 8-8 8h-52c-4.4 0-8-3.6-8-8v-86h-86c-4.4 0-8-3.6-8-8v-52c0-4.4 3.6-8 8-8h86v-86c0-4.4 3.6-8 8-8h52c4.4 0 8 3.6 8 8v86h86c4.4 0 8 3.6 8 8v52z"}}]})(e)}function h(e){return f({tag:"svg",attr:{t:"1569683432252",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M688 240c-138 0-252 102.8-269.6 236H249c-14.2-35.2-48.7-60-89-60-53 0-96 43-96 96s43 96 96 96c40.3 0 74.8-24.8 89-60h169.3C436 681.2 550 784 688 784c150.2 0 272-121.8 272-272S838.2 240 688 240z m128 298c0 4.4-3.6 8-8 8h-86v86c0 4.4-3.6 8-8 8h-52c-4.4 0-8-3.6-8-8v-86h-86c-4.4 0-8-3.6-8-8v-52c0-4.4 3.6-8 8-8h86v-86c0-4.4 3.6-8 8-8h52c4.4 0 8 3.6 8 8v86h86c4.4 0 8 3.6 8 8v52z"}}]})(e)}function m(e){return f({tag:"svg",attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M5.8 9.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.4-.3.7s.1.5.3.7z"}}]})(e)}function v(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=g(e))&&(n&&(n+=" "),n+=t);return n}function g(e){if("string"==typeof e)return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=g(e[n]))&&(r&&(r+=" "),r+=t);return r}function y(){return y=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},y.apply(this,arguments)}function x(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function o(o,a){r.set(o,a),++t>e&&(t=0,n=r,r=new Map)}return{get:function(e){var t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set:function(e,t){r.has(e)?r.set(e,t):o(e,t)}}}function w(e){var t=function(e){var t=e.theme,r=e.prefix,n={nextPart:new Map,validators:[]},o=function(e,t){if(!t)return e;return e.map((function(e){return[e[0],e[1].map((function(e){return"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((function(e){var r=e[0],n=e[1];return[t+r,n]}))):e}))]}))}(Object.entries(e.classGroups),r);return o.forEach((function(e){var r=e[0];z(e[1],n,r,t)})),n}(e);return{getClassGroupId:function(e){var r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),k(r,t)||function(e){if(E.test(e)){var t=E.exec(e)[1],r=null==t?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}(e)},getConflictingClassGroupIds:function(t){return e.conflictingClassGroups[t]||[]}}}function k(e,t){var r;if(0===e.length)return t.classGroupId;var n=e[0],o=t.nextPart.get(n),a=o?k(e.slice(1),o):void 0;if(a)return a;if(0!==t.validators.length){var l=e.join("-");return null==(r=t.validators.find((function(e){return(0,e.validator)(l)})))?void 0:r.classGroupId}}var E=/^\[(.+)\]$/;function z(e,t,r,n){e.forEach((function(e){if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void z(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach((function(e){var o=e[0];z(e[1],C(t,o),r,n)}))}else{(""===e?t:C(t,e)).classGroupId=r}}))}function C(e,t){var r=e;return t.split("-").forEach((function(e){r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)})),r}function N(e){var t=e.separator||":";return function(e){for(var r=0,n=[],o=0,a=0;a<e.length;a++){var l=e[a];0===r&&l===t[0]&&(1!==t.length&&e.slice(a,a+t.length)!==t||(n.push(e.slice(o,a)),o=a+t.length)),"["===l?r++:"]"===l&&r--}var i=0===n.length?e:e.substring(o),c=i.startsWith("!");return{modifiers:n,hasImportantModifier:c,baseClassName:c?i.substring(1):i}}}function I(e){return y({cache:x(e.cacheSize),splitModifiers:N(e)},w(e))}var j=/\s+/;function O(e,t){var r=t.splitModifiers,n=t.getClassGroupId,o=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(j).map((function(e){var t=r(e),o=t.modifiers,a=t.hasImportantModifier,l=t.baseClassName,i=n(l);if(!i)return{isTailwindClass:!1,originalClassName:e};var c=function(e){if(e.length<=1)return e;var t=[],r=[];return e.forEach((function(e){"["===e[0]?(t.push.apply(t,r.sort().concat([e])),r=[]):r.push(e)})),t.push.apply(t,r.sort()),t}(o).join(":");return{isTailwindClass:!0,modifierId:a?c+"!":c,classGroupId:i,originalClassName:e}})).reverse().filter((function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,r=e.classGroupId,n=t+r;return!a.has(n)&&(a.add(n),o(r).forEach((function(e){return a.add(t+e)})),!0)})).reverse().map((function(e){return e.originalClassName})).join(" ")}function P(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,a,l=i;function i(e){var r=t[0],i=t.slice(1).reduce((function(e,t){return t(e)}),r());return n=I(i),o=n.cache.get,a=n.cache.set,l=c,c(e)}function c(e){var t=o(e);if(t)return t;var r=O(e,n);return a(e,r),r}return function(){return l(v.apply(null,arguments))}}function S(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var U=/^\[(.+)\]$/,M=/^\d+\/\d+$/,T=new Set(["px","full","screen"]),A=/^(\d+)?(xs|sm|md|lg|xl)$/,D=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,L=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function R(e){return!Number.isNaN(Number(e))||T.has(e)||M.test(e)||G(e)}function G(e){var t,r=null==(t=U.exec(e))?void 0:t[1];return!!r&&(r.startsWith("length:")||D.test(r))}function W(e){var t,r=null==(t=U.exec(e))?void 0:t[1];return!!r&&r.startsWith("size:")}function H(e){var t,r=null==(t=U.exec(e))?void 0:t[1];return!!r&&r.startsWith("position:")}function B(e){var t,r=null==(t=U.exec(e))?void 0:t[1];return!!r&&(r.startsWith("url(")||r.startsWith("url:"))}function V(e){var t,r=null==(t=U.exec(e))?void 0:t[1];return!!r&&(!Number.isNaN(Number(r))||r.startsWith("number:"))}function $(e){var t,r=null==(t=U.exec(e))?void 0:t[1];return r?Number.isInteger(Number(r)):Number.isInteger(Number(e))}function K(e){return U.test(e)}function q(){return!0}function F(e){return A.test(e)}function _(e){var t,r=null==(t=U.exec(e))?void 0:t[1];return!!r&&L.test(r)}function J(){var e=S("colors"),t=S("spacing"),r=S("blur"),n=S("brightness"),o=S("borderColor"),a=S("borderRadius"),l=S("borderSpacing"),i=S("borderWidth"),c=S("contrast"),s=S("grayscale"),u=S("hueRotate"),d=S("invert"),f=S("gap"),p=S("gradientColorStops"),b=S("inset"),h=S("margin"),m=S("opacity"),v=S("padding"),g=S("saturate"),y=S("scale"),x=S("sepia"),w=S("skew"),k=S("space"),E=S("translate"),z=function(){return["auto",t]},C=function(){return["",R]},N=function(){return["auto",$]},I=function(){return["","0",K]};return{cacheSize:500,theme:{colors:[q],spacing:[R],blur:["none","",F,G],brightness:[$],borderColor:[e],borderRadius:["none","","full",F,G],borderSpacing:[t],borderWidth:C(),contrast:[$],grayscale:I(),hueRotate:[$],invert:I(),gap:[t],gradientColorStops:[e],inset:z(),margin:z(),opacity:[$],padding:[t],saturate:[$],scale:[$],sepia:I(),skew:[$,K],space:[t],translate:[t]},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[K])}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:[$]}],basis:[{basis:[t]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",$]}],"grid-cols":[{"grid-cols":[q]}],"col-start-end":[{col:["auto",{span:[$]}]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[q]}],"row-start-end":[{row:["auto",{span:[$]}]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["start","end","center","between","around","evenly"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:[].concat(["start","end","center","between","around","evenly"],["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(["start","end","center","between","around","evenly"],["baseline","stretch"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",t]}],"min-w":[{"min-w":["min","max","fit",R]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[F]},F,G]}],h:[{h:[t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",R]}],"max-h":[{"max-h":[t,"min","max","fit"]}],"font-size":[{text:["base",F,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",V]}],"font-family":[{font:[q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",G]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",R]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(["solid","dashed","dotted","double","none"],["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",R]}],"underline-offset":[{"underline-offset":["auto",R]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[t]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all","keep"]}],content:[{content:["none",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[H])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",W]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},B]}],"bg-color":[{bg:[e]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"])}],"outline-offset":[{"outline-offset":[R]}],"outline-w":[{outline:[R]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[R]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,_]}],"shadow-color":[{shadow:[q]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",F,K]}],grayscale:[{grayscale:[s]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:[$]}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:[$]}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[$,K]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[t]}],"scroll-mx":[{"scroll-mx":[t]}],"scroll-my":[{"scroll-my":[t]}],"scroll-mt":[{"scroll-mt":[t]}],"scroll-mr":[{"scroll-mr":[t]}],"scroll-mb":[{"scroll-mb":[t]}],"scroll-ml":[{"scroll-ml":[t]}],"scroll-p":[{"scroll-p":[t]}],"scroll-px":[{"scroll-px":[t]}],"scroll-py":[{"scroll-py":[t]}],"scroll-pt":[{"scroll-pt":[t]}],"scroll-pr":[{"scroll-pr":[t]}],"scroll-pb":[{"scroll-pb":[t]}],"scroll-pl":[{"scroll-pl":[t]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[R,V]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],"col-start-end":["col-start","col-end"],"row-start-end":["row-start","row-end"],gap:["gap-x","gap-y"],p:["px","py","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-t","rounded-r","rounded-b","rounded-l","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]}}}var Q=P(J);let X;const Y=new Uint8Array(16);function Z(){if(!X&&(X="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!X))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return X(Y)}var ee=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const te=[];for(let e=0;e<256;++e)te.push((e+256).toString(16).slice(1));function re(e,t=0){return(te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]).toLowerCase()}function ne(e){if(!function(e){return"string"==typeof e&&ee.test(e)}(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function oe(e,t,r){function n(e,n,o,a){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=ne(n)),16!==(null===(l=n)||void 0===l?void 0:l.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let i=new Uint8Array(16+e.length);if(i.set(n),i.set(e,n.length),i=r(i),i[6]=15&i[6]|t,i[8]=63&i[8]|128,o){a=a||0;for(let e=0;e<16;++e)o[a+e]=i[e];return o}return re(i)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function ae(e){return 14+(e+64>>>9<<4)+1}function le(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ie(e,t,r,n,o,a){return le((l=le(le(t,e),le(n,a)))<<(i=o)|l>>>32-i,r);var l,i}function ce(e,t,r,n,o,a,l){return ie(t&r|~t&n,e,t,o,a,l)}function se(e,t,r,n,o,a,l){return ie(t&n|r&~n,e,t,o,a,l)}function ue(e,t,r,n,o,a,l){return ie(t^r^n,e,t,o,a,l)}function de(e,t,r,n,o,a,l){return ie(r^(t|~n),e,t,o,a,l)}oe("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length,n="0123456789abcdef";for(let o=0;o<r;o+=8){const r=e[o>>5]>>>o%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[ae(t)-1]=t;let r=1732584193,n=-271733879,o=-1732584194,a=271733878;for(let t=0;t<e.length;t+=16){const l=r,i=n,c=o,s=a;r=ce(r,n,o,a,e[t],7,-680876936),a=ce(a,r,n,o,e[t+1],12,-389564586),o=ce(o,a,r,n,e[t+2],17,606105819),n=ce(n,o,a,r,e[t+3],22,-1044525330),r=ce(r,n,o,a,e[t+4],7,-176418897),a=ce(a,r,n,o,e[t+5],12,1200080426),o=ce(o,a,r,n,e[t+6],17,-1473231341),n=ce(n,o,a,r,e[t+7],22,-45705983),r=ce(r,n,o,a,e[t+8],7,1770035416),a=ce(a,r,n,o,e[t+9],12,-1958414417),o=ce(o,a,r,n,e[t+10],17,-42063),n=ce(n,o,a,r,e[t+11],22,-1990404162),r=ce(r,n,o,a,e[t+12],7,1804603682),a=ce(a,r,n,o,e[t+13],12,-40341101),o=ce(o,a,r,n,e[t+14],17,-1502002290),n=ce(n,o,a,r,e[t+15],22,1236535329),r=se(r,n,o,a,e[t+1],5,-165796510),a=se(a,r,n,o,e[t+6],9,-1069501632),o=se(o,a,r,n,e[t+11],14,643717713),n=se(n,o,a,r,e[t],20,-373897302),r=se(r,n,o,a,e[t+5],5,-701558691),a=se(a,r,n,o,e[t+10],9,38016083),o=se(o,a,r,n,e[t+15],14,-660478335),n=se(n,o,a,r,e[t+4],20,-405537848),r=se(r,n,o,a,e[t+9],5,568446438),a=se(a,r,n,o,e[t+14],9,-1019803690),o=se(o,a,r,n,e[t+3],14,-187363961),n=se(n,o,a,r,e[t+8],20,1163531501),r=se(r,n,o,a,e[t+13],5,-1444681467),a=se(a,r,n,o,e[t+2],9,-51403784),o=se(o,a,r,n,e[t+7],14,1735328473),n=se(n,o,a,r,e[t+12],20,-1926607734),r=ue(r,n,o,a,e[t+5],4,-378558),a=ue(a,r,n,o,e[t+8],11,-2022574463),o=ue(o,a,r,n,e[t+11],16,1839030562),n=ue(n,o,a,r,e[t+14],23,-35309556),r=ue(r,n,o,a,e[t+1],4,-1530992060),a=ue(a,r,n,o,e[t+4],11,1272893353),o=ue(o,a,r,n,e[t+7],16,-155497632),n=ue(n,o,a,r,e[t+10],23,-1094730640),r=ue(r,n,o,a,e[t+13],4,681279174),a=ue(a,r,n,o,e[t],11,-358537222),o=ue(o,a,r,n,e[t+3],16,-722521979),n=ue(n,o,a,r,e[t+6],23,76029189),r=ue(r,n,o,a,e[t+9],4,-640364487),a=ue(a,r,n,o,e[t+12],11,-421815835),o=ue(o,a,r,n,e[t+15],16,530742520),n=ue(n,o,a,r,e[t+2],23,-995338651),r=de(r,n,o,a,e[t],6,-198630844),a=de(a,r,n,o,e[t+7],10,1126891415),o=de(o,a,r,n,e[t+14],15,-1416354905),n=de(n,o,a,r,e[t+5],21,-57434055),r=de(r,n,o,a,e[t+12],6,1700485571),a=de(a,r,n,o,e[t+3],10,-1894986606),o=de(o,a,r,n,e[t+10],15,-1051523),n=de(n,o,a,r,e[t+1],21,-2054922799),r=de(r,n,o,a,e[t+8],6,1873313359),a=de(a,r,n,o,e[t+15],10,-30611744),o=de(o,a,r,n,e[t+6],15,-1560198380),n=de(n,o,a,r,e[t+13],21,1309151649),r=de(r,n,o,a,e[t+4],6,-145523070),a=de(a,r,n,o,e[t+11],10,-1120210379),o=de(o,a,r,n,e[t+2],15,718787259),n=de(n,o,a,r,e[t+9],21,-343485551),r=le(r,l),n=le(n,i),o=le(o,c),a=le(a,s)}return[r,n,o,a]}(function(e){if(0===e.length)return[];const t=8*e.length,r=new Uint32Array(ae(t));for(let n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))}));var fe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pe(e,t,r){if(fe.randomUUID&&!t&&!e)return fe.randomUUID();const n=(e=e||{}).random||(e.rng||Z)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return re(n)}function be(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function he(e,t){return e<<t|e>>>32-t}function me(e){return f({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m10 15.586-3.293-3.293-1.414 1.414L10 18.414l9.707-9.707-1.414-1.414z"}}]})(e)}function ve(e){return f({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",stroke:"#000",strokeWidth:"2",d:"M7,7 L17,17 M7,17 L17,7"}}]})(e)}function ge(e){return f({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}}]})(e)}function ye(e){return f({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12.9 6.858l4.242 4.243L7.242 21H3v-4.243l9.9-9.9zm1.414-1.414l2.121-2.122a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414l-2.122 2.121-4.242-4.242z"}}]}]})(e)}oe("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const n=e.length/4+2,o=Math.ceil(n/16),a=new Array(o);for(let t=0;t<o;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];a[t]=r}a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<o;++e){const n=new Uint32Array(80);for(let t=0;t<16;++t)n[t]=a[e][t];for(let e=16;e<80;++e)n[e]=he(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);let o=r[0],l=r[1],i=r[2],c=r[3],s=r[4];for(let e=0;e<80;++e){const r=Math.floor(e/20),a=he(o,5)+be(r,l,i,c)+s+t[r]+n[e]>>>0;s=c,c=i,i=he(l,30)>>>0,l=o,o=a}r[0]=r[0]+o>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+i>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+s>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}));var xe=t.forwardRef((function(e,o){var a=e.onChange,l=e.onEnter,i=e.placeholder,c=n(e,["onChange","onEnter","placeholder"]);return t.createElement("input",r({ref:o,type:"text",onKeyDown:function(e){"Enter"===e.key&&l&&l()},className:Q("bg-transparent py-0",c.className),placeholder:null!=i?i:"Type..",onChange:function(e){return a&&a(e.target.value)}},c))}));xe.displayName="TextInput";var we=function(e,t){var r=e.findIndex((function(e){return e.key===t}));-1===r?ke(e,t):e.splice(r,1)},ke=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.children){if(n.children.some((function(e){return e.key===t})))return void(n.children=n.children.filter((function(e){return e.key!==t})));ke(n.children,t)}}},Ee=function(e,t,n){return e.map((function(e){return e.key===t&&e.children?r(r({},e),{children:n}):e.children?r(r({},e),{children:Ee(e.children,t,n)}):e}))},ze=function(r){var n=r.treeData,o=r.updateTreeData,a=r.expandKey,i=r.node,c=r.deleteNode,s=r.updateNode,u=r.createLeaf,d=r.createParent,f=t.useRef(null),p=t.useState(i.title||""),m=p[0],v=p[1],g=t.useState(n&&!i.title),y=g[0],x=g[1],w=function(){we(n,i.key),o(l([],n,!0)),(null==c?void 0:c.event)&&c.event(i)},k=function(){var e=i.title;m!==i.title?(i.title=m,i.key=pe(),e||i.children||!(null==u?void 0:u.event)||null==u||u.event(i),!e&&i.children&&(null==d?void 0:d.event)&&(null==d||d.event(i)),e&&(null==s?void 0:s.event)&&(null==s||s.event(i)),E(!0),o(l([],n,!0))):E(!0)},E=function(e){i.title?(e||v(i.title),x((function(e){return!e}))):w()},z=function(e){return"function"==typeof e?e(i):!e};return t.useEffect((function(){var e;y&&(null===(e=f.current)||void 0===e||e.focus())}),[y]),t.createElement("div",{className:"flex items-center space-x-4"},y?t.createElement("div",{className:"flex items-center space-x-1"},t.createElement(xe,{ref:f,value:m,className:"outline-none px-2 border-none py-0",onChange:function(e){return v(e)},onEnter:k}),t.createElement("div",{className:"flex space-x-0.5"},t.createElement("button",{onClick:k},t.createElement(me,null)),t.createElement("button",{onClick:function(){return E(!1)}},t.createElement(ve,null)))):t.createElement("span",null,i.title),t.createElement("div",{className:Q("space-x-1 flex items-center text-gray-600",y&&"hidden")},z(null==d?void 0:d.disable)&&i.children&&t.createElement(e.Tooltip,{title:(null==d?void 0:d.caption)||"Create Parent"},t.createElement("button",{onClick:function(){var e;i.children&&(we(n,""),a(i.key),null===(e=i.children)||void 0===e||e.push({key:"",title:null,isLeaf:!1,parent:i.key,children:[]}),o(l([],n,!0)))}},t.createElement(b,null))),z(null==u?void 0:u.disable)&&i.children&&t.createElement(e.Tooltip,{title:(null==u?void 0:u.caption)||"Create Leaf"},t.createElement("button",{onClick:function(){var e;i.children&&(we(n,""),a(i.key),null===(e=i.children)||void 0===e||e.push({key:"",title:null,isLeaf:!0,parent:i.key}),o(l([],n,!0)))}},t.createElement(h,null))),z(null==s?void 0:s.disable)&&t.createElement(e.Tooltip,{title:(null==s?void 0:s.caption)||"Update Node"},t.createElement("button",{onClick:function(){return E(!0)}},t.createElement(ye,null))),z(null==c?void 0:c.disable)&&t.createElement(e.Tooltip,{title:(null==c?void 0:c.caption)||"Delete Node"},t.createElement("button",{onClick:w},t.createElement(ge,null)))))},Ce={xs:"text-xs",sm:"text-sm",md:"text-md",lg:"text-lg",xl:"text-xl"};exports.EditableAntdTree=function(i){var c=i.treeData,s=i.size,u=void 0===s?"sm":s,d=i.switcherIcon,f=void 0===d?t.createElement(m,{size:"2.75em",className:"text-gray-600 -mt-[0.2em]"}):d,p=i.onTreeChange,v=i.deleteNode,g=i.updateNode,y=i.createLeaf,x=i.createParent,w=i.createRootLeaf,k=i.createRootParent,E=i.loadData,z=n(i,["treeData","size","switcherIcon","onTreeChange","deleteNode","updateNode","createLeaf","createParent","createRootLeaf","createRootParent","loadData"]),C=t.useState(c||[]),N=C[0],I=C[1],j=t.useState([]),O=j[0],P=j[1],S=t.useState(""),U=S[0],M=S[1],T=function(e){I((function(t){var r="function"==typeof e?e(t):e;return p(r),r}))},A={treeData:N,updateTreeData:T,deleteNode:v,updateNode:g,createLeaf:y,createParent:x},D=function(e){if(U){var t=l(l([],N,!0),[r({key:pe(),title:U,isLeaf:e},e?{}:{children:[]})],!1);T(t),M(""),e&&(null==w?void 0:w.action)&&w.action(t[t.length-1]),!e&&(null==k?void 0:k.action)&&k.action(t[t.length-1])}},L=function(e){P((function(t){return l(l([],t,!0),[e],!1)}))};return t.createElement(t.Fragment,null,t.createElement(e.Tree,r({treeData:N,loadData:function(e){return o(void 0,void 0,void 0,(function(){var t,r;return a(this,(function(n){switch(n.label){case 0:return(null===(r=e.children)||void 0===r?void 0:r.length)||e.isLeaf?[2]:(t=[],E?[4,E(e)]:[3,2]);case 1:t=n.sent()||[],n.label=2;case 2:return t.length&&T((function(r){return Ee(r,e.key,t)})),[2]}}))}))},titleRender:function(e){return t.createElement(ze,r({node:e,expandKey:L},A))},onExpand:function(e){P(e)},expandedKeys:O,showLine:!0,className:Q(z.className,Ce[u]),switcherIcon:t.createElement("div",null,f)},z)),t.createElement("div",{className:Q("flex items-center w-max space-x-2 pl-1",Ce[u])},t.createElement(xe,{value:U,onChange:function(e){return M(e)},className:Q("outline-none p-1 border-none opacity-70 hover:bg-gray-100 focus::bg-gray-50 rounded-sm duration-150 transition-all",Ce[u])}),t.createElement("div",{className:"space-x-2"},!(null==k?void 0:k.disable)&&t.createElement("button",{onClick:function(){return D(!1)}},t.createElement(e.Tooltip,{title:(null==k?void 0:k.caption)||"Create Parent"},t.createElement(b,null))),!(null==w?void 0:w.disable)&&t.createElement("button",null,t.createElement(e.Tooltip,{title:(null==w?void 0:w.caption)||"Create Leaf"},t.createElement(h,{onClick:function(){return D(!0)}}))))))};