jplan-pack 0.6.51 → 0.6.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ Only state can be modified.`);l[0]="$state",ri=!1,n.set(s,l,n.state.value),ri=!0
8
8
  state: () => new MyClass()
9
9
  Found in store "${z.$id}".`),_&&s&&t.hydrate&&t.hydrate(z.$state,_),g=!0,m=!0,z}/*! #__NO_SIDE_EFFECTS__ */function uR(r,e,t){let n,i;if(typeof r=="string")n=r,i=e;else if(i=r,n=r.id,process.env.NODE_ENV!=="production"&&typeof n!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function s(l,d){const f=c.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&Yi&&Yi._testing?null:l)||(f?c.inject(cv,null):null),l&&da(l),process.env.NODE_ENV!=="production"&&!Yi)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
10
10
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
11
- This will fail in production.`);l=Yi,l._s.has(n)||(ym(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const g=l._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const m="__hot:"+n,v=ym(m,Tn({},i),l,!0);d._hotUpdate(v),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&co){const m=c.getCurrentInstance();if(m&&m.proxy&&!d){const v=m.proxy,C="_pStores"in v?v._pStores:v._pStores={};C[n]=g}}return g}return s.$id=n,s}const dR=uR({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(r){this.mini_sidebar=r},SET_CUSTOMIZER_DRAWER(r){this.Customizer_drawer=r},SET_LAYOUT(r){this.setHorizontalLayout=r},SET_THEME(r){this.actTheme=r},SET_FONT(r){this.fontTheme=r}}}),Fo=c.ref({}),ya=r=>{const e=c.computed(()=>r?Fo.value[r]||!1:Fo.value.default||!1),t=()=>{r?Fo.value[r]=!0:Fo.value.default=!0},n=()=>{r?Fo.value[r]=!1:Fo.value.default=!1};return c.onUnmounted(()=>{n()}),c.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},ie=c.ref(!1);var hR=Object.defineProperty,Cm=Object.getOwnPropertySymbols,fR=Object.prototype.hasOwnProperty,gR=Object.prototype.propertyIsEnumerable,wm=(r,e,t)=>e in r?hR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Cv=(r,e)=>{for(var t in e||(e={}))fR.call(e,t)&&wm(r,t,e[t]);if(Cm)for(var t of Cm(e))gR.call(e,t)&&wm(r,t,e[t]);return r},wc=r=>typeof r=="function",_c=r=>typeof r=="string",wv=r=>_c(r)&&r.trim().length>0,mR=r=>typeof r=="number",lo=r=>typeof r>"u",ha=r=>typeof r=="object"&&r!==null,pR=r=>er(r,"tag")&&wv(r.tag),_v=r=>window.TouchEvent&&r instanceof TouchEvent,Tv=r=>er(r,"component")&&Ev(r.component),vR=r=>wc(r)||ha(r),Ev=r=>!lo(r)&&(_c(r)||vR(r)||Tv(r)),_m=r=>ha(r)&&["height","width","right","left","top","bottom"].every(e=>mR(r[e])),er=(r,e)=>(ha(r)||wc(r))&&e in r,yR=(r=>()=>r++)(0);function wu(r){return _v(r)?r.targetTouches[0].clientX:r.clientX}function Tm(r){return _v(r)?r.targetTouches[0].clientY:r.clientY}var CR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},Ca=r=>Tv(r)?Ca(r.component):pR(r)?c.defineComponent({render(){return r}}):typeof r=="string"?r:c.toRaw(c.unref(r)),wR=r=>{if(typeof r=="string")return r;const e=er(r,"props")&&ha(r.props)?r.props:{},t=er(r,"listeners")&&ha(r.listeners)?r.listeners:{};return{component:Ca(r),props:e,listeners:t}},_R=()=>typeof window<"u",Tc=class{constructor(){this.allHandlers={}}getHandlers(r){return this.allHandlers[r]||[]}on(r,e){const t=this.getHandlers(r);t.push(e),this.allHandlers[r]=t}off(r,e){const t=this.getHandlers(r);t.splice(t.indexOf(e)>>>0,1)}emit(r,e){this.getHandlers(r).forEach(n=>n(e))}},TR=r=>["on","off","emit"].every(e=>er(r,e)&&wc(r[e]));exports.TYPE=void 0;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(function(r){r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right"})(exports.POSITION||(exports.POSITION={}));var nn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(nn||(nn={}));var Bn="Vue-Toastification",Ln={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Sv={type:Ln.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Hs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Ln.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},td={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Av={transition:{type:[Object,String],default:`${Bn}__bounce`}},ER={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:Ln.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Ln.trueBoolean,pauseOnHover:Ln.trueBoolean,closeOnClick:Ln.trueBoolean,timeout:td.timeout,hideProgressBar:td.hideProgressBar,toastClassName:Ln.classNames,bodyClassName:Ln.classNames,icon:Sv.customIcon,closeButton:Hs.component,closeButtonClassName:Hs.classNames,showCloseButtonOnHover:Hs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Tc}},SR={id:{type:[String,Number],required:!0,default:0},type:Ln.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},AR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Ln.trueBoolean,maxToasts:{type:Number,default:20},transition:Av.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:Ln.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},wr={CORE_TOAST:ER,TOAST:SR,CONTAINER:AR,PROGRESS_BAR:td,ICON:Sv,TRANSITION:Av,CLOSE_BUTTON:Hs},bv=c.defineComponent({name:"VtProgressBar",props:wr.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Bn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function bR(r,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(r.style),class:c.normalizeClass(r.cpClass)},null,6)}bv.render=bR;var IR=bv,Iv=c.defineComponent({name:"VtCloseButton",props:wr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Ca(this.component):"button"},classes(){const r=[`${Bn}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),kR=c.createTextVNode(" × ");function RR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.buttonComponent),c.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:c.withCtx(()=>[kR]),_:1},16,["aria-label","class"])}Iv.render=RR;var OR=Iv,kv={},NR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},PR=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),MR=[PR];function xR(r,e){return c.openBlock(),c.createElementBlock("svg",NR,MR)}kv.render=xR;var DR=kv,Rv={},LR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},BR=c.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),UR=[BR];function VR(r,e){return c.openBlock(),c.createElementBlock("svg",LR,UR)}Rv.render=VR;var Em=Rv,Ov={},FR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},HR=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),$R=[HR];function KR(r,e){return c.openBlock(),c.createElementBlock("svg",FR,$R)}Ov.render=KR;var zR=Ov,Nv={},WR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},qR=c.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),GR=[qR];function jR(r,e){return c.openBlock(),c.createElementBlock("svg",WR,GR)}Nv.render=jR;var YR=Nv,Pv=c.defineComponent({name:"VtIcon",props:wr.ICON,computed:{customIconChildren(){return er(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return _c(this.customIcon)?this.trimValue(this.customIcon):er(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return er(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Ev(this.customIcon)?Ca(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:Em,[exports.TYPE.INFO]:Em,[exports.TYPE.SUCCESS]:DR,[exports.TYPE.ERROR]:YR,[exports.TYPE.WARNING]:zR}[this.type]},iconClasses(){const r=[`${Bn}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return wv(r)?r.trim():e}}});function JR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{class:c.normalizeClass(r.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Pv.render=JR;var QR=Pv,Mv=c.defineComponent({name:"VtToast",components:{ProgressBar:IR,CloseButton:OR,Icon:QR},inheritAttrs:!1,props:Object.assign({},wr.CORE_TOAST,wr.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const r=[`${Bn}__toast`,`${Bn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Bn}__toast--rtl`),r},bodyClasses(){return[`${Bn}__toast-${_c(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return _m(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:er,getVueComponentFromObj:Ca,closeToast(){this.eventBus.emit(nn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const r=this.$el;r.addEventListener("touchstart",this.onDragStart,{passive:!0}),r.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const r=this.$el;r.removeEventListener("touchstart",this.onDragStart),r.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(r){this.beingDragged=!0,this.dragPos={x:wu(r),y:Tm(r)},this.dragStart=wu(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:wu(r),y:Tm(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,_m(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),XR=["role"];function ZR(r,e){const t=c.resolveComponent("Icon"),n=c.resolveComponent("CloseButton"),i=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.classes),style:c.normalizeStyle(r.draggableStyle),onClick:e[0]||(e[0]=(...s)=>r.clickHandler&&r.clickHandler(...s)),onMouseenter:e[1]||(e[1]=(...s)=>r.hoverPause&&r.hoverPause(...s)),onMouseleave:e[2]||(e[2]=(...s)=>r.hoverPlay&&r.hoverPlay(...s))},[r.icon?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:c.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(r.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),c.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},c.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,XR),r.closeButton?(c.openBlock(),c.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:c.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),r.timeout?(c.openBlock(),c.createBlock(i,{key:2,"is-running":r.isRunning,"hide-progress-bar":r.hideProgressBar,timeout:r.timeout,onCloseToast:r.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):c.createCommentVNode("v-if",!0)],38)}Mv.render=ZR;var eO=Mv,xv=c.defineComponent({name:"VtTransition",props:wr.TRANSITION,emits:["leave"],methods:{hasProp:er,leave(r){r instanceof HTMLElement&&(r.style.left=r.offsetLeft+"px",r.style.top=r.offsetTop+"px",r.style.width=getComputedStyle(r).width,r.style.position="absolute")}}});function tO(r,e){return c.openBlock(),c.createBlock(c.TransitionGroup,{tag:"div","enter-active-class":r.transition.enter?r.transition.enter:`${r.transition}-enter-active`,"move-class":r.transition.move?r.transition.move:`${r.transition}-move`,"leave-active-class":r.transition.leave?r.transition.leave:`${r.transition}-leave-active`,onLeave:r.leave},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}xv.render=tO;var nO=xv,Dv=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:eO,VtTransition:nO},props:Object.assign({},wr.CORE_TOAST,wr.CONTAINER,wr.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const r=this.eventBus;r.on(nn.ADD,this.addToast),r.on(nn.CLEAR,this.clearToasts),r.on(nn.DISMISS,this.dismissToast),r.on(nn.UPDATE,this.updateToast),r.on(nn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(r){wc(r)&&(r=await r()),CR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=wR(r.content);const e=Object.assign({},this.defaults,r.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[r.type],r),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(r){const e=this.toasts[r];!lo(e)&&!lo(e.onClose)&&e.onClose(),delete this.toasts[r]},clearToasts(){Object.keys(this.toasts).forEach(r=>{this.dismissToast(r)})},getPositionToasts(r){const e=this.filteredToasts.filter(t=>t.position===r).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(r){lo(r.container)||this.setup(r.container),this.defaults=Object.assign({},this.defaults,r)},updateToast({id:r,options:e,create:t}){this.toasts[r]?(e.timeout&&e.timeout===this.toasts[r].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[r],e))):t&&this.addToast(Object.assign({},{id:r},e))},getClasses(r){return[`${Bn}__container`,r].concat(this.defaults.containerClassName)}}});function rO(r,e){const t=c.resolveComponent("Toast"),n=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.positions,i=>(c.openBlock(),c.createElementBlock("div",{key:i},[c.createVNode(n,{transition:r.defaults.transition,class:c.normalizeClass(r.getClasses(i))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.getPositionToasts(i),s=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Dv.render=rO;var oO=Dv,Sm=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new Tc;e&&c.nextTick(()=>{const s=c.createApp(oO,Cv({},r)),l=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(l,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Bn}] App to share context with was not provided.`):(s._context.components=f._context.components,s._context.directives=f._context.directives,s._context.mixins=f._context.mixins,s._context.provides=f._context.provides,s.config.globalProperties=f.config.globalProperties)}});const n=(s,l)=>{const d=Object.assign({},{id:yR(),type:exports.TYPE.DEFAULT},l,{content:s});return t.emit(nn.ADD,d),d.id};n.clear=()=>t.emit(nn.CLEAR,void 0),n.updateDefaults=s=>{t.emit(nn.UPDATE_DEFAULTS,s)},n.dismiss=s=>{t.emit(nn.DISMISS,s)};function i(s,{content:l,options:d},f=!1){const g=Object.assign({},d,{content:l});t.emit(nn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.SUCCESS})),n.info=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.INFO})),n.error=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.ERROR})),n.warning=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.WARNING})),n},iO=()=>{const r=()=>console.warn(`[${Bn}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function fa(r){return _R()?TR(r)?Sm({eventBus:r},!1):Sm(r,!0):iO()}var Ec=Symbol("VueToastification"),xd=new Tc,aO=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=fa(Cv({eventBus:xd},e));r.provide(Ec,t)},sO=r=>{const e=fa(r);c.getCurrentInstance()&&c.provide(Ec,e)},Hn=r=>{if(r)return fa(r);const e=c.getCurrentInstance()?c.inject(Ec,void 0):void 0;return e||fa(xd)},cO=aO;const lO={class:"d-flex align-center"},uO={key:1},dO={class:"ms-auto"},wa=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=e,i=c.ref(!1),{isDialogActive:s,closeDialog:l}=ya(t.ddId);async function d(){try{await n("onCancel")}catch(g){console.error(g)}l()}async function f(){i.value=!0;try{await n("onSave")}catch(g){console.error(g)}i.value=!1,l()}return(g,m)=>{const v=c.resolveComponent("ExclamationCircleIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[g.variant==="global"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[0]||(m[0]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{rounded:"",loading:i.value},{default:c.withCtx(()=>[c.createVNode(lt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",lO,[g.$slots.title?c.renderSlot(g.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",uO,c.toDisplayString(t.title),1))]),c.createElementVNode("div",dO,[c.renderSlot(g.$slots,"heading-actions"),c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(fo.VDivider,{class:"mx-5"}),c.createVNode(lt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3}),g.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(g.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[g.$slots.metadata?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[3]||(m[3]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:f,loading:i.value},{default:c.withCtx(()=>m[4]||(m[4]=[c.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),g.variant==="confirm"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[1]||(m[1]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(v,{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[5]||(m[5]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:f},{default:c.withCtx(()=>m[6]||(m[6]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),g.variant==="empty"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[2]||(m[2]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64)}}}),Dd=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=ya("delete-all-__J"),n=e;return(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(wa,{"dd-id":"delete-all-__J",variant:"confirm",title:"Confirm delete",text:"Are you sure you want to delete all selected items?","on-save":()=>n("removeAll")},null,8,["on-save"]),c.createVNode(Be.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>s[0]||(s[0]=[c.createTextVNode(" Delete")])),_:1},8,["onClick"])],64))}}),Lv=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(c.openBlock(),c.createBlock(Be.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>n[0]||(n[0]=[c.createTextVNode(" Edit ")])),_:1}))}});var hO={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},Bv={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},Uv={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},fO={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},Am={name:"FilterIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},gO={name:"HierarchyIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},mO={name:"LayoutSidebarRightCollapseIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},pO={name:"RefreshIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},vO={name:"TableIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const Vv=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:n})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:e.variant},n,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Bv),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Uv),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),yO={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Fv=c.defineComponent({__name:"DotsMenuV1",props:{variant:{default:"text"},color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:i})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:t.variant},i,{icon:""}),{default:c.withCtx(()=>[t.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Bv),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Uv),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VList),null,{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.options,(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[i.title?(c.openBlock(),c.createElementBlock("div",yO,c.toDisplayString(i.title),1)):c.createCommentVNode("",!0),i.action?(c.openBlock(),c.createBlock(c.unref(Ft.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VListItemTitle),null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),i.divider?(c.openBlock(),c.createBlock(c.unref(Ft.VDivider),{key:2,class:"mt-2"})):c.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),Sc=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(lt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(lt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),Hv=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=c.ref(!1),i=c.ref(!1);c.onUnmounted(()=>{n.value=!1});const s=e;async function l(){try{await s("onCancel")}catch(f){console.error(f)}n.value=!1}async function d(){i.value=!0;try{await s("onSave")}catch(f){console.error(f)}i.value=!1,n.value=!1}return(f,g)=>(c.openBlock(),c.createBlock(Ls.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:m,props:v})=>[c.renderSlot(f.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:m,props:v})))]),default:c.withCtx(({isActive:m})=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(fO),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>g[0]||(g[0]=[c.createTextVNode(" Cancel ")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>g[1]||(g[1]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),_u="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",$v=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=r,t=c.ref(e.src),n=c.computed(()=>t.value||_u);function i(){t.value=_u}return(s,l)=>(c.openBlock(),c.createBlock(Zp.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(ev.VImg,{src:n.value,"lazy-src":_u,onError:i,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),Tu="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Kv=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=c.ref(e.img),n=c.computed(()=>t.value||Tu);function i(){t.value=Tu}return(s,l)=>(c.openBlock(),c.createBlock(Zp.VAvatar,{size:s.size},{default:c.withCtx(()=>[c.createVNode(ev.VImg,{src:n.value,"lazy-src":Tu,onError:i,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),CO=c.defineComponent({__name:"ContextMenu",setup(r){const e=c.ref(!1),t=c.ref({x:0,y:0}),n=s=>{s.preventDefault(),t.value={x:s.clientX,y:s.clientY},e.value=!0},i=()=>{e.value=!1};return c.onMounted(()=>{document.addEventListener("click",i)}),c.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(n,["right"]),class:"relative w-full h-full"},[c.renderSlot(s.$slots,"default",{},void 0,!0),c.createVNode(tv.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),vi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},zv=vi(CO,[["__scopeId","data-v-a53b15af"]]),wO={class:"d-inline-flex"},Wv=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>{var i;if(e.headers)return e.headers;if(e.columns)return(i=e.columns)==null?void 0:i.filter(s=>s.checked)}),n=c.useModel(r,"selection");return(i,s)=>(c.openBlock(),c.createBlock(nv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:i.items,"items-length":i.items.length,loading:i.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":i.sortBy,class:"customize-table"},{top:c.withCtx(()=>s[1]||(s[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",wO,[c.renderSlot(i.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!i.loading&&i.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),qv=6048e5,_O=864e5,bm=Symbol.for("constructDateFrom");function Wr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&bm in r?r[bm](e):r instanceof Date?new r.constructor(e):new Date(e)}function $n(r,e){return Wr(e||r,r)}let TO={};function Ac(){return TO}function ga(r,e){var d,f,g,m;const t=Ac(),n=(e==null?void 0:e.weekStartsOn)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,i=$n(r,e==null?void 0:e.in),s=i.getDay(),l=(s<n?7:0)+s-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function ec(r,e){return ga(r,{...e,weekStartsOn:1})}function Gv(r,e){const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=Wr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=ec(i),l=Wr(t,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const d=ec(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function Im(r){const e=$n(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function EO(r,...e){const t=Wr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function km(r,e){const t=$n(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function SO(r,e,t){const[n,i]=EO(t==null?void 0:t.in,r,e),s=km(n),l=km(i),d=+s-Im(s),f=+l-Im(l);return Math.round((d-f)/_O)}function AO(r,e){const t=Gv(r,e),n=Wr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ec(n)}function bO(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function IO(r){return!(!bO(r)&&typeof r!="number"||isNaN(+$n(r)))}function kO(r,e){const t=$n(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const RO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},OO=(r,e,t)=>{let n;const i=RO[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function Sn(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const NO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},MO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xO={date:Sn({formats:NO,defaultWidth:"full"}),time:Sn({formats:PO,defaultWidth:"full"}),dateTime:Sn({formats:MO,defaultWidth:"full"})},DO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},LO=(r,e,t,n)=>DO[r];function Ze(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const l=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):l;i=r.formattingValues[d]||r.formattingValues[l]}else{const l=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[l]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const BO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},UO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VO={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},FO={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},HO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$O={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KO=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},zO={ordinalNumber:KO,era:Ze({values:BO,defaultWidth:"wide"}),quarter:Ze({values:UO,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:VO,defaultWidth:"wide"}),day:Ze({values:FO,defaultWidth:"wide"}),dayPeriod:Ze({values:HO,defaultWidth:"wide",formattingValues:$O,defaultFormattingWidth:"wide"})};function et(r){return(e,t={})=>{const n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(i);if(!s)return null;const l=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?qO(d,v=>v.test(l)):WO(d,v=>v.test(l));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const m=e.slice(l.length);return{value:g,rest:m}}}function WO(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function qO(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function bc(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const i=n[0],s=e.match(r.parsePattern);if(!s)return null;let l=r.valueCallback?r.valueCallback(s[0]):s[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(i.length);return{value:l,rest:d}}}const GO=/^(\d+)(th|st|nd|rd)?/i,jO=/\d+/i,YO={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},JO={any:[/^b/i,/^(a|c)/i]},QO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},XO={any:[/1/i,/2/i,/3/i,/4/i]},ZO={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},eN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},tN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},rN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},oN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},iN={ordinalNumber:bc({matchPattern:GO,parsePattern:jO,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:YO,defaultMatchWidth:"wide",parsePatterns:JO,defaultParseWidth:"any"}),quarter:et({matchPatterns:QO,defaultMatchWidth:"wide",parsePatterns:XO,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:ZO,defaultMatchWidth:"wide",parsePatterns:eN,defaultParseWidth:"any"}),day:et({matchPatterns:tN,defaultMatchWidth:"wide",parsePatterns:nN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:rN,defaultMatchWidth:"any",parsePatterns:oN,defaultParseWidth:"any"})},Ld={code:"en-US",formatDistance:OO,formatLong:xO,formatRelative:LO,localize:zO,match:iN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aN(r,e){const t=$n(r,e==null?void 0:e.in);return SO(t,kO(t))+1}function sN(r,e){const t=$n(r,e==null?void 0:e.in),n=+ec(t)-+AO(t);return Math.round(n/qv)+1}function jv(r,e){var m,v,C,S;const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=Ac(),s=(e==null?void 0:e.firstWeekContainsDate)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=Wr((e==null?void 0:e.in)||r,0);l.setFullYear(n+1,0,s),l.setHours(0,0,0,0);const d=ga(l,e),f=Wr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=ga(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function cN(r,e){var d,f,g,m;const t=Ac(),n=(e==null?void 0:e.firstWeekContainsDate)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,i=jv(r,e),s=Wr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),ga(s,e)}function lN(r,e){const t=$n(r,e==null?void 0:e.in),n=+ga(t,e)-+cN(t,e);return Math.round(n/qv)+1}function Re(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Dr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Re(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Re(t+1,2)},d(r,e){return Re(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return Re(r.getHours()%12||12,e.length)},H(r,e){return Re(r.getHours(),e.length)},m(r,e){return Re(r.getMinutes(),e.length)},s(r,e){return Re(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return Re(i,e.length)}},Ho={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rm={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return Dr.y(r,e)},Y:function(r,e,t,n){const i=jv(r,n),s=i>0?i:1-i;if(e==="YY"){const l=s%100;return Re(l,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Re(s,e.length)},R:function(r,e){const t=Gv(r);return Re(t,e.length)},u:function(r,e){const t=r.getFullYear();return Re(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Re(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Re(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return Dr.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return Re(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const i=lN(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Re(i,e.length)},I:function(r,e,t){const n=sN(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Re(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Dr.d(r,e)},D:function(r,e,t){const n=aN(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Re(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Re(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Re(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Re(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const i=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let i;switch(n===12?i=Ho.noon:n===0?i=Ho.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let i;switch(n>=17?i=Ho.evening:n>=12?i=Ho.afternoon:n>=4?i=Ho.morning:i=Ho.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Dr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Dr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Dr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Dr.s(r,e)},S:function(r,e){return Dr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Nm(n);case"XXXX":case"XX":return ao(n);case"XXXXX":case"XXX":default:return ao(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return Nm(n);case"xxxx":case"xx":return ao(n);case"xxxxx":case"xxx":default:return ao(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Om(n,":");case"OOOO":default:return"GMT"+ao(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Om(n,":");case"zzzz":default:return"GMT"+ao(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Re(n,e.length)},T:function(r,e,t){return Re(+r,e.length)}};function Om(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?t+String(i):t+String(i)+e+Re(s,2)}function Nm(r,e){return r%60===0?(r>0?"-":"+")+Re(Math.abs(r)/60,2):ao(r,e)}function ao(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Re(Math.trunc(n/60),2),s=Re(n%60,2);return t+i+e+s}const Pm=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Yv=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},uN=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Pm(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Pm(n,e)).replace("{{time}}",Yv(i,e))},dN={p:Yv,P:uN},hN=/^D+$/,fN=/^Y+$/,gN=["D","DD","YY","YYYY"];function mN(r){return hN.test(r)}function pN(r){return fN.test(r)}function vN(r,e,t){const n=yN(r,e,t);if(console.warn(n),gN.includes(r))throw new RangeError(n)}function yN(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const CN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_N=/^'([^]*?)'?$/,TN=/''/g,EN=/[a-zA-Z]/;function SN(r,e,t){var m,v,C,S,_,A,R,$;const n=Ac(),i=(t==null?void 0:t.locale)??n.locale??Ld,s=(t==null?void 0:t.firstWeekContainsDate)??((v=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((A=(_=t==null?void 0:t.locale)==null?void 0:_.options)==null?void 0:A.weekStartsOn)??n.weekStartsOn??(($=(R=n.locale)==null?void 0:R.options)==null?void 0:$.weekStartsOn)??0,d=$n(r,t==null?void 0:t.in);if(!IO(d))throw new RangeError("Invalid time value");let f=e.match(wN).map(V=>{const B=V[0];if(B==="p"||B==="P"){const Q=dN[B];return Q(V,i.formatLong)}return V}).join("").match(CN).map(V=>{if(V==="''")return{isToken:!1,value:"'"};const B=V[0];if(B==="'")return{isToken:!1,value:AN(V)};if(Rm[B])return{isToken:!0,value:V};if(B.match(EN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");return{isToken:!1,value:V}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:l,locale:i};return f.map(V=>{if(!V.isToken)return V.value;const B=V.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&pN(B)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&mN(B))&&vN(B,e,String(r));const Q=Rm[B[0]];return Q(d,B,i.localize,g)}).join("")}function AN(r){const e=r.match(_N);return e?e[1].replace(TN,"'"):r}const Mm={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},bN=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?Mm[r].withPreposition:Mm[r].standalone;return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:"vor "+n:n},IN={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},kN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},RN={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},ON={date:Sn({formats:IN,defaultWidth:"full"}),time:Sn({formats:kN,defaultWidth:"full"}),dateTime:Sn({formats:RN,defaultWidth:"full"})},NN={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},PN=(r,e,t,n)=>NN[r],MN={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},xN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},DN={narrow:nd.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nd.wide},LN={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},BN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},UN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},VN=r=>Number(r)+".",FN={ordinalNumber:VN,era:Ze({values:MN,defaultWidth:"wide"}),quarter:Ze({values:xN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:nd,formattingValues:DN,defaultWidth:"wide"}),day:Ze({values:LN,defaultWidth:"wide"}),dayPeriod:Ze({values:BN,defaultWidth:"wide",formattingValues:UN,defaultFormattingWidth:"wide"})},HN=/^(\d+)(\.)?/i,$N=/\d+/i,KN={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},zN={any:[/^v/i,/^n/i]},WN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},qN={any:[/1/i,/2/i,/3/i,/4/i]},GN={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},jN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YN={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},JN={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},QN={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},XN={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},ZN={ordinalNumber:bc({matchPattern:HN,parsePattern:$N,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:KN,defaultMatchWidth:"wide",parsePatterns:zN,defaultParseWidth:"any"}),quarter:et({matchPatterns:WN,defaultMatchWidth:"wide",parsePatterns:qN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:GN,defaultMatchWidth:"wide",parsePatterns:jN,defaultParseWidth:"any"}),day:et({matchPatterns:YN,defaultMatchWidth:"wide",parsePatterns:JN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:QN,defaultMatchWidth:"wide",parsePatterns:XN,defaultParseWidth:"any"})},e0={code:"de",formatDistance:bN,formatLong:ON,formatRelative:PN,localize:FN,match:ZN,options:{weekStartsOn:1,firstWeekContainsDate:4}},t0={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},n0=(r,e,t)=>{let n;const i=t0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+n:"il y a "+n:n},r0={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},o0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},i0={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},a0={date:Sn({formats:r0,defaultWidth:"full"}),time:Sn({formats:o0,defaultWidth:"full"}),dateTime:Sn({formats:i0,defaultWidth:"full"})},s0={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},c0=(r,e,t,n)=>s0[r],l0={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},u0={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},d0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},h0={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},f0={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},g0=(r,e)=>{const t=Number(r),n=e==null?void 0:e.unit;if(t===0)return"0";const i=["year","week","hour","minute","second"];let s;return t===1?s=n&&i.includes(n)?"ère":"er":s="ème",t+s},m0=["MMM","MMMM"],p0={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&m0.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:g0,era:Ze({values:l0,defaultWidth:"wide"}),quarter:Ze({values:u0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:d0,defaultWidth:"wide"}),day:Ze({values:h0,defaultWidth:"wide"}),dayPeriod:Ze({values:f0,defaultWidth:"wide"})},v0=/^(\d+)(ième|ère|ème|er|e)?/i,y0=/\d+/i,C0={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},w0={any:[/^av/i,/^ap/i]},_0={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},T0={any:[/1/i,/2/i,/3/i,/4/i]},E0={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},S0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},A0={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},b0={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},I0={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},k0={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},R0={ordinalNumber:bc({matchPattern:v0,parsePattern:y0,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:C0,defaultMatchWidth:"wide",parsePatterns:w0,defaultParseWidth:"any"}),quarter:et({matchPatterns:_0,defaultMatchWidth:"wide",parsePatterns:T0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:E0,defaultMatchWidth:"wide",parsePatterns:S0,defaultParseWidth:"any"}),day:et({matchPatterns:A0,defaultMatchWidth:"wide",parsePatterns:b0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:I0,defaultMatchWidth:"any",parsePatterns:k0,defaultParseWidth:"any"})},O0={code:"fr",formatDistance:n0,formatLong:a0,formatRelative:c0,localize:p0,match:R0,options:{weekStartsOn:1,firstWeekContainsDate:4}},N0={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},P0=(r,e,t)=>{let n;const i=N0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+n:"há "+n:n},M0={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},x0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},D0={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},L0={date:Sn({formats:M0,defaultWidth:"full"}),time:Sn({formats:x0,defaultWidth:"full"}),dateTime:Sn({formats:D0,defaultWidth:"full"})},B0={lastWeek:r=>{const e=r.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},U0=(r,e,t,n)=>{const i=B0[r];return typeof i=="function"?i(e):i},V0={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},F0={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},H0={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},$0={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},K0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},z0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},W0=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},q0={ordinalNumber:W0,era:Ze({values:V0,defaultWidth:"wide"}),quarter:Ze({values:F0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:H0,defaultWidth:"wide"}),day:Ze({values:$0,defaultWidth:"wide"}),dayPeriod:Ze({values:K0,defaultWidth:"wide",formattingValues:z0,defaultFormattingWidth:"wide"})},G0=/^(\d+)[ºªo]?/i,j0=/\d+/i,Y0={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},J0={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Q0={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},X0={any:[/1/i,/2/i,/3/i,/4/i]},Z0={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},eP={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},tP={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},nP={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},rP={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},oP={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},iP={ordinalNumber:bc({matchPattern:G0,parsePattern:j0,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:Y0,defaultMatchWidth:"wide",parsePatterns:J0,defaultParseWidth:"any"}),quarter:et({matchPatterns:Q0,defaultMatchWidth:"wide",parsePatterns:X0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:Z0,defaultMatchWidth:"wide",parsePatterns:eP,defaultParseWidth:"any"}),day:et({matchPatterns:tP,defaultMatchWidth:"wide",parsePatterns:nP,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:rP,defaultMatchWidth:"any",parsePatterns:oP,defaultParseWidth:"any"})},aP={code:"pt-BR",formatDistance:P0,formatLong:L0,formatRelative:U0,localize:q0,match:iP,options:{weekStartsOn:0,firstWeekContainsDate:1}},sP={"en-US":Ld,"pt-BR":aP,"fr-FR":O0,"de-DE":e0};function Jv(r){if(!r)return"";const e=navigator.language,t=sP[e]||Ld;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":SN(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}const cP={class:"d-inline-flex"},lP={class:"d-inline-flex"},uP={class:"d-inline-flex"},Qv=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>e.headers?e.headers:e.columns?e.columns.filter(g=>g.checked):[]),n=c.useModel(r,"selection"),i=c.ref(!1),s=c.ref({x:0,y:0}),l=c.ref(null),d=(g,{item:m})=>{g.preventDefault(),l.value=m,s.value={x:g.clientX,y:g.clientY},i.value=!0};function f(g,{item:m}){var C;if(!e.selectOnRowClick||!((C=n.value)!=null&&C.length))return;const v=n.value.findIndex(S=>S===m);v!==-1?n.value.splice(v,1):n.value.push(m)}return(g,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(tv.VMenu,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=v=>i.value=v),style:c.normalizeStyle({top:`${s.value.y}px`,left:`${s.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"contextmenu",{item:l.value})]),_:3},8,["modelValue","style"]),c.createVNode(nv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":m[1]||(m[1]=v=>n.value=v),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:g.items,"items-length":g.items.length,loading:g.loading||!1,"return-object":"","show-select":"","sort-by":g.sortBy,search:g.search,"filter-keys":g.filterKeys,class:"customize-table","onContextmenu:row":d,"onClick:row":f},c.createSlots({top:c.withCtx(()=>[m[2]||(m[2]=c.createElementVNode("span",{class:"mt-4"},null,-1))]),"item.avatar":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"avatar",{item:v})]),"item.active":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"active",{item:v})]),"item.image":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"image",{item:v})]),"item.picture":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"picture",{item:v})]),"item.icon":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"icon",{item:v})]),"item.actions":c.withCtx(({item:v})=>[c.createElementVNode("div",cP,[c.renderSlot(g.$slots,"actions",{item:v})])]),"no-data":c.withCtx(()=>[!g.loading&&g.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode("No records found.")],64)):c.createCommentVNode("",!0)]),_:2},[c.renderList(g.dateFields,v=>({name:`item.${v}`,fn:c.withCtx(({item:C})=>[c.createElementVNode("div",lP,c.toDisplayString(c.unref(Jv)(C[v])),1)])})),g.customFields?{name:`item.${customField}`,fn:c.withCtx(({item:v})=>[c.createElementVNode("div",uP,[c.renderSlot(g.$slots,customField,{item:v})])]),key:"0"}:void 0]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])],64))}}),Xv=c.defineComponent({__name:"SearchFilter",props:{search:{},searchModifiers:{}},emits:["update:search"],setup(r){const e=c.useModel(r,"search");return(t,n)=>{const i=c.resolveComponent("SearchIcon");return c.openBlock(),c.createBlock(Ik.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s)},{"prepend-inner":c.withCtx(()=>[c.createVNode(i,{size:"15",class:"ma-1 me-1"})]),_:1},8,["modelValue"])}}}),dP={class:"d-flex align-center"},hP={class:"d-flex align-center justify-end"},fP={class:"d-flex align-center"},gP={class:"d-flex align-center ms-1"},mP=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filters:{}},{filterKeys:{},filterKeysModifiers:{},search:{},searchModifiers:{},columns:{},columnsModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:filterKeys","update:search","update:columns"]),setup(r,{emit:e}){var g,m;const t=e,n=c.useModel(r,"filterKeys"),i=c.useModel(r,"search"),s=c.useModel(r,"columns"),{openDialog:l}=ya("col-settings"),d=c.getCurrentInstance(),f=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((m=d==null?void 0:d.vnode.props)==null?void 0:m["onUpdate:remove"])!==void 0;return(v,C)=>{const S=c.resolveComponent("EraserIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Fd),{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=_=>s.value=_)},null,8,["modelValue"]),c.createVNode(_e.VRow,{class:"align-center",justify:"space-between"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",dP,[c.createVNode(c.unref(Am),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(Xv,{modelValue:i.value,"onUpdate:modelValue":C[1]||(C[1]=_=>i.value=_)},null,8,["modelValue"])])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",hP,[c.renderSlot(v.$slots,"tleft-prepend",{},void 0,!0)])]),_:3}),c.createVNode(_e.VCol,null,{default:c.withCtx(()=>[c.createElementVNode("div",fP,[c.createVNode(ta.VSelect,{items:["Move data","Copy","Duplicate","Loop"],"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a filter",density:"compact",class:"min-w-75 me-2","prepend-inner-icon":c.unref(Am),"hide-details":"",multiple:""},null,8,["prepend-inner-icon"]),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(S,{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(pO),{onClick:C[2]||(C[2]=_=>t("refresh")),color:"rgb(var(--v-theme-secondary))"})]),_:1})])]),_:1})]),_:3}),c.createVNode(fo.VDivider,{class:"my-4"}),c.createVNode(_e.VRow,{justify:"space-between",class:"align-center"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto"},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"left-prepend",{},void 0,!0),c.unref(f)?(c.openBlock(),c.createBlock(c.unref(Dd),{key:0,onRemoveAll:C[3]||(C[3]=_=>t("remove"))})):c.createCommentVNode("",!0),c.renderSlot(v.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(_e.VSpacer),c.createVNode(_e.VRow,{justify:"end",class:"align-center me-2 min-h-_JTable-header","no-gutters":""},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"right-prepend",{},void 0,!0),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center me-2"},{default:c.withCtx(()=>[c.createVNode(c.unref(vO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ta.VSelect,{items:v.filters,"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Visualize",density:"compact",class:"min-w-50 me-2",modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=_=>n.value=_),"hide-details":"",multiple:""},null,8,["items","modelValue"])]),_:1}),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center ms-1"},{default:c.withCtx(()=>[c.createVNode(c.unref(gO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ta.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Actions",density:"compact",class:"min-w-50","hide-details":""})]),_:1}),c.createElementVNode("div",gP,[c.createVNode(Be.VBtn,{icon:"",flat:"",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(mO),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"])])]),_:3})]),_:3})],64)}}}),Zv=vi(mP,[["__scopeId","data-v-8188268e"]]);/*!
11
+ This will fail in production.`);l=Yi,l._s.has(n)||(ym(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const g=l._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const m="__hot:"+n,v=ym(m,Tn({},i),l,!0);d._hotUpdate(v),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&co){const m=c.getCurrentInstance();if(m&&m.proxy&&!d){const v=m.proxy,C="_pStores"in v?v._pStores:v._pStores={};C[n]=g}}return g}return s.$id=n,s}const dR=uR({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(r){this.mini_sidebar=r},SET_CUSTOMIZER_DRAWER(r){this.Customizer_drawer=r},SET_LAYOUT(r){this.setHorizontalLayout=r},SET_THEME(r){this.actTheme=r},SET_FONT(r){this.fontTheme=r}}}),Fo=c.ref({}),ya=r=>{const e=c.computed(()=>r?Fo.value[r]||!1:Fo.value.default||!1),t=()=>{r?Fo.value[r]=!0:Fo.value.default=!0},n=()=>{r?Fo.value[r]=!1:Fo.value.default=!1};return c.onUnmounted(()=>{n()}),c.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},ie=c.ref(!1);var hR=Object.defineProperty,Cm=Object.getOwnPropertySymbols,fR=Object.prototype.hasOwnProperty,gR=Object.prototype.propertyIsEnumerable,wm=(r,e,t)=>e in r?hR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Cv=(r,e)=>{for(var t in e||(e={}))fR.call(e,t)&&wm(r,t,e[t]);if(Cm)for(var t of Cm(e))gR.call(e,t)&&wm(r,t,e[t]);return r},wc=r=>typeof r=="function",_c=r=>typeof r=="string",wv=r=>_c(r)&&r.trim().length>0,mR=r=>typeof r=="number",lo=r=>typeof r>"u",ha=r=>typeof r=="object"&&r!==null,pR=r=>er(r,"tag")&&wv(r.tag),_v=r=>window.TouchEvent&&r instanceof TouchEvent,Tv=r=>er(r,"component")&&Ev(r.component),vR=r=>wc(r)||ha(r),Ev=r=>!lo(r)&&(_c(r)||vR(r)||Tv(r)),_m=r=>ha(r)&&["height","width","right","left","top","bottom"].every(e=>mR(r[e])),er=(r,e)=>(ha(r)||wc(r))&&e in r,yR=(r=>()=>r++)(0);function wu(r){return _v(r)?r.targetTouches[0].clientX:r.clientX}function Tm(r){return _v(r)?r.targetTouches[0].clientY:r.clientY}var CR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},Ca=r=>Tv(r)?Ca(r.component):pR(r)?c.defineComponent({render(){return r}}):typeof r=="string"?r:c.toRaw(c.unref(r)),wR=r=>{if(typeof r=="string")return r;const e=er(r,"props")&&ha(r.props)?r.props:{},t=er(r,"listeners")&&ha(r.listeners)?r.listeners:{};return{component:Ca(r),props:e,listeners:t}},_R=()=>typeof window<"u",Tc=class{constructor(){this.allHandlers={}}getHandlers(r){return this.allHandlers[r]||[]}on(r,e){const t=this.getHandlers(r);t.push(e),this.allHandlers[r]=t}off(r,e){const t=this.getHandlers(r);t.splice(t.indexOf(e)>>>0,1)}emit(r,e){this.getHandlers(r).forEach(n=>n(e))}},TR=r=>["on","off","emit"].every(e=>er(r,e)&&wc(r[e]));exports.TYPE=void 0;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(function(r){r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right"})(exports.POSITION||(exports.POSITION={}));var nn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(nn||(nn={}));var Bn="Vue-Toastification",Ln={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Sv={type:Ln.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Hs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Ln.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},td={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Av={transition:{type:[Object,String],default:`${Bn}__bounce`}},ER={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:Ln.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Ln.trueBoolean,pauseOnHover:Ln.trueBoolean,closeOnClick:Ln.trueBoolean,timeout:td.timeout,hideProgressBar:td.hideProgressBar,toastClassName:Ln.classNames,bodyClassName:Ln.classNames,icon:Sv.customIcon,closeButton:Hs.component,closeButtonClassName:Hs.classNames,showCloseButtonOnHover:Hs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Tc}},SR={id:{type:[String,Number],required:!0,default:0},type:Ln.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},AR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Ln.trueBoolean,maxToasts:{type:Number,default:20},transition:Av.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:Ln.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},wr={CORE_TOAST:ER,TOAST:SR,CONTAINER:AR,PROGRESS_BAR:td,ICON:Sv,TRANSITION:Av,CLOSE_BUTTON:Hs},bv=c.defineComponent({name:"VtProgressBar",props:wr.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Bn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function bR(r,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(r.style),class:c.normalizeClass(r.cpClass)},null,6)}bv.render=bR;var IR=bv,Iv=c.defineComponent({name:"VtCloseButton",props:wr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Ca(this.component):"button"},classes(){const r=[`${Bn}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),kR=c.createTextVNode(" × ");function RR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.buttonComponent),c.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:c.withCtx(()=>[kR]),_:1},16,["aria-label","class"])}Iv.render=RR;var OR=Iv,kv={},NR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},PR=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),MR=[PR];function xR(r,e){return c.openBlock(),c.createElementBlock("svg",NR,MR)}kv.render=xR;var DR=kv,Rv={},LR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},BR=c.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),UR=[BR];function VR(r,e){return c.openBlock(),c.createElementBlock("svg",LR,UR)}Rv.render=VR;var Em=Rv,Ov={},FR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},HR=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),$R=[HR];function KR(r,e){return c.openBlock(),c.createElementBlock("svg",FR,$R)}Ov.render=KR;var zR=Ov,Nv={},WR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},qR=c.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),GR=[qR];function jR(r,e){return c.openBlock(),c.createElementBlock("svg",WR,GR)}Nv.render=jR;var YR=Nv,Pv=c.defineComponent({name:"VtIcon",props:wr.ICON,computed:{customIconChildren(){return er(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return _c(this.customIcon)?this.trimValue(this.customIcon):er(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return er(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Ev(this.customIcon)?Ca(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:Em,[exports.TYPE.INFO]:Em,[exports.TYPE.SUCCESS]:DR,[exports.TYPE.ERROR]:YR,[exports.TYPE.WARNING]:zR}[this.type]},iconClasses(){const r=[`${Bn}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return wv(r)?r.trim():e}}});function JR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{class:c.normalizeClass(r.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Pv.render=JR;var QR=Pv,Mv=c.defineComponent({name:"VtToast",components:{ProgressBar:IR,CloseButton:OR,Icon:QR},inheritAttrs:!1,props:Object.assign({},wr.CORE_TOAST,wr.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const r=[`${Bn}__toast`,`${Bn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Bn}__toast--rtl`),r},bodyClasses(){return[`${Bn}__toast-${_c(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return _m(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:er,getVueComponentFromObj:Ca,closeToast(){this.eventBus.emit(nn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const r=this.$el;r.addEventListener("touchstart",this.onDragStart,{passive:!0}),r.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const r=this.$el;r.removeEventListener("touchstart",this.onDragStart),r.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(r){this.beingDragged=!0,this.dragPos={x:wu(r),y:Tm(r)},this.dragStart=wu(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:wu(r),y:Tm(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,_m(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),XR=["role"];function ZR(r,e){const t=c.resolveComponent("Icon"),n=c.resolveComponent("CloseButton"),i=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.classes),style:c.normalizeStyle(r.draggableStyle),onClick:e[0]||(e[0]=(...s)=>r.clickHandler&&r.clickHandler(...s)),onMouseenter:e[1]||(e[1]=(...s)=>r.hoverPause&&r.hoverPause(...s)),onMouseleave:e[2]||(e[2]=(...s)=>r.hoverPlay&&r.hoverPlay(...s))},[r.icon?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:c.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(r.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),c.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},c.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,XR),r.closeButton?(c.openBlock(),c.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:c.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),r.timeout?(c.openBlock(),c.createBlock(i,{key:2,"is-running":r.isRunning,"hide-progress-bar":r.hideProgressBar,timeout:r.timeout,onCloseToast:r.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):c.createCommentVNode("v-if",!0)],38)}Mv.render=ZR;var eO=Mv,xv=c.defineComponent({name:"VtTransition",props:wr.TRANSITION,emits:["leave"],methods:{hasProp:er,leave(r){r instanceof HTMLElement&&(r.style.left=r.offsetLeft+"px",r.style.top=r.offsetTop+"px",r.style.width=getComputedStyle(r).width,r.style.position="absolute")}}});function tO(r,e){return c.openBlock(),c.createBlock(c.TransitionGroup,{tag:"div","enter-active-class":r.transition.enter?r.transition.enter:`${r.transition}-enter-active`,"move-class":r.transition.move?r.transition.move:`${r.transition}-move`,"leave-active-class":r.transition.leave?r.transition.leave:`${r.transition}-leave-active`,onLeave:r.leave},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}xv.render=tO;var nO=xv,Dv=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:eO,VtTransition:nO},props:Object.assign({},wr.CORE_TOAST,wr.CONTAINER,wr.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const r=this.eventBus;r.on(nn.ADD,this.addToast),r.on(nn.CLEAR,this.clearToasts),r.on(nn.DISMISS,this.dismissToast),r.on(nn.UPDATE,this.updateToast),r.on(nn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(r){wc(r)&&(r=await r()),CR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=wR(r.content);const e=Object.assign({},this.defaults,r.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[r.type],r),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(r){const e=this.toasts[r];!lo(e)&&!lo(e.onClose)&&e.onClose(),delete this.toasts[r]},clearToasts(){Object.keys(this.toasts).forEach(r=>{this.dismissToast(r)})},getPositionToasts(r){const e=this.filteredToasts.filter(t=>t.position===r).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(r){lo(r.container)||this.setup(r.container),this.defaults=Object.assign({},this.defaults,r)},updateToast({id:r,options:e,create:t}){this.toasts[r]?(e.timeout&&e.timeout===this.toasts[r].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[r],e))):t&&this.addToast(Object.assign({},{id:r},e))},getClasses(r){return[`${Bn}__container`,r].concat(this.defaults.containerClassName)}}});function rO(r,e){const t=c.resolveComponent("Toast"),n=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.positions,i=>(c.openBlock(),c.createElementBlock("div",{key:i},[c.createVNode(n,{transition:r.defaults.transition,class:c.normalizeClass(r.getClasses(i))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.getPositionToasts(i),s=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Dv.render=rO;var oO=Dv,Sm=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new Tc;e&&c.nextTick(()=>{const s=c.createApp(oO,Cv({},r)),l=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(l,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Bn}] App to share context with was not provided.`):(s._context.components=f._context.components,s._context.directives=f._context.directives,s._context.mixins=f._context.mixins,s._context.provides=f._context.provides,s.config.globalProperties=f.config.globalProperties)}});const n=(s,l)=>{const d=Object.assign({},{id:yR(),type:exports.TYPE.DEFAULT},l,{content:s});return t.emit(nn.ADD,d),d.id};n.clear=()=>t.emit(nn.CLEAR,void 0),n.updateDefaults=s=>{t.emit(nn.UPDATE_DEFAULTS,s)},n.dismiss=s=>{t.emit(nn.DISMISS,s)};function i(s,{content:l,options:d},f=!1){const g=Object.assign({},d,{content:l});t.emit(nn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.SUCCESS})),n.info=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.INFO})),n.error=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.ERROR})),n.warning=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.WARNING})),n},iO=()=>{const r=()=>console.warn(`[${Bn}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function fa(r){return _R()?TR(r)?Sm({eventBus:r},!1):Sm(r,!0):iO()}var Ec=Symbol("VueToastification"),xd=new Tc,aO=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=fa(Cv({eventBus:xd},e));r.provide(Ec,t)},sO=r=>{const e=fa(r);c.getCurrentInstance()&&c.provide(Ec,e)},Hn=r=>{if(r)return fa(r);const e=c.getCurrentInstance()?c.inject(Ec,void 0):void 0;return e||fa(xd)},cO=aO;const lO={class:"d-flex align-center"},uO={key:1},dO={class:"ms-auto"},wa=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=e,i=c.ref(!1),{isDialogActive:s,closeDialog:l}=ya(t.ddId);async function d(){try{await n("onCancel")}catch(g){console.error(g)}l()}async function f(){i.value=!0;try{await n("onSave")}catch(g){console.error(g)}i.value=!1,l()}return(g,m)=>{const v=c.resolveComponent("ExclamationCircleIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[g.variant==="global"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[0]||(m[0]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{rounded:"",loading:i.value},{default:c.withCtx(()=>[c.createVNode(lt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",lO,[g.$slots.title?c.renderSlot(g.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",uO,c.toDisplayString(t.title),1))]),c.createElementVNode("div",dO,[c.renderSlot(g.$slots,"heading-actions"),c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(fo.VDivider,{class:"mx-5"}),c.createVNode(lt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3}),g.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(g.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[g.$slots.metadata?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[3]||(m[3]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:f,loading:i.value},{default:c.withCtx(()=>m[4]||(m[4]=[c.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),g.variant==="confirm"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[1]||(m[1]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(v,{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[5]||(m[5]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:f},{default:c.withCtx(()=>m[6]||(m[6]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),g.variant==="empty"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[2]||(m[2]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64)}}}),Dd=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=ya("delete-all-__J"),n=e;return(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(wa,{"dd-id":"delete-all-__J",variant:"confirm",title:"Confirm delete",text:"Are you sure you want to delete all selected items?","on-save":()=>n("removeAll")},null,8,["on-save"]),c.createVNode(Be.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>s[0]||(s[0]=[c.createTextVNode(" Delete")])),_:1},8,["onClick"])],64))}}),Lv=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(c.openBlock(),c.createBlock(Be.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>n[0]||(n[0]=[c.createTextVNode(" Edit ")])),_:1}))}});var hO={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},Bv={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},Uv={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},fO={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},Am={name:"FilterIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},gO={name:"HierarchyIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},mO={name:"LayoutSidebarRightCollapseIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},pO={name:"RefreshIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},vO={name:"TableIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const Vv=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:n})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:e.variant},n,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Bv),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Uv),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),yO={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Fv=c.defineComponent({__name:"DotsMenuV1",props:{variant:{default:"text"},color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:i})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:t.variant},i,{icon:""}),{default:c.withCtx(()=>[t.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Bv),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Uv),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VList),null,{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.options,(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[i.title?(c.openBlock(),c.createElementBlock("div",yO,c.toDisplayString(i.title),1)):c.createCommentVNode("",!0),i.action?(c.openBlock(),c.createBlock(c.unref(Ft.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VListItemTitle),null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),i.divider?(c.openBlock(),c.createBlock(c.unref(Ft.VDivider),{key:2,class:"mt-2"})):c.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),Sc=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(lt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(lt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),Hv=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=c.ref(!1),i=c.ref(!1);c.onUnmounted(()=>{n.value=!1});const s=e;async function l(){try{await s("onCancel")}catch(f){console.error(f)}n.value=!1}async function d(){i.value=!0;try{await s("onSave")}catch(f){console.error(f)}i.value=!1,n.value=!1}return(f,g)=>(c.openBlock(),c.createBlock(Ls.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:m,props:v})=>[c.renderSlot(f.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:m,props:v})))]),default:c.withCtx(({isActive:m})=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(fO),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>g[0]||(g[0]=[c.createTextVNode(" Cancel ")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>g[1]||(g[1]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),_u="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",$v=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=r,t=c.ref(e.src),n=c.computed(()=>t.value||_u);function i(){t.value=_u}return(s,l)=>(c.openBlock(),c.createBlock(Zp.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(ev.VImg,{src:n.value,"lazy-src":_u,onError:i,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),Tu="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Kv=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=c.ref(e.img),n=c.computed(()=>t.value||Tu);function i(){t.value=Tu}return(s,l)=>(c.openBlock(),c.createBlock(Zp.VAvatar,{size:s.size},{default:c.withCtx(()=>[c.createVNode(ev.VImg,{src:n.value,"lazy-src":Tu,onError:i,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),CO=c.defineComponent({__name:"ContextMenu",setup(r){const e=c.ref(!1),t=c.ref({x:0,y:0}),n=s=>{s.preventDefault(),t.value={x:s.clientX,y:s.clientY},e.value=!0},i=()=>{e.value=!1};return c.onMounted(()=>{document.addEventListener("click",i)}),c.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(n,["right"]),class:"relative w-full h-full"},[c.renderSlot(s.$slots,"default",{},void 0,!0),c.createVNode(tv.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),vi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},zv=vi(CO,[["__scopeId","data-v-a53b15af"]]),wO={class:"d-inline-flex"},Wv=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>{var i;if(e.headers)return e.headers;if(e.columns)return(i=e.columns)==null?void 0:i.filter(s=>s.checked)}),n=c.useModel(r,"selection");return(i,s)=>(c.openBlock(),c.createBlock(nv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:i.items,"items-length":i.items.length,loading:i.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":i.sortBy,class:"customize-table"},{top:c.withCtx(()=>s[1]||(s[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",wO,[c.renderSlot(i.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!i.loading&&i.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),qv=6048e5,_O=864e5,bm=Symbol.for("constructDateFrom");function Wr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&bm in r?r[bm](e):r instanceof Date?new r.constructor(e):new Date(e)}function $n(r,e){return Wr(e||r,r)}let TO={};function Ac(){return TO}function ga(r,e){var d,f,g,m;const t=Ac(),n=(e==null?void 0:e.weekStartsOn)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,i=$n(r,e==null?void 0:e.in),s=i.getDay(),l=(s<n?7:0)+s-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function ec(r,e){return ga(r,{...e,weekStartsOn:1})}function Gv(r,e){const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=Wr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=ec(i),l=Wr(t,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const d=ec(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function Im(r){const e=$n(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function EO(r,...e){const t=Wr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function km(r,e){const t=$n(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function SO(r,e,t){const[n,i]=EO(t==null?void 0:t.in,r,e),s=km(n),l=km(i),d=+s-Im(s),f=+l-Im(l);return Math.round((d-f)/_O)}function AO(r,e){const t=Gv(r,e),n=Wr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ec(n)}function bO(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function IO(r){return!(!bO(r)&&typeof r!="number"||isNaN(+$n(r)))}function kO(r,e){const t=$n(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const RO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},OO=(r,e,t)=>{let n;const i=RO[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function Sn(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const NO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},MO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xO={date:Sn({formats:NO,defaultWidth:"full"}),time:Sn({formats:PO,defaultWidth:"full"}),dateTime:Sn({formats:MO,defaultWidth:"full"})},DO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},LO=(r,e,t,n)=>DO[r];function Ze(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const l=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):l;i=r.formattingValues[d]||r.formattingValues[l]}else{const l=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[l]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const BO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},UO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VO={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},FO={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},HO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$O={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KO=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},zO={ordinalNumber:KO,era:Ze({values:BO,defaultWidth:"wide"}),quarter:Ze({values:UO,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:VO,defaultWidth:"wide"}),day:Ze({values:FO,defaultWidth:"wide"}),dayPeriod:Ze({values:HO,defaultWidth:"wide",formattingValues:$O,defaultFormattingWidth:"wide"})};function et(r){return(e,t={})=>{const n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(i);if(!s)return null;const l=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?qO(d,v=>v.test(l)):WO(d,v=>v.test(l));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const m=e.slice(l.length);return{value:g,rest:m}}}function WO(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function qO(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function bc(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const i=n[0],s=e.match(r.parsePattern);if(!s)return null;let l=r.valueCallback?r.valueCallback(s[0]):s[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(i.length);return{value:l,rest:d}}}const GO=/^(\d+)(th|st|nd|rd)?/i,jO=/\d+/i,YO={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},JO={any:[/^b/i,/^(a|c)/i]},QO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},XO={any:[/1/i,/2/i,/3/i,/4/i]},ZO={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},eN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},tN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},rN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},oN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},iN={ordinalNumber:bc({matchPattern:GO,parsePattern:jO,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:YO,defaultMatchWidth:"wide",parsePatterns:JO,defaultParseWidth:"any"}),quarter:et({matchPatterns:QO,defaultMatchWidth:"wide",parsePatterns:XO,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:ZO,defaultMatchWidth:"wide",parsePatterns:eN,defaultParseWidth:"any"}),day:et({matchPatterns:tN,defaultMatchWidth:"wide",parsePatterns:nN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:rN,defaultMatchWidth:"any",parsePatterns:oN,defaultParseWidth:"any"})},Ld={code:"en-US",formatDistance:OO,formatLong:xO,formatRelative:LO,localize:zO,match:iN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aN(r,e){const t=$n(r,e==null?void 0:e.in);return SO(t,kO(t))+1}function sN(r,e){const t=$n(r,e==null?void 0:e.in),n=+ec(t)-+AO(t);return Math.round(n/qv)+1}function jv(r,e){var m,v,C,S;const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=Ac(),s=(e==null?void 0:e.firstWeekContainsDate)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=Wr((e==null?void 0:e.in)||r,0);l.setFullYear(n+1,0,s),l.setHours(0,0,0,0);const d=ga(l,e),f=Wr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=ga(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function cN(r,e){var d,f,g,m;const t=Ac(),n=(e==null?void 0:e.firstWeekContainsDate)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,i=jv(r,e),s=Wr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),ga(s,e)}function lN(r,e){const t=$n(r,e==null?void 0:e.in),n=+ga(t,e)-+cN(t,e);return Math.round(n/qv)+1}function Re(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Dr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Re(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Re(t+1,2)},d(r,e){return Re(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return Re(r.getHours()%12||12,e.length)},H(r,e){return Re(r.getHours(),e.length)},m(r,e){return Re(r.getMinutes(),e.length)},s(r,e){return Re(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return Re(i,e.length)}},Ho={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rm={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return Dr.y(r,e)},Y:function(r,e,t,n){const i=jv(r,n),s=i>0?i:1-i;if(e==="YY"){const l=s%100;return Re(l,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Re(s,e.length)},R:function(r,e){const t=Gv(r);return Re(t,e.length)},u:function(r,e){const t=r.getFullYear();return Re(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Re(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Re(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return Dr.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return Re(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const i=lN(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Re(i,e.length)},I:function(r,e,t){const n=sN(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Re(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Dr.d(r,e)},D:function(r,e,t){const n=aN(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Re(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Re(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Re(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Re(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const i=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let i;switch(n===12?i=Ho.noon:n===0?i=Ho.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let i;switch(n>=17?i=Ho.evening:n>=12?i=Ho.afternoon:n>=4?i=Ho.morning:i=Ho.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Dr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Dr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Dr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Dr.s(r,e)},S:function(r,e){return Dr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Nm(n);case"XXXX":case"XX":return ao(n);case"XXXXX":case"XXX":default:return ao(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return Nm(n);case"xxxx":case"xx":return ao(n);case"xxxxx":case"xxx":default:return ao(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Om(n,":");case"OOOO":default:return"GMT"+ao(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Om(n,":");case"zzzz":default:return"GMT"+ao(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Re(n,e.length)},T:function(r,e,t){return Re(+r,e.length)}};function Om(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?t+String(i):t+String(i)+e+Re(s,2)}function Nm(r,e){return r%60===0?(r>0?"-":"+")+Re(Math.abs(r)/60,2):ao(r,e)}function ao(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Re(Math.trunc(n/60),2),s=Re(n%60,2);return t+i+e+s}const Pm=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Yv=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},uN=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Pm(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Pm(n,e)).replace("{{time}}",Yv(i,e))},dN={p:Yv,P:uN},hN=/^D+$/,fN=/^Y+$/,gN=["D","DD","YY","YYYY"];function mN(r){return hN.test(r)}function pN(r){return fN.test(r)}function vN(r,e,t){const n=yN(r,e,t);if(console.warn(n),gN.includes(r))throw new RangeError(n)}function yN(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const CN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_N=/^'([^]*?)'?$/,TN=/''/g,EN=/[a-zA-Z]/;function SN(r,e,t){var m,v,C,S,_,A,R,$;const n=Ac(),i=(t==null?void 0:t.locale)??n.locale??Ld,s=(t==null?void 0:t.firstWeekContainsDate)??((v=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((A=(_=t==null?void 0:t.locale)==null?void 0:_.options)==null?void 0:A.weekStartsOn)??n.weekStartsOn??(($=(R=n.locale)==null?void 0:R.options)==null?void 0:$.weekStartsOn)??0,d=$n(r,t==null?void 0:t.in);if(!IO(d))throw new RangeError("Invalid time value");let f=e.match(wN).map(V=>{const B=V[0];if(B==="p"||B==="P"){const Q=dN[B];return Q(V,i.formatLong)}return V}).join("").match(CN).map(V=>{if(V==="''")return{isToken:!1,value:"'"};const B=V[0];if(B==="'")return{isToken:!1,value:AN(V)};if(Rm[B])return{isToken:!0,value:V};if(B.match(EN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+B+"`");return{isToken:!1,value:V}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:l,locale:i};return f.map(V=>{if(!V.isToken)return V.value;const B=V.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&pN(B)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&mN(B))&&vN(B,e,String(r));const Q=Rm[B[0]];return Q(d,B,i.localize,g)}).join("")}function AN(r){const e=r.match(_N);return e?e[1].replace(TN,"'"):r}const Mm={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},bN=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?Mm[r].withPreposition:Mm[r].standalone;return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:"vor "+n:n},IN={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},kN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},RN={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},ON={date:Sn({formats:IN,defaultWidth:"full"}),time:Sn({formats:kN,defaultWidth:"full"}),dateTime:Sn({formats:RN,defaultWidth:"full"})},NN={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},PN=(r,e,t,n)=>NN[r],MN={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},xN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},DN={narrow:nd.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nd.wide},LN={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},BN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},UN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},VN=r=>Number(r)+".",FN={ordinalNumber:VN,era:Ze({values:MN,defaultWidth:"wide"}),quarter:Ze({values:xN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:nd,formattingValues:DN,defaultWidth:"wide"}),day:Ze({values:LN,defaultWidth:"wide"}),dayPeriod:Ze({values:BN,defaultWidth:"wide",formattingValues:UN,defaultFormattingWidth:"wide"})},HN=/^(\d+)(\.)?/i,$N=/\d+/i,KN={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},zN={any:[/^v/i,/^n/i]},WN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},qN={any:[/1/i,/2/i,/3/i,/4/i]},GN={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},jN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YN={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},JN={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},QN={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},XN={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},ZN={ordinalNumber:bc({matchPattern:HN,parsePattern:$N,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:KN,defaultMatchWidth:"wide",parsePatterns:zN,defaultParseWidth:"any"}),quarter:et({matchPatterns:WN,defaultMatchWidth:"wide",parsePatterns:qN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:GN,defaultMatchWidth:"wide",parsePatterns:jN,defaultParseWidth:"any"}),day:et({matchPatterns:YN,defaultMatchWidth:"wide",parsePatterns:JN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:QN,defaultMatchWidth:"wide",parsePatterns:XN,defaultParseWidth:"any"})},e0={code:"de",formatDistance:bN,formatLong:ON,formatRelative:PN,localize:FN,match:ZN,options:{weekStartsOn:1,firstWeekContainsDate:4}},t0={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},n0=(r,e,t)=>{let n;const i=t0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+n:"il y a "+n:n},r0={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},o0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},i0={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},a0={date:Sn({formats:r0,defaultWidth:"full"}),time:Sn({formats:o0,defaultWidth:"full"}),dateTime:Sn({formats:i0,defaultWidth:"full"})},s0={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},c0=(r,e,t,n)=>s0[r],l0={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},u0={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},d0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},h0={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},f0={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},g0=(r,e)=>{const t=Number(r),n=e==null?void 0:e.unit;if(t===0)return"0";const i=["year","week","hour","minute","second"];let s;return t===1?s=n&&i.includes(n)?"ère":"er":s="ème",t+s},m0=["MMM","MMMM"],p0={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&m0.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:g0,era:Ze({values:l0,defaultWidth:"wide"}),quarter:Ze({values:u0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:d0,defaultWidth:"wide"}),day:Ze({values:h0,defaultWidth:"wide"}),dayPeriod:Ze({values:f0,defaultWidth:"wide"})},v0=/^(\d+)(ième|ère|ème|er|e)?/i,y0=/\d+/i,C0={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},w0={any:[/^av/i,/^ap/i]},_0={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},T0={any:[/1/i,/2/i,/3/i,/4/i]},E0={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},S0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},A0={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},b0={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},I0={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},k0={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},R0={ordinalNumber:bc({matchPattern:v0,parsePattern:y0,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:C0,defaultMatchWidth:"wide",parsePatterns:w0,defaultParseWidth:"any"}),quarter:et({matchPatterns:_0,defaultMatchWidth:"wide",parsePatterns:T0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:E0,defaultMatchWidth:"wide",parsePatterns:S0,defaultParseWidth:"any"}),day:et({matchPatterns:A0,defaultMatchWidth:"wide",parsePatterns:b0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:I0,defaultMatchWidth:"any",parsePatterns:k0,defaultParseWidth:"any"})},O0={code:"fr",formatDistance:n0,formatLong:a0,formatRelative:c0,localize:p0,match:R0,options:{weekStartsOn:1,firstWeekContainsDate:4}},N0={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},P0=(r,e,t)=>{let n;const i=N0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+n:"há "+n:n},M0={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},x0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},D0={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},L0={date:Sn({formats:M0,defaultWidth:"full"}),time:Sn({formats:x0,defaultWidth:"full"}),dateTime:Sn({formats:D0,defaultWidth:"full"})},B0={lastWeek:r=>{const e=r.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},U0=(r,e,t,n)=>{const i=B0[r];return typeof i=="function"?i(e):i},V0={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},F0={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},H0={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},$0={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},K0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},z0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},W0=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},q0={ordinalNumber:W0,era:Ze({values:V0,defaultWidth:"wide"}),quarter:Ze({values:F0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:H0,defaultWidth:"wide"}),day:Ze({values:$0,defaultWidth:"wide"}),dayPeriod:Ze({values:K0,defaultWidth:"wide",formattingValues:z0,defaultFormattingWidth:"wide"})},G0=/^(\d+)[ºªo]?/i,j0=/\d+/i,Y0={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},J0={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Q0={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},X0={any:[/1/i,/2/i,/3/i,/4/i]},Z0={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},eP={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},tP={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},nP={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},rP={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},oP={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},iP={ordinalNumber:bc({matchPattern:G0,parsePattern:j0,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:Y0,defaultMatchWidth:"wide",parsePatterns:J0,defaultParseWidth:"any"}),quarter:et({matchPatterns:Q0,defaultMatchWidth:"wide",parsePatterns:X0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:Z0,defaultMatchWidth:"wide",parsePatterns:eP,defaultParseWidth:"any"}),day:et({matchPatterns:tP,defaultMatchWidth:"wide",parsePatterns:nP,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:rP,defaultMatchWidth:"any",parsePatterns:oP,defaultParseWidth:"any"})},aP={code:"pt-BR",formatDistance:P0,formatLong:L0,formatRelative:U0,localize:q0,match:iP,options:{weekStartsOn:0,firstWeekContainsDate:1}},sP={"en-US":Ld,"pt-BR":aP,"fr-FR":O0,"de-DE":e0};function Jv(r){if(!r)return"";const e=navigator.language,t=sP[e]||Ld;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":SN(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}const cP={class:"d-inline-flex"},lP={class:"d-inline-flex"},uP={class:"d-inline-flex"},Qv=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>e.headers?e.headers:e.columns?e.columns.filter(g=>g.checked):[]),n=c.useModel(r,"selection"),i=c.ref(!1),s=c.ref({x:0,y:0}),l=c.ref(null),d=(g,{item:m})=>{g.preventDefault(),l.value=m,s.value={x:g.clientX,y:g.clientY},i.value=!0};function f(g,{item:m}){var C;if(!e.selectOnRowClick||!((C=n.value)!=null&&C.length))return;const v=n.value.findIndex(S=>S===m);v!==-1?n.value.splice(v,1):n.value.push(m)}return(g,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(tv.VMenu,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=v=>i.value=v),style:c.normalizeStyle({top:`${s.value.y}px`,left:`${s.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"contextmenu",{item:l.value})]),_:3},8,["modelValue","style"]),c.createVNode(nv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":m[1]||(m[1]=v=>n.value=v),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:g.items,"items-length":g.items.length,loading:g.loading||!1,"return-object":"","show-select":"","sort-by":g.sortBy,search:g.search,"filter-keys":g.filterKeys,class:"customize-table","onContextmenu:row":d,"onClick:row":f},c.createSlots({top:c.withCtx(()=>[m[2]||(m[2]=c.createElementVNode("span",{class:"mt-4"},null,-1))]),"item.avatar":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"avatar",{item:v})]),"item.active":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"active",{item:v})]),"item.image":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"image",{item:v})]),"item.picture":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"picture",{item:v})]),"item.icon":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"icon",{item:v})]),"item.actions":c.withCtx(({item:v})=>[c.createElementVNode("div",cP,[c.renderSlot(g.$slots,"actions",{item:v})])]),"no-data":c.withCtx(()=>[!g.loading&&g.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode("No records found.")],64)):c.createCommentVNode("",!0)]),_:2},[c.renderList(g.dateFields,v=>({name:`item.${v}`,fn:c.withCtx(({item:C})=>[c.createElementVNode("div",lP,c.toDisplayString(c.unref(Jv)(C[v])),1)])})),g.customFields?{name:`item.${customField}`,fn:c.withCtx(({item:v})=>[c.createElementVNode("div",uP,[c.renderSlot(g.$slots,customField,{item:v})])]),key:"0"}:void 0]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])],64))}}),Xv=c.defineComponent({__name:"SearchFilter",props:{search:{},searchModifiers:{}},emits:["update:search"],setup(r){const e=c.useModel(r,"search");return(t,n)=>{const i=c.resolveComponent("SearchIcon");return c.openBlock(),c.createBlock(Ik.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s)},{"prepend-inner":c.withCtx(()=>[c.createVNode(i,{size:"15",class:"ma-1 me-1"})]),_:1},8,["modelValue"])}}}),dP={class:"d-flex align-center"},hP={class:"d-flex align-center justify-end"},fP={class:"d-flex align-center"},gP={class:"d-flex align-center ms-1"},mP=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filters:{}},{filterKeys:{},filterKeysModifiers:{},search:{},searchModifiers:{},columns:{},columnsModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:filterKeys","update:search","update:columns"]),setup(r,{emit:e}){var g,m;const t=e,n=c.useModel(r,"filterKeys"),i=c.useModel(r,"search"),s=c.useModel(r,"columns"),{openDialog:l}=ya("col-settings"),d=c.getCurrentInstance(),f=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((m=d==null?void 0:d.vnode.props)==null?void 0:m["onUpdate:remove"])!==void 0;return(v,C)=>{const S=c.resolveComponent("EraserIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Fd),{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=_=>s.value=_)},null,8,["modelValue"]),c.createVNode(_e.VRow,{class:"align-center",justify:"space-between"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",dP,[c.createVNode(c.unref(Am),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(Xv,{modelValue:i.value,"onUpdate:modelValue":C[1]||(C[1]=_=>i.value=_)},null,8,["modelValue"])])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",hP,[c.renderSlot(v.$slots,"tleft-prepend",{},void 0,!0)])]),_:3}),c.createVNode(_e.VCol,null,{default:c.withCtx(()=>[c.createElementVNode("div",fP,[c.createVNode(ta.VSelect,{items:["Move data","Copy","Duplicate","Loop"],"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a filter",density:"compact",class:"min-w-75 me-2","prepend-inner-icon":c.unref(Am),"hide-details":"",multiple:""},null,8,["prepend-inner-icon"]),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(S,{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(pO),{onClick:C[2]||(C[2]=_=>t("refresh")),color:"rgb(var(--v-theme-secondary))"})]),_:1})])]),_:1})]),_:3}),c.createVNode(fo.VDivider,{class:"my-4"}),c.createVNode(_e.VRow,{justify:"space-between",class:"align-center"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto"},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"left-prepend",{},void 0,!0),c.unref(f)?(c.openBlock(),c.createBlock(c.unref(Dd),{key:0,onRemoveAll:C[3]||(C[3]=_=>t("remove"))})):c.createCommentVNode("",!0),c.renderSlot(v.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(_e.VSpacer),c.createVNode(_e.VRow,{justify:"end",class:"align-center me-2 min-h-_JTable-header","no-gutters":""},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"right-prepend",{},void 0,!0),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center me-2"},{default:c.withCtx(()=>[c.createVNode(c.unref(vO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ta.VSelect,{items:v.filters,"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Visualize",density:"compact",class:"min-w-50 me-2",modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=_=>n.value=_),"hide-details":"",multiple:""},null,8,["items","modelValue"])]),_:1}),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center ms-1"},{default:c.withCtx(()=>[c.createVNode(c.unref(gO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ta.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Actions",density:"compact",class:"min-w-50","hide-details":""})]),_:1}),c.createElementVNode("div",gP,[c.createVNode(Be.VBtn,{icon:"",flat:"",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(mO),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"])])]),_:3})]),_:3})],64)}}}),Zv=vi(mP,[["__scopeId","data-v-ecaf75ac"]]);/*!
12
12
  * vue-draggable-next v2.2.0
13
13
  * (c) 2023 Anish George
14
14
  * @license MIT
@@ -17,7 +17,7 @@ This will fail in production.`);l=Yi,l._s.has(n)||(ym(n,i,l),process.env.NODE_EN
17
17
  * @author RubaXa <trash@rubaxa.org>
18
18
  * @author owenm <owen23355@gmail.com>
19
19
  * @license MIT
20
- */function xm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function rr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xm(Object(t),!0).forEach(function(n){pP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):xm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function $s(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$s=function(e){return typeof e}:$s=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(r)}function pP(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(){return Er=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Er.apply(this,arguments)}function vP(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function yP(r,e){if(r==null)return{};var t=vP(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var CP="1.14.0";function _r(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Ar=_r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_a=_r(/Edge/i),Dm=_r(/firefox/i),na=_r(/safari/i)&&!_r(/chrome/i)&&!_r(/android/i),ey=_r(/iP(ad|od|hone)/i),wP=_r(/chrome/i)&&_r(/android/i),ty={capture:!1,passive:!1};function Ae(r,e,t){r.addEventListener(e,t,!Ar&&ty)}function Ce(r,e,t){r.removeEventListener(e,t,!Ar&&ty)}function tc(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function _P(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Yn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&tc(r,e):tc(r,e))||n&&r===t)return r;if(r===t)break}while(r=_P(r))}return null}var Lm=/\s+/g;function Jt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Lm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Lm," ")}}function re(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ci(r,e){var t="";if(typeof r=="string")t=r;else do{var n=re(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function ny(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function tr(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,v;if(r!==window&&r.parentNode&&r!==tr()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,v=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,v=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Ar))do if(i&&i.getBoundingClientRect&&(re(i,"transform")!=="none"||t&&re(i,"position")!=="static")){var C=i.getBoundingClientRect();l-=C.top+parseInt(re(i,"border-top-width")),d-=C.left+parseInt(re(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=ci(i||r),_=S&&S.a,A=S&&S.d;S&&(l/=A,d/=_,v/=_,m/=A,f=l+m,g=d+v)}return{top:l,left:d,bottom:f,right:g,width:v,height:m}}}function Bm(r,e,t){for(var n=Kr(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===tr())break;n=Kr(n,!1)}return!1}function hi(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==oe.ghost&&(n||l[s]!==oe.dragged)&&Yn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Bd(r,e){for(var t=r.lastElementChild;t&&(t===oe.ghost||re(t,"display")==="none"||e&&!tc(t,e));)t=t.previousElementSibling;return t||null}function En(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==oe.clone&&(!e||tc(r,e))&&t++;return t}function Um(r){var e=0,t=0,n=tr();if(r)do{var i=ci(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function TP(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Kr(r,e){if(!r||!r.getBoundingClientRect)return tr();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=re(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return tr();if(n||e)return t;n=!0}}while(t=t.parentNode);return tr()}function EP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Eu(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ra;function ry(r,e){return function(){if(!ra){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ra=setTimeout(function(){ra=void 0},e)}}}function SP(){clearTimeout(ra),ra=void 0}function oy(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function iy(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var rn="Sortable"+new Date().getTime();function AP(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(re(i,"display")==="none"||i===oe.ghost)){r.push({target:i,rect:it(i)});var s=rr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=ci(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(TP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,v=it(g),C=g.prevFromRect,S=g.prevToRect,_=d.rect,A=ci(g,!0);A&&(v.top-=A.f,v.left-=A.e),g.toRect=v,g.thisAnimationDuration&&Eu(C,v)&&!Eu(m,v)&&(_.top-v.top)/(_.left-v.left)===(m.top-v.top)/(m.left-v.left)&&(f=IP(_,C,S,i.options)),Eu(v,m)||(g.prevFromRect=m,g.prevToRect=v,f||(f=i.options.animation),i.animate(g,_,v,f)),f&&(s=!0,l=Math.max(l,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){re(n,"transition",""),re(n,"transform","");var d=ci(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),v=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!v,re(n,"transform","translate3d("+m+"px,"+v+"px,0)"),this.forRepaintDummy=bP(n),re(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),re(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){re(n,"transition",""),re(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function bP(r){return r.offsetWidth}function IP(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var $o=[],Su={initializeByDefault:!0},Ta={mount:function(e){for(var t in Su)Su.hasOwnProperty(t)&&!(t in e)&&(e[t]=Su[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](rr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](rr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Er(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.forEach(function(i){typeof i.eventProperties=="function"&&Er(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function kP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,v=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,_=r.extraEventProperties;if(e=e||t&&t[rn],!!e){var A,R=e.options,$="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ar&&!_a?A=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(A=document.createEvent("Event"),A.initEvent(n,!0,!0)),A.to=l||t,A.from=d||t,A.item=i||t,A.clone=s,A.oldIndex=f,A.newIndex=g,A.oldDraggableIndex=m,A.newDraggableIndex=v,A.originalEvent=C,A.pullMode=S?S.lastPutMode:void 0;var V=rr(rr({},_),Ta.getEventProperties(n,e));for(var B in V)A[B]=V[B];t&&t.dispatchEvent(A),R[$]&&R[$].call(e,A)}}var RP=["evt"],Ut=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=yP(n,RP);Ta.pluginEvent.bind(oe)(e,t,rr({dragEl:H,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:Ks,cloneEl:Ge,cloneHidden:Vr,dragStarted:Ji,putSortable:vt,activeSortable:oe.active,originalEvent:i,oldIndex:oi,oldDraggableIndex:oa,newIndex:Qt,newDraggableIndex:Ur,hideGhostForTarget:ly,unhideGhostForTarget:uy,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(d){Nt({sortable:t,name:d,originalEvent:i})}},s))};function Nt(r){kP(rr({putSortable:vt,cloneEl:Ge,targetEl:H,rootEl:Fe,oldIndex:oi,oldDraggableIndex:oa,newIndex:Qt,newDraggableIndex:Ur},r))}var H,qe,le,Fe,so,Ks,Ge,Vr,oi,Qt,oa,Ur,_s,vt,Qo=!1,nc=!1,rc=[],ro,Pn,Au,bu,Vm,Fm,Ji,Ko,ia,aa=!1,Ts=!1,zs,Et,Iu=[],rd=!1,oc=[],Ic=typeof document<"u",Es=ey,Hm=_a||Ar?"cssFloat":"float",OP=Ic&&!wP&&!ey&&"draggable"in document.createElement("div"),ay=function(){if(Ic){if(Ar)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),sy=function(e,t){var n=re(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=hi(e,0,t),l=hi(e,1,t),d=s&&re(s),f=l&&re(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&d.float&&d.float!=="none"){var v=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===v)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[Hm]==="none"||l&&n[Hm]==="none"&&g+m>i)?"vertical":"horizontal"},NP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+l/2===d+g/2},PP=function(e,t){var n;return rc.some(function(i){var s=i[rn].options.emptyInsertThreshold;if(!(!s||Bd(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},cy=function(e){function t(s,l){return function(d,f,g,m){var v=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||v))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var C=(l?d:f).options.group.name;return s===!0||typeof s=="string"&&s===C||s.join&&s.indexOf(C)>-1}}var n={},i=e.group;(!i||$s(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},ly=function(){!ay&&le&&re(le,"display","none")},uy=function(){!ay&&le&&re(le,"display","")};Ic&&document.addEventListener("click",function(r){if(nc)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),nc=!1,!1},!0);var oo=function(e){if(H){e=e.touches?e.touches[0]:e;var t=PP(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[rn]._onDragOver(n)}}},MP=function(e){H&&H.parentNode[rn]._isOutsideThisEl(e.target)};function oe(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Er({},e),r[rn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return sy(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:oe.supportPointer!==!1&&"PointerEvent"in window&&!na,emptyInsertThreshold:5};Ta.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);cy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:OP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ae(r,"pointerdown",this._onTapStart):(Ae(r,"mousedown",this._onTapStart),Ae(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(r,"dragover",this),Ae(r,"dragenter",this)),rc.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Er(this,AP())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,H):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,m=i.filter;if(HP(n),!H&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&na&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Yn(f,i.draggable,n,!1),!(f&&f.animated)&&Ks!==f)){if(oi=En(f),oa=En(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Nt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Ut("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(v){if(v=Yn(g,v.trim(),n,!1),v)return Nt({sortable:t,rootEl:v,name:"filter",targetEl:f,fromEl:n,toEl:n}),Ut("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!Yn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!H&&n.parentNode===s){var g=it(n);if(Fe=s,H=n,qe=H.parentNode,so=H.nextSibling,Ks=n,_s=l.group,oe.dragged=H,ro={target:H,clientX:(t||e).clientX,clientY:(t||e).clientY},Vm=ro.clientX-g.left,Fm=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,H.style["will-change"]="all",f=function(){if(Ut("delayEnded",i,{evt:e}),oe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Dm&&i.nativeDraggable&&(H.draggable=!0),i._triggerDragStart(e,t),Nt({sortable:i,name:"choose",originalEvent:e}),Jt(H,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){ny(H,m.trim(),ku)}),Ae(d,"dragover",oo),Ae(d,"mousemove",oo),Ae(d,"touchmove",oo),Ae(d,"mouseup",i._onDrop),Ae(d,"touchend",i._onDrop),Ae(d,"touchcancel",i._onDrop),Dm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,H.draggable=!0),Ut("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(_a||Ar))){if(oe.eventCanceled){this._onDrop();return}Ae(d,"mouseup",i._disableDelayedDrag),Ae(d,"touchend",i._disableDelayedDrag),Ae(d,"touchcancel",i._disableDelayedDrag),Ae(d,"mousemove",i._delayedDragTouchMoveHandler),Ae(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Ae(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){H&&ku(H),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Ae(document,"pointermove",this._onTouchMove):t?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(H,"dragend",this),Ae(Fe,"dragstart",this._onDragStart));try{document.selection?Ws(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Fe&&H){Ut("dragStarted",this,{evt:t}),this.nativeDraggable&&Ae(document,"dragover",MP);var n=this.options;!e&&Jt(H,n.dragClass,!1),Jt(H,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),Nt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,ly();for(var e=document.elementFromPoint(Pn.clientX,Pn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pn.clientX,Pn.clientY),e!==t);)t=e;if(H.parentNode[rn]._isOutsideThisEl(e),t)do{if(t[rn]){var n=void 0;if(n=t[rn]._onDragOver({clientX:Pn.clientX,clientY:Pn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);uy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&ci(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=Es&&Et&&Um(Et),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-Iu[0]:0)/(d||1),v=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-Iu[1]:0)/(f||1);if(!oe.active&&!Qo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){l?(l.e+=m-(Au||0),l.f+=v-(bu||0)):l={a:1,b:0,c:0,d:1,e:m,f:v};var C="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");re(le,"webkitTransform",C),re(le,"mozTransform",C),re(le,"msTransform",C),re(le,"transform",C),Au=m,bu=v,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(H,!0,Es,!0,e),n=this.options;if(Es){for(Et=e;re(Et,"position")==="static"&&re(Et,"transform")==="none"&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=tr()),t.top+=Et.scrollTop,t.left+=Et.scrollLeft):Et=tr(),Iu=Um(Et)}le=H.cloneNode(!0),Jt(le,n.ghostClass,!1),Jt(le,n.fallbackClass,!0),Jt(le,n.dragClass,!0),re(le,"transition",""),re(le,"transform",""),re(le,"box-sizing","border-box"),re(le,"margin",0),re(le,"top",t.top),re(le,"left",t.left),re(le,"width",t.width),re(le,"height",t.height),re(le,"opacity","0.8"),re(le,"position",Es?"absolute":"fixed"),re(le,"zIndex","100000"),re(le,"pointerEvents","none"),oe.ghost=le,e.appendChild(le),re(le,"transform-origin",Vm/parseInt(le.style.width)*100+"% "+Fm/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Ut("dragStart",this,{evt:e}),oe.eventCanceled){this._onDrop();return}Ut("setupClone",this),oe.eventCanceled||(Ge=iy(H),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Jt(Ge,this.options.chosenClass,!1),oe.clone=Ge),n.cloneId=Ws(function(){Ut("clone",n),!oe.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,H),n._hideClone(),Nt({sortable:n,name:"clone"}))}),!t&&Jt(H,s.dragClass,!0),t?(nc=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,H)),Ae(document,"drop",n),re(H,"transform","translateZ(0)")),Qo=!0,n._dragStartId=Ws(n._dragStarted.bind(n,t,e)),Ae(document,"selectstart",n),Ji=!0,na&&re(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=oe.active,m=_s===f,v=d.sort,C=vt||g,S,_=this,A=!1;if(rd)return;function R(Qe,wt){Ut(Qe,_,rr({evt:e,isOwner:m,axis:S?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:v,fromSortable:C,target:n,completed:V,onMove:function(Kt,Jc){return Ss(Fe,t,H,i,Kt,it(Kt),e,Jc)},changed:B},wt))}function $(){R("dragOverAnimationCapture"),_.captureAnimationState(),_!==C&&C.captureAnimationState()}function V(Qe){return R("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(_),_!==C&&(Jt(H,vt?vt.options.ghostClass:g.options.ghostClass,!1),Jt(H,d.ghostClass,!0)),vt!==_&&_!==oe.active?vt=_:_===oe.active&&vt&&(vt=null),C===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){R("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===H&&!H.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(H.parentNode[rn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),A=!0}function B(){Qt=En(H),Ur=En(H,d.draggable),Nt({sortable:_,name:"change",toEl:t,newIndex:Qt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Yn(n,d.draggable,t,!0),R("dragOver"),oe.eventCanceled)return A;if(H.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return V(!1);if(nc=!1,g&&!d.disabled&&(m?v||(l=qe!==Fe):vt===this||(this.lastPutMode=_s.checkPull(this,g,H,e))&&f.checkPut(this,g,H,e))){if(S=this._getDirection(e,n)==="vertical",i=it(H),R("dragOverValid"),oe.eventCanceled)return A;if(l)return qe=Fe,$(),this._hideClone(),R("revert"),oe.eventCanceled||(so?Fe.insertBefore(H,so):Fe.appendChild(H)),V(!0);var Q=Bd(t,d.draggable);if(!Q||BP(e,S,this)&&!Q.animated){if(Q===H)return V(!1);if(Q&&t===e.target&&(n=Q),n&&(s=it(n)),Ss(Fe,t,H,i,n,s,e,!!n)!==!1)return $(),t.appendChild(H),qe=t,B(),V(!0)}else if(Q&&LP(e,S,this)){var se=hi(t,0,d,!0);if(se===H)return V(!1);if(n=se,s=it(n),Ss(Fe,t,H,i,n,s,e,!1)!==!1)return $(),t.insertBefore(H,se),qe=t,B(),V(!0)}else if(n.parentNode===t){s=it(n);var we=0,z,tt=H.parentNode!==t,Te=!NP(H.animated&&H.toRect||i,n.animated&&n.toRect||s,S),j=S?"top":"left",q=Bm(n,"top","top")||Bm(H,"top","top"),Ee=q?q.scrollTop:void 0;Ko!==n&&(z=s[j],aa=!1,Ts=!Te&&d.invertSwap||tt),we=UP(e,n,s,S,Te?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Ts,Ko===n);var Ue;if(we!==0){var Ct=En(H);do Ct-=we,Ue=qe.children[Ct];while(Ue&&(re(Ue,"display")==="none"||Ue===le))}if(we===0||Ue===n)return V(!1);Ko=n,ia=we;var An=n.nextElementSibling,sn=!1;sn=we===1;var Mt=Ss(Fe,t,H,i,n,s,e,sn);if(Mt!==!1)return(Mt===1||Mt===-1)&&(sn=Mt===1),rd=!0,setTimeout(DP,30),$(),sn&&!An?t.appendChild(H):n.parentNode.insertBefore(H,sn?An:n),q&&oy(q,0,Ee-q.scrollTop),qe=H.parentNode,z!==void 0&&!Ts&&(zs=Math.abs(z-it(n)[j])),B(),V(!0)}if(t.contains(H))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Qt=En(H),Ur=En(H,n.draggable),Ut("drop",this,{evt:e}),qe=H&&H.parentNode,Qt=En(H),Ur=En(H,n.draggable),oe.eventCanceled){this._nulling();return}Qo=!1,Ts=!1,aa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),od(this.cloneId),od(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),na&&re(document.body,"user-select",""),re(H,"transform",""),e&&(Ji&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),H&&(this.nativeDraggable&&Ce(H,"dragend",this),ku(H),H.style["will-change"]="",Ji&&!Qo&&Jt(H,vt?vt.options.ghostClass:this.options.ghostClass,!1),Jt(H,this.options.chosenClass,!1),Nt({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Qt>=0&&(Nt({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Nt({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Qt!==oi&&Qt>=0&&(Nt({sortable:this,name:"update",toEl:qe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),oe.active&&((Qt==null||Qt===-1)&&(Qt=oi,Ur=oa),Nt({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Ut("nulling",this),Fe=H=qe=le=so=Ge=Ks=Vr=ro=Pn=Ji=Qt=Ur=oi=oa=Ko=ia=vt=_s=oe.dragged=oe.ghost=oe.clone=oe.active=null,oc.forEach(function(e){e.checked=!0}),oc.length=Au=bu=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":H&&(this._onDragOver(e),xP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],Yn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||FP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];Yn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Yn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Ta.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&cy(n)},destroy:function(){Ut("destroy",this);var e=this.el;e[rn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),rc.splice(rc.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Vr){if(Ut("hideClone",this),oe.eventCanceled)return;re(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Vr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Vr){if(Ut("showClone",this),oe.eventCanceled)return;H.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,H):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(H,Ge),re(Ge,"display",""),Vr=!1}}};function xP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function Ss(r,e,t,n,i,s,l,d){var f,g=r[rn],m=g.options.onMove,v;return window.CustomEvent&&!Ar&&!_a?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(v=m.call(g,f,l)),v}function ku(r){r.draggable=!1}function DP(){rd=!1}function LP(r,e,t){var n=it(hi(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function BP(r,e,t){var n=it(Bd(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function UP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,v=n?t.bottom:t.right,C=!1;if(!l){if(d&&zs<g*i){if(!aa&&(ia===1?f>m+g*s/2:f<v-g*s/2)&&(aa=!0),aa)C=!0;else if(ia===1?f<m+zs:f>v-zs)return-ia}else if(f>m+g*(1-i)/2&&f<v-g*(1-i)/2)return VP(e)}return C=C||l,C&&(f<m+g*s/2||f>v-g*s/2)?f>m+g/2?1:-1:0}function VP(r){return En(H)<En(r)?1:-1}function FP(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function HP(r){oc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&oc.push(n)}}function Ws(r){return setTimeout(r,0)}function od(r){return clearTimeout(r)}Ic&&Ae(document,"touchmove",function(r){(oe.active||Qo)&&r.cancelable&&r.preventDefault()});oe.utils={on:Ae,off:Ce,css:re,find:ny,is:function(e,t){return!!Yn(e,t,e,!1)},extend:EP,throttle:ry,closest:Yn,toggleClass:Jt,clone:iy,index:En,nextTick:Ws,cancelNextTick:od,detectDirection:sy,getChild:hi};oe.get=function(r){return r[rn]};oe.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(oe.utils=rr(rr({},oe.utils),n.utils)),Ta.mount(n)})};oe.create=function(r,e){return new oe(r,e)};oe.version=CP;var Xe=[],Qi,id,ad=!1,Ru,Ou,ic,Xi;function $P(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),$m(),qs(),SP()},nulling:function(){ic=id=Qi=ad=Xi=Ru=Ou=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(ic=t,n||this.options.forceAutoScrollFallback||_a||Ar||na){Nu(t,this.options,d,n);var f=Kr(d,!0);ad&&(!Xi||s!==Ru||l!==Ou)&&(Xi&&$m(),Xi=setInterval(function(){var g=Kr(document.elementFromPoint(s,l),!0);g!==f&&(f=g,qs()),Nu(t,i.options,g,n)},10),Ru=s,Ou=l)}else{if(!this.options.bubbleScroll||Kr(d,!0)===tr()){qs();return}Nu(t,this.options,Kr(d,!1),!1)}}},Er(r,{pluginName:"scroll",initializeByDefault:!0})}function qs(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function $m(){clearInterval(Xi)}var Nu=ry(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,f=tr(),g=!1,m;id!==t&&(id=t,qs(),Qi=e.scroll,m=e.scrollFn,Qi===!0&&(Qi=Kr(t,!0)));var v=0,C=Qi;do{var S=C,_=it(S),A=_.top,R=_.bottom,$=_.left,V=_.right,B=_.width,Q=_.height,se=void 0,we=void 0,z=S.scrollWidth,tt=S.scrollHeight,Te=re(S),j=S.scrollLeft,q=S.scrollTop;S===f?(se=B<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"||Te.overflowX==="visible"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"||Te.overflowY==="visible")):(se=B<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"));var Ee=se&&(Math.abs(V-i)<=l&&j+B<z)-(Math.abs($-i)<=l&&!!j),Ue=we&&(Math.abs(R-s)<=l&&q+Q<tt)-(Math.abs(A-s)<=l&&!!q);if(!Xe[v])for(var Ct=0;Ct<=v;Ct++)Xe[Ct]||(Xe[Ct]={});(Xe[v].vx!=Ee||Xe[v].vy!=Ue||Xe[v].el!==S)&&(Xe[v].el=S,Xe[v].vx=Ee,Xe[v].vy=Ue,clearInterval(Xe[v].pid),(Ee!=0||Ue!=0)&&(g=!0,Xe[v].pid=setInterval((function(){n&&this.layer===0&&oe.active._onTouchMove(ic);var An=Xe[this.layer].vy?Xe[this.layer].vy*d:0,sn=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(oe.dragged.parentNode[rn],sn,An,r,ic,Xe[this.layer].el)!=="continue"||oy(Xe[this.layer].el,sn,An)}).bind({layer:v}),24))),v++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));ad=g}},30),dy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,v=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(v)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Ud(){}Ud.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=hi(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:dy};Er(Ud,{pluginName:"revertOnSpill"});function Vd(){}Vd.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:dy};Er(Vd,{pluginName:"removeOnSpill"});oe.mount(new $P);oe.mount(Vd,Ud);function KP(){return typeof window<"u"?window.console:global.console}const zP=KP();function WP(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const qP=/-(\w)/g,Km=WP(r=>r.replace(qP,(e,t)=>t?t.toUpperCase():""));function Pu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function zm(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function GP(r,e){return Object.values(r).indexOf(e)}function jP(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function hy(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function YP(r){return e=>{this.realList!==null&&this["onDrag"+r](e),hy.call(this,r,e)}}function JP(r){return["transition-group","TransitionGroup"].includes(r)}function QP(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?JP(e.name):!1}function XP(r,e){return e?{...e.props,...e.attrs}:r}const sd=["Start","Add","Remove","Update","End"],cd=["Choose","Unchoose","Sort","Filter","Clone"],ZP=["Move",...sd,...cd].map(r=>"on"+r);let Mu=null;const e1={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},t1=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...sd.map(r=>r.toLowerCase()),...cd.map(r=>r.toLowerCase())],props:e1,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=XP(this.$attrs,this.componentData);return r?(this.transitionMode=QP(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&zP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};sd.forEach(i=>{r["on"+i]=YP.call(this,i)}),cd.forEach(i=>{r["on"+i]=hy.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[Km(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new oe(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=Km(e);ZP.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=jP(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=GP(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),Mu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Pu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(zm(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Pu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){Pu(r.item),zm(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),Mu=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(Mu)!==-1||!e.willInsertAfter?i:i+1}}}),n1={class:"d-flex flex-row align-center"},Fd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref("");return(n,i)=>{const s=c.resolveComponent("GripVerticalIcon"),l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(wa,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(Xv,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(t1),{list:e.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,d=>(c.openBlock(),c.createBlock(Vt.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",n1,[c.createVNode(s,{class:"mb-2"}),c.createVNode(Vt.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(kk.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+"  ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(Xs.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),r1=["src","height","width"],o1={key:0,class:"text-center text-h6"},i1={key:1,class:"text-center text-h5"},a1={key:0,class:"text-center"},s1={class:"d-flex justify-center align-center mt-4 ga-3"},Hd=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,r1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",o1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",i1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",a1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",s1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(Rk.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),c1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},view:{},itemKey:{}},setup(r){return(e,t)=>e.view==="card"?(c.openBlock(),c.createBlock(_e.VRow,{key:0,class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(_e.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Hd,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3})):c.createCommentVNode("",!0)}}),fy=vi(c1,[["__scopeId","data-v-22d1c8f9"]]),l1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},gy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",l1,c.toDisplayString(e.value),1))}}),u1={key:0,class:"mb-2 ms-1"},my=c.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",u1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Ft.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(gy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),d1={class:"text-faded mt-7"},h1={class:"d-flex align-baseline mb-1"},f1={class:"me-1"},g1={class:"max-w-_form-metadataJ"},m1={key:0,class:"mb-1"},p1={key:1,class:"mb-1"},v1={class:"mb-1"},kc=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",d1,[c.createVNode(_e.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",h1,[c.createElementVNode("b",f1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",g1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(Cc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(_e.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",m1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",p1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",v1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),y1={key:0,class:"mb-2 ms-1"},py=c.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",y1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(gy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Ft.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field"},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density"]))],64))}}),C1={key:0,class:"mb-2 ms-1"},w1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},vy=c.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",C1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Ok.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",w1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),yy=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Be.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),Cy=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Be.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),_1={class:"mt-4"},wy=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Sc,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",_1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(_e.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(kc,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(yy,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(Cy,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),T1={class:"d-flex align-items-center"},E1={key:0,class:"d-flex align-center"},S1={class:"ms-1"},A1={class:"d-flex"},b1={class:"d-flex mb-1 align-center"},I1={class:"min-w-100 relative"},_y=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,v)=>(c.openBlock(),c.createElementBlock("div",T1,[m.id?(c.openBlock(),c.createElementBlock("div",E1,[v[0]||(v[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",S1,c.toDisplayString(m.id),1),c.createVNode(Cc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createElementVNode("div",A1,[c.createVNode(Be.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(hO),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(Xs.VIcon,{class:"me-2"},{default:c.withCtx(()=>v[1]||(v[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",b1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",I1,[c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>v[2]||(v[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Xs.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>v[3]||(v[3]=[c.createTextVNode("mdi-close")])),_:1}),v[4]||(v[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),k1={class:"d-flex flex-column"},R1={class:"height d-flex flex-column"},O1={class:"d-flex justify-between align-end"},N1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Sc,null,{default:c.withCtx(()=>[c.createElementVNode("div",k1,[c.createElementVNode("div",R1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",O1,[c.createVNode(_e.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(kc,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(_e.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(yy,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(Cy,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Ty=vi(N1,[["__scopeId","data-v-489d31c3"]]);/**
20
+ */function xm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function rr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xm(Object(t),!0).forEach(function(n){pP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):xm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function $s(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$s=function(e){return typeof e}:$s=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(r)}function pP(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(){return Er=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Er.apply(this,arguments)}function vP(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function yP(r,e){if(r==null)return{};var t=vP(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var CP="1.14.0";function _r(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Ar=_r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_a=_r(/Edge/i),Dm=_r(/firefox/i),na=_r(/safari/i)&&!_r(/chrome/i)&&!_r(/android/i),ey=_r(/iP(ad|od|hone)/i),wP=_r(/chrome/i)&&_r(/android/i),ty={capture:!1,passive:!1};function Ae(r,e,t){r.addEventListener(e,t,!Ar&&ty)}function Ce(r,e,t){r.removeEventListener(e,t,!Ar&&ty)}function tc(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function _P(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Yn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&tc(r,e):tc(r,e))||n&&r===t)return r;if(r===t)break}while(r=_P(r))}return null}var Lm=/\s+/g;function Jt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Lm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Lm," ")}}function re(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ci(r,e){var t="";if(typeof r=="string")t=r;else do{var n=re(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function ny(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function tr(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,v;if(r!==window&&r.parentNode&&r!==tr()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,v=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,v=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Ar))do if(i&&i.getBoundingClientRect&&(re(i,"transform")!=="none"||t&&re(i,"position")!=="static")){var C=i.getBoundingClientRect();l-=C.top+parseInt(re(i,"border-top-width")),d-=C.left+parseInt(re(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=ci(i||r),_=S&&S.a,A=S&&S.d;S&&(l/=A,d/=_,v/=_,m/=A,f=l+m,g=d+v)}return{top:l,left:d,bottom:f,right:g,width:v,height:m}}}function Bm(r,e,t){for(var n=Kr(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===tr())break;n=Kr(n,!1)}return!1}function hi(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==oe.ghost&&(n||l[s]!==oe.dragged)&&Yn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Bd(r,e){for(var t=r.lastElementChild;t&&(t===oe.ghost||re(t,"display")==="none"||e&&!tc(t,e));)t=t.previousElementSibling;return t||null}function En(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==oe.clone&&(!e||tc(r,e))&&t++;return t}function Um(r){var e=0,t=0,n=tr();if(r)do{var i=ci(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function TP(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Kr(r,e){if(!r||!r.getBoundingClientRect)return tr();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=re(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return tr();if(n||e)return t;n=!0}}while(t=t.parentNode);return tr()}function EP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Eu(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ra;function ry(r,e){return function(){if(!ra){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ra=setTimeout(function(){ra=void 0},e)}}}function SP(){clearTimeout(ra),ra=void 0}function oy(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function iy(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var rn="Sortable"+new Date().getTime();function AP(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(re(i,"display")==="none"||i===oe.ghost)){r.push({target:i,rect:it(i)});var s=rr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=ci(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(TP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,v=it(g),C=g.prevFromRect,S=g.prevToRect,_=d.rect,A=ci(g,!0);A&&(v.top-=A.f,v.left-=A.e),g.toRect=v,g.thisAnimationDuration&&Eu(C,v)&&!Eu(m,v)&&(_.top-v.top)/(_.left-v.left)===(m.top-v.top)/(m.left-v.left)&&(f=IP(_,C,S,i.options)),Eu(v,m)||(g.prevFromRect=m,g.prevToRect=v,f||(f=i.options.animation),i.animate(g,_,v,f)),f&&(s=!0,l=Math.max(l,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){re(n,"transition",""),re(n,"transform","");var d=ci(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),v=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!v,re(n,"transform","translate3d("+m+"px,"+v+"px,0)"),this.forRepaintDummy=bP(n),re(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),re(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){re(n,"transition",""),re(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function bP(r){return r.offsetWidth}function IP(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var $o=[],Su={initializeByDefault:!0},Ta={mount:function(e){for(var t in Su)Su.hasOwnProperty(t)&&!(t in e)&&(e[t]=Su[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](rr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](rr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Er(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.forEach(function(i){typeof i.eventProperties=="function"&&Er(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function kP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,v=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,_=r.extraEventProperties;if(e=e||t&&t[rn],!!e){var A,R=e.options,$="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ar&&!_a?A=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(A=document.createEvent("Event"),A.initEvent(n,!0,!0)),A.to=l||t,A.from=d||t,A.item=i||t,A.clone=s,A.oldIndex=f,A.newIndex=g,A.oldDraggableIndex=m,A.newDraggableIndex=v,A.originalEvent=C,A.pullMode=S?S.lastPutMode:void 0;var V=rr(rr({},_),Ta.getEventProperties(n,e));for(var B in V)A[B]=V[B];t&&t.dispatchEvent(A),R[$]&&R[$].call(e,A)}}var RP=["evt"],Ut=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=yP(n,RP);Ta.pluginEvent.bind(oe)(e,t,rr({dragEl:H,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:Ks,cloneEl:Ge,cloneHidden:Vr,dragStarted:Ji,putSortable:vt,activeSortable:oe.active,originalEvent:i,oldIndex:oi,oldDraggableIndex:oa,newIndex:Qt,newDraggableIndex:Ur,hideGhostForTarget:ly,unhideGhostForTarget:uy,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(d){Nt({sortable:t,name:d,originalEvent:i})}},s))};function Nt(r){kP(rr({putSortable:vt,cloneEl:Ge,targetEl:H,rootEl:Fe,oldIndex:oi,oldDraggableIndex:oa,newIndex:Qt,newDraggableIndex:Ur},r))}var H,qe,le,Fe,so,Ks,Ge,Vr,oi,Qt,oa,Ur,_s,vt,Qo=!1,nc=!1,rc=[],ro,Pn,Au,bu,Vm,Fm,Ji,Ko,ia,aa=!1,Ts=!1,zs,Et,Iu=[],rd=!1,oc=[],Ic=typeof document<"u",Es=ey,Hm=_a||Ar?"cssFloat":"float",OP=Ic&&!wP&&!ey&&"draggable"in document.createElement("div"),ay=function(){if(Ic){if(Ar)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),sy=function(e,t){var n=re(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=hi(e,0,t),l=hi(e,1,t),d=s&&re(s),f=l&&re(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&d.float&&d.float!=="none"){var v=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===v)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[Hm]==="none"||l&&n[Hm]==="none"&&g+m>i)?"vertical":"horizontal"},NP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+l/2===d+g/2},PP=function(e,t){var n;return rc.some(function(i){var s=i[rn].options.emptyInsertThreshold;if(!(!s||Bd(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},cy=function(e){function t(s,l){return function(d,f,g,m){var v=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||v))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var C=(l?d:f).options.group.name;return s===!0||typeof s=="string"&&s===C||s.join&&s.indexOf(C)>-1}}var n={},i=e.group;(!i||$s(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},ly=function(){!ay&&le&&re(le,"display","none")},uy=function(){!ay&&le&&re(le,"display","")};Ic&&document.addEventListener("click",function(r){if(nc)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),nc=!1,!1},!0);var oo=function(e){if(H){e=e.touches?e.touches[0]:e;var t=PP(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[rn]._onDragOver(n)}}},MP=function(e){H&&H.parentNode[rn]._isOutsideThisEl(e.target)};function oe(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Er({},e),r[rn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return sy(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:oe.supportPointer!==!1&&"PointerEvent"in window&&!na,emptyInsertThreshold:5};Ta.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);cy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:OP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ae(r,"pointerdown",this._onTapStart):(Ae(r,"mousedown",this._onTapStart),Ae(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(r,"dragover",this),Ae(r,"dragenter",this)),rc.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Er(this,AP())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,H):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,m=i.filter;if(HP(n),!H&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&na&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Yn(f,i.draggable,n,!1),!(f&&f.animated)&&Ks!==f)){if(oi=En(f),oa=En(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Nt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Ut("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(v){if(v=Yn(g,v.trim(),n,!1),v)return Nt({sortable:t,rootEl:v,name:"filter",targetEl:f,fromEl:n,toEl:n}),Ut("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!Yn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!H&&n.parentNode===s){var g=it(n);if(Fe=s,H=n,qe=H.parentNode,so=H.nextSibling,Ks=n,_s=l.group,oe.dragged=H,ro={target:H,clientX:(t||e).clientX,clientY:(t||e).clientY},Vm=ro.clientX-g.left,Fm=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,H.style["will-change"]="all",f=function(){if(Ut("delayEnded",i,{evt:e}),oe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Dm&&i.nativeDraggable&&(H.draggable=!0),i._triggerDragStart(e,t),Nt({sortable:i,name:"choose",originalEvent:e}),Jt(H,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){ny(H,m.trim(),ku)}),Ae(d,"dragover",oo),Ae(d,"mousemove",oo),Ae(d,"touchmove",oo),Ae(d,"mouseup",i._onDrop),Ae(d,"touchend",i._onDrop),Ae(d,"touchcancel",i._onDrop),Dm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,H.draggable=!0),Ut("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(_a||Ar))){if(oe.eventCanceled){this._onDrop();return}Ae(d,"mouseup",i._disableDelayedDrag),Ae(d,"touchend",i._disableDelayedDrag),Ae(d,"touchcancel",i._disableDelayedDrag),Ae(d,"mousemove",i._delayedDragTouchMoveHandler),Ae(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Ae(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){H&&ku(H),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Ae(document,"pointermove",this._onTouchMove):t?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(H,"dragend",this),Ae(Fe,"dragstart",this._onDragStart));try{document.selection?Ws(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Fe&&H){Ut("dragStarted",this,{evt:t}),this.nativeDraggable&&Ae(document,"dragover",MP);var n=this.options;!e&&Jt(H,n.dragClass,!1),Jt(H,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),Nt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,ly();for(var e=document.elementFromPoint(Pn.clientX,Pn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pn.clientX,Pn.clientY),e!==t);)t=e;if(H.parentNode[rn]._isOutsideThisEl(e),t)do{if(t[rn]){var n=void 0;if(n=t[rn]._onDragOver({clientX:Pn.clientX,clientY:Pn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);uy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&ci(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=Es&&Et&&Um(Et),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-Iu[0]:0)/(d||1),v=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-Iu[1]:0)/(f||1);if(!oe.active&&!Qo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){l?(l.e+=m-(Au||0),l.f+=v-(bu||0)):l={a:1,b:0,c:0,d:1,e:m,f:v};var C="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");re(le,"webkitTransform",C),re(le,"mozTransform",C),re(le,"msTransform",C),re(le,"transform",C),Au=m,bu=v,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(H,!0,Es,!0,e),n=this.options;if(Es){for(Et=e;re(Et,"position")==="static"&&re(Et,"transform")==="none"&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=tr()),t.top+=Et.scrollTop,t.left+=Et.scrollLeft):Et=tr(),Iu=Um(Et)}le=H.cloneNode(!0),Jt(le,n.ghostClass,!1),Jt(le,n.fallbackClass,!0),Jt(le,n.dragClass,!0),re(le,"transition",""),re(le,"transform",""),re(le,"box-sizing","border-box"),re(le,"margin",0),re(le,"top",t.top),re(le,"left",t.left),re(le,"width",t.width),re(le,"height",t.height),re(le,"opacity","0.8"),re(le,"position",Es?"absolute":"fixed"),re(le,"zIndex","100000"),re(le,"pointerEvents","none"),oe.ghost=le,e.appendChild(le),re(le,"transform-origin",Vm/parseInt(le.style.width)*100+"% "+Fm/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Ut("dragStart",this,{evt:e}),oe.eventCanceled){this._onDrop();return}Ut("setupClone",this),oe.eventCanceled||(Ge=iy(H),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Jt(Ge,this.options.chosenClass,!1),oe.clone=Ge),n.cloneId=Ws(function(){Ut("clone",n),!oe.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,H),n._hideClone(),Nt({sortable:n,name:"clone"}))}),!t&&Jt(H,s.dragClass,!0),t?(nc=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,H)),Ae(document,"drop",n),re(H,"transform","translateZ(0)")),Qo=!0,n._dragStartId=Ws(n._dragStarted.bind(n,t,e)),Ae(document,"selectstart",n),Ji=!0,na&&re(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=oe.active,m=_s===f,v=d.sort,C=vt||g,S,_=this,A=!1;if(rd)return;function R(Qe,wt){Ut(Qe,_,rr({evt:e,isOwner:m,axis:S?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:v,fromSortable:C,target:n,completed:V,onMove:function(Kt,Jc){return Ss(Fe,t,H,i,Kt,it(Kt),e,Jc)},changed:B},wt))}function $(){R("dragOverAnimationCapture"),_.captureAnimationState(),_!==C&&C.captureAnimationState()}function V(Qe){return R("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(_),_!==C&&(Jt(H,vt?vt.options.ghostClass:g.options.ghostClass,!1),Jt(H,d.ghostClass,!0)),vt!==_&&_!==oe.active?vt=_:_===oe.active&&vt&&(vt=null),C===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){R("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===H&&!H.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(H.parentNode[rn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),A=!0}function B(){Qt=En(H),Ur=En(H,d.draggable),Nt({sortable:_,name:"change",toEl:t,newIndex:Qt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Yn(n,d.draggable,t,!0),R("dragOver"),oe.eventCanceled)return A;if(H.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return V(!1);if(nc=!1,g&&!d.disabled&&(m?v||(l=qe!==Fe):vt===this||(this.lastPutMode=_s.checkPull(this,g,H,e))&&f.checkPut(this,g,H,e))){if(S=this._getDirection(e,n)==="vertical",i=it(H),R("dragOverValid"),oe.eventCanceled)return A;if(l)return qe=Fe,$(),this._hideClone(),R("revert"),oe.eventCanceled||(so?Fe.insertBefore(H,so):Fe.appendChild(H)),V(!0);var Q=Bd(t,d.draggable);if(!Q||BP(e,S,this)&&!Q.animated){if(Q===H)return V(!1);if(Q&&t===e.target&&(n=Q),n&&(s=it(n)),Ss(Fe,t,H,i,n,s,e,!!n)!==!1)return $(),t.appendChild(H),qe=t,B(),V(!0)}else if(Q&&LP(e,S,this)){var se=hi(t,0,d,!0);if(se===H)return V(!1);if(n=se,s=it(n),Ss(Fe,t,H,i,n,s,e,!1)!==!1)return $(),t.insertBefore(H,se),qe=t,B(),V(!0)}else if(n.parentNode===t){s=it(n);var we=0,z,tt=H.parentNode!==t,Te=!NP(H.animated&&H.toRect||i,n.animated&&n.toRect||s,S),j=S?"top":"left",q=Bm(n,"top","top")||Bm(H,"top","top"),Ee=q?q.scrollTop:void 0;Ko!==n&&(z=s[j],aa=!1,Ts=!Te&&d.invertSwap||tt),we=UP(e,n,s,S,Te?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Ts,Ko===n);var Ue;if(we!==0){var Ct=En(H);do Ct-=we,Ue=qe.children[Ct];while(Ue&&(re(Ue,"display")==="none"||Ue===le))}if(we===0||Ue===n)return V(!1);Ko=n,ia=we;var An=n.nextElementSibling,sn=!1;sn=we===1;var Mt=Ss(Fe,t,H,i,n,s,e,sn);if(Mt!==!1)return(Mt===1||Mt===-1)&&(sn=Mt===1),rd=!0,setTimeout(DP,30),$(),sn&&!An?t.appendChild(H):n.parentNode.insertBefore(H,sn?An:n),q&&oy(q,0,Ee-q.scrollTop),qe=H.parentNode,z!==void 0&&!Ts&&(zs=Math.abs(z-it(n)[j])),B(),V(!0)}if(t.contains(H))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Qt=En(H),Ur=En(H,n.draggable),Ut("drop",this,{evt:e}),qe=H&&H.parentNode,Qt=En(H),Ur=En(H,n.draggable),oe.eventCanceled){this._nulling();return}Qo=!1,Ts=!1,aa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),od(this.cloneId),od(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),na&&re(document.body,"user-select",""),re(H,"transform",""),e&&(Ji&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),H&&(this.nativeDraggable&&Ce(H,"dragend",this),ku(H),H.style["will-change"]="",Ji&&!Qo&&Jt(H,vt?vt.options.ghostClass:this.options.ghostClass,!1),Jt(H,this.options.chosenClass,!1),Nt({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Qt>=0&&(Nt({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Nt({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Qt!==oi&&Qt>=0&&(Nt({sortable:this,name:"update",toEl:qe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),oe.active&&((Qt==null||Qt===-1)&&(Qt=oi,Ur=oa),Nt({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Ut("nulling",this),Fe=H=qe=le=so=Ge=Ks=Vr=ro=Pn=Ji=Qt=Ur=oi=oa=Ko=ia=vt=_s=oe.dragged=oe.ghost=oe.clone=oe.active=null,oc.forEach(function(e){e.checked=!0}),oc.length=Au=bu=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":H&&(this._onDragOver(e),xP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],Yn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||FP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];Yn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Yn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Ta.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&cy(n)},destroy:function(){Ut("destroy",this);var e=this.el;e[rn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),rc.splice(rc.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Vr){if(Ut("hideClone",this),oe.eventCanceled)return;re(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Vr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Vr){if(Ut("showClone",this),oe.eventCanceled)return;H.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,H):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(H,Ge),re(Ge,"display",""),Vr=!1}}};function xP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function Ss(r,e,t,n,i,s,l,d){var f,g=r[rn],m=g.options.onMove,v;return window.CustomEvent&&!Ar&&!_a?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(v=m.call(g,f,l)),v}function ku(r){r.draggable=!1}function DP(){rd=!1}function LP(r,e,t){var n=it(hi(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function BP(r,e,t){var n=it(Bd(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function UP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,v=n?t.bottom:t.right,C=!1;if(!l){if(d&&zs<g*i){if(!aa&&(ia===1?f>m+g*s/2:f<v-g*s/2)&&(aa=!0),aa)C=!0;else if(ia===1?f<m+zs:f>v-zs)return-ia}else if(f>m+g*(1-i)/2&&f<v-g*(1-i)/2)return VP(e)}return C=C||l,C&&(f<m+g*s/2||f>v-g*s/2)?f>m+g/2?1:-1:0}function VP(r){return En(H)<En(r)?1:-1}function FP(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function HP(r){oc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&oc.push(n)}}function Ws(r){return setTimeout(r,0)}function od(r){return clearTimeout(r)}Ic&&Ae(document,"touchmove",function(r){(oe.active||Qo)&&r.cancelable&&r.preventDefault()});oe.utils={on:Ae,off:Ce,css:re,find:ny,is:function(e,t){return!!Yn(e,t,e,!1)},extend:EP,throttle:ry,closest:Yn,toggleClass:Jt,clone:iy,index:En,nextTick:Ws,cancelNextTick:od,detectDirection:sy,getChild:hi};oe.get=function(r){return r[rn]};oe.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(oe.utils=rr(rr({},oe.utils),n.utils)),Ta.mount(n)})};oe.create=function(r,e){return new oe(r,e)};oe.version=CP;var Xe=[],Qi,id,ad=!1,Ru,Ou,ic,Xi;function $P(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),$m(),qs(),SP()},nulling:function(){ic=id=Qi=ad=Xi=Ru=Ou=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(ic=t,n||this.options.forceAutoScrollFallback||_a||Ar||na){Nu(t,this.options,d,n);var f=Kr(d,!0);ad&&(!Xi||s!==Ru||l!==Ou)&&(Xi&&$m(),Xi=setInterval(function(){var g=Kr(document.elementFromPoint(s,l),!0);g!==f&&(f=g,qs()),Nu(t,i.options,g,n)},10),Ru=s,Ou=l)}else{if(!this.options.bubbleScroll||Kr(d,!0)===tr()){qs();return}Nu(t,this.options,Kr(d,!1),!1)}}},Er(r,{pluginName:"scroll",initializeByDefault:!0})}function qs(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function $m(){clearInterval(Xi)}var Nu=ry(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,f=tr(),g=!1,m;id!==t&&(id=t,qs(),Qi=e.scroll,m=e.scrollFn,Qi===!0&&(Qi=Kr(t,!0)));var v=0,C=Qi;do{var S=C,_=it(S),A=_.top,R=_.bottom,$=_.left,V=_.right,B=_.width,Q=_.height,se=void 0,we=void 0,z=S.scrollWidth,tt=S.scrollHeight,Te=re(S),j=S.scrollLeft,q=S.scrollTop;S===f?(se=B<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"||Te.overflowX==="visible"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"||Te.overflowY==="visible")):(se=B<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"));var Ee=se&&(Math.abs(V-i)<=l&&j+B<z)-(Math.abs($-i)<=l&&!!j),Ue=we&&(Math.abs(R-s)<=l&&q+Q<tt)-(Math.abs(A-s)<=l&&!!q);if(!Xe[v])for(var Ct=0;Ct<=v;Ct++)Xe[Ct]||(Xe[Ct]={});(Xe[v].vx!=Ee||Xe[v].vy!=Ue||Xe[v].el!==S)&&(Xe[v].el=S,Xe[v].vx=Ee,Xe[v].vy=Ue,clearInterval(Xe[v].pid),(Ee!=0||Ue!=0)&&(g=!0,Xe[v].pid=setInterval((function(){n&&this.layer===0&&oe.active._onTouchMove(ic);var An=Xe[this.layer].vy?Xe[this.layer].vy*d:0,sn=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(oe.dragged.parentNode[rn],sn,An,r,ic,Xe[this.layer].el)!=="continue"||oy(Xe[this.layer].el,sn,An)}).bind({layer:v}),24))),v++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));ad=g}},30),dy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,v=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(v)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Ud(){}Ud.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=hi(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:dy};Er(Ud,{pluginName:"revertOnSpill"});function Vd(){}Vd.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:dy};Er(Vd,{pluginName:"removeOnSpill"});oe.mount(new $P);oe.mount(Vd,Ud);function KP(){return typeof window<"u"?window.console:global.console}const zP=KP();function WP(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const qP=/-(\w)/g,Km=WP(r=>r.replace(qP,(e,t)=>t?t.toUpperCase():""));function Pu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function zm(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function GP(r,e){return Object.values(r).indexOf(e)}function jP(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function hy(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function YP(r){return e=>{this.realList!==null&&this["onDrag"+r](e),hy.call(this,r,e)}}function JP(r){return["transition-group","TransitionGroup"].includes(r)}function QP(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?JP(e.name):!1}function XP(r,e){return e?{...e.props,...e.attrs}:r}const sd=["Start","Add","Remove","Update","End"],cd=["Choose","Unchoose","Sort","Filter","Clone"],ZP=["Move",...sd,...cd].map(r=>"on"+r);let Mu=null;const e1={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},t1=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...sd.map(r=>r.toLowerCase()),...cd.map(r=>r.toLowerCase())],props:e1,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=XP(this.$attrs,this.componentData);return r?(this.transitionMode=QP(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&zP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};sd.forEach(i=>{r["on"+i]=YP.call(this,i)}),cd.forEach(i=>{r["on"+i]=hy.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[Km(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new oe(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=Km(e);ZP.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=jP(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=GP(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),Mu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Pu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(zm(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Pu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){Pu(r.item),zm(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),Mu=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(Mu)!==-1||!e.willInsertAfter?i:i+1}}}),n1={class:"d-flex flex-row align-center"},Fd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref("");return(n,i)=>{const s=c.resolveComponent("GripVerticalIcon"),l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(wa,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(Xv,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(t1),{list:e.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,d=>(c.openBlock(),c.createBlock(Vt.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",n1,[c.createVNode(s,{class:"mb-2"}),c.createVNode(Vt.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(kk.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+"  ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(Xs.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),r1=["src","height","width"],o1={key:0,class:"text-center text-h6"},i1={key:1,class:"text-center text-h5"},a1={key:0,class:"text-center"},s1={class:"d-flex justify-center align-center mt-4 ga-3"},Hd=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,r1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",o1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",i1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",a1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",s1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(Rk.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),c1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(_e.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(_e.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Hd,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),fy=vi(c1,[["__scopeId","data-v-e1a4ccbc"]]),l1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},gy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",l1,c.toDisplayString(e.value),1))}}),u1={key:0,class:"mb-2 ms-1"},my=c.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",u1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Ft.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(gy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),d1={class:"text-faded mt-7"},h1={class:"d-flex align-baseline mb-1"},f1={class:"me-1"},g1={class:"max-w-_form-metadataJ"},m1={key:0,class:"mb-1"},p1={key:1,class:"mb-1"},v1={class:"mb-1"},kc=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",d1,[c.createVNode(_e.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",h1,[c.createElementVNode("b",f1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",g1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(Cc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(_e.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",m1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",p1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",v1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),y1={key:0,class:"mb-2 ms-1"},py=c.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",y1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(gy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Ft.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field"},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density"]))],64))}}),C1={key:0,class:"mb-2 ms-1"},w1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},vy=c.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",C1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Ok.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",w1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),yy=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Be.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),Cy=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Be.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),_1={class:"mt-4"},wy=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Sc,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",_1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(_e.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(kc,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(yy,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(Cy,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),T1={class:"d-flex align-items-center"},E1={key:0,class:"d-flex align-center"},S1={class:"ms-1"},A1={class:"d-flex"},b1={class:"d-flex mb-1 align-center"},I1={class:"min-w-100 relative"},_y=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,v)=>(c.openBlock(),c.createElementBlock("div",T1,[m.id?(c.openBlock(),c.createElementBlock("div",E1,[v[0]||(v[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",S1,c.toDisplayString(m.id),1),c.createVNode(Cc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createElementVNode("div",A1,[c.createVNode(Be.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(hO),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(Xs.VIcon,{class:"me-2"},{default:c.withCtx(()=>v[1]||(v[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",b1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",I1,[c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>v[2]||(v[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Xs.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>v[3]||(v[3]=[c.createTextVNode("mdi-close")])),_:1}),v[4]||(v[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),k1={class:"d-flex flex-column"},R1={class:"height d-flex flex-column"},O1={class:"d-flex justify-between align-end"},N1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Sc,null,{default:c.withCtx(()=>[c.createElementVNode("div",k1,[c.createElementVNode("div",R1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",O1,[c.createVNode(_e.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(kc,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(_e.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(yy,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(Cy,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Ty=vi(N1,[["__scopeId","data-v-489d31c3"]]);/**
21
21
  * @license @tabler/icons-vue v3.22.0 - MIT
22
22
  *
23
23
  * This source code is licensed under the MIT license.
@@ -84,4 +84,4 @@ __p += '`),ve&&(L+=`' +
84
84
  function print() { __p += __j.call(arguments, '') }
85
85
  `:`;
86
86
  `)+L+`return __p
87
- }`;var he=lm(function(){return Se(w,Y+"return "+L).apply(t,T)});if(he.source=L,su(he))throw he;return he}function xI(o){return be(o).toLowerCase()}function DI(o){return be(o).toUpperCase()}function LI(o,a,u){if(o=be(o),o&&(u||a===t))return yf(o);if(!o||!(a=qt(a)))return o;var h=kn(o),p=kn(a),w=Cf(h,p),T=wf(h,p)+1;return Mr(h,w,T).join("")}function BI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,Tf(o)+1);if(!o||!(a=qt(a)))return o;var h=kn(o),p=wf(h,kn(a))+1;return Mr(h,0,p).join("")}function UI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(sl,"");if(!o||!(a=qt(a)))return o;var h=kn(o),p=Cf(h,kn(a));return Mr(h,p).join("")}function VI(o,a){var u=j,h=q;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?qt(a.omission):h}o=be(o);var w=o.length;if(bo(o)){var T=kn(o);w=T.length}if(u>=w)return o;var E=u-Io(h);if(E<1)return h;var I=T?Mr(T,0,E).join(""):o.slice(0,E);if(p===t)return I+h;if(T&&(E+=I.length-E),cu(p)){if(o.slice(E).search(p)){var x,D=I;for(p.global||(p=Sl(p.source,be(Vh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?E:L)}}else if(o.indexOf(qt(p),E)!=E){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function FI(o){return o=be(o),o&&Qw.test(o)?o.replace(Lh,mT):o}var HI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),du=ug("toUpperCase");function cm(o,a,u){return o=be(o),a=u?t:a,a===t?uT(o)?yT(o):tT(o):o.match(a)||[]}var lm=fe(function(o,a){try{return zt(o,t,a)}catch(u){return su(u)?u:new ae(u)}}),$I=ur(function(o,a){return ln(a,function(u){u=qn(u),cr(o,u,iu(o[u],o))}),o});function KI(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new un(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var w=o[p];if(zt(w[0],this,h))return zt(w[1],this,h)}})}function zI(o){return mE(hn(o,v))}function hu(o){return function(){return o}}function WI(o,a){return o==null||o!==o?a:o}var qI=hg(),GI=hg(!0);function Bt(o){return o}function fu(o){return $f(typeof o=="function"?o:hn(o,v))}function jI(o){return zf(hn(o,v))}function YI(o,a){return Wf(o,hn(a,v))}var JI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),QI=fe(function(o,a){return function(u){return Hi(o,u,a)}});function gu(o,a,u){var h=st(a),p=es(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=es(a,st(a)));var w=!($e(u)&&"chain"in u)||!!u.chain,T=hr(o);return ln(p,function(E){var I=a[E];o[E]=I,T&&(o.prototype[E]=function(){var x=this.__chain__;if(w||x){var D=o(this.__wrapped__),L=D.__actions__=xt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,Ir([this.value()],arguments))})}),o}function XI(){return ht._===this&&(ht._=ST),this}function mu(){}function ZI(o){return o=de(o),fe(function(a){return qf(a,o)})}var ek=ql(Ve),tk=ql(ff),nk=ql(vl);function um(o){return Zl(o)?yl(qn(o)):PE(o)}function rk(o){return function(a){return o==null?t:Zr(o,a)}}var ok=gg(),ik=gg(!0);function pu(){return[]}function vu(){return!1}function ak(){return{}}function sk(){return""}function ck(){return!0}function lk(o,a){if(o=de(o),o<1||o>Qe)return[];var u=Kt,h=_t(o,Kt);a=X(a),o-=Kt;for(var p=_l(h,a);++u<o;)a(u);return p}function uk(o){return ce(o)?Ve(o,qn):Gt(o)?[o]:xt(Og(be(o)))}function dk(o){var a=++TT;return be(o)+a}var hk=as(function(o,a){return o+a},0),fk=Gl("ceil"),gk=as(function(o,a){return o/a},1),mk=Gl("floor");function pk(o){return o&&o.length?Za(o,Bt,Pl):t}function vk(o,a){return o&&o.length?Za(o,X(a,2),Pl):t}function yk(o){return pf(o,Bt)}function Ck(o,a){return pf(o,X(a,2))}function wk(o){return o&&o.length?Za(o,Bt,Ll):t}function _k(o,a){return o&&o.length?Za(o,X(a,2),Ll):t}var Tk=as(function(o,a){return o*a},1),Ek=Gl("round"),Sk=as(function(o,a){return o-a},0);function Ak(o){return o&&o.length?wl(o,Bt):0}function bk(o,a){return o&&o.length?wl(o,X(a,2)):0}return y.after=jA,y.ary=Hg,y.assign=Db,y.assignIn=tm,y.assignInWith=Cs,y.assignWith=Lb,y.at=Bb,y.before=$g,y.bind=iu,y.bindAll=$I,y.bindKey=Kg,y.castArray=ab,y.chain=Ug,y.chunk=mS,y.compact=pS,y.concat=vS,y.cond=KI,y.conforms=zI,y.constant=hu,y.countBy=AA,y.create=Ub,y.curry=zg,y.curryRight=Wg,y.debounce=qg,y.defaults=Vb,y.defaultsDeep=Fb,y.defer=YA,y.delay=JA,y.difference=yS,y.differenceBy=CS,y.differenceWith=wS,y.drop=_S,y.dropRight=TS,y.dropRightWhile=ES,y.dropWhile=SS,y.fill=AS,y.filter=IA,y.flatMap=OA,y.flatMapDeep=NA,y.flatMapDepth=PA,y.flatten=xg,y.flattenDeep=bS,y.flattenDepth=IS,y.flip=QA,y.flow=qI,y.flowRight=GI,y.fromPairs=kS,y.functions=Gb,y.functionsIn=jb,y.groupBy=MA,y.initial=OS,y.intersection=NS,y.intersectionBy=PS,y.intersectionWith=MS,y.invert=Jb,y.invertBy=Qb,y.invokeMap=DA,y.iteratee=fu,y.keyBy=LA,y.keys=st,y.keysIn=Lt,y.map=fs,y.mapKeys=Zb,y.mapValues=eI,y.matches=jI,y.matchesProperty=YI,y.memoize=ms,y.merge=tI,y.mergeWith=nm,y.method=JI,y.methodOf=QI,y.mixin=gu,y.negate=ps,y.nthArg=ZI,y.omit=nI,y.omitBy=rI,y.once=XA,y.orderBy=BA,y.over=ek,y.overArgs=ZA,y.overEvery=tk,y.overSome=nk,y.partial=au,y.partialRight=Gg,y.partition=UA,y.pick=oI,y.pickBy=rm,y.property=um,y.propertyOf=rk,y.pull=BS,y.pullAll=Lg,y.pullAllBy=US,y.pullAllWith=VS,y.pullAt=FS,y.range=ok,y.rangeRight=ik,y.rearg=eb,y.reject=HA,y.remove=HS,y.rest=tb,y.reverse=ru,y.sampleSize=KA,y.set=aI,y.setWith=sI,y.shuffle=zA,y.slice=$S,y.sortBy=GA,y.sortedUniq=YS,y.sortedUniqBy=JS,y.split=OI,y.spread=nb,y.tail=QS,y.take=XS,y.takeRight=ZS,y.takeRightWhile=eA,y.takeWhile=tA,y.tap=pA,y.throttle=rb,y.thru=hs,y.toArray=Xg,y.toPairs=om,y.toPairsIn=im,y.toPath=uk,y.toPlainObject=em,y.transform=cI,y.unary=ob,y.union=nA,y.unionBy=rA,y.unionWith=oA,y.uniq=iA,y.uniqBy=aA,y.uniqWith=sA,y.unset=lI,y.unzip=ou,y.unzipWith=Bg,y.update=uI,y.updateWith=dI,y.values=Bo,y.valuesIn=hI,y.without=cA,y.words=cm,y.wrap=ib,y.xor=lA,y.xorBy=uA,y.xorWith=dA,y.zip=hA,y.zipObject=fA,y.zipObjectDeep=gA,y.zipWith=mA,y.entries=om,y.entriesIn=im,y.extend=tm,y.extendWith=Cs,gu(y,y),y.add=hk,y.attempt=lm,y.camelCase=pI,y.capitalize=am,y.ceil=fk,y.clamp=fI,y.clone=sb,y.cloneDeep=lb,y.cloneDeepWith=ub,y.cloneWith=cb,y.conformsTo=db,y.deburr=sm,y.defaultTo=WI,y.divide=gk,y.endsWith=vI,y.eq=On,y.escape=yI,y.escapeRegExp=CI,y.every=bA,y.find=kA,y.findIndex=Pg,y.findKey=Hb,y.findLast=RA,y.findLastIndex=Mg,y.findLastKey=$b,y.floor=mk,y.forEach=Vg,y.forEachRight=Fg,y.forIn=Kb,y.forInRight=zb,y.forOwn=Wb,y.forOwnRight=qb,y.get=lu,y.gt=hb,y.gte=fb,y.has=Yb,y.hasIn=uu,y.head=Dg,y.identity=Bt,y.includes=xA,y.indexOf=RS,y.inRange=gI,y.invoke=Xb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=gb,y.isArrayLike=Dt,y.isArrayLikeObject=je,y.isBoolean=mb,y.isBuffer=xr,y.isDate=pb,y.isElement=vb,y.isEmpty=yb,y.isEqual=Cb,y.isEqualWith=wb,y.isError=su,y.isFinite=_b,y.isFunction=hr,y.isInteger=jg,y.isLength=vs,y.isMap=Yg,y.isMatch=Tb,y.isMatchWith=Eb,y.isNaN=Sb,y.isNative=Ab,y.isNil=Ib,y.isNull=bb,y.isNumber=Jg,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=cu,y.isSafeInteger=kb,y.isSet=Qg,y.isString=ys,y.isSymbol=Gt,y.isTypedArray=Lo,y.isUndefined=Rb,y.isWeakMap=Ob,y.isWeakSet=Nb,y.join=xS,y.kebabCase=wI,y.last=gn,y.lastIndexOf=DS,y.lowerCase=_I,y.lowerFirst=TI,y.lt=Pb,y.lte=Mb,y.max=pk,y.maxBy=vk,y.mean=yk,y.meanBy=Ck,y.min=wk,y.minBy=_k,y.stubArray=pu,y.stubFalse=vu,y.stubObject=ak,y.stubString=sk,y.stubTrue=ck,y.multiply=Tk,y.nth=LS,y.noConflict=XI,y.noop=mu,y.now=gs,y.pad=EI,y.padEnd=SI,y.padStart=AI,y.parseInt=bI,y.random=mI,y.reduce=VA,y.reduceRight=FA,y.repeat=II,y.replace=kI,y.result=iI,y.round=Ek,y.runInContext=b,y.sample=$A,y.size=WA,y.snakeCase=RI,y.some=qA,y.sortedIndex=KS,y.sortedIndexBy=zS,y.sortedIndexOf=WS,y.sortedLastIndex=qS,y.sortedLastIndexBy=GS,y.sortedLastIndexOf=jS,y.startCase=NI,y.startsWith=PI,y.subtract=Sk,y.sum=Ak,y.sumBy=bk,y.template=MI,y.times=lk,y.toFinite=fr,y.toInteger=de,y.toLength=Zg,y.toLower=xI,y.toNumber=mn,y.toSafeInteger=xb,y.toString=be,y.toUpper=DI,y.trim=LI,y.trimEnd=BI,y.trimStart=UI,y.truncate=VI,y.unescape=FI,y.uniqueId=dk,y.upperCase=HI,y.upperFirst=du,y.each=Vg,y.eachRight=Fg,y.first=Dg,gu(y,function(){var o={};return zn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,ln(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),ln(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=_t(u,h.__takeCount__):h.__views__.push({size:_t(u,Kt),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),ln(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==sn;pe.prototype[o]=function(p){var w=this.clone();return w.__iteratees__.push({iteratee:X(p,3),type:u}),w.__filtered__=w.__filtered__||h,w}}),ln(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),ln(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Bt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(u){return Hi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(ps(X(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take(Kt)},zn(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=y[h?"take"+(a=="last"?"Right":""):a],w=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,E=h?[1]:arguments,I=T instanceof pe,x=E[0],D=I||ce(T),L=function(me){var ve=p.apply(y,Ir([me],E));return h&&K?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(I=D=!1);var K=this.__chain__,Y=!!this.__actions__.length,Z=w&&!K,he=I&&!Y;if(!w&&D){T=he?T:new pe(this);var ee=o.apply(T,E);return ee.__actions__.push({func:hs,args:[L],thisArg:t}),new dn(ee,K)}return Z&&he?o.apply(this,E):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),ln(["pop","push","shift","sort","splice","unshift"],function(o){var a=Ua[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return a.apply(ce(w)?w:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),zn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(No,h)||(No[h]=[]),No[h].push({name:a,func:u})}}),No[is(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=FT,pe.prototype.reverse=HT,pe.prototype.value=$T,y.prototype.at=vA,y.prototype.chain=yA,y.prototype.commit=CA,y.prototype.next=wA,y.prototype.plant=TA,y.prototype.reverse=EA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=SA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=_A),y},ko=CT();jr?((jr.exports=ko)._=ko,fl._=ko):ht._=ko}).call(UB)}(ea,ea.exports)),ea.exports}var Ti=VB();const Qs=BB(Ti),FB={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-B9KF18f1.js")),meta:{requiresAuth:!1}},HB={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-DczSIeNL.js")),meta:{requiresAuth:!1}},{isAuthenticated:Wp,handleRedirect:$B}=kh(),KB=Yc();function zB(r,e){r.addRoute(FB),r.addRoute(HB),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!Wp.value){ie.value=!0;try{await $B(e),await KB.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}Wp.value&&i()})}const{scope:qp}=Yc();function WB(){const r=Mh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(qp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=qp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ei(r){const e=WB();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function qB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Hn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Fr=qB();function GB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Hn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Hr=GB();function jB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Hn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const en=jB();async function YB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Si(r,e,t=[]){const n=QB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>JB(s,i,t))}function JB(r,e,t){return t.some(n=>{const i=Qs.get(r,n);if(Qs.isNil(i))return!1;const s=Qs.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function QB(r){return Qs.trim(r).toLowerCase().replace(/\s+/g," ")}let xs=!1;const qu=c.ref(!1),pn=c.ref([]),Gp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Dw=()=>{const r=Hn(),e=async _=>{qu.value=!0;const A=_?`_active eq true and ${_}`:"_active eq true",R=await Fr.getOrgList(A);R&&(pn.value=R,xs=!0),qu.value=!1},t=async _=>{var A;return(A=pn.value)!=null&&A.length||await e(_),pn.value};function n(_){if(!pn.value)throw new Error("Data not stored yet");const A=Si(pn.value,_,["name","description"]);return _!==""?A:pn.value}const i=_=>{Gp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Fr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Fr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),xs&&pn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Fr.updateOrg(We.value);if(xs&&(_!=null&&_.data.__id)){const A=pn.value.findIndex(R=>R.__id===_.data.__id);return A!==-1?(pn.value[A]=_.data,r.success("Organization updated.")):r.error("Unable to update item"),ie.value=!1,_.data}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,We.value&&We.value.created_at){if(await Fr.deactivateOrg(We.value.__id),xs){const _=pn.value.findIndex(A=>{var R;return A.__id===((R=We.value)==null?void 0:R.__id)});if(_!==-1)return pn.value.splice(_,1),We.value;r.error("Unable to deactivate organization")}ie.value=!1}};async function m(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Hr.updateBranch(A)){ie.value=!1;return}if(qo.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Branch added successfully."),qo.value.push(A),A;r.info("Branch already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function v(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Hr.updateBranch(A)){ie.value=!1;return}const $=qo.value.findIndex(V=>V.__id===_.__id);if($!==-1)return qo.value.splice($,1),ie.value=!1,qo.value;throw new Error("Item not found to remove")}ie.value=!1}async function C(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await en.updateTeam(A)){ie.value=!1;return}if(Go.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Team added successfully."),Go.value.push(A),A;r.info("Team already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function S(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await en.updateTeam(A)){ie.value=!1;return}const $=Go.value.findIndex(V=>V.__id===_.__id);if($!==-1)return Go.value.splice($,1),ie.value=!1,Go.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:qu,columns:Gp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:qo,orgTeams:Go,linkBranch:m,unlinkBranch:v,linkTeam:C,unlinkTeam:S}};let Ds=!1;const vn=c.ref([]),jp=c.ref([]),ot=c.ref(null),Gu=c.ref(!1),jo=c.ref([]),Lw=()=>{const r=Hn(),e=async C=>{Gu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await en.getTeamList(S);_&&(vn.value=_,Ds=!0),Gu.value=!1},t=async C=>(vn.value.length||await e(C),vn.value);function n(C){if(!vn.value)throw new Error("Data not stored yet");const S=Si(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{jp.value=C},s=C=>{ot.value=Ti.cloneDeep(C)},l=async C=>await en.getTeam(C),d=async()=>{if(ot.value!=null){const C=await en.createTeam(ot.value);return C!=null&&C.data.created_at&&(r.success("Team created."),Ds&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const C=await en.updateTeam(ot.value);if(Ds&&(C!=null&&C.data.__id)){const S=vn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(vn.value[S]=C.data,r.success("Team updated.")):r.error("Unable to update item"),C.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await en.deactivateTeam(ot.value.__id),Ds)){const C=vn.value.findIndex(S=>{var _;return S.__id===((_=ot.value)==null?void 0:_.__id)});if(C!==-1)return vn.value.splice(C,1),ot.value;r.error("Unable to deactivate organization")}};async function m(C){var S;if(ie.value=!0,(S=ot.value)!=null&&S.__id)if(jo.value.findIndex(A=>A.__id===C.__id)===-1)try{const A=await en.linkManageUser(ot.value.__id,{team:ot.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),R=await en.getTeamUserList(ot.value.__id);return R&&(jo.value=R),r.success("User added successfully."),A}catch(A){console.error(A),r.error("Unable to add User.")}finally{ie.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");ie.value=!1}async function v(C){if(ie.value=!0,ot.value&&ot.value.__id){const S=jo.value.findIndex(_=>_.__id===C);if(S!==-1)return await en.unlinkManageUser(ot.value.__id,C),jo.value.splice(S,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:vn,loading:Gu,columns:jp,item:ot,usersTeam:jo,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:v}},Bw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var A,R,$;const{openDialog:e}=ya("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Yc(),{getData:l,data:d}=Dw(),{getData:f,data:g}=Lw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const v=c.ref({scope_type:(A=n.value)==null?void 0:A.scope_type,organization:((R=n.value)==null?void 0:R.organization)??"org",team:($=n.value)==null?void 0:$.team});function C(){var V,B,Q;v.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((B=n.value)==null?void 0:B.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const S=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return x1;case"org":return P1;case"team":return D1;default:return M1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(v.value)}return(V,B)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Be.VBtn,{onClick:C,icon:"",class:"text-secondary ms-2",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(S.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(wa),{loading:m.value,title:"Scope","dd-id":"global-scope__J-","on-save":_},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(_e.VRow,null,{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>B[3]||(B[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>B[4]||(B[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>B[5]||(B[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(Nk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:v.value.scope_type,"onUpdate:modelValue":B[0]||(B[0]=Q=>v.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>B[6]||(B[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Be.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>B[7]||(B[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Be.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>B[8]||(B[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Be.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>B[9]||(B[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>B[10]||(B[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:v.value.organization,"onUpdate:modelValue":B[1]||(B[1]=Q=>v.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>B[11]||(B[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(g),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:v.value.team,"onUpdate:modelValue":B[2]||(B[2]=Q=>v.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),XB={},ZB={class:"double-ring-spinner-container"};function eU(r,e){return c.openBlock(),c.createElementBlock("div",ZB,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Uw=vi(XB,[["render",eU],["__scopeId","data-v-00d7a69f"]]),tU={key:0,class:"_jspinner-overlay_jj"},Vw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",tU,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),nU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Kv,ColumnSettingsDialog:Fd,ConfirmDialog:Hv,ContextMenu:zv,CopyButton:Cc,DeleteAllBtn:Dd,DotsMenu:Vv,DotsMenuV1:Fv,EditButton:Lv,FormHeadless:Ty,FormMetadata:kc,GlobalScopeFilter:Bw,GlobalSpinner:Vw,JAvatar:$v,JBtn:ov,JDialog:wa,JForm:wy,JIconBtn:rv,JSelect:py,JTextArea:vy,JTextField:my,ParentCard:Sc,SpinnerLoader:Uw,TabFormHeader:_y,TableAdvanced:Qv,TableCard:Hd,TableCardsView:fy,TableHeader:Zv,UiTable:Wv},Symbol.toStringTag,{value:"Module"})),rU=aR(),oU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let ju=!1;const Yu=c.ref(!1),yn=c.ref([]),Yp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),iU=()=>{const r=Hn(),e=async C=>{Yu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await Hr.getBranchList(S);_&&(yn.value=_,ju=!0),Yu.value=!1},t=async C=>(yn.value.length||await e(C),yn.value);function n(C){if(!yn.value)throw new Error("Data not stored yet");const S=Si(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{Yp.value=C},s=C=>{gt.value=Ti.cloneDeep(C)},l=async C=>await Hr.getBranch(C),d=async()=>{if(gt.value!=null){const C=await Hr.createBranch(gt.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),ju&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(gt.value&&gt.value.__id){const C=await Hr.updateBranch(gt.value);if(ju&&C){const S=yn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(yn.value[S]=C.data,r.success("Branch updated.")):r.error("Unable to update item"),C}}else r.error("Unable to update item")},g=async()=>{if(gt.value&&gt.value.created_at){await Hr.deactivateBranch(gt.value.__id);const C=yn.value.findIndex(S=>{var _;return S.__id===((_=gt.value)==null?void 0:_.__id)});if(C!==-1)return yn.value.splice(C,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(C){ie.value=!0;try{if(gt.value&&gt.value.__id){const S={...C,branch:gt.value.__id};if(!await en.updateTeam(S)){r.error("Unable to link team");return}if(Yo.value.findIndex(R=>R.__id===C.__id)===-1)return r.success("Team added successfully."),Yo.value.push(S),S;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,gt.value&&gt.value.__id){const S={...C,branch:null};if(!await en.updateTeam(S))return;const A=Yo.value.findIndex(R=>R.__id===C.__id);if(A!==-1)return Yo.value.splice(A,1),ie.value=!1,Yo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:yn,columns:Yp,item:gt,loading:Yu,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:v}};function aU(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Hn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ti=aU();let Ju=!1;const Qu=c.ref(!1),Cn=c.ref([]),Jp=c.ref([]),mt=c.ref(null),Jo=c.ref([]),sU=()=>{const r=Hn(),e=async C=>{Qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await ti.getDivisionList(S);_&&(Cn.value=_,Ju=!0),Qu.value=!1},t=async C=>(Cn.value.length||await e(C),Cn.value);function n(C){if(!Cn.value)throw new Error("Data not stored yet");const S=Si(Cn.value,C,["name","description"]);return C!==""?S:Cn.value}const i=C=>{Jp.value=C},s=C=>{mt.value=Ti.cloneDeep(C)},l=async C=>await ti.getDivision(C),d=async()=>{if(mt.value!=null){const C=await ti.createDivision(mt.value);return C!=null&&C.data.created_at&&(r.success("Division created."),Ju&&Cn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const C=await ti.updateDivision(mt.value);if(Ju&&(C!=null&&C.data.__id)){const S=Cn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(Cn.value[S]=C.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,C}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,mt.value&&mt.value.created_at){await ti.deactivateDivision(mt.value.__id);const C=Cn.value.findIndex(S=>{var _;return S.__id===((_=mt.value)==null?void 0:_.__id)});if(C!==-1)return Cn.value.splice(C,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(C){ie.value=!0;try{if(mt.value&&mt.value.__id){const S={...C,division:mt.value.__id};return await Fr.updateOrg(S)?(Jo.value.findIndex(R=>R.__id===C.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(S)):r.info("Organization already added."),S):void 0}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,mt.value&&mt.value.__id){const S={...C,division:null};if(!await Fr.updateOrg(S))return;const A=Jo.value.findIndex(R=>R.__id===C.__id);if(A!==-1)Jo.value.splice(A,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ie.value=!1,Jo.value}return{data:Cn,columns:Jp,item:mt,loading:Qu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:v}};function cU(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Hn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ni=cU();let Xu=!1,Zu=c.ref(!1);const wn=c.ref([]),Qp=c.ref([]),_n=c.ref(null),lU=c.ref(null),uU=c.ref([]),dU=()=>{const r=Hn(),e=async m=>{Zu.value=!0;const v=m?`_active eq true and ${m}`:"_active eq true",C=await ni.getManageUserList(v);C&&(wn.value=C,Xu=!0),Zu.value=!1},t=async m=>(wn.value.length||await e(m),wn.value);function n(m){if(!wn.value)throw new Error("Data not stored yet");const v=Si(wn.value,m,["name","description"]);return m!==""?v:wn.value}return{data:wn,loading:Zu,columns:Qp,item:_n,filterData:n,__init__:e,getData:t,setColumns:m=>{Qp.value=m},setItem:m=>{_n.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(_n.value!=null){const m=crypto.randomUUID(),v=await ni.createManageUser({..._n.value,__id:m});return v!=null&&v.data.created_at&&(r.success("User created."),Xu&&wn.value.push(v.data)),v==null?void 0:v.data}},updateItem:async()=>{if(ie.value=!0,_n.value&&_n.value.created_at){const m=await ni.updateManageUser(_n.value);if(Xu&&(m!=null&&m.data)){const v=wn.value.findIndex(C=>C.__id===(m==null?void 0:m.data.__id));if(v!==-1)wn.value[v]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ie.value=!1,m==null?void 0:m.data}},removeItem:async()=>{if(_n.value&&_n.value.created_at){try{await ni.deactivateManageUser(_n.value.__id)}catch{r.error("Unable to deactivate user");return}const m=wn.value.findIndex(v=>{var C;return v.__id===((C=_n.value)==null?void 0:C.__id)});if(m!==-1)return wn.value.splice(m,1),_n.value}},userOrg:lU,userTeams:uU}},hU=r=>{r.use(rU),r.use(cO,oU),Object.entries(nU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Mk).forEach(([e,t])=>{r.provide(e,t)})},fU={install:hU};exports.ContextMenu=zv;exports.EventBus=Tc;exports.FormHeadless=Ty;exports.HttpCore=YB;exports.SpinnerLoader=Uw;exports.TableCardsView=fy;exports.TableHeader=Zv;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=Wv;exports._sfc_main$1=Qv;exports._sfc_main$10=Dd;exports._sfc_main$11=Lv;exports._sfc_main$12=wa;exports._sfc_main$13=rv;exports._sfc_main$14=py;exports._sfc_main$15=vy;exports._sfc_main$16=my;exports._sfc_main$17=wy;exports._sfc_main$18=_y;exports._sfc_main$19=Sc;exports._sfc_main$2=Fd;exports._sfc_main$20=$v;exports._sfc_main$21=Kv;exports._sfc_main$22=Bw;exports._sfc_main$23=Vw;exports._sfc_main$3=Hd;exports._sfc_main$4=Hv;exports._sfc_main$5=Cc;exports._sfc_main$6=Vv;exports._sfc_main$7=Fv;exports._sfc_main$8=kc;exports._sfc_main$9=ov;exports.branchInstance=Hr;exports.coreClient=Mh;exports.createToastInterface=fa;exports.dateFormat=Jv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=xd;exports.index=fU;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Fr;exports.provideToast=sO;exports.scopedClient=Ei;exports.setupAuthGuard=zB;exports.teamInstance=en;exports.toastInjectionKey=Ec;exports.useAuth=kh;exports.useBranchStore=iU;exports.useCustomizer=dR;exports.useDialog=ya;exports.useDivisionStore=sU;exports.useManageUserStore=dU;exports.useOrganizationStore=Dw;exports.useSession=Yc;exports.useTeamStore=Lw;exports.useToast=Hn;
87
+ }`;var he=lm(function(){return Se(w,Y+"return "+L).apply(t,T)});if(he.source=L,su(he))throw he;return he}function xI(o){return be(o).toLowerCase()}function DI(o){return be(o).toUpperCase()}function LI(o,a,u){if(o=be(o),o&&(u||a===t))return yf(o);if(!o||!(a=qt(a)))return o;var h=kn(o),p=kn(a),w=Cf(h,p),T=wf(h,p)+1;return Mr(h,w,T).join("")}function BI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,Tf(o)+1);if(!o||!(a=qt(a)))return o;var h=kn(o),p=wf(h,kn(a))+1;return Mr(h,0,p).join("")}function UI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(sl,"");if(!o||!(a=qt(a)))return o;var h=kn(o),p=Cf(h,kn(a));return Mr(h,p).join("")}function VI(o,a){var u=j,h=q;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?qt(a.omission):h}o=be(o);var w=o.length;if(bo(o)){var T=kn(o);w=T.length}if(u>=w)return o;var E=u-Io(h);if(E<1)return h;var I=T?Mr(T,0,E).join(""):o.slice(0,E);if(p===t)return I+h;if(T&&(E+=I.length-E),cu(p)){if(o.slice(E).search(p)){var x,D=I;for(p.global||(p=Sl(p.source,be(Vh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?E:L)}}else if(o.indexOf(qt(p),E)!=E){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function FI(o){return o=be(o),o&&Qw.test(o)?o.replace(Lh,mT):o}var HI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),du=ug("toUpperCase");function cm(o,a,u){return o=be(o),a=u?t:a,a===t?uT(o)?yT(o):tT(o):o.match(a)||[]}var lm=fe(function(o,a){try{return zt(o,t,a)}catch(u){return su(u)?u:new ae(u)}}),$I=ur(function(o,a){return ln(a,function(u){u=qn(u),cr(o,u,iu(o[u],o))}),o});function KI(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new un(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var w=o[p];if(zt(w[0],this,h))return zt(w[1],this,h)}})}function zI(o){return mE(hn(o,v))}function hu(o){return function(){return o}}function WI(o,a){return o==null||o!==o?a:o}var qI=hg(),GI=hg(!0);function Bt(o){return o}function fu(o){return $f(typeof o=="function"?o:hn(o,v))}function jI(o){return zf(hn(o,v))}function YI(o,a){return Wf(o,hn(a,v))}var JI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),QI=fe(function(o,a){return function(u){return Hi(o,u,a)}});function gu(o,a,u){var h=st(a),p=es(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=es(a,st(a)));var w=!($e(u)&&"chain"in u)||!!u.chain,T=hr(o);return ln(p,function(E){var I=a[E];o[E]=I,T&&(o.prototype[E]=function(){var x=this.__chain__;if(w||x){var D=o(this.__wrapped__),L=D.__actions__=xt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,Ir([this.value()],arguments))})}),o}function XI(){return ht._===this&&(ht._=ST),this}function mu(){}function ZI(o){return o=de(o),fe(function(a){return qf(a,o)})}var ek=ql(Ve),tk=ql(ff),nk=ql(vl);function um(o){return Zl(o)?yl(qn(o)):PE(o)}function rk(o){return function(a){return o==null?t:Zr(o,a)}}var ok=gg(),ik=gg(!0);function pu(){return[]}function vu(){return!1}function ak(){return{}}function sk(){return""}function ck(){return!0}function lk(o,a){if(o=de(o),o<1||o>Qe)return[];var u=Kt,h=_t(o,Kt);a=X(a),o-=Kt;for(var p=_l(h,a);++u<o;)a(u);return p}function uk(o){return ce(o)?Ve(o,qn):Gt(o)?[o]:xt(Og(be(o)))}function dk(o){var a=++TT;return be(o)+a}var hk=as(function(o,a){return o+a},0),fk=Gl("ceil"),gk=as(function(o,a){return o/a},1),mk=Gl("floor");function pk(o){return o&&o.length?Za(o,Bt,Pl):t}function vk(o,a){return o&&o.length?Za(o,X(a,2),Pl):t}function yk(o){return pf(o,Bt)}function Ck(o,a){return pf(o,X(a,2))}function wk(o){return o&&o.length?Za(o,Bt,Ll):t}function _k(o,a){return o&&o.length?Za(o,X(a,2),Ll):t}var Tk=as(function(o,a){return o*a},1),Ek=Gl("round"),Sk=as(function(o,a){return o-a},0);function Ak(o){return o&&o.length?wl(o,Bt):0}function bk(o,a){return o&&o.length?wl(o,X(a,2)):0}return y.after=jA,y.ary=Hg,y.assign=Db,y.assignIn=tm,y.assignInWith=Cs,y.assignWith=Lb,y.at=Bb,y.before=$g,y.bind=iu,y.bindAll=$I,y.bindKey=Kg,y.castArray=ab,y.chain=Ug,y.chunk=mS,y.compact=pS,y.concat=vS,y.cond=KI,y.conforms=zI,y.constant=hu,y.countBy=AA,y.create=Ub,y.curry=zg,y.curryRight=Wg,y.debounce=qg,y.defaults=Vb,y.defaultsDeep=Fb,y.defer=YA,y.delay=JA,y.difference=yS,y.differenceBy=CS,y.differenceWith=wS,y.drop=_S,y.dropRight=TS,y.dropRightWhile=ES,y.dropWhile=SS,y.fill=AS,y.filter=IA,y.flatMap=OA,y.flatMapDeep=NA,y.flatMapDepth=PA,y.flatten=xg,y.flattenDeep=bS,y.flattenDepth=IS,y.flip=QA,y.flow=qI,y.flowRight=GI,y.fromPairs=kS,y.functions=Gb,y.functionsIn=jb,y.groupBy=MA,y.initial=OS,y.intersection=NS,y.intersectionBy=PS,y.intersectionWith=MS,y.invert=Jb,y.invertBy=Qb,y.invokeMap=DA,y.iteratee=fu,y.keyBy=LA,y.keys=st,y.keysIn=Lt,y.map=fs,y.mapKeys=Zb,y.mapValues=eI,y.matches=jI,y.matchesProperty=YI,y.memoize=ms,y.merge=tI,y.mergeWith=nm,y.method=JI,y.methodOf=QI,y.mixin=gu,y.negate=ps,y.nthArg=ZI,y.omit=nI,y.omitBy=rI,y.once=XA,y.orderBy=BA,y.over=ek,y.overArgs=ZA,y.overEvery=tk,y.overSome=nk,y.partial=au,y.partialRight=Gg,y.partition=UA,y.pick=oI,y.pickBy=rm,y.property=um,y.propertyOf=rk,y.pull=BS,y.pullAll=Lg,y.pullAllBy=US,y.pullAllWith=VS,y.pullAt=FS,y.range=ok,y.rangeRight=ik,y.rearg=eb,y.reject=HA,y.remove=HS,y.rest=tb,y.reverse=ru,y.sampleSize=KA,y.set=aI,y.setWith=sI,y.shuffle=zA,y.slice=$S,y.sortBy=GA,y.sortedUniq=YS,y.sortedUniqBy=JS,y.split=OI,y.spread=nb,y.tail=QS,y.take=XS,y.takeRight=ZS,y.takeRightWhile=eA,y.takeWhile=tA,y.tap=pA,y.throttle=rb,y.thru=hs,y.toArray=Xg,y.toPairs=om,y.toPairsIn=im,y.toPath=uk,y.toPlainObject=em,y.transform=cI,y.unary=ob,y.union=nA,y.unionBy=rA,y.unionWith=oA,y.uniq=iA,y.uniqBy=aA,y.uniqWith=sA,y.unset=lI,y.unzip=ou,y.unzipWith=Bg,y.update=uI,y.updateWith=dI,y.values=Bo,y.valuesIn=hI,y.without=cA,y.words=cm,y.wrap=ib,y.xor=lA,y.xorBy=uA,y.xorWith=dA,y.zip=hA,y.zipObject=fA,y.zipObjectDeep=gA,y.zipWith=mA,y.entries=om,y.entriesIn=im,y.extend=tm,y.extendWith=Cs,gu(y,y),y.add=hk,y.attempt=lm,y.camelCase=pI,y.capitalize=am,y.ceil=fk,y.clamp=fI,y.clone=sb,y.cloneDeep=lb,y.cloneDeepWith=ub,y.cloneWith=cb,y.conformsTo=db,y.deburr=sm,y.defaultTo=WI,y.divide=gk,y.endsWith=vI,y.eq=On,y.escape=yI,y.escapeRegExp=CI,y.every=bA,y.find=kA,y.findIndex=Pg,y.findKey=Hb,y.findLast=RA,y.findLastIndex=Mg,y.findLastKey=$b,y.floor=mk,y.forEach=Vg,y.forEachRight=Fg,y.forIn=Kb,y.forInRight=zb,y.forOwn=Wb,y.forOwnRight=qb,y.get=lu,y.gt=hb,y.gte=fb,y.has=Yb,y.hasIn=uu,y.head=Dg,y.identity=Bt,y.includes=xA,y.indexOf=RS,y.inRange=gI,y.invoke=Xb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=gb,y.isArrayLike=Dt,y.isArrayLikeObject=je,y.isBoolean=mb,y.isBuffer=xr,y.isDate=pb,y.isElement=vb,y.isEmpty=yb,y.isEqual=Cb,y.isEqualWith=wb,y.isError=su,y.isFinite=_b,y.isFunction=hr,y.isInteger=jg,y.isLength=vs,y.isMap=Yg,y.isMatch=Tb,y.isMatchWith=Eb,y.isNaN=Sb,y.isNative=Ab,y.isNil=Ib,y.isNull=bb,y.isNumber=Jg,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=cu,y.isSafeInteger=kb,y.isSet=Qg,y.isString=ys,y.isSymbol=Gt,y.isTypedArray=Lo,y.isUndefined=Rb,y.isWeakMap=Ob,y.isWeakSet=Nb,y.join=xS,y.kebabCase=wI,y.last=gn,y.lastIndexOf=DS,y.lowerCase=_I,y.lowerFirst=TI,y.lt=Pb,y.lte=Mb,y.max=pk,y.maxBy=vk,y.mean=yk,y.meanBy=Ck,y.min=wk,y.minBy=_k,y.stubArray=pu,y.stubFalse=vu,y.stubObject=ak,y.stubString=sk,y.stubTrue=ck,y.multiply=Tk,y.nth=LS,y.noConflict=XI,y.noop=mu,y.now=gs,y.pad=EI,y.padEnd=SI,y.padStart=AI,y.parseInt=bI,y.random=mI,y.reduce=VA,y.reduceRight=FA,y.repeat=II,y.replace=kI,y.result=iI,y.round=Ek,y.runInContext=b,y.sample=$A,y.size=WA,y.snakeCase=RI,y.some=qA,y.sortedIndex=KS,y.sortedIndexBy=zS,y.sortedIndexOf=WS,y.sortedLastIndex=qS,y.sortedLastIndexBy=GS,y.sortedLastIndexOf=jS,y.startCase=NI,y.startsWith=PI,y.subtract=Sk,y.sum=Ak,y.sumBy=bk,y.template=MI,y.times=lk,y.toFinite=fr,y.toInteger=de,y.toLength=Zg,y.toLower=xI,y.toNumber=mn,y.toSafeInteger=xb,y.toString=be,y.toUpper=DI,y.trim=LI,y.trimEnd=BI,y.trimStart=UI,y.truncate=VI,y.unescape=FI,y.uniqueId=dk,y.upperCase=HI,y.upperFirst=du,y.each=Vg,y.eachRight=Fg,y.first=Dg,gu(y,function(){var o={};return zn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,ln(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),ln(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=_t(u,h.__takeCount__):h.__views__.push({size:_t(u,Kt),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),ln(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==sn;pe.prototype[o]=function(p){var w=this.clone();return w.__iteratees__.push({iteratee:X(p,3),type:u}),w.__filtered__=w.__filtered__||h,w}}),ln(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),ln(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Bt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(u){return Hi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(ps(X(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take(Kt)},zn(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=y[h?"take"+(a=="last"?"Right":""):a],w=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,E=h?[1]:arguments,I=T instanceof pe,x=E[0],D=I||ce(T),L=function(me){var ve=p.apply(y,Ir([me],E));return h&&K?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(I=D=!1);var K=this.__chain__,Y=!!this.__actions__.length,Z=w&&!K,he=I&&!Y;if(!w&&D){T=he?T:new pe(this);var ee=o.apply(T,E);return ee.__actions__.push({func:hs,args:[L],thisArg:t}),new dn(ee,K)}return Z&&he?o.apply(this,E):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),ln(["pop","push","shift","sort","splice","unshift"],function(o){var a=Ua[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return a.apply(ce(w)?w:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),zn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(No,h)||(No[h]=[]),No[h].push({name:a,func:u})}}),No[is(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=FT,pe.prototype.reverse=HT,pe.prototype.value=$T,y.prototype.at=vA,y.prototype.chain=yA,y.prototype.commit=CA,y.prototype.next=wA,y.prototype.plant=TA,y.prototype.reverse=EA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=SA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=_A),y},ko=CT();jr?((jr.exports=ko)._=ko,fl._=ko):ht._=ko}).call(UB)}(ea,ea.exports)),ea.exports}var Ti=VB();const Qs=BB(Ti),FB={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-Dt8AVSly.js")),meta:{requiresAuth:!1}},HB={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-B1RnTlsN.js")),meta:{requiresAuth:!1}},{isAuthenticated:Wp,handleRedirect:$B}=kh(),KB=Yc();function zB(r,e){r.addRoute(FB),r.addRoute(HB),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!Wp.value){ie.value=!0;try{await $B(e),await KB.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}Wp.value&&i()})}const{scope:qp}=Yc();function WB(){const r=Mh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(qp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=qp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ei(r){const e=WB();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function qB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Hn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Fr=qB();function GB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Hn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Hr=GB();function jB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Hn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const en=jB();async function YB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Si(r,e,t=[]){const n=QB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>JB(s,i,t))}function JB(r,e,t){return t.some(n=>{const i=Qs.get(r,n);if(Qs.isNil(i))return!1;const s=Qs.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function QB(r){return Qs.trim(r).toLowerCase().replace(/\s+/g," ")}let xs=!1;const qu=c.ref(!1),pn=c.ref([]),Gp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Dw=()=>{const r=Hn(),e=async _=>{qu.value=!0;const A=_?`_active eq true and ${_}`:"_active eq true",R=await Fr.getOrgList(A);R&&(pn.value=R,xs=!0),qu.value=!1},t=async _=>{var A;return(A=pn.value)!=null&&A.length||await e(_),pn.value};function n(_){if(!pn.value)throw new Error("Data not stored yet");const A=Si(pn.value,_,["name","description"]);return _!==""?A:pn.value}const i=_=>{Gp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Fr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Fr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),xs&&pn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Fr.updateOrg(We.value);if(xs&&(_!=null&&_.data.__id)){const A=pn.value.findIndex(R=>R.__id===_.data.__id);return A!==-1?(pn.value[A]=_.data,r.success("Organization updated.")):r.error("Unable to update item"),ie.value=!1,_.data}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,We.value&&We.value.created_at){if(await Fr.deactivateOrg(We.value.__id),xs){const _=pn.value.findIndex(A=>{var R;return A.__id===((R=We.value)==null?void 0:R.__id)});if(_!==-1)return pn.value.splice(_,1),We.value;r.error("Unable to deactivate organization")}ie.value=!1}};async function m(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Hr.updateBranch(A)){ie.value=!1;return}if(qo.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Branch added successfully."),qo.value.push(A),A;r.info("Branch already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function v(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Hr.updateBranch(A)){ie.value=!1;return}const $=qo.value.findIndex(V=>V.__id===_.__id);if($!==-1)return qo.value.splice($,1),ie.value=!1,qo.value;throw new Error("Item not found to remove")}ie.value=!1}async function C(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await en.updateTeam(A)){ie.value=!1;return}if(Go.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Team added successfully."),Go.value.push(A),A;r.info("Team already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function S(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await en.updateTeam(A)){ie.value=!1;return}const $=Go.value.findIndex(V=>V.__id===_.__id);if($!==-1)return Go.value.splice($,1),ie.value=!1,Go.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:qu,columns:Gp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:qo,orgTeams:Go,linkBranch:m,unlinkBranch:v,linkTeam:C,unlinkTeam:S}};let Ds=!1;const vn=c.ref([]),jp=c.ref([]),ot=c.ref(null),Gu=c.ref(!1),jo=c.ref([]),Lw=()=>{const r=Hn(),e=async C=>{Gu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await en.getTeamList(S);_&&(vn.value=_,Ds=!0),Gu.value=!1},t=async C=>(vn.value.length||await e(C),vn.value);function n(C){if(!vn.value)throw new Error("Data not stored yet");const S=Si(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{jp.value=C},s=C=>{ot.value=Ti.cloneDeep(C)},l=async C=>await en.getTeam(C),d=async()=>{if(ot.value!=null){const C=await en.createTeam(ot.value);return C!=null&&C.data.created_at&&(r.success("Team created."),Ds&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const C=await en.updateTeam(ot.value);if(Ds&&(C!=null&&C.data.__id)){const S=vn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(vn.value[S]=C.data,r.success("Team updated.")):r.error("Unable to update item"),C.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await en.deactivateTeam(ot.value.__id),Ds)){const C=vn.value.findIndex(S=>{var _;return S.__id===((_=ot.value)==null?void 0:_.__id)});if(C!==-1)return vn.value.splice(C,1),ot.value;r.error("Unable to deactivate organization")}};async function m(C){var S;if(ie.value=!0,(S=ot.value)!=null&&S.__id)if(jo.value.findIndex(A=>A.__id===C.__id)===-1)try{const A=await en.linkManageUser(ot.value.__id,{team:ot.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),R=await en.getTeamUserList(ot.value.__id);return R&&(jo.value=R),r.success("User added successfully."),A}catch(A){console.error(A),r.error("Unable to add User.")}finally{ie.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");ie.value=!1}async function v(C){if(ie.value=!0,ot.value&&ot.value.__id){const S=jo.value.findIndex(_=>_.__id===C);if(S!==-1)return await en.unlinkManageUser(ot.value.__id,C),jo.value.splice(S,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:vn,loading:Gu,columns:jp,item:ot,usersTeam:jo,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:v}},Bw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var A,R,$;const{openDialog:e}=ya("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Yc(),{getData:l,data:d}=Dw(),{getData:f,data:g}=Lw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const v=c.ref({scope_type:(A=n.value)==null?void 0:A.scope_type,organization:((R=n.value)==null?void 0:R.organization)??"org",team:($=n.value)==null?void 0:$.team});function C(){var V,B,Q;v.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((B=n.value)==null?void 0:B.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const S=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return x1;case"org":return P1;case"team":return D1;default:return M1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(v.value)}return(V,B)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Be.VBtn,{onClick:C,icon:"",class:"text-secondary ms-2",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(S.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(wa),{loading:m.value,title:"Scope","dd-id":"global-scope__J-","on-save":_},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(_e.VRow,null,{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>B[3]||(B[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>B[4]||(B[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>B[5]||(B[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(Nk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:v.value.scope_type,"onUpdate:modelValue":B[0]||(B[0]=Q=>v.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>B[6]||(B[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Be.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>B[7]||(B[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Be.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>B[8]||(B[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Be.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>B[9]||(B[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>B[10]||(B[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:v.value.organization,"onUpdate:modelValue":B[1]||(B[1]=Q=>v.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>B[11]||(B[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(g),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:v.value.team,"onUpdate:modelValue":B[2]||(B[2]=Q=>v.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),XB={},ZB={class:"double-ring-spinner-container"};function eU(r,e){return c.openBlock(),c.createElementBlock("div",ZB,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Uw=vi(XB,[["render",eU],["__scopeId","data-v-00d7a69f"]]),tU={key:0,class:"_jspinner-overlay_jj"},Vw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",tU,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),nU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Kv,ColumnSettingsDialog:Fd,ConfirmDialog:Hv,ContextMenu:zv,CopyButton:Cc,DeleteAllBtn:Dd,DotsMenu:Vv,DotsMenuV1:Fv,EditButton:Lv,FormHeadless:Ty,FormMetadata:kc,GlobalScopeFilter:Bw,GlobalSpinner:Vw,JAvatar:$v,JBtn:ov,JDialog:wa,JForm:wy,JIconBtn:rv,JSelect:py,JTextArea:vy,JTextField:my,ParentCard:Sc,SpinnerLoader:Uw,TabFormHeader:_y,TableAdvanced:Qv,TableCard:Hd,TableCardsView:fy,TableHeader:Zv,UiTable:Wv},Symbol.toStringTag,{value:"Module"})),rU=aR(),oU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let ju=!1;const Yu=c.ref(!1),yn=c.ref([]),Yp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),iU=()=>{const r=Hn(),e=async C=>{Yu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await Hr.getBranchList(S);_&&(yn.value=_,ju=!0),Yu.value=!1},t=async C=>(yn.value.length||await e(C),yn.value);function n(C){if(!yn.value)throw new Error("Data not stored yet");const S=Si(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{Yp.value=C},s=C=>{gt.value=Ti.cloneDeep(C)},l=async C=>await Hr.getBranch(C),d=async()=>{if(gt.value!=null){const C=await Hr.createBranch(gt.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),ju&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(gt.value&&gt.value.__id){const C=await Hr.updateBranch(gt.value);if(ju&&C){const S=yn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(yn.value[S]=C.data,r.success("Branch updated.")):r.error("Unable to update item"),C}}else r.error("Unable to update item")},g=async()=>{if(gt.value&&gt.value.created_at){await Hr.deactivateBranch(gt.value.__id);const C=yn.value.findIndex(S=>{var _;return S.__id===((_=gt.value)==null?void 0:_.__id)});if(C!==-1)return yn.value.splice(C,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(C){ie.value=!0;try{if(gt.value&&gt.value.__id){const S={...C,branch:gt.value.__id};if(!await en.updateTeam(S)){r.error("Unable to link team");return}if(Yo.value.findIndex(R=>R.__id===C.__id)===-1)return r.success("Team added successfully."),Yo.value.push(S),S;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,gt.value&&gt.value.__id){const S={...C,branch:null};if(!await en.updateTeam(S))return;const A=Yo.value.findIndex(R=>R.__id===C.__id);if(A!==-1)return Yo.value.splice(A,1),ie.value=!1,Yo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:yn,columns:Yp,item:gt,loading:Yu,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:v}};function aU(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Hn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ti=aU();let Ju=!1;const Qu=c.ref(!1),Cn=c.ref([]),Jp=c.ref([]),mt=c.ref(null),Jo=c.ref([]),sU=()=>{const r=Hn(),e=async C=>{Qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await ti.getDivisionList(S);_&&(Cn.value=_,Ju=!0),Qu.value=!1},t=async C=>(Cn.value.length||await e(C),Cn.value);function n(C){if(!Cn.value)throw new Error("Data not stored yet");const S=Si(Cn.value,C,["name","description"]);return C!==""?S:Cn.value}const i=C=>{Jp.value=C},s=C=>{mt.value=Ti.cloneDeep(C)},l=async C=>await ti.getDivision(C),d=async()=>{if(mt.value!=null){const C=await ti.createDivision(mt.value);return C!=null&&C.data.created_at&&(r.success("Division created."),Ju&&Cn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const C=await ti.updateDivision(mt.value);if(Ju&&(C!=null&&C.data.__id)){const S=Cn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(Cn.value[S]=C.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,C}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,mt.value&&mt.value.created_at){await ti.deactivateDivision(mt.value.__id);const C=Cn.value.findIndex(S=>{var _;return S.__id===((_=mt.value)==null?void 0:_.__id)});if(C!==-1)return Cn.value.splice(C,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(C){ie.value=!0;try{if(mt.value&&mt.value.__id){const S={...C,division:mt.value.__id};return await Fr.updateOrg(S)?(Jo.value.findIndex(R=>R.__id===C.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(S)):r.info("Organization already added."),S):void 0}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,mt.value&&mt.value.__id){const S={...C,division:null};if(!await Fr.updateOrg(S))return;const A=Jo.value.findIndex(R=>R.__id===C.__id);if(A!==-1)Jo.value.splice(A,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ie.value=!1,Jo.value}return{data:Cn,columns:Jp,item:mt,loading:Qu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:v}};function cU(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Hn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ni=cU();let Xu=!1,Zu=c.ref(!1);const wn=c.ref([]),Qp=c.ref([]),_n=c.ref(null),lU=c.ref(null),uU=c.ref([]),dU=()=>{const r=Hn(),e=async m=>{Zu.value=!0;const v=m?`_active eq true and ${m}`:"_active eq true",C=await ni.getManageUserList(v);C&&(wn.value=C,Xu=!0),Zu.value=!1},t=async m=>(wn.value.length||await e(m),wn.value);function n(m){if(!wn.value)throw new Error("Data not stored yet");const v=Si(wn.value,m,["name","description"]);return m!==""?v:wn.value}return{data:wn,loading:Zu,columns:Qp,item:_n,filterData:n,__init__:e,getData:t,setColumns:m=>{Qp.value=m},setItem:m=>{_n.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(_n.value!=null){const m=crypto.randomUUID(),v=await ni.createManageUser({..._n.value,__id:m});return v!=null&&v.data.created_at&&(r.success("User created."),Xu&&wn.value.push(v.data)),v==null?void 0:v.data}},updateItem:async()=>{if(ie.value=!0,_n.value&&_n.value.created_at){const m=await ni.updateManageUser(_n.value);if(Xu&&(m!=null&&m.data)){const v=wn.value.findIndex(C=>C.__id===(m==null?void 0:m.data.__id));if(v!==-1)wn.value[v]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ie.value=!1,m==null?void 0:m.data}},removeItem:async()=>{if(_n.value&&_n.value.created_at){try{await ni.deactivateManageUser(_n.value.__id)}catch{r.error("Unable to deactivate user");return}const m=wn.value.findIndex(v=>{var C;return v.__id===((C=_n.value)==null?void 0:C.__id)});if(m!==-1)return wn.value.splice(m,1),_n.value}},userOrg:lU,userTeams:uU}},hU=r=>{r.use(rU),r.use(cO,oU),Object.entries(nU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Mk).forEach(([e,t])=>{r.provide(e,t)})},fU={install:hU};exports.ContextMenu=zv;exports.EventBus=Tc;exports.FormHeadless=Ty;exports.HttpCore=YB;exports.SpinnerLoader=Uw;exports.TableCardsView=fy;exports.TableHeader=Zv;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=Wv;exports._sfc_main$1=Qv;exports._sfc_main$10=Dd;exports._sfc_main$11=Lv;exports._sfc_main$12=wa;exports._sfc_main$13=rv;exports._sfc_main$14=py;exports._sfc_main$15=vy;exports._sfc_main$16=my;exports._sfc_main$17=wy;exports._sfc_main$18=_y;exports._sfc_main$19=Sc;exports._sfc_main$2=Fd;exports._sfc_main$20=$v;exports._sfc_main$21=Kv;exports._sfc_main$22=Bw;exports._sfc_main$23=Vw;exports._sfc_main$3=Hd;exports._sfc_main$4=Hv;exports._sfc_main$5=Cc;exports._sfc_main$6=Vv;exports._sfc_main$7=Fv;exports._sfc_main$8=kc;exports._sfc_main$9=ov;exports.branchInstance=Hr;exports.coreClient=Mh;exports.createToastInterface=fa;exports.dateFormat=Jv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=xd;exports.index=fU;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Fr;exports.provideToast=sO;exports.scopedClient=Ei;exports.setupAuthGuard=zB;exports.teamInstance=en;exports.toastInjectionKey=Ec;exports.useAuth=kh;exports.useBranchStore=iU;exports.useCustomizer=dR;exports.useDialog=ya;exports.useDivisionStore=sU;exports.useManageUserStore=dU;exports.useOrganizationStore=Dw;exports.useSession=Yc;exports.useTeamStore=Lw;exports.useToast=Hn;