diff --git a/resources/assets/component.min.js b/resources/assets/component.min.js
index d06933c..bca2700 100644
--- a/resources/assets/component.min.js
+++ b/resources/assets/component.min.js
@@ -1 +1 @@
-window._component={trash:'',move:'',write:'',close:'',check:'',check_circle:'',caret_right:'',caret_right_circle:'',sub_loading:'',node:'',request:function(e){e=Object.assign({url:"",method:"GET",header:{},data:{},callback:null,error_callback:null,timeout:3e4},e);let t=new XMLHttpRequest;"GET"===e.method&&(e.url=_component.parseParams(e.url,e.data)),t.open(e.method,e.url,!0),t.timeout=e.timeout;let i="";if(document.querySelector('meta[name="csrf-token"]')&&(i=document.querySelector('meta[name="csrf-token"]').getAttribute("content")),t.setRequestHeader("X-CSRF-TOKEN",i),e.header)for(let i in e.header)e.header.hasOwnProperty(i)&&t.setRequestHeader(i,e.header[i]);"GET"===e.method?(t.setRequestHeader("Content-type","application/text;charset=UTF-8"),t.responseType="text",t.send(null)):(e.data instanceof FormData?t.setRequestHeader("X-Requested-With","XMLHttpRequest"):(t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),e.data=JSON.stringify(e.data)),t.responseType="json",t.send(e.data)),t.onload=function(){this.status>=200&&this.status<300||"function"==typeof e.error_callback&&e.error_callback()},t.onreadystatechange=function(){if(t.readyState===t.DONE&&200===t.status){let i=t.response;"function"==typeof e.callback&&e.callback(i)}},t.onerror=function(t){console.error(t),"function"==typeof e.error_callback&&e.error_callback(t)}},parseParams(e,t){let i=[];return 0===Object.keys(t).length||(Object.keys(t).forEach((e=>t[e]&&i.push(`${e}=${t[e]}`))),-1===e.search(/\?/)?e+=`?${i.join("&")}`:e+=`&${i.join("&")}`),e},loading:function(e,t=!1){t?e.innerHTML="":e.insertAdjacentHTML("afterbegin",'
\n
\n
\n
\n
\n
\n
\n
')},_alert_documents:[],alert:function(e,t=1,i=null,s=null){let a,n,l=document.createElement("div");l.insertAdjacentHTML("afterbegin",`${e}`),l.className="dlp-alert",this._alert_documents.forEach((e=>{e.style.top=parseInt(e.style.top)-60+"px"})),this._alert_documents.push(l),s?s.append(l):document.getElementsByTagName("BODY")[0].appendChild(l),s?(a=(s.offsetWidth-320)/2,n=s.offsetHeight/2-15,l.style.position="absolute"):(a=(window.innerWidth-320)/2,n=window.innerHeight/2-15,l.style.position="fixed"),l.style.top=n+"px",l.style.left=a+"px",setTimeout((()=>{let e=this._alert_documents.shift();e.parentNode.removeChild(e),"function"==typeof i&&i()}),1e3*t)},contextmenu:function(e,t,i={}){i=Object.assign({W:"70px"},i);let s=document.createElement("ul");s.className="dlp dlp-contextmenu",t.forEach((e=>{let t=document.createElement("li");t.className="dlp dlp-text",t.insertAdjacentHTML("afterbegin",e.title),t.style.width=i.W,"function"==typeof e.func&&(t.addEventListener("click",(()=>{s.remove(),setTimeout((()=>{e.func()}),100)})),s.append(t))})),s.style.top=e.pageY-3+"px",s.style.left=e.pageX-3+"px",s.addEventListener("contextmenu",(e=>{e.preventDefault()})),s.addEventListener("mouseleave",(()=>{s.remove()})),document.getElementsByTagName("BODY")[0].appendChild(s)},dimensional(e,t,i=0,s=[]){if(Array.isArray(t)){for(let a in t){if(!t.hasOwnProperty(a))continue;let n=s.slice(0);n.push(t[a].key),_component.dimensional(e,t[a],i,n)}return}let a=s.slice(0);a.pop(),t.parentNodes=a,Array.isArray(e[i])?e[i].push(t):e[i]=[t],t.hasOwnProperty("nodes")&&Array.isArray(t.nodes)&&0!==t.nodes.length&&(i++,_component.dimensional(e,t.nodes,i,s))}},window.ComponentDot=class{MODE={insert:"insert",delete:"delete"};constructor(e,t,i,s=0,a={}){if(!Array.isArray(i))return void console.error("Dot param selected must be array!");if(Array.isArray(t)||"object"!=typeof t)return void console.error("Dot param select must be object such as {key:val,key2:val2,...} !");this.select=t,this.name=e,this.limit=s,this.DOM=document.getElementById(e),this.DOM.addEventListener("contextmenu",(e=>{e.preventDefault()})),this.menu=Object.assign({mode:!1,placeholder:"未选择",height:"150px"},a),this.selected_data=i,this.select_data=[],this.insert_data=[],this.delete_data=[],setTimeout((()=>{let e=[];this.CONTENT_DOM.childNodes.forEach((t=>{let s=parseInt(t.getAttribute("data-id"));-1!==i.indexOf(s)&&e.push(t)})),e.forEach((e=>e.click())),!0===this.menu.mode&&(this.DOM.querySelector(".menu-list").style.display="none")})),!1===this.menu.mode?this.make(i,t):(this.menu_placeholder=this.menu.placeholder,this.menuMake(i,t));let n=this.DOM.querySelector(".dot-search");n.addEventListener("input",(()=>{setTimeout((()=>{this.search(n,this.menu.mode)}),500)}))}make(e,t){let i="";for(let e in t)t.hasOwnProperty(e)&&(i+=`
${t[e]}
`);let s=`
${i}
\n`;this.DOM.insertAdjacentHTML("afterbegin",s),this.SELECTED_DOM=document.querySelector(`#${this.name} .dot-selected`),this.CONTENT_DOM=document.querySelector(`#${this.name} .dot-select`),this.selectInputDOM=document.querySelector(`input[name='${this.name}[select]']`),this.insertInputDOM=document.querySelector(`input[name='${this.name}[insert]']`),this.deleteInputDOM=document.querySelector(`input[name='${this.name}[delete]']`);for(let e of this.CONTENT_DOM.getElementsByClassName("dlp-label"))e.addEventListener("click",this.tagSelect.bind(this,e),!1)}menuMake(e,t){let i=document.createElement("div");i.className="dlp-dot-menu";let s=document.createElement("div");s.className="dlp-input dlp-dot-menu-select",s.insertAdjacentHTML("afterbegin",`
${this.menu_placeholder}
▼
`);let a=document.createElement("div");a.className="menu-list";let n=document.createElement("div");n.className="search-box";let l=document.createElement("input");l.className="dlp dlp-input dot-search",l.setAttribute("placeholder","搜索");let d=document.createElement("div");d.className="list dlp-scroll",d.style.maxHeight=this.menu.height;let r=_component.check;r=r.replace('width="16" height="16"','width="12" height="12"'),this.id_line_hash=[];let o=0;for(let e in t){if(!t.hasOwnProperty(e))continue;this.id_line_hash[e]=o,o++;let i=document.createElement("div");i.className="option",i.setAttribute("data-id",e),i.insertAdjacentHTML("afterbegin",`
${t[e]}
`),i.addEventListener("click",(()=>{if(e=parseInt(e),-1!==this.select_data.indexOf(e))return this.tagCal(e,this.MODE.delete),i.classList.remove("option-active"),i.lastChild instanceof HTMLElement&&(i.lastChild.innerHTML=""),this.menuSelect(t),void(0===this.select_data.length&&(this.SELECTED_DOM.textContent=this.menu_placeholder));this.limit>0&&this.select_data.length>=this.limit&&d.childNodes[this.id_line_hash[this.select_data[0].toString()]].click(),i.classList.add("option-active"),this.tagCal(e,this.MODE.insert),i.lastChild instanceof HTMLElement&&i.lastChild.insertAdjacentHTML("afterbegin",r),this.menuSelect(t)}),!1),d.append(i)}i.append(s),n.append(l),a.append(n),a.append(d),i.append(a),i.addEventListener("click",(()=>{a.style.display="flex"})),i.addEventListener("mouseleave",(()=>{a.style.display="none",this.DOM.querySelector(".dot-search").value="";for(let e of this.CONTENT_DOM.childNodes)e.style.display="flex"})),this.DOM.append(i),this.DOM.insertAdjacentHTML("beforeend",``),this.SELECTED_DOM=document.querySelector(`#${this.name} .dlp-dot-menu-select`).firstElementChild,this.CONTENT_DOM=document.querySelector(`#${this.name} .list`),this.selectInputDOM=document.querySelector(`input[name='${this.name}[select]']`),this.insertInputDOM=document.querySelector(`input[name='${this.name}[insert]']`),this.deleteInputDOM=document.querySelector(`input[name='${this.name}[delete]']`)}menuSelect(e){if(1===this.limit)return void(this.SELECTED_DOM.innerHTML=`
${e[this.select_data[0]]}
`);let t="";for(let i of this.select_data)t+=`${e[i]}`;this.SELECTED_DOM.innerHTML=t}tagSelect(e){this.limit>0&&this.select_data.length>=this.limit&&this.SELECTED_DOM.firstChild instanceof HTMLElement&&this.SELECTED_DOM.firstChild.click();let t=e.cloneNode(!0);t.addEventListener("click",this.tagCancel.bind(this,t),!1),this.SELECTED_DOM.appendChild(t),e.remove(),this.tagCal(parseInt(e.getAttribute("data-id")),this.MODE.insert),this.SELECTED_DOM.scrollTop=this.SELECTED_DOM.scrollHeight}tagCancel(e){let t=e.cloneNode(!0);t.addEventListener("click",this.tagSelect.bind(this,t),!1),this.CONTENT_DOM.appendChild(t),e.remove(),this.tagCal(parseInt(e.getAttribute("data-id")),this.MODE.delete)}tagCal(e,t){let i=this.select_data.indexOf(e);t===this.MODE.insert?(-1===i&&(this.select_data.push(e),this.selectInputDOM.value=JSON.stringify(this.select_data)),-1===this.selected_data.indexOf(e)&&-1===this.insert_data.indexOf(e)&&(this.insert_data.push(e),this.insertInputDOM.value=JSON.stringify(this.insert_data)),i=this.delete_data.indexOf(e),-1!==i&&(this.delete_data.splice(i,1),this.deleteInputDOM.value=JSON.stringify(this.delete_data))):(-1!==i&&(this.select_data.splice(i,1),this.selectInputDOM.value=JSON.stringify(this.select_data)),-1!==this.selected_data.indexOf(e)&&-1===this.delete_data.indexOf(e)&&(this.delete_data.push(e),this.deleteInputDOM.value=JSON.stringify(this.delete_data)),i=this.insert_data.indexOf(e),-1!==i&&(this.insert_data.splice(i,1),this.insertInputDOM.value=JSON.stringify(this.insert_data)))}search(e,t){if(t){if(""===e.value){for(let e of this.CONTENT_DOM.childNodes)e.style.display="flex";return}for(let t in this.select){if(!this.select.hasOwnProperty(t))continue;let i=this.select[t],s=this.id_line_hash[t];-1!==i.indexOf(e.value)||-1!==e.value.indexOf(i)?this.CONTENT_DOM.childNodes[s].style.display="flex":this.CONTENT_DOM.childNodes[s].style.display="none"}return}if(""===e.value){if(this.SELECT_COVER_DOM instanceof HTMLElement){let e=[];this.SELECT_COVER_DOM.childNodes.forEach((t=>{e.push(t)})),this.CONTENT_DOM.append(...e),this.SELECT_COVER_DOM.remove(),this.SELECT_COVER_DOM=null}return}if(this.SELECT_COVER_DOM instanceof HTMLElement){let e=[];this.SELECT_COVER_DOM.childNodes.forEach((t=>{e.push(t)})),this.CONTENT_DOM.append(...e)}else this.SELECT_COVER_DOM=document.createElement("div"),this.SELECT_COVER_DOM.className="dot-select dlp-scroll dot-select-cover",this.CONTENT_DOM.parentNode.appendChild(this.SELECT_COVER_DOM);let i=[];for(let t of this.CONTENT_DOM.childNodes)-1!==t.className.indexOf("dlp-label")&&(-1===t.innerText.indexOf(e.value)&&-1===e.value.indexOf(t.innerText)||i.push(t));this.SELECT_COVER_DOM.append(...i)}},window.ComponentCascadeDot=class{MODE={insert:"insert",delete:"delete"};constructor(e,t,i,s=0){if(!Array.isArray(i)||!Array.isArray(t))return void console.error("CascadeDot param selected and select must be array!");this.name=e,this.limit=s,this.DOM=document.getElementById(e),this.selected_data=i,this.select_data=[],this.insert_data=[],this.delete_data=[],this.make().makeSelect(t),setTimeout((()=>{this.selected_label_dom.forEach((e=>{e.click()}))})),this.selectInputDOM.value=JSON.stringify(this.select_data);let a=document.querySelector(`#${this.name} .dot-search`);a.addEventListener("input",(()=>{setTimeout((()=>{this.search(a)}),500)}))}make(){let e=`
',t=document.createElement("tr");t.className="dlp-tr";let i=this.COLUMNS;this.INSERT_ROW_MENUE_DATA={};for(let s in i){if(!i.hasOwnProperty(s))continue;let a=i[s];if("hidden"===a.type)continue;let n=a.style?`style="${a.style}"`:"";switch(e+=`
`);let r=document.createElement("div");r.className="menu-list";let o=document.createElement("div");o.className="search-box";let c=document.createElement("input");c.className="dlp dlp-input dot-search",c.setAttribute("placeholder","搜索"),c.addEventListener("input",(()=>{setTimeout((()=>{if(""!==c.value)for(let e of h.childNodes){let t=e.firstElementChild.innerText;-1!==t.indexOf(c.value)||-1!==c.value.indexOf(t)?e.style.display="flex":e.style.display="none"}else for(let e of h.childNodes)e.style.display="flex"}),300)}));let h=document.createElement("div");h.className="list dlp-scroll";let p=_component.check;p=p.replace('width="16" height="16"','width="12" height="12"');for(let r in i){if(!i.hasOwnProperty(r))continue;let o=document.createElement("div");o.className="option",o.setAttribute("data-id",r),o.insertAdjacentHTML("afterbegin",`
${i[r]}
`),o.addEventListener("click",(()=>{let t;if(r=parseInt(r),n)t=this.INSERT_ROW_MENUE_DATA[e];else{let i=this.searchChildrenDomIndex(l.parentNode.parentNode);t=this.DATA[i][e]}let c=t.indexOf(r);if(-1!==c)return t.splice(c,1),o.classList.remove("option-active"),o.lastChild instanceof HTMLElement&&(o.lastChild.innerHTML=""),m(i,t,s),0===t.length&&(d.firstElementChild.textContent=a),void(!1===n&&(this.DATA_INPUT.value=JSON.stringify(this.DATA)));if(s>0&&t.length>=s)for(let e of h.childNodes)t.hasOwnProperty("0")&&e.getAttribute("data-id")===t[0].toString()&&e.click();o.classList.add("option-active"),t.push(r),o.lastChild instanceof HTMLElement&&o.lastChild.insertAdjacentHTML("afterbegin",p),m(i,t,s),!1===n&&(this.DATA_INPUT.value=JSON.stringify(this.DATA))}),!1),s>0&&t.length>=s&&t.slice(0,s),-1!==t.indexOf(parseInt(r))&&(o.classList.add("option-active"),o.lastChild instanceof HTMLElement&&o.lastChild.insertAdjacentHTML("afterbegin",p),m(i,t,s)),h.append(o)}function m(e,t,i){if(1===i)return void(d.firstElementChild.innerHTML=`
${e[t[0]]}
`);let s="";for(let i of t)s+=`${e[i]}`;d.firstElementChild.innerHTML=s}return l.append(d),o.append(c),r.append(o),r.append(h),l.append(r),l.addEventListener("click",(()=>{r.style.display="flex"})),l.addEventListener("mouseleave",(()=>{r.style.display="none",this.DOM.querySelector(".dot-search").value=""})),l}sortable(){let e=this;new ComponentSortable(this.TBODY_DOM,(function(t){let i=[];t.forEach((function(t){i.push(e.DATA[t])})),e.DATA=i,e.DATA_INPUT.value=JSON.stringify(e.DATA)}))}datepicker(){"undefined"!=typeof jQuery&&setTimeout((()=>{for(let e in this.format_settings){let t=this.format_settings[e];$(`#${this.NAME} input.datetime-${e}`).datetimepicker({format:t,locale:"zh-CN"})}}))}searchChildrenDomIndex(e){let t=0;for(;null!=(e=e.previousSibling);)t++;return t}},window.ComponentPlane=class{constructor(e,t={},i={}){document.querySelector("#dlp-plane")instanceof HTMLElement||(this.URL=e,this.XHR=Object.assign({url:e,method:"POST",listener:null,event:"click",callback:null},t),this.OPTIONS=Object.assign({w:.8,h:.8,top:"30px",left:"auto"},i),this.makeModal(),this.makeContent())}makeModal(){let e,t;e=-1!==this.OPTIONS.w.toString().indexOf(".")?window.innerWidth*this.OPTIONS.w+"px":this.OPTIONS.w,t=-1!==this.OPTIONS.h.toString().indexOf(".")?window.innerHeight*this.OPTIONS.h+"px":this.OPTIONS.h;let i=`
`;document.body.insertAdjacentHTML("beforeEnd",i),this.DOM=document.getElementById("dlp-plane");let s=document.createElement("i");s.insertAdjacentHTML("afterbegin",_component.close),s.addEventListener("click",(()=>{this.DOM instanceof HTMLElement&&this.DOM.remove(),document.getElementById("kvFileinputModal")instanceof HTMLElement&&document.getElementById("kvFileinputModal").remove()}),!1),this.DOM.querySelector(".plane-header").append(s),this.MODEL_BODY_DOM=this.DOM.querySelector(".plane-body"),window.addEventListener("popstate",(()=>{this.DOM.remove()}),!1)}makeContent(){_component.loading(this.MODEL_BODY_DOM);let e=this;_component.request({url:this.URL,method:"GET",callback:function(t){_component.loading(e.MODEL_BODY_DOM,!0);let i=document.createRange().createContextualFragment(t);e.MODEL_BODY_DOM.appendChild(i);let s=e.XHR.listener;if("function"==typeof s){let t=s(e.MODEL_BODY_DOM);t instanceof HTMLElement&&t.addEventListener(e.XHR.event,e.submitEvent.bind(e,t),!1)}}})}submitEvent(e){e.setAttribute("disabled","disabled"),e.innerText="提交中...";let t=this.MODEL_BODY_DOM.getElementsByTagName("form")[0],i=new FormData(t);for(const e of i.entries()){let t=e[0],s=e[1];/\[.*\]/.test(t)&&/^\[.*\]$/.test(s)&&"string"==typeof s&&(s=JSON.parse(s),Array.isArray(s)&&s.length>0?s.forEach((e=>{i.append(`${t}[]`,e)})):i.append(`${t}`,""))}_component.request({url:this.XHR.url,method:this.XHR.method,data:i,callback:t=>{"function"!=typeof this.XHR.callback?t&&(0===t.code?window.location.reload():_component.alert(t.message,3,(function(){e.removeAttribute("disabled"),e.innerText="提交"}))):this.XHR.callback(t)}})}},window.ComponentSortable=class{constructor(e,t=null){this.list="string"==typeof e?document.querySelector(e):e,this.options={animationSpeed:200,animationEasing:"ease-out"},this.callback=t,this.animation=!1,this.dragStart=this.dragStart.bind(this),this.dragMove=this.dragMove.bind(this),this.dragEnd=this.dragEnd.bind(this),this.list.addEventListener("touchstart",this.dragStart,!1),this.list.addEventListener("mousedown",this.dragStart,!1)}reset(){this.items=Array.from(this.list.children),this.items[this.items.length-1].offsetTop>this.list.offsetHeight?this.listHeight=this.list.scrollHeight:this.listHeight=this.items[this.items.length-1].offsetTop}dragStart(e){if(this.reset(),this.animation)return;if(this.items.length<2)return;this.handle=null;let t=e.target;for(;t&&(t.hasAttribute("sortable-handle")&&(this.handle=t),t.hasAttribute("sortable-item")&&(this.item=t),!t.hasAttribute("sortable-list"));)t=t.parentElement;if(!this.handle)return;this.list.style.position="relative",this.item.classList.add("is-dragging"),this.itemHeight=this.items[1].offsetTop,this.startTouchY=this.getDragY(e),this.startTop=this.item.offsetTop;const i=this.items.map((e=>e.offsetTop));this.items.forEach(((e,t)=>{e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.transform=`translateY(${i[t]}px)`,e.style.zIndex=e===this.item?"2":"1"})),this.positions=this.items.map(((e,t)=>t)),this.position=Math.round(this.startTop/this.listHeight*this.items.length),this.touch="touchstart"===e.type,window.addEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.addEventListener(this.touch?"touchend":"mouseup",this.dragEnd,!1)}dragMove(e){if(this.animation)return;if(this.items.length<2)return;const t=this.startTop+this.getDragY(e)-this.startTouchY,i=Math.round(t/this.listHeight*this.items.length);this.item.style.transform=`translateY(${t}px)`,this.positions.forEach((e=>{e!==this.position&&e===i&&(this.swapElements(this.positions,this.position,e),this.position=e)})),this.items.forEach(((e,t)=>{e!==this.item&&(e.style.transform=`translateY(${this.positions.indexOf(t)*this.itemHeight}px)`,e.style.transition=`transform ${this.options.animationSpeed}ms ${this.options.animationEasing}`)})),e.preventDefault()}dragEnd(){this.animation=!0,this.items.length<2||(this.item.style.transition=`all ${this.options.animationSpeed}ms ${this.options.animationEasing}`,this.item.style.transform=`translateY(${this.position*this.itemHeight}px)`,this.item.classList.remove("is-dragging"),"function"==typeof this.callback&&this.callback(this.positions),setTimeout((()=>{this.list.style.position="",this.items.forEach((e=>{e.style.top="",e.style.left="",e.style.right="",e.style.position="",e.style.transform="",e.style.transition="",e.style.zIndex=""})),this.positions.map((e=>{this.items[e]&&this.list.appendChild(this.items[e])})),this.animation=!1}),this.options.animationSpeed),window.removeEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.removeEventListener(this.touch?"touchend":"mouseup",this.dragEnd,!1))}swapElements(e,t,i){let s=e[t];e[t]=e[i],e[i]=s}getDragY(e){return e.touches?(e.touches[0]||e.changedTouches[0]).pageY:e.pageY}},window.ComponentCascadeLine=class{constructor(e,t,i,s){if(!Array.isArray(t))return void console.error("CascadeLine param select must be array!");this.name=e,this.OPTIONS=Object.assign({movable:!0,exchange:!0,detail:!0,insert:!0,update:!0,delete:!0,root:!0},s),this.DOM=document.getElementById(e),this.URL=i,this.make().makeSelect(t),this.OPTIONS.insert&&this.makeHeader();let a=document.querySelector(`#${this.name} .dot-search`);if(a.addEventListener("input",(()=>{setTimeout((()=>{this.search(a)}),700)})),this.OPTIONS.movable)for(let e of this.DOM.querySelectorAll("i.right"))this.nodeMigrate(e)}make(){return this.DOM.insertAdjacentHTML("afterbegin",'
'),r.addEventListener("click",(()=>{o.submit_block||(o.submit_block=!0,r.querySelector(".right").innerHTML=_component.sub_loading,_component.request({url:this.URL,method:"GET",data:{event:i,node_key:l.key,node_val:l.val,aim_node_key:n.key,aim_node_val:n.val},callback:function(s){if(o.submit_block=!1,0!==(s=JSON.parse(s)).code)return _component.alert(s.message,3,null,o.DOM);"exchange"===i&&o.nodeExchangeExec(e,l,t,n),"migrate"===i&&o.nodeMigrateExec(e,l,t,n),o.PLANE_DOM.remove()},error_callback:function(){o.submit_block=!1}}))})),this.PLANE_BODY.append(r)}nodeRootExec(e,t){let i=t.parentNodes.slice().pop(),s=t.stack-1;t.parentNodes=[];let a=0-t.stack,n=parseInt(e.getAttribute("data-k"));this.dimensional_data[t.stack].splice(n,1),this.dimensional_data[0].push(t),null!==t.nodes&&this.resetChildrenDimensional(t,t.stack+1,a),t.stack=0,this.dimensional_data=this.dimensional_data.filter((e=>e.length>0)),this.CONTENT_DOM.innerHTML="";for(let e in this.dimensional_data){if(!this.dimensional_data.hasOwnProperty(e))continue;e=parseInt(e);let a=this.dimensional_data[e],n=document.createElement("div");n.className="dot-cascade-stack dlp-scroll",a.forEach(((a,l)=>{parseInt(e)===s&&a.key===i&&a.nodes.splice(a.nodes.indexOf(t.key),1),Array.isArray(a.nodes)&&0!==a.nodes.length?a.expand=!1:a.nodes=null;let d=this.insertLabelDom(a,l,e);null!==a.nodes&&d.insertAdjacentHTML("afterbegin",`${_component.caret_right}`),n.append(d)})),this.CONTENT_DOM.append(n)}this.STACKS=this.CONTENT_DOM.childNodes;for(let e of this.DOM.querySelectorAll("i.right"))this.nodeMigrate(e)}nodeMigrateExec(e,t,i,s){let a,n=t.parentNodes.slice().pop(),l=t.stack-1,d=s.parentNodes.slice(0);d.push(s.key),t.parentNodes=d,null!==s.nodes&&(a=s.nodes.slice(0).pop());let r=s.stack+1,o=r-t.stack,c=parseInt(e.getAttribute("data-k"));if(this.dimensional_data[t.stack].splice(c,1),Array.isArray(this.dimensional_data[r])||(this.dimensional_data[r]=[]),a){let e=0;for(let t in this.dimensional_data[s.stack+1])if(this.dimensional_data[s.stack+1].hasOwnProperty(t)&&this.dimensional_data[s.stack+1][t].key===a){e=t;break}e++,this.dimensional_data[s.stack+1].splice(e,0,t)}else this.dimensional_data[r].push(t);this.resetChildrenDimensional(t,t.stack+1,o),this.dimensional_data=this.dimensional_data.filter((e=>e.length>0)),t.stack=r,Array.isArray(s.nodes)||(s.nodes=[]),s.nodes.push(t.key),this.CONTENT_DOM.innerHTML="";for(let e in this.dimensional_data){if(!this.dimensional_data.hasOwnProperty(e))continue;e=parseInt(e);let i=this.dimensional_data[e],s=document.createElement("div");s.className="dot-cascade-stack dlp-scroll",i.forEach(((i,a)=>{parseInt(e)===l&&i.key===n&&i.nodes.splice(i.nodes.indexOf(t.key),1),Array.isArray(i.nodes)&&0!==i.nodes.length?i.expand=!1:i.nodes=null;let d=this.insertLabelDom(i,a,e);null!==i.nodes&&d.insertAdjacentHTML("afterbegin",`${_component.caret_right}`),s.append(d)})),this.CONTENT_DOM.append(s)}this.STACKS=this.CONTENT_DOM.childNodes;for(let e of this.DOM.querySelectorAll("i.right"))this.nodeMigrate(e)}nodeExchangeExec(e,t,i,s){let a=t.key,n=t.val;t.key=s.key,t.val=s.val;let l=t.nodes.indexOf(s.key);-1!==l&&t.nodes.splice(l,1,a);let d=t.parentNodes.slice(0).pop();if(void 0!==d)for(let e in this.dimensional_data[t.stack-1]){if(!this.dimensional_data[t.stack-1].hasOwnProperty(e))continue;let i=this.dimensional_data[t.stack-1][e];if(i.key===d){i.nodes.splice(i.nodes.indexOf(a),1,s.key);break}}s.key=a,s.val=n;let r=s.parentNodes.slice(0).pop();for(let e in this.dimensional_data[s.stack-1]){if(!this.dimensional_data[s.stack-1].hasOwnProperty(e))continue;let i=this.dimensional_data[s.stack-1][e];if(i.key===r){i.nodes.splice(i.nodes.indexOf(t.key),1,s.key);break}}this.resetChildrenParent(t),e.querySelector("span").textContent=t.val,e.setAttribute("data-id",t.key),i.querySelector("span").textContent=s.val,i.setAttribute("data-id",s.key)}resetChildrenParent(e){let t=e.stack,i=e.nodes,s=e.parentNodes.slice(0);s.push(e.key),t++,this.dimensional_data[t].forEach((e=>{-1!==i.indexOf(e.key)&&(e.parentNodes=s,Array.isArray(e.nodes)&&e.nodes.length>0&&this.resetChildrenParent(e))}))}resetChildrenDimensional(e,t,i){let s=e.nodes,a=e.parentNodes.slice(0);if(a.push(e.key),!Array.isArray(this.dimensional_data[t]))return;let n=[];this.dimensional_data[t].forEach(((e,l)=>{Array.isArray(s)&&-1!==s.indexOf(e.key)&&(n.push(l),e.parentNodes=a,e.stack=t+i,Array.isArray(this.dimensional_data[e.stack])||(this.dimensional_data[e.stack]=[]),this.dimensional_data[e.stack].push(e),this.resetChildrenDimensional(e,t+1,i))})),n.reverse(),n.forEach((e=>{this.dimensional_data[t].splice(e,1)}))}};
\ No newline at end of file
+window._component={trash:'',move:'',write:'',close:'',check:'',check_circle:'',caret_right:'',caret_right_circle:'',sub_loading:'',node:'',request:function(e){e=Object.assign({url:"",method:"GET",header:{},data:{},callback:null,error_callback:null,timeout:3e4},e);let t=new XMLHttpRequest;"GET"===e.method&&(e.url=_component.parseParams(e.url,e.data)),t.open(e.method,e.url,!0),t.timeout=e.timeout;let i="";if(document.querySelector('meta[name="csrf-token"]')&&(i=document.querySelector('meta[name="csrf-token"]').getAttribute("content")),t.setRequestHeader("X-CSRF-TOKEN",i),e.header)for(let i in e.header)e.header.hasOwnProperty(i)&&t.setRequestHeader(i,e.header[i]);"GET"===e.method?(t.setRequestHeader("Content-type","application/text;charset=UTF-8"),t.responseType="text",t.send(null)):(e.data instanceof FormData?t.setRequestHeader("X-Requested-With","XMLHttpRequest"):(t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),e.data=JSON.stringify(e.data)),t.responseType="json",t.send(e.data)),t.onload=function(){this.status>=200&&this.status<300||"function"==typeof e.error_callback&&e.error_callback()},t.onreadystatechange=function(){if(t.readyState===t.DONE&&200===t.status){let i=t.response;"function"==typeof e.callback&&e.callback(i)}},t.onerror=function(t){console.error(t),"function"==typeof e.error_callback&&e.error_callback(t)}},parseParams(e,t){let i=[];return 0===Object.keys(t).length||(Object.keys(t).forEach((e=>t[e]&&i.push(`${e}=${t[e]}`))),-1===e.search(/\?/)?e+=`?${i.join("&")}`:e+=`&${i.join("&")}`),e},loading:function(e,t=!1){t?e.innerHTML="":e.insertAdjacentHTML("afterbegin",'
\n
\n
\n
\n
\n
\n
\n
')},_alert_documents:[],alert:function(e,t=1,i=null,s=null){let a,n,l=document.createElement("div");l.insertAdjacentHTML("afterbegin",`${e}`),l.className="dlp-alert",this._alert_documents.forEach((e=>{e.style.top=parseInt(e.style.top)-60+"px"})),this._alert_documents.push(l),s?s.append(l):document.getElementsByTagName("BODY")[0].appendChild(l),s?(a=(s.offsetWidth-320)/2,n=s.offsetHeight/2-15,l.style.position="absolute"):(a=(window.innerWidth-320)/2,n=window.innerHeight/2-15,l.style.position="fixed"),l.style.top=n+"px",l.style.left=a+"px",setTimeout((()=>{let e=this._alert_documents.shift();e.parentNode.removeChild(e),"function"==typeof i&&i()}),1e3*t)},contextmenu:function(e,t,i={}){i=Object.assign({W:"70px"},i);let s=document.createElement("ul");s.className="dlp dlp-contextmenu",t.forEach((e=>{let t=document.createElement("li");t.className="dlp dlp-text",t.insertAdjacentHTML("afterbegin",e.title),t.style.width=i.W,"function"==typeof e.func&&(t.addEventListener("click",(()=>{s.remove(),setTimeout((()=>{e.func()}),100)})),s.append(t))})),s.style.top=e.pageY-3+"px",s.style.left=e.pageX-3+"px",s.addEventListener("contextmenu",(e=>{e.preventDefault()})),s.addEventListener("mouseleave",(()=>{s.remove()})),document.getElementsByTagName("BODY")[0].appendChild(s)},dimensional(e,t,i=0,s=[]){if(Array.isArray(t)){for(let a in t){if(!t.hasOwnProperty(a))continue;let n=s.slice(0);n.push(t[a].key),_component.dimensional(e,t[a],i,n)}return}let a=s.slice(0);a.pop(),t.parentNodes=a,Array.isArray(e[i])?e[i].push(t):e[i]=[t],t.hasOwnProperty("nodes")&&Array.isArray(t.nodes)&&0!==t.nodes.length&&(i++,_component.dimensional(e,t.nodes,i,s))}},window.ComponentDot=class{MODE={insert:"insert",delete:"delete"};constructor(e,t,i,s=0,a={}){if(!Array.isArray(i))return void console.error("Dot param selected must be array!");if(Array.isArray(t)||"object"!=typeof t)return void console.error("Dot param select must be object such as {key:val,key2:val2,...} !");this.select=t,this.name=e,this.limit=s,this.DOM=document.getElementById(e),this.DOM.addEventListener("contextmenu",(e=>{e.preventDefault()})),this.menu=Object.assign({mode:!1,placeholder:"未选择",height:"150px"},a),i=i.filter((e=>void 0!==t[e])),this.selected_data=i,this.select_data=[],this.insert_data=[],this.delete_data=[],setTimeout((()=>{let e=[];this.CONTENT_DOM.childNodes.forEach((t=>{let s=parseInt(t.getAttribute("data-id"));-1!==i.indexOf(s)&&e.push(t)})),e.forEach((e=>e.click())),!0===this.menu.mode&&(this.DOM.querySelector(".menu-list").style.display="none")})),!1===this.menu.mode?this.make(i,t):(this.menu_placeholder=this.menu.placeholder,this.menuMake(i,t));let n=this.DOM.querySelector(".dot-search");n.addEventListener("input",(()=>{setTimeout((()=>{this.search(n,this.menu.mode)}),500)}))}make(e,t){let i="";for(let e in t)t.hasOwnProperty(e)&&(i+=`
${t[e]}
`);let s=`
${i}
\n`;this.DOM.insertAdjacentHTML("afterbegin",s),this.SELECTED_DOM=document.querySelector(`#${this.name} .dot-selected`),this.CONTENT_DOM=document.querySelector(`#${this.name} .dot-select`),this.selectInputDOM=document.querySelector(`input[name='${this.name}[select]']`),this.insertInputDOM=document.querySelector(`input[name='${this.name}[insert]']`),this.deleteInputDOM=document.querySelector(`input[name='${this.name}[delete]']`);for(let e of this.CONTENT_DOM.getElementsByClassName("dlp-label"))e.addEventListener("click",this.tagSelect.bind(this,e),!1)}menuMake(e,t){let i=document.createElement("div");i.className="dlp-dot-menu";let s=document.createElement("div");s.className="dlp-input dlp-dot-menu-select",s.insertAdjacentHTML("afterbegin",`
${this.menu_placeholder}
▼
`);let a=document.createElement("div");a.className="menu-list";let n=document.createElement("div");n.className="search-box";let l=document.createElement("input");l.className="dlp dlp-input dot-search",l.setAttribute("placeholder","搜索");let d=document.createElement("div");d.className="list dlp-scroll",d.style.maxHeight=this.menu.height;let r=_component.check;r=r.replace('width="16" height="16"','width="12" height="12"'),this.id_line_hash=[];let o=0;for(let e in t){if(!t.hasOwnProperty(e))continue;this.id_line_hash[e]=o,o++;let i=document.createElement("div");i.className="option",i.setAttribute("data-id",e),i.insertAdjacentHTML("afterbegin",`
${t[e]}
`),i.addEventListener("click",(()=>{if(e=parseInt(e),-1!==this.select_data.indexOf(e))return this.tagCal(e,this.MODE.delete),i.classList.remove("option-active"),i.lastChild instanceof HTMLElement&&(i.lastChild.innerHTML=""),this.menuSelect(t),void(0===this.select_data.length&&(this.SELECTED_DOM.textContent=this.menu_placeholder));this.limit>0&&this.select_data.length>=this.limit&&d.childNodes[this.id_line_hash[this.select_data[0].toString()]].click(),i.classList.add("option-active"),this.tagCal(e,this.MODE.insert),i.lastChild instanceof HTMLElement&&i.lastChild.insertAdjacentHTML("afterbegin",r),this.menuSelect(t)}),!1),d.append(i)}i.append(s),n.append(l),a.append(n),a.append(d),i.append(a),i.addEventListener("click",(()=>{a.style.display="flex"})),i.addEventListener("mouseleave",(()=>{a.style.display="none",this.DOM.querySelector(".dot-search").value="";for(let e of this.CONTENT_DOM.childNodes)e.style.display="flex"})),this.DOM.append(i),this.DOM.insertAdjacentHTML("beforeend",``),this.SELECTED_DOM=document.querySelector(`#${this.name} .dlp-dot-menu-select`).firstElementChild,this.CONTENT_DOM=document.querySelector(`#${this.name} .list`),this.selectInputDOM=document.querySelector(`input[name='${this.name}[select]']`),this.insertInputDOM=document.querySelector(`input[name='${this.name}[insert]']`),this.deleteInputDOM=document.querySelector(`input[name='${this.name}[delete]']`)}menuSelect(e){if(1===this.limit)return void(this.SELECTED_DOM.innerHTML=`
${e[this.select_data[0]]}
`);let t="";for(let i of this.select_data)t+=`${e[i]}`;this.SELECTED_DOM.innerHTML=t}tagSelect(e){this.limit>0&&this.select_data.length>=this.limit&&this.SELECTED_DOM.firstChild instanceof HTMLElement&&this.SELECTED_DOM.firstChild.click();let t=e.cloneNode(!0);t.addEventListener("click",this.tagCancel.bind(this,t),!1),this.SELECTED_DOM.appendChild(t),e.remove(),this.tagCal(parseInt(e.getAttribute("data-id")),this.MODE.insert),this.SELECTED_DOM.scrollTop=this.SELECTED_DOM.scrollHeight}tagCancel(e){let t=e.cloneNode(!0);t.addEventListener("click",this.tagSelect.bind(this,t),!1),this.CONTENT_DOM.appendChild(t),e.remove(),this.tagCal(parseInt(e.getAttribute("data-id")),this.MODE.delete)}tagCal(e,t){let i=this.select_data.indexOf(e);t===this.MODE.insert?(-1===i&&(this.select_data.push(e),this.selectInputDOM.value=JSON.stringify(this.select_data)),-1===this.selected_data.indexOf(e)&&-1===this.insert_data.indexOf(e)&&(this.insert_data.push(e),this.insertInputDOM.value=JSON.stringify(this.insert_data)),i=this.delete_data.indexOf(e),-1!==i&&(this.delete_data.splice(i,1),this.deleteInputDOM.value=JSON.stringify(this.delete_data))):(-1!==i&&(this.select_data.splice(i,1),this.selectInputDOM.value=JSON.stringify(this.select_data)),-1!==this.selected_data.indexOf(e)&&-1===this.delete_data.indexOf(e)&&(this.delete_data.push(e),this.deleteInputDOM.value=JSON.stringify(this.delete_data)),i=this.insert_data.indexOf(e),-1!==i&&(this.insert_data.splice(i,1),this.insertInputDOM.value=JSON.stringify(this.insert_data)))}search(e,t){if(t){if(""===e.value){for(let e of this.CONTENT_DOM.childNodes)e.style.display="flex";return}for(let t in this.select){if(!this.select.hasOwnProperty(t))continue;let i=this.select[t],s=this.id_line_hash[t];-1!==i.indexOf(e.value)||-1!==e.value.indexOf(i)?this.CONTENT_DOM.childNodes[s].style.display="flex":this.CONTENT_DOM.childNodes[s].style.display="none"}return}if(""===e.value){if(this.SELECT_COVER_DOM instanceof HTMLElement){let e=[];this.SELECT_COVER_DOM.childNodes.forEach((t=>{e.push(t)})),this.CONTENT_DOM.append(...e),this.SELECT_COVER_DOM.remove(),this.SELECT_COVER_DOM=null}return}if(this.SELECT_COVER_DOM instanceof HTMLElement){let e=[];this.SELECT_COVER_DOM.childNodes.forEach((t=>{e.push(t)})),this.CONTENT_DOM.append(...e)}else this.SELECT_COVER_DOM=document.createElement("div"),this.SELECT_COVER_DOM.className="dot-select dlp-scroll dot-select-cover",this.CONTENT_DOM.parentNode.appendChild(this.SELECT_COVER_DOM);let i=[];for(let t of this.CONTENT_DOM.childNodes)-1!==t.className.indexOf("dlp-label")&&(-1===t.innerText.indexOf(e.value)&&-1===e.value.indexOf(t.innerText)||i.push(t));this.SELECT_COVER_DOM.append(...i)}},window.ComponentCascadeDot=class{MODE={insert:"insert",delete:"delete"};constructor(e,t,i,s=0){if(!Array.isArray(i)||!Array.isArray(t))return void console.error("CascadeDot param selected and select must be array!");i=i.filter((e=>void 0!==t[e])),this.name=e,this.limit=s,this.DOM=document.getElementById(e),this.selected_data=i,this.select_data=[],this.insert_data=[],this.delete_data=[],this.make().makeSelect(t),setTimeout((()=>{this.selected_label_dom.forEach((e=>{e.click()}))})),this.selectInputDOM.value=JSON.stringify(this.select_data);let a=document.querySelector(`#${this.name} .dot-search`);a.addEventListener("input",(()=>{setTimeout((()=>{this.search(a)}),500)}))}make(){let e=`
',t=document.createElement("tr");t.className="dlp-tr";let i=this.COLUMNS;this.INSERT_ROW_MENUE_DATA={};for(let s in i){if(!i.hasOwnProperty(s))continue;let a=i[s];if("hidden"===a.type)continue;let n=a.style?`style="${a.style}"`:"";switch(e+=`
`);let r=document.createElement("div");r.className="menu-list";let o=document.createElement("div");o.className="search-box";let c=document.createElement("input");c.className="dlp dlp-input dot-search",c.setAttribute("placeholder","搜索"),c.addEventListener("input",(()=>{setTimeout((()=>{if(""!==c.value)for(let e of h.childNodes){let t=e.firstElementChild.innerText;-1!==t.indexOf(c.value)||-1!==c.value.indexOf(t)?e.style.display="flex":e.style.display="none"}else for(let e of h.childNodes)e.style.display="flex"}),300)}));let h=document.createElement("div");h.className="list dlp-scroll";let p=_component.check;p=p.replace('width="16" height="16"','width="12" height="12"');for(let r in i){if(!i.hasOwnProperty(r))continue;let o=document.createElement("div");o.className="option",o.setAttribute("data-id",r),o.insertAdjacentHTML("afterbegin",`
${i[r]}
`),o.addEventListener("click",(()=>{let t;if(r=parseInt(r),n)t=this.INSERT_ROW_MENUE_DATA[e];else{let i=this.searchChildrenDomIndex(l.parentNode.parentNode);t=this.DATA[i][e]}let c=t.indexOf(r);if(-1!==c)return t.splice(c,1),o.classList.remove("option-active"),o.lastChild instanceof HTMLElement&&(o.lastChild.innerHTML=""),m(i,t,s),0===t.length&&(d.firstElementChild.textContent=a),void(!1===n&&(this.DATA_INPUT.value=JSON.stringify(this.DATA)));if(s>0&&t.length>=s)for(let e of h.childNodes)t.hasOwnProperty("0")&&e.getAttribute("data-id")===t[0].toString()&&e.click();o.classList.add("option-active"),t.push(r),o.lastChild instanceof HTMLElement&&o.lastChild.insertAdjacentHTML("afterbegin",p),m(i,t,s),!1===n&&(this.DATA_INPUT.value=JSON.stringify(this.DATA))}),!1),s>0&&t.length>=s&&t.slice(0,s),-1!==t.indexOf(parseInt(r))&&(o.classList.add("option-active"),o.lastChild instanceof HTMLElement&&o.lastChild.insertAdjacentHTML("afterbegin",p),m(i,t,s)),h.append(o)}function m(e,t,i){if(1===i)return void(d.firstElementChild.innerHTML=`
${e[t[0]]}
`);let s="";for(let i of t)s+=`${e[i]}`;d.firstElementChild.innerHTML=s}return l.append(d),o.append(c),r.append(o),r.append(h),l.append(r),l.addEventListener("click",(()=>{r.style.display="flex"})),l.addEventListener("mouseleave",(()=>{r.style.display="none",this.DOM.querySelector(".dot-search").value=""})),l}sortable(){let e=this;new ComponentSortable(this.TBODY_DOM,(function(t){let i=[];t.forEach((function(t){i.push(e.DATA[t])})),e.DATA=i,e.DATA_INPUT.value=JSON.stringify(e.DATA)}))}datepicker(){"undefined"!=typeof jQuery&&setTimeout((()=>{for(let e in this.format_settings){let t=this.format_settings[e];$(`#${this.NAME} input.datetime-${e}`).datetimepicker({format:t,locale:"zh-CN"})}}))}searchChildrenDomIndex(e){let t=0;for(;null!=(e=e.previousSibling);)t++;return t}},window.ComponentPlane=class{constructor(e,t={},i={}){document.querySelector("#dlp-plane")instanceof HTMLElement||(this.URL=e,this.XHR=Object.assign({url:e,method:"POST",listener:null,event:"click",callback:null},t),this.OPTIONS=Object.assign({w:.8,h:.8,top:"30px",left:"auto"},i),this.makeModal(),this.makeContent())}makeModal(){let e,t;e=-1!==this.OPTIONS.w.toString().indexOf(".")?window.innerWidth*this.OPTIONS.w+"px":this.OPTIONS.w,t=-1!==this.OPTIONS.h.toString().indexOf(".")?window.innerHeight*this.OPTIONS.h+"px":this.OPTIONS.h;let i=`
`;document.body.insertAdjacentHTML("beforeEnd",i),this.DOM=document.getElementById("dlp-plane");let s=document.createElement("i");s.insertAdjacentHTML("afterbegin",_component.close),s.addEventListener("click",(()=>{this.DOM instanceof HTMLElement&&this.DOM.remove(),document.getElementById("kvFileinputModal")instanceof HTMLElement&&document.getElementById("kvFileinputModal").remove()}),!1),this.DOM.querySelector(".plane-header").append(s),this.MODEL_BODY_DOM=this.DOM.querySelector(".plane-body"),window.addEventListener("popstate",(()=>{this.DOM.remove()}),!1)}makeContent(){_component.loading(this.MODEL_BODY_DOM);let e=this;_component.request({url:this.URL,method:"GET",callback:function(t){_component.loading(e.MODEL_BODY_DOM,!0);let i=document.createRange().createContextualFragment(t);e.MODEL_BODY_DOM.appendChild(i);let s=e.XHR.listener;if("function"==typeof s){let t=s(e.MODEL_BODY_DOM);t instanceof HTMLElement&&t.addEventListener(e.XHR.event,e.submitEvent.bind(e,t),!1)}}})}submitEvent(e){e.setAttribute("disabled","disabled"),e.innerText="提交中...";let t=this.MODEL_BODY_DOM.getElementsByTagName("form")[0],i=new FormData(t);for(const e of i.entries()){let t=e[0],s=e[1];/\[.*\]/.test(t)&&/^\[.*\]$/.test(s)&&"string"==typeof s&&(s=JSON.parse(s),Array.isArray(s)&&s.length>0?s.forEach((e=>{i.append(`${t}[]`,e)})):i.append(`${t}`,""))}_component.request({url:this.XHR.url,method:this.XHR.method,data:i,callback:t=>{"function"!=typeof this.XHR.callback?t&&(0===t.code?window.location.reload():_component.alert(t.message,3,(function(){e.removeAttribute("disabled"),e.innerText="提交"}))):this.XHR.callback(t)}})}},window.ComponentSortable=class{constructor(e,t=null){this.list="string"==typeof e?document.querySelector(e):e,this.options={animationSpeed:200,animationEasing:"ease-out"},this.callback=t,this.animation=!1,this.dragStart=this.dragStart.bind(this),this.dragMove=this.dragMove.bind(this),this.dragEnd=this.dragEnd.bind(this),this.list.addEventListener("touchstart",this.dragStart,!1),this.list.addEventListener("mousedown",this.dragStart,!1)}reset(){this.items=Array.from(this.list.children),this.items[this.items.length-1].offsetTop>this.list.offsetHeight?this.listHeight=this.list.scrollHeight:this.listHeight=this.items[this.items.length-1].offsetTop}dragStart(e){if(this.reset(),this.animation)return;if(this.items.length<2)return;this.handle=null;let t=e.target;for(;t&&(t.hasAttribute("sortable-handle")&&(this.handle=t),t.hasAttribute("sortable-item")&&(this.item=t),!t.hasAttribute("sortable-list"));)t=t.parentElement;if(!this.handle)return;this.list.style.position="relative",this.item.classList.add("is-dragging"),this.itemHeight=this.items[1].offsetTop,this.startTouchY=this.getDragY(e),this.startTop=this.item.offsetTop;const i=this.items.map((e=>e.offsetTop));this.items.forEach(((e,t)=>{e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.transform=`translateY(${i[t]}px)`,e.style.zIndex=e===this.item?"2":"1"})),this.positions=this.items.map(((e,t)=>t)),this.position=Math.round(this.startTop/this.listHeight*this.items.length),this.touch="touchstart"===e.type,window.addEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.addEventListener(this.touch?"touchend":"mouseup",this.dragEnd,!1)}dragMove(e){if(this.animation)return;if(this.items.length<2)return;const t=this.startTop+this.getDragY(e)-this.startTouchY,i=Math.round(t/this.listHeight*this.items.length);this.item.style.transform=`translateY(${t}px)`,this.positions.forEach((e=>{e!==this.position&&e===i&&(this.swapElements(this.positions,this.position,e),this.position=e)})),this.items.forEach(((e,t)=>{e!==this.item&&(e.style.transform=`translateY(${this.positions.indexOf(t)*this.itemHeight}px)`,e.style.transition=`transform ${this.options.animationSpeed}ms ${this.options.animationEasing}`)})),e.preventDefault()}dragEnd(){this.animation=!0,this.items.length<2||(this.item.style.transition=`all ${this.options.animationSpeed}ms ${this.options.animationEasing}`,this.item.style.transform=`translateY(${this.position*this.itemHeight}px)`,this.item.classList.remove("is-dragging"),"function"==typeof this.callback&&this.callback(this.positions),setTimeout((()=>{this.list.style.position="",this.items.forEach((e=>{e.style.top="",e.style.left="",e.style.right="",e.style.position="",e.style.transform="",e.style.transition="",e.style.zIndex=""})),this.positions.map((e=>{this.items[e]&&this.list.appendChild(this.items[e])})),this.animation=!1}),this.options.animationSpeed),window.removeEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.removeEventListener(this.touch?"touchend":"mouseup",this.dragEnd,!1))}swapElements(e,t,i){let s=e[t];e[t]=e[i],e[i]=s}getDragY(e){return e.touches?(e.touches[0]||e.changedTouches[0]).pageY:e.pageY}},window.ComponentCascadeLine=class{constructor(e,t,i,s){if(!Array.isArray(t))return void console.error("CascadeLine param select must be array!");this.name=e,this.OPTIONS=Object.assign({movable:!0,exchange:!0,detail:!0,insert:!0,update:!0,delete:!0,root:!0},s),this.DOM=document.getElementById(e),this.URL=i,this.make().makeSelect(t),this.OPTIONS.insert&&this.makeHeader();let a=document.querySelector(`#${this.name} .dot-search`);if(a.addEventListener("input",(()=>{setTimeout((()=>{this.search(a)}),700)})),this.OPTIONS.movable)for(let e of this.DOM.querySelectorAll("i.right"))this.nodeMigrate(e)}make(){return this.DOM.insertAdjacentHTML("afterbegin",'
'),r.addEventListener("click",(()=>{o.submit_block||(o.submit_block=!0,r.querySelector(".right").innerHTML=_component.sub_loading,_component.request({url:this.URL,method:"GET",data:{event:i,node_key:l.key,node_val:l.val,aim_node_key:n.key,aim_node_val:n.val},callback:function(s){if(o.submit_block=!1,0!==(s=JSON.parse(s)).code)return _component.alert(s.message,3,null,o.DOM);"exchange"===i&&o.nodeExchangeExec(e,l,t,n),"migrate"===i&&o.nodeMigrateExec(e,l,t,n),o.PLANE_DOM.remove()},error_callback:function(){o.submit_block=!1}}))})),this.PLANE_BODY.append(r)}nodeRootExec(e,t){let i=t.parentNodes.slice().pop(),s=t.stack-1;t.parentNodes=[];let a=0-t.stack,n=parseInt(e.getAttribute("data-k"));this.dimensional_data[t.stack].splice(n,1),this.dimensional_data[0].push(t),null!==t.nodes&&this.resetChildrenDimensional(t,t.stack+1,a),t.stack=0,this.dimensional_data=this.dimensional_data.filter((e=>e.length>0)),this.CONTENT_DOM.innerHTML="";for(let e in this.dimensional_data){if(!this.dimensional_data.hasOwnProperty(e))continue;e=parseInt(e);let a=this.dimensional_data[e],n=document.createElement("div");n.className="dot-cascade-stack dlp-scroll",a.forEach(((a,l)=>{parseInt(e)===s&&a.key===i&&a.nodes.splice(a.nodes.indexOf(t.key),1),Array.isArray(a.nodes)&&0!==a.nodes.length?a.expand=!1:a.nodes=null;let d=this.insertLabelDom(a,l,e);null!==a.nodes&&d.insertAdjacentHTML("afterbegin",`${_component.caret_right}`),n.append(d)})),this.CONTENT_DOM.append(n)}this.STACKS=this.CONTENT_DOM.childNodes;for(let e of this.DOM.querySelectorAll("i.right"))this.nodeMigrate(e)}nodeMigrateExec(e,t,i,s){let a,n=t.parentNodes.slice().pop(),l=t.stack-1,d=s.parentNodes.slice(0);d.push(s.key),t.parentNodes=d,null!==s.nodes&&(a=s.nodes.slice(0).pop());let r=s.stack+1,o=r-t.stack,c=parseInt(e.getAttribute("data-k"));if(this.dimensional_data[t.stack].splice(c,1),Array.isArray(this.dimensional_data[r])||(this.dimensional_data[r]=[]),a){let e=0;for(let t in this.dimensional_data[s.stack+1])if(this.dimensional_data[s.stack+1].hasOwnProperty(t)&&this.dimensional_data[s.stack+1][t].key===a){e=t;break}e++,this.dimensional_data[s.stack+1].splice(e,0,t)}else this.dimensional_data[r].push(t);this.resetChildrenDimensional(t,t.stack+1,o),this.dimensional_data=this.dimensional_data.filter((e=>e.length>0)),t.stack=r,Array.isArray(s.nodes)||(s.nodes=[]),s.nodes.push(t.key),this.CONTENT_DOM.innerHTML="";for(let e in this.dimensional_data){if(!this.dimensional_data.hasOwnProperty(e))continue;e=parseInt(e);let i=this.dimensional_data[e],s=document.createElement("div");s.className="dot-cascade-stack dlp-scroll",i.forEach(((i,a)=>{parseInt(e)===l&&i.key===n&&i.nodes.splice(i.nodes.indexOf(t.key),1),Array.isArray(i.nodes)&&0!==i.nodes.length?i.expand=!1:i.nodes=null;let d=this.insertLabelDom(i,a,e);null!==i.nodes&&d.insertAdjacentHTML("afterbegin",`${_component.caret_right}`),s.append(d)})),this.CONTENT_DOM.append(s)}this.STACKS=this.CONTENT_DOM.childNodes;for(let e of this.DOM.querySelectorAll("i.right"))this.nodeMigrate(e)}nodeExchangeExec(e,t,i,s){let a=t.key,n=t.val;t.key=s.key,t.val=s.val;let l=t.nodes.indexOf(s.key);-1!==l&&t.nodes.splice(l,1,a);let d=t.parentNodes.slice(0).pop();if(void 0!==d)for(let e in this.dimensional_data[t.stack-1]){if(!this.dimensional_data[t.stack-1].hasOwnProperty(e))continue;let i=this.dimensional_data[t.stack-1][e];if(i.key===d){i.nodes.splice(i.nodes.indexOf(a),1,s.key);break}}s.key=a,s.val=n;let r=s.parentNodes.slice(0).pop();for(let e in this.dimensional_data[s.stack-1]){if(!this.dimensional_data[s.stack-1].hasOwnProperty(e))continue;let i=this.dimensional_data[s.stack-1][e];if(i.key===r){i.nodes.splice(i.nodes.indexOf(t.key),1,s.key);break}}this.resetChildrenParent(t),e.querySelector("span").textContent=t.val,e.setAttribute("data-id",t.key),i.querySelector("span").textContent=s.val,i.setAttribute("data-id",s.key)}resetChildrenParent(e){let t=e.stack,i=e.nodes,s=e.parentNodes.slice(0);s.push(e.key),t++,this.dimensional_data[t].forEach((e=>{-1!==i.indexOf(e.key)&&(e.parentNodes=s,Array.isArray(e.nodes)&&e.nodes.length>0&&this.resetChildrenParent(e))}))}resetChildrenDimensional(e,t,i){let s=e.nodes,a=e.parentNodes.slice(0);if(a.push(e.key),!Array.isArray(this.dimensional_data[t]))return;let n=[];this.dimensional_data[t].forEach(((e,l)=>{Array.isArray(s)&&-1!==s.indexOf(e.key)&&(n.push(l),e.parentNodes=a,e.stack=t+i,Array.isArray(this.dimensional_data[e.stack])||(this.dimensional_data[e.stack]=[]),this.dimensional_data[e.stack].push(e),this.resetChildrenDimensional(e,t+1,i))})),n.reverse(),n.forEach((e=>{this.dimensional_data[t].splice(e,1)}))}};
\ No newline at end of file
diff --git a/src/DLPServiceProvider.php b/src/DLPServiceProvider.php
index 28c51f5..48704f2 100644
--- a/src/DLPServiceProvider.php
+++ b/src/DLPServiceProvider.php
@@ -29,8 +29,8 @@ public function boot(DLP $extension)
}
Admin::booting(function () {
- Admin::css('vendor/dlp/component.min.css?v4.2');
- Admin::headerJs('vendor/dlp/component.min.js?v4.2');
+ Admin::css('vendor/dlp/component.min.css?v4.3');
+ Admin::headerJs('vendor/dlp/component.min.js?v4.3');
Form::extend('Dot', Dot::class);
Form::extend('CascadeDot', CascadeDot::class);
Form::extend('Linear', Linear::class);