马宇豪
2023-10-20 67ddfbd2db13529c8923838d4dc7ed4cf105b0fe
1
2
3
4
5
6
var Xn=Object.defineProperty;var mn=Object.getOwnPropertySymbols;var Yn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable;var pn=(e,t,n)=>t in e?Xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N=(e,t)=>{for(var n in t||(t={}))Yn.call(t,n)&&pn(e,n,t[n]);if(mn)for(var n of mn(t))jn.call(t,n)&&pn(e,n,t[n]);return e};import{J as ae,ay as U,l as oe,o as y,a as L,b as V,X as H,a5 as T,a8 as Qe,F as me,Q as Y,R,Y as I,W as Ae,aE as ut,aG as Rt,a1 as Ce,k as He,aI as Ft,a4 as Se,at as Wn,V as ee,a0 as Be,f as je,n as nt,L as ot,M as Dt,j as ct,aC as Tn,aD as Dn,I as In,a9 as Gn,G as an,g as It,S as sn,T as rn,Z as Un,aj as Qn}from"./vue.1683511265143.js";import{u as Ie,_ as ie,b as Mt,C as Lt,L as Ee,e as $t,f as Ln,g as Kn,E as Jt,d as Zn,k as Jn,S as we,N as $n,l as zt,c as eo,m as to,p as no,D as qt}from"./index.1683511265143.js";import{s as gt}from"./index.16835112651436.js";import{l as oo}from"./logo-mini.1683511265143.js";import ao from"./parent.1683511265143.js";const io=ae({name:"layoutLogo",setup(){const e=Ie(),{themeConfig:t}=U(e),n=oe(()=>{let{isCollapse:a,layout:s}=t.value;return!a||s==="classic"||document.body.clientWidth<1e3});return{logoMini:oo,setShowLogo:n,themeConfig:t,onThemeConfigChange:()=>{if(t.value.layout==="transverse")return!1;t.value.isCollapse=!t.value.isCollapse}}}}),so=["src"],ro=["src"];function lo(e,t,n,o,a,s){return e.setShowLogo?(y(),L("div",{key:0,class:"layout-logo",onClick:t[0]||(t[0]=(...i)=>e.onThemeConfigChange&&e.onThemeConfigChange(...i))},[V("img",{src:e.logoMini,class:"layout-logo-medium-img"},null,8,so),V("span",null,H(e.themeConfig.globalTitle),1)])):(y(),L("div",{key:1,class:"layout-logo-size",onClick:t[1]||(t[1]=(...i)=>e.onThemeConfigChange&&e.onThemeConfigChange(...i))},[V("img",{src:e.logoMini,class:"layout-logo-size-img"},null,8,ro)]))}var uo=ie(io,[["render",lo],["__scopeId","data-v-3d08a39b"]]);const co=ae({name:"navMenuSubItem",props:{chil:{type:Array,default:()=>[]}},setup(e){return{chils:oe(()=>e.chil)}}}),fo=["href"];function ho(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("sub-item",!0),l=T("el-sub-menu"),c=T("el-menu-item");return y(!0),L(me,null,Qe(e.chils,h=>(y(),L(me,null,[h.children&&h.children.length>0?(y(),Y(l,{index:h.path,key:h.path},{title:R(()=>[I(i,{name:h.meta.icon},null,8,["name"]),V("span",null,H(e.$t(h.meta.title)),1)]),default:R(()=>[I(r,{chil:h.children},null,8,["chil"])]),_:2},1032,["index"])):(y(),Y(c,{index:h.path,key:h.path},{default:R(()=>[!h.meta.isLink||h.meta.isLink&&h.meta.isIframe?(y(),L(me,{key:0},[I(i,{name:h.meta.icon},null,8,["name"]),V("span",null,H(e.$t(h.meta.title)),1)],64)):(y(),L("a",{key:1,href:h.meta.isLink,target:"_blank",rel:"opener",class:"w100"},[I(i,{name:h.meta.icon},null,8,["name"]),Ae(" "+H(e.$t(h.meta.title)),1)],8,fo))]),_:2},1032,["index"]))],64))),256)}var mo=ie(co,[["render",ho]]);const po=ae({name:"layoutBreadcrumb",setup(){const e=Mt(),t=Ie(),{themeConfig:n}=U(t),{routesList:o}=U(e),a=ut(),s=Rt(),i=Ce({breadcrumbList:[],routeSplit:[],routeSplitFirst:"",routeSplitIndex:1}),r=oe(()=>{w(a.path);const{layout:u,isBreadcrumb:p}=n.value;return u==="classic"||u==="transverse"?!1:!!p}),l=u=>{const{redirect:p,path:g}=u;p?s.push(p):s.push(g)},c=()=>{n.value.isCollapse=!n.value.isCollapse,h()},h=()=>{Ee.remove("themeConfig"),Ee.set("themeConfig",n.value)},d=u=>{u.forEach(p=>{i.routeSplit.forEach((g,D,A)=>{i.routeSplitFirst===p.path&&(i.routeSplitFirst+=`/${A[i.routeSplitIndex]}`,i.breadcrumbList.push(p),i.routeSplitIndex++,p.children&&d(p.children))})})},w=u=>{if(!n.value.isBreadcrumb)return!1;i.breadcrumbList=[o.value[0]],i.routeSplit=u.split("/"),i.routeSplit.shift(),i.routeSplitFirst=`/${i.routeSplit[0]}`,i.routeSplitIndex=1,d(o.value),(a.name==="home"||a.name==="notFound"&&i.breadcrumbList.length>1)&&i.breadcrumbList.shift(),i.breadcrumbList.length>0&&(i.breadcrumbList[i.breadcrumbList.length-1].meta.tagsViewName=Lt.setTagsViewNameI18n(a))};return He(()=>{w(a.path)}),Ft(u=>{w(u.path)}),N({onThemeConfigChange:c,isShowBreadcrumb:r,themeConfig:n,onBreadcrumbClick:l},Se(i))}}),go={key:0,class:"layout-navbars-breadcrumb"},vo={key:0,class:"layout-navbars-breadcrumb-span"},wo={key:1},bo={key:2},_o=["onClick"];function yo(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("el-breadcrumb-item"),l=T("el-breadcrumb");return e.isShowBreadcrumb?(y(),L("div",go,[I(i,{class:"layout-navbars-breadcrumb-icon",name:e.themeConfig.isCollapse?"ele-Expand":"ele-Fold",size:16,onClick:e.onThemeConfigChange},null,8,["name","onClick"]),I(l,{class:"layout-navbars-breadcrumb-hide"},{default:R(()=>[I(Wn,{name:"breadcrumb"},{default:R(()=>[(y(!0),L(me,null,Qe(e.breadcrumbList,(c,h)=>(y(),Y(r,{key:c.meta.tagsViewName?c.meta.tagsViewName:c.meta.title},{default:R(()=>[h===e.breadcrumbList.length-1?(y(),L("span",vo,[e.themeConfig.isBreadcrumbIcon?(y(),Y(i,{key:0,name:c.meta.icon,class:"layout-navbars-breadcrumb-iconfont"},null,8,["name"])):ee("",!0),c.meta.tagsViewName?(y(),L("div",bo,H(c.meta.tagsViewName),1)):(y(),L("div",wo,H(e.$t(c.meta.title)),1))])):(y(),L("a",{key:1,onClick:Be(d=>e.onBreadcrumbClick(c),["prevent"])},[e.themeConfig.isBreadcrumbIcon?(y(),Y(i,{key:0,name:c.meta.icon,class:"layout-navbars-breadcrumb-iconfont"},null,8,["name"])):ee("",!0),Ae(H(e.$t(c.meta.title)),1)],8,_o))]),_:2},1024))),128))]),_:1})]),_:1})])):ee("",!0)}var Co=ie(po,[["render",yo],["__scopeId","data-v-7915d3e2"]]);const So=ae({name:"layoutBreadcrumbUserNews",setup(){const e=Ce({newsList:[{label:"\u5173\u4E8E\u7248\u672C\u53D1\u5E03\u7684\u901A\u77E5",value:"vue-next-admin\uFF0C\u57FA\u4E8E vue3 + CompositionAPI + typescript + vite + element plus\uFF0C\u6B63\u5F0F\u53D1\u5E03\u65F6\u95F4\uFF1A2021\u5E7402\u670828\u65E5\uFF01",time:"2020-12-08"},{label:"\u5173\u4E8E\u5B66\u4E60\u4EA4\u6D41\u7684\u901A\u77E5",value:"QQ\u7FA4\u53F7\u7801 665452019\uFF0C\u6B22\u8FCE\u5C0F\u4F19\u4F34\u5165\u7FA4\u5B66\u4E60\u4EA4\u6D41\u63A2\u8BA8\uFF01",time:"2020-12-08"}]});return N({onAllReadClick:()=>{e.newsList=[]},onGoToGiteeClick:()=>{window.open("https://gitee.com/lyt-top/vue-next-admin")}},Se(e))}}),Eo={class:"layout-navbars-breadcrumb-user-news"},To={class:"head-box"},Do={class:"head-box-title"},Io={class:"content-box"},Lo={class:"content-box-msg"},$o={class:"content-box-time"};function ko(e,t,n,o,a,s){const i=T("el-empty");return y(),L("div",Eo,[V("div",To,[V("div",Do,H(e.$t("message.user.newTitle")),1),e.newsList.length>0?(y(),L("div",{key:0,class:"head-box-btn",onClick:t[0]||(t[0]=(...r)=>e.onAllReadClick&&e.onAllReadClick(...r))},H(e.$t("message.user.newBtn")),1)):ee("",!0)]),V("div",Io,[e.newsList.length>0?(y(!0),L(me,{key:0},Qe(e.newsList,(r,l)=>(y(),L("div",{class:"content-box-item",key:l},[V("div",null,H(r.label),1),V("div",Lo,H(r.value),1),V("div",$o,H(r.time),1)]))),128)):(y(),Y(i,{key:1,description:e.$t("message.user.newDesc")},null,8,["description"]))]),e.newsList.length>0?(y(),L("div",{key:0,class:"foot-box",onClick:t[1]||(t[1]=(...r)=>e.onGoToGiteeClick&&e.onGoToGiteeClick(...r))},H(e.$t("message.user.newGo")),1)):ee("",!0)])}var Vo=ie(So,[["render",ko],["__scopeId","data-v-31e50f96"]]);const Ao=ae({name:"layoutBreadcrumbSearch",setup(){const e=$t(),{tagsViewRoutes:t}=U(e),n=je(),{t:o}=Ln(),a=Rt(),s=Ce({isShowSearch:!1,menuQuery:"",tagsViewList:[]}),i=()=>{s.menuQuery="",s.isShowSearch=!0,h(),nt(()=>{setTimeout(()=>{n.value.focus()})})},r=()=>{s.isShowSearch=!1},l=(u,p)=>{let g=u?s.tagsViewList.filter(c(u)):s.tagsViewList;p(g)},c=u=>p=>p.path.toLowerCase().indexOf(u.toLowerCase())>-1||p.meta.title.toLowerCase().indexOf(u.toLowerCase())>-1||o(p.meta.title).indexOf(u.toLowerCase())>-1,h=()=>{if(s.tagsViewList.length>0)return!1;t.value.map(u=>{u.meta.isHide||s.tagsViewList.push(N({},u))})};return N({layoutMenuAutocompleteRef:n,openSearch:i,closeSearch:r,menuSearch:l,onHandleSelect:u=>{let{path:p,redirect:g}=u;u.meta.isLink&&!u.meta.isIframe?window.open(u.meta.isLink):g?a.push(g):a.push(p),r()},onSearchBlur:()=>{r()}},Se(s))}}),xo={class:"layout-search-dialog"};function Oo(e,t,n,o,a,s){const i=T("ele-Search"),r=T("el-icon"),l=T("SvgIcon"),c=T("el-autocomplete"),h=T("el-dialog");return y(),L("div",xo,[I(h,{modelValue:e.isShowSearch,"onUpdate:modelValue":t[1]||(t[1]=d=>e.isShowSearch=d),width:"300px","destroy-on-close":"",modal:!1,fullscreen:"","show-close":!1},{default:R(()=>[I(c,{modelValue:e.menuQuery,"onUpdate:modelValue":t[0]||(t[0]=d=>e.menuQuery=d),"fetch-suggestions":e.menuSearch,placeholder:e.$t("message.user.searchPlaceholder"),ref:"layoutMenuAutocompleteRef",onSelect:e.onHandleSelect,onBlur:e.onSearchBlur},{prefix:R(()=>[I(r,{class:"el-input__icon"},{default:R(()=>[I(i)]),_:1})]),default:R(({item:d})=>[V("div",null,[I(l,{name:d.meta.icon,class:"mr5"},null,8,["name"]),Ae(" "+H(e.$t(d.meta.title)),1)])]),_:1},8,["modelValue","fetch-suggestions","placeholder","onSelect","onBlur"])]),_:1},8,["modelValue"])])}var Ro=ie(Ao,[["render",Oo],["__scopeId","data-v-6caca869"]]),Fo="http://121.239.169.27:7000/assets/company.1683511265143.png",Mo="http://121.239.169.27:7000/assets/icon.1683511265143.jpg";const No=eo(),Po=ae({name:"layoutBreadcrumbUser",components:{UserNews:Vo,Search:Ro},setup(){const{t:e}=Ln(),{proxy:t}=ct(),n=Rt(),o=Kn();U(Mt());const a=Ie(),{userInfos:s}=U(o),{themeConfig:i}=U(a),r=je(),l=Ce({isScreenfull:!1,disabledI18n:"zh-cn",disabledSize:"large",systemName:""}),c=oe(()=>{let O="";const{layout:z,isClassicSplitMenu:W}=i.value;return["defaults","columns"].includes(z)||z==="classic"&&!W?O="1":O="",O}),h=()=>{if(!gt.isEnabled)return Jt.warning("\u6682\u4E0D\u4E0D\u652F\u6301\u5168\u5C4F"),!1;gt.toggle(),gt.on("change",()=>{gt.isFullscreen?l.isScreenfull=!0:l.isScreenfull=!1})},d=()=>{t.mittBus.emit("openSetingsDrawer")},w=O=>{O==="logOut"?Zn({closeOnClickModal:!1,closeOnPressEscape:!1,title:e("message.user.logOutTitle"),message:e("message.user.logOutMessage"),showCancelButton:!0,confirmButtonText:e("message.user.logOutConfirm"),cancelButtonText:e("message.user.logOutCancel"),buttonSize:"default",beforeClose:(z,W,ue)=>{z==="confirm"?(W.confirmButtonLoading=!0,W.confirmButtonText=e("message.user.logOutExit"),setTimeout(()=>{ue(),setTimeout(()=>{W.confirmButtonLoading=!1},300)},700)):ue()}}).then(async()=>{let z=await Jn().signOut();z.data.code===100?(we.clear(),window.location.reload()):Jt({type:"warning",message:z.data.msg})}).catch(()=>{}):O==="wareHouse"?window.open("https://gitee.com/lyt-top/vue-next-admin"):n.push(O)},u=()=>{r.value.openSearch()},p=O=>{Ee.remove("themeConfig"),i.value.globalComponentSize=O,Ee.set("themeConfig",i.value),x(),window.location.reload()},g=O=>{Ee.remove("themeConfig"),i.value.globalI18n=O,Ee.set("themeConfig",i.value),t.$i18n.locale=O,A(),Lt.useTitle()},D=O=>{t.mittBus.emit("getI18nConfig",t.$i18n.messages[O])},A=()=>{switch(Ee.get("themeConfig").globalI18n){case"zh-cn":l.disabledI18n="zh-cn",D("zh-cn");break;case"en":l.disabledI18n="en",D("en");break;case"zh-tw":l.disabledI18n="zh-tw",D("zh-tw");break}},x=()=>{switch(Ee.get("themeConfig").globalComponentSize){case"large":l.disabledSize="large";break;case"default":l.disabledSize="default";break;case"small":l.disabledSize="small";break}},Q=async()=>{if(window.nextLoading===void 0&&$n.start(),!zt.get("token"))return!1;const O=await No.getMenuAdmin(zt.get("projectId")===null?"":zt.get("projectId"));O.data.code==="200"?l.systemName=O.data.data[1].project.projectName:console.log("\u6709\u95EE\u9898")},j=()=>{n.push({path:"newMenu"})};return He(()=>{Ee.get("themeConfig")&&(A(),x()),Q()}),N({userInfos:s,toHome:j,onLayoutSetingClick:d,onHandleCommandClick:w,onScreenfullClick:h,onSearchClick:u,onComponentSizeChange:p,onLanguageChange:g,searchRef:r,layoutUserFlexNum:c},Se(l))}}),kn=e=>(Tn("data-v-9215dfb4"),e=e(),Dn(),e),Bo=kn(()=>V("div",{class:"logo"},[V("img",{src:Fo})],-1)),Ho={style:{display:"flex","align-items":"center","padding-right":"5px"}},zo=["title"],qo={class:"layout-navbars-breadcrumb-user-link"},Xo=kn(()=>V("img",{src:Mo,class:"layout-navbars-breadcrumb-user-link-photo mr5",style:{width:"24px",height:"24px"}},null,-1));function Yo(e,t,n,o,a,s){const i=T("ele-ArrowDown"),r=T("el-icon"),l=T("el-dropdown-item"),c=T("el-dropdown-menu"),h=T("el-dropdown"),d=T("Search");return y(),L("div",{class:"layout-navbars-breadcrumb-user pr15",style:Dt({flex:e.layoutUserFlexNum})},[Bo,V("div",Ho,[V("div",{class:"layout-navbars-breadcrumb-user-icon mr10",onClick:t[0]||(t[0]=(...w)=>e.onScreenfullClick&&e.onScreenfullClick(...w))},[V("i",{class:ot(["iconfont",e.isScreenfull?"icon-tuichuquanping":"icon-fullscreen"]),title:e.isScreenfull?e.$t("message.user.title6"):e.$t("message.user.title5")},null,10,zo)]),I(h,{"show-timeout":70,"hide-timeout":50,onCommand:e.onHandleCommandClick},{dropdown:R(()=>[I(c,null,{default:R(()=>[I(l,{command:"/project"},{default:R(()=>[Ae(H(e.$t("message.user.dropdown1")),1)]),_:1}),I(l,{divided:"",command:"logOut"},{default:R(()=>[Ae(H(e.$t("message.user.dropdown5")),1)]),_:1})]),_:1})]),default:R(()=>[V("span",qo,[Xo,Ae(" "+H(e.userInfos.userName)+" ",1),I(r,{class:"el-icon--right"},{default:R(()=>[I(i)]),_:1})])]),_:1},8,["onCommand"]),I(d,{ref:"searchRef"},null,512)])],4)}var jo=ie(Po,[["render",Yo],["__scopeId","data-v-9215dfb4"]]);const Wo=ae({name:"navMenuHorizontal",components:{SubItem:mo},props:{menuList:{type:Array,default:()=>[]}},setup(e){const{proxy:t}=ct(),n=Mt(),o=Ie(),{routesList:a}=U(n),{themeConfig:s}=U(o),i=ut(),r=Ce({defaultActive:null}),l=oe(()=>e.menuList),c=p=>{const g=p.wheelDelta||-p.deltaY*40;t.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft=t.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft+g/4},h=()=>{nt(()=>{let p=document.querySelector(".el-menu.el-menu--horizontal li.is-active");if(!p)return!1;t.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft=p.offsetLeft})},d=p=>p.filter(g=>!g.meta.isHide).map(g=>(g=Object.assign({},g),g.children&&(g.children=d(g.children)),g)),w=p=>{const g=p.split("/");let D={};return d(a.value).map((A,x)=>{A.path===`/${g[1]}`&&(A.k=x,D.item=[N({},A)],D.children=[N({},A)],A.children&&(D.children=A.children))}),D},u=p=>{const{path:g,meta:D}=p;if(s.value.layout==="classic")r.defaultActive=`/${g.split("/")[1]}`;else{const A=D.isDynamic?D.isDynamicPath.split("/"):g.split("/");A.length>=4&&D.isHide?r.defaultActive=A.splice(0,3).join("/"):r.defaultActive=g}};return In(()=>{u(i)}),He(()=>{h()}),Ft(p=>{u(p);let{layout:g,isClassicSplitMenu:D}=s.value;g==="classic"&&D&&t.mittBus.emit("setSendClassicChildren",w(p.path))}),N({menuLists:l,onElMenuHorizontalScroll:c},Se(r))}}),Go={class:"el-menu-horizontal-warp"};function Uo(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("SubItem"),l=T("el-sub-menu"),c=T("el-menu-item"),h=T("el-menu"),d=T("el-scrollbar");return y(),L("div",Go,[I(d,{onWheel:Be(e.onElMenuHorizontalScroll,["prevent"]),ref:"elMenuHorizontalScrollRef"},{default:R(()=>[I(h,{router:"","default-active":e.defaultActive,ellipsis:!1,"background-color":"transparent",mode:"horizontal"},{default:R(()=>[(y(!0),L(me,null,Qe(e.menuLists,w=>(y(),L(me,null,[w.children&&w.children.length>0?(y(),Y(l,{index:w.path,key:w.path},{title:R(()=>[I(i,{name:w.meta.icon},null,8,["name"]),V("span",null,H(e.$t(w.meta.title)),1)]),default:R(()=>[I(r,{chil:w.children},null,8,["chil"])]),_:2},1032,["index"])):(y(),Y(c,{index:w.path,key:w.path},Gn({_:2},[!w.meta.isLink||w.meta.isLink&&w.meta.isIframe?{name:"title",fn:R(()=>[I(i,{name:w.meta.icon},null,8,["name"]),Ae(" "+H(e.$t(w.meta.title)),1)])}:{name:"title",fn:R(()=>[V("a",{href:w.meta.isLink,target:"_blank",rel:"opener",class:"w100"},[I(i,{name:w.meta.icon},null,8,["name"]),Ae(" "+H(e.$t(w.meta.title)),1)],8,["href"])])}]),1032,["index"]))],64))),256))]),_:1},8,["default-active"])]),_:1},8,["onWheel"])])}var Qo=ie(Wo,[["render",Uo],["__scopeId","data-v-7d16fc9d"]]);const Ko=ae({name:"layoutBreadcrumbIndex",components:{Breadcrumb:Co,User:jo,Logo:uo,Horizontal:Qo},setup(){const{proxy:e}=ct(),t=Mt(),n=Ie(),{themeConfig:o}=U(n),{routesList:a}=U(t),s=ut(),i=Ce({menuList:[]}),r=oe(()=>{let{isShowLogo:u,layout:p}=o.value;return u&&p==="classic"||u&&p==="transverse"}),l=oe(()=>{let{layout:u,isClassicSplitMenu:p}=o.value;return u==="transverse"||p&&u==="classic"}),c=()=>{let{layout:u,isClassicSplitMenu:p}=o.value;if(u==="classic"&&p){i.menuList=h(d(a.value));const g=w(s.path);e.mittBus.emit("setSendClassicChildren",g)}else i.menuList=d(a.value)},h=u=>(u.map(p=>{p.children&&delete p.children}),u),d=u=>u.filter(p=>!p.meta.isHide).map(p=>(p=Object.assign({},p),p.children&&(p.children=d(p.children)),p)),w=u=>{const p=u.split("/");let g={};return d(a.value).map((D,A)=>{D.path===`/${p[1]}`&&(D.k=A,g.item=[N({},D)],g.children=[N({},D)],D.children&&(g.children=D.children))}),g};return He(()=>{c(),e.mittBus.on("getBreadcrumbIndexSetFilterRoutes",()=>{c()})}),an(()=>{e.mittBus.off("getBreadcrumbIndexSetFilterRoutes",()=>{})}),N({setIsShowLogo:r,isLayoutTransverse:l},Se(i))}}),Zo={class:"layout-navbars-breadcrumb-index"};function Jo(e,t,n,o,a,s){const i=T("Logo"),r=T("Breadcrumb"),l=T("Horizontal"),c=T("User");return y(),L("div",Zo,[e.setIsShowLogo?(y(),Y(i,{key:0})):ee("",!0),I(r),e.isLayoutTransverse?(y(),Y(l,{key:1,menuList:e.menuList},null,8,["menuList"])):ee("",!0),I(c)])}var ea=ie(Ko,[["render",Jo],["__scopeId","data-v-aa5619e8"]]);/**!
* Sortable 1.15.0
* @author    RubaXa   <trash@rubaxa.org>
* @author    owenm    <owen23355@gmail.com>
* @license MIT
*/function gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gn(Object(n),!0).forEach(function(o){ta(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gn(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function yt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?yt=function(t){return typeof t}:yt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(e)}function ta(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},De.apply(this,arguments)}function na(e,t){if(e==null)return{};var n={},o=Object.keys(e),a,s;for(s=0;s<o.length;s++)a=o[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function oa(e,t){if(e==null)return{};var n=na(e,t),o,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)o=s[a],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(n[o]=e[o]))}return n}var aa="1.15.0";function Te(e){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(e)}var Le=Te(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),dt=Te(/Edge/i),vn=Te(/firefox/i),at=Te(/safari/i)&&!Te(/chrome/i)&&!Te(/android/i),Vn=Te(/iP(ad|od|hone)/i),An=Te(/chrome/i)&&Te(/android/i),xn={capture:!1,passive:!1};function k(e,t,n){e.addEventListener(t,n,!Le&&xn)}function $(e,t,n){e.removeEventListener(t,n,!Le&&xn)}function kt(e,t){if(!!t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function ia(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function be(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&kt(e,t):kt(e,t))||o&&e===n)return e;if(e===n)break}while(e=ia(e))}return null}var wn=/\s+/g;function se(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(wn," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(wn," ")}}function C(e,t,n){var o=e&&e.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=n+(typeof n=="string"?"":"px")}}function Ge(e,t){var n="";if(typeof e=="string")n=e;else do{var o=C(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function On(e,t,n){if(e){var o=e.getElementsByTagName(t),a=0,s=o.length;if(n)for(;a<s;a++)n(o[a],a);return o}return[]}function _e(){var e=document.scrollingElement;return e||document.documentElement}function X(e,t,n,o,a){if(!(!e.getBoundingClientRect&&e!==window)){var s,i,r,l,c,h,d;if(e!==window&&e.parentNode&&e!==_e()?(s=e.getBoundingClientRect(),i=s.top,r=s.left,l=s.bottom,c=s.right,h=s.height,d=s.width):(i=0,r=0,l=window.innerHeight,c=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(a=a||e.parentNode,!Le))do if(a&&a.getBoundingClientRect&&(C(a,"transform")!=="none"||n&&C(a,"position")!=="static")){var w=a.getBoundingClientRect();i-=w.top+parseInt(C(a,"border-top-width")),r-=w.left+parseInt(C(a,"border-left-width")),l=i+s.height,c=r+s.width;break}while(a=a.parentNode);if(o&&e!==window){var u=Ge(a||e),p=u&&u.a,g=u&&u.d;u&&(i/=g,r/=p,d/=p,h/=g,l=i+h,c=r+d)}return{top:i,left:r,bottom:l,right:c,width:d,height:h}}}function bn(e,t,n){for(var o=Ve(e,!0),a=X(e)[t];o;){var s=X(o)[n],i=void 0;if(n==="top"||n==="left"?i=a>=s:i=a<=s,!i)return o;if(o===_e())break;o=Ve(o,!1)}return!1}function Ue(e,t,n,o){for(var a=0,s=0,i=e.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==S.ghost&&(o||i[s]!==S.dragged)&&be(i[s],n.draggable,e,!1)){if(a===t)return i[s];a++}s++}return null}function ln(e,t){for(var n=e.lastElementChild;n&&(n===S.ghost||C(n,"display")==="none"||t&&!kt(n,t));)n=n.previousElementSibling;return n||null}function fe(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==S.clone&&(!t||kt(e,t))&&n++;return n}function _n(e){var t=0,n=0,o=_e();if(e)do{var a=Ge(e),s=a.a,i=a.d;t+=e.scrollLeft*s,n+=e.scrollTop*i}while(e!==o&&(e=e.parentNode));return[t,n]}function sa(e,t){for(var n in e)if(!!e.hasOwnProperty(n)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n)}return-1}function Ve(e,t){if(!e||!e.getBoundingClientRect)return _e();var n=e,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=C(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return _e();if(o||t)return n;o=!0}}while(n=n.parentNode);return _e()}function ra(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Xt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var it;function Rn(e,t){return function(){if(!it){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n),it=setTimeout(function(){it=void 0},t)}}}function la(){clearTimeout(it),it=void 0}function Fn(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Mn(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var le="Sortable"+new Date().getTime();function ua(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(a){if(!(C(a,"display")==="none"||a===S.ghost)){e.push({target:a,rect:X(a)});var s=ye({},e[e.length-1].rect);if(a.thisAnimationDuration){var i=Ge(a,!0);i&&(s.top-=i.f,s.left-=i.e)}a.fromRect=s}})}},addAnimationState:function(o){e.push(o)},removeAnimationState:function(o){e.splice(sa(e,{target:o}),1)},animateAll:function(o){var a=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var s=!1,i=0;e.forEach(function(r){var l=0,c=r.target,h=c.fromRect,d=X(c),w=c.prevFromRect,u=c.prevToRect,p=r.rect,g=Ge(c,!0);g&&(d.top-=g.f,d.left-=g.e),c.toRect=d,c.thisAnimationDuration&&Xt(w,d)&&!Xt(h,d)&&(p.top-d.top)/(p.left-d.left)===(h.top-d.top)/(h.left-d.left)&&(l=da(p,w,u,a.options)),Xt(d,h)||(c.prevFromRect=h,c.prevToRect=d,l||(l=a.options.animation),a.animate(c,p,d,l)),l&&(s=!0,i=Math.max(i,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),s?t=setTimeout(function(){typeof o=="function"&&o()},i):typeof o=="function"&&o(),e=[]},animate:function(o,a,s,i){if(i){C(o,"transition",""),C(o,"transform","");var r=Ge(this.el),l=r&&r.a,c=r&&r.d,h=(a.left-s.left)/(l||1),d=(a.top-s.top)/(c||1);o.animatingX=!!h,o.animatingY=!!d,C(o,"transform","translate3d("+h+"px,"+d+"px,0)"),this.forRepaintDummy=ca(o),C(o,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),C(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){C(o,"transition",""),C(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},i)}}}}function ca(e){return e.offsetWidth}function da(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}var qe=[],Yt={initializeByDefault:!0},ft={mount:function(t){for(var n in Yt)Yt.hasOwnProperty(n)&&!(n in t)&&(t[n]=Yt[n]);qe.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),qe.push(t)},pluginEvent:function(t,n,o){var a=this;this.eventCanceled=!1,o.cancel=function(){a.eventCanceled=!0};var s=t+"Global";qe.forEach(function(i){!n[i.pluginName]||(n[i.pluginName][s]&&n[i.pluginName][s](ye({sortable:n},o)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](ye({sortable:n},o)))})},initializePlugins:function(t,n,o,a){qe.forEach(function(r){var l=r.pluginName;if(!(!t.options[l]&&!r.initializeByDefault)){var c=new r(t,n,t.options);c.sortable=t,c.options=t.options,t[l]=c,De(o,c.defaults)}});for(var s in t.options)if(!!t.options.hasOwnProperty(s)){var i=this.modifyOption(t,s,t.options[s]);typeof i!="undefined"&&(t.options[s]=i)}},getEventProperties:function(t,n){var o={};return qe.forEach(function(a){typeof a.eventProperties=="function"&&De(o,a.eventProperties.call(n[a.pluginName],t))}),o},modifyOption:function(t,n,o){var a;return qe.forEach(function(s){!t[s.pluginName]||s.optionListeners&&typeof s.optionListeners[n]=="function"&&(a=s.optionListeners[n].call(t[s.pluginName],o))}),a}};function fa(e){var t=e.sortable,n=e.rootEl,o=e.name,a=e.targetEl,s=e.cloneEl,i=e.toEl,r=e.fromEl,l=e.oldIndex,c=e.newIndex,h=e.oldDraggableIndex,d=e.newDraggableIndex,w=e.originalEvent,u=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[le],!!t){var g,D=t.options,A="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!Le&&!dt?g=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(o,!0,!0)),g.to=i||n,g.from=r||n,g.item=a||n,g.clone=s,g.oldIndex=l,g.newIndex=c,g.oldDraggableIndex=h,g.newDraggableIndex=d,g.originalEvent=w,g.pullMode=u?u.lastPutMode:void 0;var x=ye(ye({},p),ft.getEventProperties(o,t));for(var Q in x)g[Q]=x[Q];n&&n.dispatchEvent(g),D[A]&&D[A].call(t,g)}}var ha=["evt"],ne=function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.evt,s=oa(o,ha);ft.pluginEvent.bind(S)(t,n,ye({dragEl:v,parentEl:B,ghostEl:E,rootEl:F,nextEl:Pe,lastDownEl:Ct,cloneEl:P,cloneHidden:ke,dragStarted:Je,putSortable:G,activeSortable:S.active,originalEvent:a,oldIndex:We,oldDraggableIndex:st,newIndex:re,newDraggableIndex:$e,hideGhostForTarget:Hn,unhideGhostForTarget:zn,cloneNowHidden:function(){ke=!0},cloneNowShown:function(){ke=!1},dispatchSortableEvent:function(r){J({sortable:n,name:r,originalEvent:a})}},s))};function J(e){fa(ye({putSortable:G,cloneEl:P,targetEl:v,rootEl:F,oldIndex:We,oldDraggableIndex:st,newIndex:re,newDraggableIndex:$e},e))}var v,B,E,F,Pe,Ct,P,ke,We,re,st,$e,vt,G,Ye=!1,Vt=!1,At=[],Me,he,jt,Wt,yn,Cn,Je,Xe,rt,lt=!1,wt=!1,St,Z,Gt=[],en=!1,xt=[],Nt=typeof document!="undefined",bt=Vn,Sn=dt||Le?"cssFloat":"float",ma=Nt&&!An&&!Vn&&"draggable"in document.createElement("div"),Nn=function(){if(!!Nt){if(Le)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Pn=function(t,n){var o=C(t),a=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),s=Ue(t,0,n),i=Ue(t,1,n),r=s&&C(s),l=i&&C(i),c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+X(s).width,h=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(i).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&r.float&&r.float!=="none"){var d=r.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||c>=a&&o[Sn]==="none"||i&&o[Sn]==="none"&&c+h>a)?"vertical":"horizontal"},pa=function(t,n,o){var a=o?t.left:t.top,s=o?t.right:t.bottom,i=o?t.width:t.height,r=o?n.left:n.top,l=o?n.right:n.bottom,c=o?n.width:n.height;return a===r||s===l||a+i/2===r+c/2},ga=function(t,n){var o;return At.some(function(a){var s=a[le].options.emptyInsertThreshold;if(!(!s||ln(a))){var i=X(a),r=t>=i.left-s&&t<=i.right+s,l=n>=i.top-s&&n<=i.bottom+s;if(r&&l)return o=a}}),o},Bn=function(t){function n(s,i){return function(r,l,c,h){var d=r.options.group.name&&l.options.group.name&&r.options.group.name===l.options.group.name;if(s==null&&(i||d))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return n(s(r,l,c,h),i)(r,l,c,h);var w=(i?r:l).options.group.name;return s===!0||typeof s=="string"&&s===w||s.join&&s.indexOf(w)>-1}}var o={},a=t.group;(!a||yt(a)!="object")&&(a={name:a}),o.name=a.name,o.checkPull=n(a.pull,!0),o.checkPut=n(a.put),o.revertClone=a.revertClone,t.group=o},Hn=function(){!Nn&&E&&C(E,"display","none")},zn=function(){!Nn&&E&&C(E,"display","")};Nt&&!An&&document.addEventListener("click",function(e){if(Vt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Vt=!1,!1},!0);var Ne=function(t){if(v){t=t.touches?t.touches[0]:t;var n=ga(t.clientX,t.clientY);if(n){var o={};for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[le]._onDragOver(o)}}},va=function(t){v&&v.parentNode[le]._isOutsideThisEl(t.target)};function S(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=De({},t),e[le]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pn(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,r){i.setData("Text",r.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:S.supportPointer!==!1&&"PointerEvent"in window&&!at,emptyInsertThreshold:5};ft.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);Bn(t);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=t.forceFallback?!1:ma,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?k(e,"pointerdown",this._onTapStart):(k(e,"mousedown",this._onTapStart),k(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(k(e,"dragover",this),k(e,"dragenter",this)),At.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),De(this,ua())}S.prototype={constructor:S,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Xe=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,v):this.options.direction},_onTapStart:function(t){if(!!t.cancelable){var n=this,o=this.el,a=this.options,s=a.preventOnFilter,i=t.type,r=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(r||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,h=a.filter;if(Ta(o),!v&&!(/mousedown|pointerdown/.test(i)&&t.button!==0||a.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&at&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=be(l,a.draggable,o,!1),!(l&&l.animated)&&Ct!==l)){if(We=fe(l),st=fe(l,a.draggable),typeof h=="function"){if(h.call(this,t,l,this)){J({sortable:n,rootEl:c,name:"filter",targetEl:l,toEl:o,fromEl:o}),ne("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(d){if(d=be(c,d.trim(),o,!1),d)return J({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:o,toEl:o}),ne("filter",n,{evt:t}),!0}),h)){s&&t.cancelable&&t.preventDefault();return}a.handle&&!be(c,a.handle,o,!1)||this._prepareDragStart(t,r,l)}}},_prepareDragStart:function(t,n,o){var a=this,s=a.el,i=a.options,r=s.ownerDocument,l;if(o&&!v&&o.parentNode===s){var c=X(o);if(F=s,v=o,B=v.parentNode,Pe=v.nextSibling,Ct=o,vt=i.group,S.dragged=v,Me={target:v,clientX:(n||t).clientX,clientY:(n||t).clientY},yn=Me.clientX-c.left,Cn=Me.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,v.style["will-change"]="all",l=function(){if(ne("delayEnded",a,{evt:t}),S.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!vn&&a.nativeDraggable&&(v.draggable=!0),a._triggerDragStart(t,n),J({sortable:a,name:"choose",originalEvent:t}),se(v,i.chosenClass,!0)},i.ignore.split(",").forEach(function(h){On(v,h.trim(),Ut)}),k(r,"dragover",Ne),k(r,"mousemove",Ne),k(r,"touchmove",Ne),k(r,"mouseup",a._onDrop),k(r,"touchend",a._onDrop),k(r,"touchcancel",a._onDrop),vn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,v.draggable=!0),ne("delayStart",this,{evt:t}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(dt||Le))){if(S.eventCanceled){this._onDrop();return}k(r,"mouseup",a._disableDelayedDrag),k(r,"touchend",a._disableDelayedDrag),k(r,"touchcancel",a._disableDelayedDrag),k(r,"mousemove",a._delayedDragTouchMoveHandler),k(r,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&k(r,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){v&&Ut(v),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;$(t,"mouseup",this._disableDelayedDrag),$(t,"touchend",this._disableDelayedDrag),$(t,"touchcancel",this._disableDelayedDrag),$(t,"mousemove",this._delayedDragTouchMoveHandler),$(t,"touchmove",this._delayedDragTouchMoveHandler),$(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?k(document,"pointermove",this._onTouchMove):n?k(document,"touchmove",this._onTouchMove):k(document,"mousemove",this._onTouchMove):(k(v,"dragend",this),k(F,"dragstart",this._onDragStart));try{document.selection?Et(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Ye=!1,F&&v){ne("dragStarted",this,{evt:n}),this.nativeDraggable&&k(document,"dragover",va);var o=this.options;!t&&se(v,o.dragClass,!1),se(v,o.ghostClass,!0),S.active=this,t&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(he){this._lastX=he.clientX,this._lastY=he.clientY,Hn();for(var t=document.elementFromPoint(he.clientX,he.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(he.clientX,he.clientY),t!==n);)n=t;if(v.parentNode[le]._isOutsideThisEl(t),n)do{if(n[le]){var o=void 0;if(o=n[le]._onDragOver({clientX:he.clientX,clientY:he.clientY,target:t,rootEl:n}),o&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);zn()}},_onTouchMove:function(t){if(Me){var n=this.options,o=n.fallbackTolerance,a=n.fallbackOffset,s=t.touches?t.touches[0]:t,i=E&&Ge(E,!0),r=E&&i&&i.a,l=E&&i&&i.d,c=bt&&Z&&_n(Z),h=(s.clientX-Me.clientX+a.x)/(r||1)+(c?c[0]-Gt[0]:0)/(r||1),d=(s.clientY-Me.clientY+a.y)/(l||1)+(c?c[1]-Gt[1]:0)/(l||1);if(!S.active&&!Ye){if(o&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(E){i?(i.e+=h-(jt||0),i.f+=d-(Wt||0)):i={a:1,b:0,c:0,d:1,e:h,f:d};var w="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");C(E,"webkitTransform",w),C(E,"mozTransform",w),C(E,"msTransform",w),C(E,"transform",w),jt=h,Wt=d,he=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!E){var t=this.options.fallbackOnBody?document.body:F,n=X(v,!0,bt,!0,t),o=this.options;if(bt){for(Z=t;C(Z,"position")==="static"&&C(Z,"transform")==="none"&&Z!==document;)Z=Z.parentNode;Z!==document.body&&Z!==document.documentElement?(Z===document&&(Z=_e()),n.top+=Z.scrollTop,n.left+=Z.scrollLeft):Z=_e(),Gt=_n(Z)}E=v.cloneNode(!0),se(E,o.ghostClass,!1),se(E,o.fallbackClass,!0),se(E,o.dragClass,!0),C(E,"transition",""),C(E,"transform",""),C(E,"box-sizing","border-box"),C(E,"margin",0),C(E,"top",n.top),C(E,"left",n.left),C(E,"width",n.width),C(E,"height",n.height),C(E,"opacity","0.8"),C(E,"position",bt?"absolute":"fixed"),C(E,"zIndex","100000"),C(E,"pointerEvents","none"),S.ghost=E,t.appendChild(E),C(E,"transform-origin",yn/parseInt(E.style.width)*100+"% "+Cn/parseInt(E.style.height)*100+"%")}},_onDragStart:function(t,n){var o=this,a=t.dataTransfer,s=o.options;if(ne("dragStart",this,{evt:t}),S.eventCanceled){this._onDrop();return}ne("setupClone",this),S.eventCanceled||(P=Mn(v),P.removeAttribute("id"),P.draggable=!1,P.style["will-change"]="",this._hideClone(),se(P,this.options.chosenClass,!1),S.clone=P),o.cloneId=Et(function(){ne("clone",o),!S.eventCanceled&&(o.options.removeCloneOnHide||F.insertBefore(P,v),o._hideClone(),J({sortable:o,name:"clone"}))}),!n&&se(v,s.dragClass,!0),n?(Vt=!0,o._loopId=setInterval(o._emulateDragOver,50)):($(document,"mouseup",o._onDrop),$(document,"touchend",o._onDrop),$(document,"touchcancel",o._onDrop),a&&(a.effectAllowed="move",s.setData&&s.setData.call(o,a,v)),k(document,"drop",o),C(v,"transform","translateZ(0)")),Ye=!0,o._dragStartId=Et(o._dragStarted.bind(o,n,t)),k(document,"selectstart",o),Je=!0,at&&C(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,o=t.target,a,s,i,r=this.options,l=r.group,c=S.active,h=vt===l,d=r.sort,w=G||c,u,p=this,g=!1;if(en)return;function D(Fe,Pt){ne(Fe,p,ye({evt:t,isOwner:h,axis:u?"vertical":"horizontal",revert:i,dragRect:a,targetRect:s,canSort:d,fromSortable:w,target:o,completed:x,onMove:function(Ke,Ze){return _t(F,n,v,a,Ke,X(Ke),t,Ze)},changed:Q},Pt))}function A(){D("dragOverAnimationCapture"),p.captureAnimationState(),p!==w&&w.captureAnimationState()}function x(Fe){return D("dragOverCompleted",{insertion:Fe}),Fe&&(h?c._hideClone():c._showClone(p),p!==w&&(se(v,G?G.options.ghostClass:c.options.ghostClass,!1),se(v,r.ghostClass,!0)),G!==p&&p!==S.active?G=p:p===S.active&&G&&(G=null),w===p&&(p._ignoreWhileAnimating=o),p.animateAll(function(){D("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==w&&(w.animateAll(),w._ignoreWhileAnimating=null)),(o===v&&!v.animated||o===n&&!o.animated)&&(Xe=null),!r.dragoverBubble&&!t.rootEl&&o!==document&&(v.parentNode[le]._isOutsideThisEl(t.target),!Fe&&Ne(t)),!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function Q(){re=fe(v),$e=fe(v,r.draggable),J({sortable:p,name:"change",toEl:n,newIndex:re,newDraggableIndex:$e,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=be(o,r.draggable,n,!0),D("dragOver"),S.eventCanceled)return g;if(v.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||p._ignoreWhileAnimating===o)return x(!1);if(Vt=!1,c&&!r.disabled&&(h?d||(i=B!==F):G===this||(this.lastPutMode=vt.checkPull(this,c,v,t))&&l.checkPut(this,c,v,t))){if(u=this._getDirection(t,o)==="vertical",a=X(v),D("dragOverValid"),S.eventCanceled)return g;if(i)return B=F,A(),this._hideClone(),D("revert"),S.eventCanceled||(Pe?F.insertBefore(v,Pe):F.appendChild(v)),x(!0);var j=ln(n,r.draggable);if(!j||ya(t,u,this)&&!j.animated){if(j===v)return x(!1);if(j&&n===t.target&&(o=j),o&&(s=X(o)),_t(F,n,v,a,o,s,t,!!o)!==!1)return A(),j&&j.nextSibling?n.insertBefore(v,j.nextSibling):n.appendChild(v),B=n,Q(),x(!0)}else if(j&&_a(t,u,this)){var O=Ue(n,0,r,!0);if(O===v)return x(!1);if(o=O,s=X(o),_t(F,n,v,a,o,s,t,!1)!==!1)return A(),n.insertBefore(v,O),B=n,Q(),x(!0)}else if(o.parentNode===n){s=X(o);var z=0,W,ue=v.parentNode!==n,K=!pa(v.animated&&v.toRect||a,o.animated&&o.toRect||s,u),xe=u?"top":"left",pe=bn(o,"top","top")||bn(v,"top","top"),Oe=pe?pe.scrollTop:void 0;Xe!==o&&(W=s[xe],lt=!1,wt=!K&&r.invertSwap||ue),z=Ca(t,o,s,u,K?1:r.swapThreshold,r.invertedSwapThreshold==null?r.swapThreshold:r.invertedSwapThreshold,wt,Xe===o);var ce;if(z!==0){var ge=fe(v);do ge-=z,ce=B.children[ge];while(ce&&(C(ce,"display")==="none"||ce===E))}if(z===0||ce===o)return x(!1);Xe=o,rt=z;var Re=o.nextElementSibling,ve=!1;ve=z===1;var te=_t(F,n,v,a,o,s,t,ve);if(te!==!1)return(te===1||te===-1)&&(ve=te===1),en=!0,setTimeout(ba,30),A(),ve&&!Re?n.appendChild(v):o.parentNode.insertBefore(v,ve?Re:o),pe&&Fn(pe,0,Oe-pe.scrollTop),B=v.parentNode,W!==void 0&&!wt&&(St=Math.abs(W-X(o)[xe])),Q(),x(!0)}if(n.contains(v))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){$(document,"mousemove",this._onTouchMove),$(document,"touchmove",this._onTouchMove),$(document,"pointermove",this._onTouchMove),$(document,"dragover",Ne),$(document,"mousemove",Ne),$(document,"touchmove",Ne)},_offUpEvents:function(){var t=this.el.ownerDocument;$(t,"mouseup",this._onDrop),$(t,"touchend",this._onDrop),$(t,"pointerup",this._onDrop),$(t,"touchcancel",this._onDrop),$(document,"selectstart",this)},_onDrop:function(t){var n=this.el,o=this.options;if(re=fe(v),$e=fe(v,o.draggable),ne("drop",this,{evt:t}),B=v&&v.parentNode,re=fe(v),$e=fe(v,o.draggable),S.eventCanceled){this._nulling();return}Ye=!1,wt=!1,lt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tn(this.cloneId),tn(this._dragStartId),this.nativeDraggable&&($(document,"drop",this),$(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),at&&C(document.body,"user-select",""),C(v,"transform",""),t&&(Je&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),E&&E.parentNode&&E.parentNode.removeChild(E),(F===B||G&&G.lastPutMode!=="clone")&&P&&P.parentNode&&P.parentNode.removeChild(P),v&&(this.nativeDraggable&&$(v,"dragend",this),Ut(v),v.style["will-change"]="",Je&&!Ye&&se(v,G?G.options.ghostClass:this.options.ghostClass,!1),se(v,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:B,newIndex:null,newDraggableIndex:null,originalEvent:t}),F!==B?(re>=0&&(J({rootEl:B,name:"add",toEl:B,fromEl:F,originalEvent:t}),J({sortable:this,name:"remove",toEl:B,originalEvent:t}),J({rootEl:B,name:"sort",toEl:B,fromEl:F,originalEvent:t}),J({sortable:this,name:"sort",toEl:B,originalEvent:t})),G&&G.save()):re!==We&&re>=0&&(J({sortable:this,name:"update",toEl:B,originalEvent:t}),J({sortable:this,name:"sort",toEl:B,originalEvent:t})),S.active&&((re==null||re===-1)&&(re=We,$e=st),J({sortable:this,name:"end",toEl:B,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ne("nulling",this),F=v=B=E=Pe=P=Ct=ke=Me=he=Je=re=$e=We=st=Xe=rt=G=vt=S.dragged=S.ghost=S.clone=S.active=null,xt.forEach(function(t){t.checked=!0}),xt.length=jt=Wt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":v&&(this._onDragOver(t),wa(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,o=this.el.children,a=0,s=o.length,i=this.options;a<s;a++)n=o[a],be(n,i.draggable,this.el,!1)&&t.push(n.getAttribute(i.dataIdAttr)||Ea(n));return t},sort:function(t,n){var o={},a=this.el;this.toArray().forEach(function(s,i){var r=a.children[i];be(r,this.options.draggable,a,!1)&&(o[s]=r)},this),n&&this.captureAnimationState(),t.forEach(function(s){o[s]&&(a.removeChild(o[s]),a.appendChild(o[s]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return be(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var o=this.options;if(n===void 0)return o[t];var a=ft.modifyOption(this,t,n);typeof a!="undefined"?o[t]=a:o[t]=n,t==="group"&&Bn(o)},destroy:function(){ne("destroy",this);var t=this.el;t[le]=null,$(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart),$(t,"pointerdown",this._onTapStart),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),At.splice(At.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ke){if(ne("hideClone",this),S.eventCanceled)return;C(P,"display","none"),this.options.removeCloneOnHide&&P.parentNode&&P.parentNode.removeChild(P),ke=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(ke){if(ne("showClone",this),S.eventCanceled)return;v.parentNode==F&&!this.options.group.revertClone?F.insertBefore(P,v):Pe?F.insertBefore(P,Pe):F.appendChild(P),this.options.group.revertClone&&this.animate(v,P),C(P,"display",""),ke=!1}}};function wa(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _t(e,t,n,o,a,s,i,r){var l,c=e[le],h=c.options.onMove,d;return window.CustomEvent&&!Le&&!dt?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=o,l.related=a||t,l.relatedRect=s||X(t),l.willInsertAfter=r,l.originalEvent=i,e.dispatchEvent(l),h&&(d=h.call(c,l,i)),d}function Ut(e){e.draggable=!1}function ba(){en=!1}function _a(e,t,n){var o=X(Ue(n.el,0,n.options,!0)),a=10;return t?e.clientX<o.left-a||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-a||e.clientY<o.bottom&&e.clientX<o.left}function ya(e,t,n){var o=X(ln(n.el,n.options.draggable)),a=10;return t?e.clientX>o.right+a||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+a}function Ca(e,t,n,o,a,s,i,r){var l=o?e.clientY:e.clientX,c=o?n.height:n.width,h=o?n.top:n.left,d=o?n.bottom:n.right,w=!1;if(!i){if(r&&St<c*a){if(!lt&&(rt===1?l>h+c*s/2:l<d-c*s/2)&&(lt=!0),lt)w=!0;else if(rt===1?l<h+St:l>d-St)return-rt}else if(l>h+c*(1-a)/2&&l<d-c*(1-a)/2)return Sa(t)}return w=w||i,w&&(l<h+c*s/2||l>d-c*s/2)?l>h+c/2?1:-1:0}function Sa(e){return fe(v)<fe(e)?1:-1}function Ea(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Ta(e){xt.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&xt.push(o)}}function Et(e){return setTimeout(e,0)}function tn(e){return clearTimeout(e)}Nt&&k(document,"touchmove",function(e){(S.active||Ye)&&e.cancelable&&e.preventDefault()});S.utils={on:k,off:$,css:C,find:On,is:function(t,n){return!!be(t,n,t,!1)},extend:ra,throttle:Rn,closest:be,toggleClass:se,clone:Mn,index:fe,nextTick:Et,cancelNextTick:tn,detectDirection:Pn,getChild:Ue};S.get=function(e){return e[le]};S.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(S.utils=ye(ye({},S.utils),o.utils)),ft.mount(o)})};S.create=function(e,t){return new S(e,t)};S.version=aa;var q=[],et,nn,on=!1,Qt,Kt,Ot,tt;function Da(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?k(document,"dragover",this._handleAutoScroll):this.options.supportPointer?k(document,"pointermove",this._handleFallbackAutoScroll):o.touches?k(document,"touchmove",this._handleFallbackAutoScroll):k(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?$(document,"dragover",this._handleAutoScroll):($(document,"pointermove",this._handleFallbackAutoScroll),$(document,"touchmove",this._handleFallbackAutoScroll),$(document,"mousemove",this._handleFallbackAutoScroll)),En(),Tt(),la()},nulling:function(){Ot=nn=et=on=tt=Qt=Kt=null,q.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var a=this,s=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,r=document.elementFromPoint(s,i);if(Ot=n,o||this.options.forceAutoScrollFallback||dt||Le||at){Zt(n,this.options,r,o);var l=Ve(r,!0);on&&(!tt||s!==Qt||i!==Kt)&&(tt&&En(),tt=setInterval(function(){var c=Ve(document.elementFromPoint(s,i),!0);c!==l&&(l=c,Tt()),Zt(n,a.options,c,o)},10),Qt=s,Kt=i)}else{if(!this.options.bubbleScroll||Ve(r,!0)===_e()){Tt();return}Zt(n,this.options,Ve(r,!1),!1)}}},De(e,{pluginName:"scroll",initializeByDefault:!0})}function Tt(){q.forEach(function(e){clearInterval(e.pid)}),q=[]}function En(){clearInterval(tt)}var Zt=Rn(function(e,t,n,o){if(!!t.scroll){var a=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,i=t.scrollSensitivity,r=t.scrollSpeed,l=_e(),c=!1,h;nn!==n&&(nn=n,Tt(),et=t.scroll,h=t.scrollFn,et===!0&&(et=Ve(n,!0)));var d=0,w=et;do{var u=w,p=X(u),g=p.top,D=p.bottom,A=p.left,x=p.right,Q=p.width,j=p.height,O=void 0,z=void 0,W=u.scrollWidth,ue=u.scrollHeight,K=C(u),xe=u.scrollLeft,pe=u.scrollTop;u===l?(O=Q<W&&(K.overflowX==="auto"||K.overflowX==="scroll"||K.overflowX==="visible"),z=j<ue&&(K.overflowY==="auto"||K.overflowY==="scroll"||K.overflowY==="visible")):(O=Q<W&&(K.overflowX==="auto"||K.overflowX==="scroll"),z=j<ue&&(K.overflowY==="auto"||K.overflowY==="scroll"));var Oe=O&&(Math.abs(x-a)<=i&&xe+Q<W)-(Math.abs(A-a)<=i&&!!xe),ce=z&&(Math.abs(D-s)<=i&&pe+j<ue)-(Math.abs(g-s)<=i&&!!pe);if(!q[d])for(var ge=0;ge<=d;ge++)q[ge]||(q[ge]={});(q[d].vx!=Oe||q[d].vy!=ce||q[d].el!==u)&&(q[d].el=u,q[d].vx=Oe,q[d].vy=ce,clearInterval(q[d].pid),(Oe!=0||ce!=0)&&(c=!0,q[d].pid=setInterval(function(){o&&this.layer===0&&S.active._onTouchMove(Ot);var Re=q[this.layer].vy?q[this.layer].vy*r:0,ve=q[this.layer].vx?q[this.layer].vx*r:0;typeof h=="function"&&h.call(S.dragged.parentNode[le],ve,Re,e,Ot,q[this.layer].el)!=="continue"||Fn(q[this.layer].el,ve,Re)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&w!==l&&(w=Ve(w,!1)));on=c}},30),qn=function(t){var n=t.originalEvent,o=t.putSortable,a=t.dragEl,s=t.activeSortable,i=t.dispatchSortableEvent,r=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(!!n){var c=o||s;r();var h=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(h.clientX,h.clientY);l(),c&&!c.el.contains(d)&&(i("spill"),this.onSpill({dragEl:a,putSortable:o}))}};function un(){}un.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var a=Ue(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(n,a):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:qn};De(un,{pluginName:"revertOnSpill"});function cn(){}cn.prototype={onSpill:function(t){var n=t.dragEl,o=t.putSortable,a=o||this.sortable;a.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),a.animateAll()},drop:qn};De(cn,{pluginName:"removeOnSpill"});S.mount(new Da);S.mount(cn,un);const Ia=ae({name:"layoutTagsViewContextmenu",props:{dropdown:{type:Object,default:()=>({x:0,y:0})}},setup(e,{emit:t}){const n=Ce({isShow:!1,dropdownList:[{contextMenuClickId:0,txt:"message.tagsView.refresh",affix:!1,icon:"ele-RefreshRight"},{contextMenuClickId:1,txt:"message.tagsView.close",affix:!1,icon:"ele-Close"},{contextMenuClickId:2,txt:"message.tagsView.closeOther",affix:!1,icon:"ele-CircleClose"},{contextMenuClickId:3,txt:"message.tagsView.closeAll",affix:!1,icon:"ele-FolderDelete"},{contextMenuClickId:4,txt:"message.tagsView.fullscreen",affix:!1,icon:"iconfont icon-fullscreen"}],item:{},arrowLeft:10}),o=oe(()=>e.dropdown.x+117>document.documentElement.clientWidth?{x:document.documentElement.clientWidth-117-5,y:e.dropdown.y}:e.dropdown),a=r=>{t("currentContextmenuClick",Object.assign({},{contextMenuClickId:r},n.item))},s=r=>{n.item=r,r.meta.isAffix?n.dropdownList[1].affix=!0:n.dropdownList[1].affix=!1,i(),setTimeout(()=>{n.isShow=!0},10)},i=()=>{n.isShow=!1};return He(()=>{document.body.addEventListener("click",i)}),an(()=>{document.body.removeEventListener("click",i)}),It(()=>e.dropdown,({x:r})=>{r+117>document.documentElement.clientWidth?n.arrowLeft=117-(document.documentElement.clientWidth-r):n.arrowLeft=10},{deep:!0}),N({dropdowns:o,openContextmenu:s,closeContextmenu:i,onCurrentContextmenuClick:a},Se(n))}}),La={class:"el-dropdown-menu"},$a=["onClick"];function ka(e,t,n,o,a,s){const i=T("SvgIcon");return y(),Y(Un,{name:"el-zoom-in-center"},{default:R(()=>[sn((y(),L("div",{"aria-hidden":"true",class:"el-dropdown__popper el-popper is-light is-pure custom-contextmenu",role:"tooltip","data-popper-placement":"bottom",style:Dt(`top: ${e.dropdowns.y+5}px;left: ${e.dropdowns.x}px;`),key:Math.random()},[V("ul",La,[(y(!0),L(me,null,Qe(e.dropdownList,(r,l)=>(y(),L(me,null,[r.affix?ee("",!0):(y(),L("li",{class:"el-dropdown-menu__item","aria-disabled":"false",tabindex:"-1",key:l,onClick:c=>e.onCurrentContextmenuClick(r.contextMenuClickId)},[I(i,{name:r.icon},null,8,["name"]),V("span",null,H(e.$t(r.txt)),1)],8,$a))],64))),256))]),V("div",{class:"el-popper__arrow",style:Dt({left:`${e.arrowLeft}px`})},null,4)],4)),[[rn,e.isShow]])]),_:1})}var Va=ie(Ia,[["render",ka],["__scopeId","data-v-225a0b9c"]]);const Aa=ae({name:"layoutTagsView",components:{Contextmenu:Va},setup(){const{proxy:e}=ct(),t=je([]),n=je(),o=je(),a=je(),s=$t(),i=Ie(),r=$t(),{themeConfig:l}=U(i),{tagsViewRoutes:c}=U(r),h=to(),d=ut(),w=Rt(),u=Ce({routeActive:"",routePath:d.path,dropdown:{x:"",y:""},sortable:"",tagsRefsIndex:0,tagsViewList:[],tagsViewRoutesList:[]}),p=oe(()=>l.value.tagsStyle),g=oe(()=>l.value),D=oe(()=>m=>Lt.setTagsViewNameI18n(m)),A=m=>g.value.isShareTagsView?m.path===u.routePath:m.query&&Object.keys(m.query).length||m.params&&Object.keys(m.params).length?m.url?m.url===u.routeActive:m.path===u.routeActive:m.path===u.routePath,x=m=>{we.set("tagsViewList",m)},Q=async()=>{u.routeActive=await te(d),u.routePath=await d.meta.isDynamic?d.meta.isDynamicPath:d.path,u.tagsViewList=[],u.tagsViewRoutesList=c.value,j()},j=async()=>{we.get("tagsViewList")&&g.value.isCacheTagsView?u.tagsViewList=await we.get("tagsViewList"):(await u.tagsViewRoutesList.map(m=>{m.meta.isAffix&&!m.meta.isHide&&(m.url=te(m),u.tagsViewList.push(N({},m)),h.addCachedView(m))}),await W(d.path,d)),Ke(g.value.isShareTagsView?u.routePath:u.routeActive)},O=async(m,f)=>{let _=f.meta.isDynamic?f.meta.isDynamicPath:m;if(u.tagsViewList.filter(M=>M.path===_&&qt(f.meta.isDynamic?M.params?M.params:null:M.query?M.query:null,f.meta.isDynamic?f!=null&&f.params?f==null?void 0:f.params:null:f!=null&&f.query?f==null?void 0:f.query:null)).length<=0){let M=u.tagsViewRoutesList.find(de=>de.path===_);if(!M||M.meta.isAffix||M.meta.isLink&&!M.meta.isIframe)return!1;f.meta.isDynamic?M.params=f.params:M.query=f.query,M.url=te(M),u.tagsViewList.push(N({},M)),await h.addCachedView(M),x(u.tagsViewList)}},z=(m,f)=>{let _=f.meta.isDynamic?f.meta.isDynamicPath:m;u.tagsViewList.forEach(b=>{b.path===_&&!qt(f.meta.isDynamic?b.params?b.params:null:b.query?b.query:null,f.meta.isDynamic?f!=null&&f.params?f==null?void 0:f.params:null:f!=null&&f.query?f==null?void 0:f.query:null)&&(f.meta.isDynamic?b.params=f.params:b.query=f.query,b.url=te(b),x(u.tagsViewList))})},W=(m,f)=>{nt(async()=>{let _="";if(f&&f.meta.isDynamic){if(g.value.isShareTagsView?await z(m,f):await O(m,f),u.tagsViewList.some(b=>b.path===f.meta.isDynamicPath))return!1;_=u.tagsViewRoutesList.find(b=>b.path===f.meta.isDynamicPath)}else{if(g.value.isShareTagsView?await z(m,f):await O(m,f),u.tagsViewList.some(b=>b.path===m))return!1;_=u.tagsViewRoutesList.find(b=>b.path===m)}if(!_||_.meta.isLink&&!_.meta.isIframe)return!1;f&&f.meta.isDynamic?_.params=f!=null&&f.params?f==null?void 0:f.params:d.params:_.query=f!=null&&f.query?f==null?void 0:f.query:d.query,_.url=te(_),await h.addCachedView(_),await u.tagsViewList.push(N({},_)),await x(u.tagsViewList)})},ue=async m=>{const f=u.tagsViewList.find(_=>g.value.isShareTagsView?_.path===m:_.url===m);f!=null&&(await h.delCachedView(f),e.mittBus.emit("onTagsViewRefreshRouterView",m),f.meta.isKeepAlive&&h.addCachedView(f))},K=m=>{u.tagsViewList.map((f,_,b)=>{f.meta.isAffix||(g.value.isShareTagsView?f.path===m:f.url===m)&&(h.delCachedView(f),u.tagsViewList.splice(_,1),setTimeout(()=>{(u.tagsViewList.length===_&&g.value.isShareTagsView?u.routePath===m:u.routeActive===m)?b[b.length-1].meta.isDynamic?_!==b.length?w.push({name:b[_].name,params:b[_].params}):w.push({name:b[b.length-1].name,params:b[b.length-1].params}):_!==b.length?w.push({path:b[_].path,query:b[_].query}):w.push({path:b[b.length-1].path,query:b[b.length-1].query}):(u.tagsViewList.length!==_&&g.value.isShareTagsView?u.routePath===m:u.routeActive===m)&&(b[_].meta.isDynamic?w.push({name:b[_].name,params:b[_].params}):w.push({path:b[_].path,query:b[_].query}))},0))}),x(u.tagsViewList)},xe=m=>{we.get("tagsViewList")&&(u.tagsViewList=[],we.get("tagsViewList").map(f=>{f.meta.isAffix&&!f.meta.isHide&&(f.url=te(f),h.delOthersCachedViews(f),u.tagsViewList.push(N({},f)))}),W(m,d),x(u.tagsViewList))},pe=()=>{we.get("tagsViewList")&&(h.delAllCachedViews(),u.tagsViewList=[],we.get("tagsViewList").map(m=>{m.meta.isAffix&&!m.meta.isHide&&(m.url=te(m),u.tagsViewList.push(N({},m)),w.push({path:u.tagsViewList[u.tagsViewList.length-1].path}))}),x(u.tagsViewList))},Oe=async m=>{const f=u.tagsViewList.find(_=>g.value.isShareTagsView?_.path===m:_.url===m);f.meta.isDynamic?await w.push({name:f.name,params:f.params}):await w.push({name:f.name,query:f.query}),s.setCurrenFullscreen(!0)},ce=(m,f)=>(we.get("tagsViewList")?we.get("tagsViewList"):u.tagsViewList).find(b=>{if(b.path===m&&qt(b.meta.isDynamic?b.params?b.params:null:b.query?b.query:null,f&&Object.keys(f||{}).length>0?f:null))return b;if(b.path===m&&Object.keys(f||{}).length<=0)return b}),ge=async m=>{const f=m.meta.isDynamic?m.params:m.query;if(!ce(m.path,f))return Jt({type:"warning",message:"\u8BF7\u6B63\u786E\u8F93\u5165\u8DEF\u5F84\u53CA\u5B8C\u6574\u53C2\u6570\uFF08query\u3001params\uFF09"});const{path:_,name:b,params:M,query:de,meta:ht,url:ze}=ce(m.path,f);switch(m.contextMenuClickId){case 0:ht.isDynamic?await w.push({name:b,params:M}):await w.push({path:_,query:de}),ue(d.fullPath);break;case 1:K(g.value.isShareTagsView?_:ze);break;case 2:ht.isDynamic?await w.push({name:b,params:M}):await w.push({path:_,query:de}),xe(_);break;case 3:pe();break;case 4:Oe(g.value.isShareTagsView?_:ze);break}},Re=(m,f)=>{const{clientX:_,clientY:b}=f;u.dropdown.x=_,u.dropdown.y=b,o.value.openContextmenu(m)},ve=(m,f)=>{u.tagsRefsIndex=f,w.push(m)},te=m=>{let f=m.query&&Object.keys(m.query).length>0?m.query:m.params;if(!f||Object.keys(f).length<=0)return m.path;let _="";for(let b in f)_+=f[b];return`${m.meta.isDynamic?m.meta.isDynamicPath:m.path}-${_}`},Fe=()=>{e.$refs.scrollbarRef.update()},Pt=m=>{e.$refs.scrollbarRef.$refs.wrap$.scrollLeft+=m.wheelDelta/4},dn=()=>{nt(()=>{if(t.value.length<=0)return!1;let m=t.value[u.tagsRefsIndex],f=u.tagsRefsIndex,_=t.value.length,b=t.value[0],M=t.value[t.value.length-1],de=e.$refs.scrollbarRef.$refs.wrap$,ht=de.scrollWidth,ze=de.offsetWidth,fn=de.scrollLeft,Ht=t.value[u.tagsRefsIndex-1],hn=t.value[u.tagsRefsIndex+1],mt="",pt="";m===b?de.scrollLeft=0:m===M?de.scrollLeft=ht-ze:(f===0?mt=b.offsetLeft-5:mt=(Ht==null?void 0:Ht.offsetLeft)-5,f===_?pt=M.offsetLeft+M.offsetWidth+5:pt=hn.offsetLeft+hn.offsetWidth+5,pt>fn+ze?de.scrollLeft=pt-ze:mt<fn&&(de.scrollLeft=mt)),Fe()})},Ke=m=>{nt(async()=>{let f=await u.tagsViewList;u.tagsRefsIndex=f.findIndex(_=>g.value.isShareTagsView?_.path===m:_.url===m),dn()})},Ze=async()=>{const m=document.querySelector(".layout-navbars-tagsview-ul");if(!m)return!1;u.sortable.el&&u.sortable.destroy(),u.sortable=S.create(m,{animation:300,dataIdAttr:"data-url",disabled:!g.value.isSortableTagsView,onEnd:()=>{const f=[];u.sortable.toArray().map(_=>{u.tagsViewList.map(b=>{b.url===_&&f.push(N({},b))})}),x(f)}})},Bt=async()=>{await Ze(),Lt.isMobile()&&u.sortable.el&&u.sortable.destroy()};return In(()=>{Bt(),window.addEventListener("resize",Bt),e.mittBus.on("onCurrentContextmenuClick",m=>{ge(m)}),e.mittBus.on("openOrCloseSortable",()=>{Ze()}),e.mittBus.on("openShareTagsView",()=>{g.value.isShareTagsView&&(w.push("/project"),u.tagsViewList=[],u.tagsViewRoutesList.map(m=>{m.meta.isAffix&&!m.meta.isHide&&(m.url=te(m),u.tagsViewList.push(N({},m)))}))})}),an(()=>{e.mittBus.off("onCurrentContextmenuClick",()=>{}),e.mittBus.off("openOrCloseSortable",()=>{}),e.mittBus.off("openShareTagsView",()=>{}),window.removeEventListener("resize",Bt)}),Qn(()=>{t.value=[]}),He(()=>{Q(),Ze()}),Ft(async m=>{u.routeActive=te(m),u.routePath=m.meta.isDynamic?m.meta.isDynamicPath:m.path,await W(m.path,m),Ke(g.value.isShareTagsView?u.routePath:u.routeActive)}),It(no.state,m=>{if(m.tagsViewRoutes.tagsViewRoutes.length===u.tagsViewRoutesList.length)return!1;Q()},{deep:!0}),N({isActive:A,onContextmenu:Re,onTagsClick:ve,tagsRefs:t,contextmenuRef:o,scrollbarRef:n,tagsUlRef:a,onHandleScroll:Pt,getThemeConfig:g,setTagsStyle:p,setTagsViewNameI18n:D,refreshCurrentTagsView:ue,closeCurrentTagsView:K,onCurrentContextmenuClick:ge},Se(u))}}),xa=["data-url","onContextmenu","onClick"],Oa={key:0,class:"iconfont icon-webicon318 layout-navbars-tagsview-ul-li-iconfont"};function Ra(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("el-scrollbar"),l=T("Contextmenu");return y(),L("div",{class:ot(["layout-navbars-tagsview",{"layout-navbars-tagsview-shadow":e.getThemeConfig.layout==="classic"}])},[I(r,{ref:"scrollbarRef",onWheel:Be(e.onHandleScroll,["prevent"])},{default:R(()=>[V("ul",{class:ot(["layout-navbars-tagsview-ul",e.setTagsStyle]),ref:"tagsUlRef"},[(y(!0),L(me,null,Qe(e.tagsViewList,(c,h)=>(y(),L("li",{key:h,class:ot(["layout-navbars-tagsview-ul-li",{"is-active":e.isActive(c)}]),"data-url":c.url,onContextmenu:Be(d=>e.onContextmenu(c,d),["prevent"]),onClick:d=>e.onTagsClick(c,h),ref_for:!0,ref:d=>{d&&(e.tagsRefs[h]=d)}},[e.isActive(c)?(y(),L("i",Oa)):ee("",!0),!e.isActive(c)&&e.getThemeConfig.isTagsviewIcon?(y(),Y(i,{key:1,name:c.meta.icon,class:"pr5"},null,8,["name"])):ee("",!0),V("span",null,H(e.setTagsViewNameI18n(c)),1),e.isActive(c)?(y(),L(me,{key:2},[I(i,{name:"ele-RefreshRight",class:"ml5 layout-navbars-tagsview-ul-li-refresh",onClick:t[0]||(t[0]=Be(d=>e.refreshCurrentTagsView(e.$route.fullPath),["stop"]))}),c.meta.isAffix?ee("",!0):(y(),Y(i,{key:0,name:"ele-Close",class:"layout-navbars-tagsview-ul-li-icon layout-icon-active",onClick:Be(d=>e.closeCurrentTagsView(e.getThemeConfig.isShareTagsView?c.path:c.url),["stop"])},null,8,["onClick"]))],64)):ee("",!0),c.meta.isAffix?ee("",!0):(y(),Y(i,{key:3,name:"ele-Close",class:"layout-navbars-tagsview-ul-li-icon layout-icon-three",onClick:Be(d=>e.closeCurrentTagsView(e.getThemeConfig.isShareTagsView?c.path:c.url),["stop"])},null,8,["onClick"]))],42,xa))),128))],2)]),_:1},8,["onWheel"]),I(l,{dropdown:e.dropdown,ref:"contextmenuRef",onCurrentContextmenuClick:e.onCurrentContextmenuClick},null,8,["dropdown","onCurrentContextmenuClick"])],2)}var Fa=ie(Aa,[["render",Ra],["__scopeId","data-v-13efbe9c"]]);const Ma=ae({name:"layoutNavBars",components:{BreadcrumbIndex:ea,TagsView:Fa},setup(){const e=Ie(),{themeConfig:t}=U(e);return{setShowTagsView:oe(()=>{let{layout:o,isTagsview:a}=t.value;return o!=="classic"&&a})}}}),Na={class:"layout-navbars-container"};function Pa(e,t,n,o,a,s){const i=T("BreadcrumbIndex"),r=T("TagsView");return y(),L("div",Na,[I(i),e.setShowTagsView?(y(),Y(r,{key:0})):ee("",!0)])}var Ba=ie(Ma,[["render",Pa],["__scopeId","data-v-2b1a3776"]]);const Ha=ae({name:"layoutHeader",components:{NavBarsIndex:Ba},setup(){const e=$t(),t=Ie(),{themeConfig:n}=U(t),{isTagsViewCurrenFull:o}=U(e);return{setHeaderHeight:oe(()=>{let{isTagsview:s,layout:i}=n.value;return s&&i!=="classic"?"84px":"80px"}),isTagsViewCurrenFull:o}}});function za(e,t,n,o,a,s){const i=T("NavBarsIndex"),r=T("el-header");return sn((y(),Y(r,{class:"layout-header",height:e.setHeaderHeight},{default:R(()=>[I(i)]),_:1},8,["height"])),[[rn,!e.isTagsViewCurrenFull]])}var ai=ie(Ha,[["render",za]]);const qa=ae({name:"layoutFooter",setup(){const e=Ce({isDelayFooter:!0});return Ft(()=>{setTimeout(()=>{e.isDelayFooter=!1,setTimeout(()=>{e.isDelayFooter=!0},800)},0)}),N({},Se(e))}}),Xa=e=>(Tn("data-v-7f3657f7"),e=e(),Dn(),e),Ya={class:"layout-footer mt15"},ja=Xa(()=>V("div",{class:"layout-footer-warp"},[V("div",null,"vue-next-admin\uFF0CMade by lyt with \u2764\uFE0F"),V("div",{class:"mt5"},"\u6DF1\u5733\u5E02 xxx \u516C\u53F8\u7248\u6743\u6240\u6709")],-1)),Wa=[ja];function Ga(e,t,n,o,a,s){return sn((y(),L("div",Ya,Wa,512)),[[rn,e.isDelayFooter]])}var Ua=ie(qa,[["render",Ga],["__scopeId","data-v-7f3657f7"]]);const Qa=ae({name:"layoutMain",components:{LayoutParentView:ao,Footer:Ua},setup(){const{proxy:e}=ct(),t=Ie(),{themeConfig:n}=U(t),o=ut(),a=Ce({headerHeight:"",currentRouteMeta:{}}),s=oe(()=>{const{layout:l}=n.value;return l==="classic"||l==="transverse"}),i=()=>{const l=a.currentRouteMeta.isLink&&a.currentRouteMeta.isIframe;let{isTagsview:c}=n.value;return c?a.headerHeight=l?"86px":"115px":a.headerHeight="80px"},r=()=>{a.currentRouteMeta=o.meta};return He(async()=>{await r(),i(),$n.done()}),It(()=>o.path,()=>{a.currentRouteMeta=o.meta;const l=a.currentRouteMeta.isLink&&a.currentRouteMeta.isIframe;a.headerHeight=l?"86px":"115px",e.$refs.layoutScrollbarRef.update()}),It(n,l=>{var h,d;a.currentRouteMeta=o.meta;const c=a.currentRouteMeta.isLink&&a.currentRouteMeta.isIframe;a.headerHeight=l.isTagsview?c?"86px":"115px":"51px",(d=(h=e.$refs)==null?void 0:h.layoutScrollbarRef)==null||d.update()},{deep:!0}),N({themeConfig:n,isClassicOrTransverse:s},Se(a))}});function Ka(e,t,n,o,a,s){const i=T("LayoutParentView"),r=T("Footer"),l=T("el-scrollbar"),c=T("el-main");return y(),Y(c,{class:"layout-main"},{default:R(()=>[I(l,{ref:"layoutScrollbarRef",class:ot({"layout-scrollbar":!e.isClassicOrTransverse&&!e.currentRouteMeta.isLink&&!e.currentRouteMeta.isIframe||!e.isClassicOrTransverse&&e.currentRouteMeta.isLink&&!e.currentRouteMeta.isIframe})},{default:R(()=>[I(i,{style:Dt({padding:!e.isClassicOrTransverse||e.currentRouteMeta.isLink&&e.currentRouteMeta.isIframe?"0":"15px",transition:"padding 0.3s ease-in-out"})},null,8,["style"]),e.themeConfig.isFooter?(y(),Y(r,{key:0})):ee("",!0)]),_:1},8,["class"])]),_:1})}var ii=ie(Qa,[["render",Ka]]);export{ai as H,uo as L,ii as M,mo as S,Fa as T};