jplan-pack 0.6.631 → 0.6.632

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),l=require("./index-BHnafw0s.js"),d=require("vuetify/lib/components/VBtn/index.mjs");/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),l=require("./index-C30WKG0I.js"),d=require("vuetify/lib/components/VBtn/index.mjs");/*!
2
2
  * vue-router v4.5.0
3
3
  * (c) 2024 Eduardo San Martin Morote
4
4
  * @license MIT
@@ -1,5 +1,5 @@
1
1
  import { inject as u, openBlock as d, createElementBlock as a, createElementVNode as r, createVNode as p, withCtx as i, createTextVNode as f } from "vue";
2
- import { _ as m } from "./index-DAcbUV6I.mjs";
2
+ import { _ as m } from "./index-CSo3vK_R.mjs";
3
3
  import { VBtn as _ } from "vuetify/lib/components/VBtn/index.mjs";
4
4
  /*!
5
5
  * vue-router v4.5.0
@@ -3,7 +3,7 @@ import "@vueuse/core";
3
3
  import "vuetify/lib/components/VBtn/index.mjs";
4
4
  import "vuetify/components";
5
5
  import "vuetify/lib/components/VIcon/index.mjs";
6
- import { m as t, S as g, _ as v } from "./index-DAcbUV6I.mjs";
6
+ import { m as t, S as g, _ as v } from "./index-CSo3vK_R.mjs";
7
7
  import "vuetify/lib/components/VCard/index.mjs";
8
8
  import "vuetify/lib/components/VDialog/index.mjs";
9
9
  import "vuetify/lib/components/VDivider/index.mjs";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("@vueuse/core");require("vuetify/lib/components/VBtn/index.mjs");require("vuetify/components");require("vuetify/lib/components/VIcon/index.mjs");const t=require("./index-BHnafw0s.js");require("vuetify/lib/components/VCard/index.mjs");require("vuetify/lib/components/VDialog/index.mjs");require("vuetify/lib/components/VDivider/index.mjs");require("vuetify/lib/components/VGrid/index.mjs");require("vuetify/lib/components/VAvatar/index.mjs");require("vuetify/lib/components/VImg/index.mjs");require("vuetify/lib/components/VList/index.mjs");require("vuetify/lib/components/VMenu/index.mjs");require("vuetify/lib/components/VDataTable/index.mjs");require("vuetify/lib/components/VTextField/index.mjs");require("vuetify/lib/components/VSelect/index.mjs");require("vuetify/lib/components/VCheckbox/index.mjs");require("vuetify/lib/components/VChip/index.mjs");require("vuetify/lib/components/VLabel/index.mjs");require("vuetify/lib/components/VTextarea/index.mjs");require("vuetify/lib/components/VBtnToggle/index.mjs");const c={class:"overlay"},l={class:"text-white"},d={class:"text-white"},q=e.defineComponent({__name:"AuthRoute",setup(p){const s=r=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:window.location.href,extraQueryParameters:r}),i=e.ref(!1);async function u(){t.msal.getAllAccounts().length===0&&(i.value=!0);const r=await t.msal.handleRedirectPromise();if(!r){await t.msal.initialize();const n=s();await t.msal.loginRedirect(n);return}t.msal.setActiveAccount(r.account)}e.onMounted(async()=>{await t.msal.initialize(),await u()});const o=[{title:"Authenticating...",subtitle:"Please wait."},{title:"Authorized",subtitle:"If this window don't closed automatically, you can close it now."}],a=e.computed(()=>i.value?o[0]:o[1]);return(r,n)=>(e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("h3",l,e.toDisplayString(a.value.title),1),e.createVNode(e.unref(t.SpinnerLoader)),e.createElementVNode("p",d,e.toDisplayString(a.value.subtitle),1)]))}}),m=t._export_sfc(q,[["__scopeId","data-v-b7679fd7"]]);exports.default=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("@vueuse/core");require("vuetify/lib/components/VBtn/index.mjs");require("vuetify/components");require("vuetify/lib/components/VIcon/index.mjs");const t=require("./index-C30WKG0I.js");require("vuetify/lib/components/VCard/index.mjs");require("vuetify/lib/components/VDialog/index.mjs");require("vuetify/lib/components/VDivider/index.mjs");require("vuetify/lib/components/VGrid/index.mjs");require("vuetify/lib/components/VAvatar/index.mjs");require("vuetify/lib/components/VImg/index.mjs");require("vuetify/lib/components/VList/index.mjs");require("vuetify/lib/components/VMenu/index.mjs");require("vuetify/lib/components/VDataTable/index.mjs");require("vuetify/lib/components/VTextField/index.mjs");require("vuetify/lib/components/VSelect/index.mjs");require("vuetify/lib/components/VCheckbox/index.mjs");require("vuetify/lib/components/VChip/index.mjs");require("vuetify/lib/components/VLabel/index.mjs");require("vuetify/lib/components/VTextarea/index.mjs");require("vuetify/lib/components/VBtnToggle/index.mjs");const c={class:"overlay"},l={class:"text-white"},d={class:"text-white"},q=e.defineComponent({__name:"AuthRoute",setup(p){const s=r=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:window.location.href,extraQueryParameters:r}),i=e.ref(!1);async function u(){t.msal.getAllAccounts().length===0&&(i.value=!0);const r=await t.msal.handleRedirectPromise();if(!r){await t.msal.initialize();const n=s();await t.msal.loginRedirect(n);return}t.msal.setActiveAccount(r.account)}e.onMounted(async()=>{await t.msal.initialize(),await u()});const o=[{title:"Authenticating...",subtitle:"Please wait."},{title:"Authorized",subtitle:"If this window don't closed automatically, you can close it now."}],a=e.computed(()=>i.value?o[0]:o[1]);return(r,n)=>(e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("h3",l,e.toDisplayString(a.value.title),1),e.createVNode(e.unref(t.SpinnerLoader)),e.createElementVNode("p",d,e.toDisplayString(a.value.subtitle),1)]))}}),m=t._export_sfc(q,[["__scopeId","data-v-b7679fd7"]]);exports.default=m;
@@ -89,4 +89,4 @@ __p += '`),ve&&(L+=`' +
89
89
  function print() { __p += __j.call(arguments, '') }
90
90
  `:`;
91
91
  `)+L+`return __p
92
- }`;var he=mm(function(){return Ee(C,Y+"return "+L).apply(t,T)});if(he.source=L,cu(he))throw he;return he}function MI(o){return be(o).toLowerCase()}function xI(o){return be(o).toUpperCase()}function DI(o,a,u){if(o=be(o),o&&(u||a===t))return Sf(o);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=kn(a),C=Af(h,p),T=bf(h,p)+1;return Pr(h,C,T).join("")}function LI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,kf(o)+1);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=bf(h,kn(a))+1;return Pr(h,0,p).join("")}function UI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(cl,"");if(!o||!(a=Wt(a)))return o;var h=kn(o),p=Af(h,kn(a));return Pr(h,p).join("")}function BI(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?Wt(a.omission):h}o=be(o);var C=o.length;if(bo(o)){var T=kn(o);C=T.length}if(u>=C)return o;var S=u-Io(h);if(S<1)return h;var I=T?Pr(T,0,S).join(""):o.slice(0,S);if(p===t)return I+h;if(T&&(S+=I.length-S),lu(p)){if(o.slice(S).search(p)){var x,D=I;for(p.global||(p=Al(p.source,be(Wh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?S:L)}}else if(o.indexOf(Wt(p),S)!=S){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function VI(o){return o=be(o),o&&Jw.test(o)?o.replace($h,gT):o}var FI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),hu=pg("toUpperCase");function gm(o,a,u){return o=be(o),a=u?t:a,a===t?lT(o)?vT(o):eT(o):o.match(a)||[]}var mm=fe(function(o,a){try{return Kt(o,t,a)}catch(u){return cu(u)?u:new ae(u)}}),HI=lr(function(o,a){return cn(a,function(u){u=Wn(u),sr(o,u,au(o[u],o))}),o});function $I(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new ln(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var C=o[p];if(Kt(C[0],this,h))return Kt(C[1],this,h)}})}function KI(o){return gE(dn(o,w))}function fu(o){return function(){return o}}function zI(o,a){return o==null||o!==o?a:o}var WI=yg(),qI=yg(!0);function Bt(o){return o}function gu(o){return jf(typeof o=="function"?o:dn(o,w))}function GI(o){return Jf(dn(o,w))}function jI(o,a){return Qf(o,dn(a,w))}var YI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),JI=fe(function(o,a){return function(u){return Hi(o,u,a)}});function mu(o,a,u){var h=st(a),p=ts(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=ts(a,st(a)));var C=!($e(u)&&"chain"in u)||!!u.chain,T=dr(o);return cn(p,function(S){var I=a[S];o[S]=I,T&&(o.prototype[S]=function(){var x=this.__chain__;if(C||x){var D=o(this.__wrapped__),L=D.__actions__=Dt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,br([this.value()],arguments))})}),o}function QI(){return ht._===this&&(ht._=ET),this}function pu(){}function XI(o){return o=de(o),fe(function(a){return Xf(a,o)})}var ZI=Gl(Ve),ek=Gl(Cf),tk=Gl(yl);function pm(o){return eu(o)?Cl(Wn(o)):OE(o)}function nk(o){return function(a){return o==null?t:Zr(o,a)}}var rk=wg(),ok=wg(!0);function vu(){return[]}function yu(){return!1}function ik(){return{}}function ak(){return""}function sk(){return!0}function ck(o,a){if(o=de(o),o<1||o>Qe)return[];var u=$t,h=_t(o,$t);a=X(a),o-=$t;for(var p=Tl(h,a);++u<o;)a(u);return p}function lk(o){return ce(o)?Ve(o,Wn):qt(o)?[o]:Dt(Lg(be(o)))}function uk(o){var a=++_T;return be(o)+a}var dk=ss(function(o,a){return o+a},0),hk=jl("ceil"),fk=ss(function(o,a){return o/a},1),gk=jl("floor");function mk(o){return o&&o.length?es(o,Bt,Ml):t}function pk(o,a){return o&&o.length?es(o,X(a,2),Ml):t}function vk(o){return Tf(o,Bt)}function yk(o,a){return Tf(o,X(a,2))}function Ck(o){return o&&o.length?es(o,Bt,Ul):t}function wk(o,a){return o&&o.length?es(o,X(a,2),Ul):t}var _k=ss(function(o,a){return o*a},1),Tk=jl("round"),Ek=ss(function(o,a){return o-a},0);function Sk(o){return o&&o.length?_l(o,Bt):0}function Ak(o,a){return o&&o.length?_l(o,X(a,2)):0}return y.after=GA,y.ary=Gg,y.assign=xb,y.assignIn=sm,y.assignInWith=ws,y.assignWith=Db,y.at=Lb,y.before=jg,y.bind=au,y.bindAll=HI,y.bindKey=Yg,y.castArray=ib,y.chain=zg,y.chunk=gS,y.compact=mS,y.concat=pS,y.cond=$I,y.conforms=KI,y.constant=fu,y.countBy=SA,y.create=Ub,y.curry=Jg,y.curryRight=Qg,y.debounce=Xg,y.defaults=Bb,y.defaultsDeep=Vb,y.defer=jA,y.delay=YA,y.difference=vS,y.differenceBy=yS,y.differenceWith=CS,y.drop=wS,y.dropRight=_S,y.dropRightWhile=TS,y.dropWhile=ES,y.fill=SS,y.filter=bA,y.flatMap=RA,y.flatMapDeep=NA,y.flatMapDepth=OA,y.flatten=Fg,y.flattenDeep=AS,y.flattenDepth=bS,y.flip=JA,y.flow=WI,y.flowRight=qI,y.fromPairs=IS,y.functions=qb,y.functionsIn=Gb,y.groupBy=PA,y.initial=RS,y.intersection=NS,y.intersectionBy=OS,y.intersectionWith=PS,y.invert=Yb,y.invertBy=Jb,y.invokeMap=xA,y.iteratee=gu,y.keyBy=DA,y.keys=st,y.keysIn=Ut,y.map=gs,y.mapKeys=Xb,y.mapValues=Zb,y.matches=GI,y.matchesProperty=jI,y.memoize=ps,y.merge=eI,y.mergeWith=cm,y.method=YI,y.methodOf=JI,y.mixin=mu,y.negate=vs,y.nthArg=XI,y.omit=tI,y.omitBy=nI,y.once=QA,y.orderBy=LA,y.over=ZI,y.overArgs=XA,y.overEvery=ek,y.overSome=tk,y.partial=su,y.partialRight=Zg,y.partition=UA,y.pick=rI,y.pickBy=lm,y.property=pm,y.propertyOf=nk,y.pull=LS,y.pullAll=$g,y.pullAllBy=US,y.pullAllWith=BS,y.pullAt=VS,y.range=rk,y.rangeRight=ok,y.rearg=ZA,y.reject=FA,y.remove=FS,y.rest=eb,y.reverse=ou,y.sampleSize=$A,y.set=iI,y.setWith=aI,y.shuffle=KA,y.slice=HS,y.sortBy=qA,y.sortedUniq=jS,y.sortedUniqBy=YS,y.split=RI,y.spread=tb,y.tail=JS,y.take=QS,y.takeRight=XS,y.takeRightWhile=ZS,y.takeWhile=eA,y.tap=mA,y.throttle=nb,y.thru=fs,y.toArray=om,y.toPairs=um,y.toPairsIn=dm,y.toPath=lk,y.toPlainObject=am,y.transform=sI,y.unary=rb,y.union=tA,y.unionBy=nA,y.unionWith=rA,y.uniq=oA,y.uniqBy=iA,y.uniqWith=aA,y.unset=cI,y.unzip=iu,y.unzipWith=Kg,y.update=lI,y.updateWith=uI,y.values=Uo,y.valuesIn=dI,y.without=sA,y.words=gm,y.wrap=ob,y.xor=cA,y.xorBy=lA,y.xorWith=uA,y.zip=dA,y.zipObject=hA,y.zipObjectDeep=fA,y.zipWith=gA,y.entries=um,y.entriesIn=dm,y.extend=sm,y.extendWith=ws,mu(y,y),y.add=dk,y.attempt=mm,y.camelCase=mI,y.capitalize=hm,y.ceil=hk,y.clamp=hI,y.clone=ab,y.cloneDeep=cb,y.cloneDeepWith=lb,y.cloneWith=sb,y.conformsTo=ub,y.deburr=fm,y.defaultTo=zI,y.divide=fk,y.endsWith=pI,y.eq=Nn,y.escape=vI,y.escapeRegExp=yI,y.every=AA,y.find=IA,y.findIndex=Bg,y.findKey=Fb,y.findLast=kA,y.findLastIndex=Vg,y.findLastKey=Hb,y.floor=gk,y.forEach=Wg,y.forEachRight=qg,y.forIn=$b,y.forInRight=Kb,y.forOwn=zb,y.forOwnRight=Wb,y.get=uu,y.gt=db,y.gte=hb,y.has=jb,y.hasIn=du,y.head=Hg,y.identity=Bt,y.includes=MA,y.indexOf=kS,y.inRange=fI,y.invoke=Qb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=fb,y.isArrayLike=Lt,y.isArrayLikeObject=je,y.isBoolean=gb,y.isBuffer=Mr,y.isDate=mb,y.isElement=pb,y.isEmpty=vb,y.isEqual=yb,y.isEqualWith=Cb,y.isError=cu,y.isFinite=wb,y.isFunction=dr,y.isInteger=em,y.isLength=ys,y.isMap=tm,y.isMatch=_b,y.isMatchWith=Tb,y.isNaN=Eb,y.isNative=Sb,y.isNil=bb,y.isNull=Ab,y.isNumber=nm,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=lu,y.isSafeInteger=Ib,y.isSet=rm,y.isString=Cs,y.isSymbol=qt,y.isTypedArray=Lo,y.isUndefined=kb,y.isWeakMap=Rb,y.isWeakSet=Nb,y.join=MS,y.kebabCase=CI,y.last=fn,y.lastIndexOf=xS,y.lowerCase=wI,y.lowerFirst=_I,y.lt=Ob,y.lte=Pb,y.max=mk,y.maxBy=pk,y.mean=vk,y.meanBy=yk,y.min=Ck,y.minBy=wk,y.stubArray=vu,y.stubFalse=yu,y.stubObject=ik,y.stubString=ak,y.stubTrue=sk,y.multiply=_k,y.nth=DS,y.noConflict=QI,y.noop=pu,y.now=ms,y.pad=TI,y.padEnd=EI,y.padStart=SI,y.parseInt=AI,y.random=gI,y.reduce=BA,y.reduceRight=VA,y.repeat=bI,y.replace=II,y.result=oI,y.round=Tk,y.runInContext=b,y.sample=HA,y.size=zA,y.snakeCase=kI,y.some=WA,y.sortedIndex=$S,y.sortedIndexBy=KS,y.sortedIndexOf=zS,y.sortedLastIndex=WS,y.sortedLastIndexBy=qS,y.sortedLastIndexOf=GS,y.startCase=NI,y.startsWith=OI,y.subtract=Ek,y.sum=Sk,y.sumBy=Ak,y.template=PI,y.times=ck,y.toFinite=hr,y.toInteger=de,y.toLength=im,y.toLower=MI,y.toNumber=gn,y.toSafeInteger=Mb,y.toString=be,y.toUpper=xI,y.trim=DI,y.trimEnd=LI,y.trimStart=UI,y.truncate=BI,y.unescape=VI,y.uniqueId=uk,y.upperCase=FI,y.upperFirst=hu,y.each=Wg,y.eachRight=qg,y.first=Hg,mu(y,function(){var o={};return Kn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),cn(["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,$t),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),cn(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==an;pe.prototype[o]=function(p){var C=this.clone();return C.__iteratees__.push({iteratee:X(p,3),type:u}),C.__filtered__=C.__filtered__||h,C}}),cn(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),cn(["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(vs(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($t)},Kn(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],C=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,S=h?[1]:arguments,I=T instanceof pe,x=S[0],D=I||ce(T),L=function(me){var ve=p.apply(y,br([me],S));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=C&&!K,he=I&&!Y;if(!C&&D){T=he?T:new pe(this);var ee=o.apply(T,S);return ee.__actions__.push({func:fs,args:[L],thisArg:t}),new un(ee,K)}return Z&&he?o.apply(this,S):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),cn(["pop","push","shift","sort","splice","unshift"],function(o){var a=Va[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 C=this.value();return a.apply(ce(C)?C:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),Kn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(Oo,h)||(Oo[h]=[]),Oo[h].push({name:a,func:u})}}),Oo[as(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=VT,pe.prototype.reverse=FT,pe.prototype.value=HT,y.prototype.at=pA,y.prototype.chain=vA,y.prototype.commit=yA,y.prototype.next=CA,y.prototype.plant=_A,y.prototype.reverse=TA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=EA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=wA),y},ko=yT();jr?((jr.exports=ko)._=ko,gl._=ko):ht._=ko}).call(qU)}(ea,ea.exports)),ea.exports}var Ti=GU();const Xs=WU(Ti),jU={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-Dd50c4I_.js")),meta:{requiresAuth:!1}},YU={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-BGdJhx1m.js")),meta:{requiresAuth:!1}},{isAuthenticated:Yp,handleRedirect:JU}=xh(),QU=Jc();function XU(r,e){r.addRoute(jU),r.addRoute(YU),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!Yp.value){ie.value=!0;try{await JU(e,t.fullPath),await QU.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}if(Yp.value){if(localStorage.getItem("returnRoute")&&localStorage.getItem("returnRoute")!==null){const d=localStorage.getItem("returnRoute")??"/";console.log("trying to go to saved route:",d),i(d),localStorage.removeItem("returnRoute");return}i()}})}const{scope:Jp}=Jc();function ZU(){const r=Vh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Jp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Jp.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=ZU();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 eB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Fn();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 Vr=eB();function tB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Fn();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 Fr=tB();function nB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Fn();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 Zt=nB();async function rB({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=iB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>oB(s,i,t))}function oB(r,e,t){return t.some(n=>{const i=Xs.get(r,n);if(Xs.isNil(i))return!1;const s=Xs.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function iB(r){return Xs.trim(r).toLowerCase().replace(/\s+/g," ")}let Ds=!1;const Gu=c.ref(!1),mn=c.ref([]),Qp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Mw=()=>{const r=Fn(),e=async _=>{Gu.value=!0;const A=_?`_active eq true and ${_}`:"_active eq true",R=await Vr.getOrgList(A);R&&(mn.value=R,Ds=!0),Gu.value=!1},t=async _=>{var A;return(A=mn.value)!=null&&A.length||await e(_),mn.value};function n(_){if(!mn.value)throw new Error("Data not stored yet");const A=Si(mn.value,_,["name","description"]);return _!==""?A:mn.value}const i=_=>{Qp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Vr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Vr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),Ds&&mn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Vr.updateOrg(We.value);if(Ds&&(_!=null&&_.data.__id)){const A=mn.value.findIndex(R=>R.__id===_.data.__id);return A!==-1?(mn.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 Vr.deactivateOrg(We.value.__id),Ds){const _=mn.value.findIndex(A=>{var R;return A.__id===((R=We.value)==null?void 0:R.__id)});if(_!==-1)return mn.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 Fr.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 w(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Fr.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 v(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Zt.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 E(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Zt.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:mn,loading:Gu,columns:Qp,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:w,linkTeam:v,unlinkTeam:E}};let Ls=!1;const pn=c.ref([]),Xp=c.ref([]),ot=c.ref(null),ju=c.ref(!1),jo=c.ref([]),xw=()=>{const r=Fn(),e=async v=>{ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Zt.getTeamList(E);_&&(pn.value=_,Ls=!0),ju.value=!1},t=async v=>(pn.value.length||await e(v),pn.value);function n(v){if(!pn.value)throw new Error("Data not stored yet");const E=Si(pn.value,v,["name","description"]);return v!==""?E:pn.value}const i=v=>{Xp.value=v},s=v=>{ot.value=Ti.cloneDeep(v)},l=async v=>await Zt.getTeam(v),d=async()=>{if(ot.value!=null){const v=await Zt.createTeam(ot.value);return v!=null&&v.data.created_at&&(r.success("Team created."),Ls&&pn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const v=await Zt.updateTeam(ot.value);if(Ls&&(v!=null&&v.data.__id)){const E=pn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(pn.value[E]=v.data,r.success("Team updated.")):r.error("Unable to update item"),v.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await Zt.deactivateTeam(ot.value.__id),Ls)){const v=pn.value.findIndex(E=>{var _;return E.__id===((_=ot.value)==null?void 0:_.__id)});if(v!==-1)return pn.value.splice(v,1),ot.value;r.error("Unable to deactivate organization")}};async function m(v){var E;if(ie.value=!0,(E=ot.value)!=null&&E.__id)if(jo.value.findIndex(A=>A.__id===v.__id)===-1)try{const A=await Zt.linkManageUser(ot.value.__id,{team:ot.value.__id,user:v.__id,role:"string",joined_at:"string",comments:"string"}),R=await Zt.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 w(v){if(ie.value=!0,ot.value&&ot.value.__id){const E=jo.value.findIndex(_=>_.__id===v);if(E!==-1)return await Zt.unlinkManageUser(ot.value.__id,v),jo.value.splice(E,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:ju,columns:Xp,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:w}},Dw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var A,R,$;const{openDialog:e}=ya("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Jc(),{getData:l,data:d}=Mw(),{getData:f,data:g}=xw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const w=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 v(){var V,U,Q;w.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((U=n.value)==null?void 0:U.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const E=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return F1;case"org":return B1;case"team":return H1;default:return V1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(w.value)}return(V,U)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ue.VBtn,{onClick:v,icon:"",class:"text-secondary",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(E.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(Ae.VRow,null,{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[3]||(U[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(St.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(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[4]||(U[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[5]||(U[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(St.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:w.value.scope_type,"onUpdate:modelValue":U[0]||(U[0]=Q=>w.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Ue.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>U[6]||(U[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Ue.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>U[7]||(U[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Ue.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>U[8]||(U[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Ue.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>U[9]||(U[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(()=>U[10]||(U[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:w.value.organization,"onUpdate:modelValue":U[1]||(U[1]=Q=>w.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[11]||(U[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:w.value.team,"onUpdate:modelValue":U[2]||(U[2]=Q=>w.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),aB={},sB={class:"double-ring-spinner-container"};function cB(r,e){return c.openBlock(),c.createElementBlock("div",sB,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 Lw=vi(aB,[["render",cB],["__scopeId","data-v-00d7a69f"]]),lB={key:0,class:"_jspinner-overlay_jj"},Uw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",lB,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)}}),Bw=c.defineComponent({__name:"SubMenu",props:{title:{}},setup(r,{expose:e}){return e({props:r}),(n,i)=>(c.openBlock(),c.createBlock(St.VListItem,{class:"ms-2",onClick:i[0]||(i[0]=()=>{}),density:"compact"},{append:c.withCtx(()=>[c.createVNode(c.unref($1))]),default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title),1)]),_:1}),c.createVNode(Ud.VMenu,{activator:"parent","open-on-hover":"",submenu:"",density:"compact"},{default:c.withCtx(()=>[c.renderSlot(n.$slots,"default")]),_:3})]),_:3}))}}),uB=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Hv,ColumnSettingsDialog:qd,ConfirmDialog:Vv,ContextMenu:$v,CopyButton:wc,DeleteAllBtn:Hd,DotsMenu:Bv,EditButton:Uv,FormHeadless:Cy,FormMetadata:Nc,GlobalScopeFilter:Dw,GlobalSpinner:Uw,JAvatar:Fv,JBtn:iv,JDialog:wa,JForm:vy,JIconBtn:ov,JSelect:fy,JTextArea:gy,JTextField:hy,ParentCard:Ac,SearchFilter:kc,SpinnerLoader:Lw,SubMenu:Bw,TabFormHeader:yy,TableAdvanced:Yv,TableCard:Gd,TableCardsView:uy,TableHeader:Jv,UiTable:Kv},Symbol.toStringTag,{value:"Module"})),dB=iR(),hB={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let Yu=!1;const Ju=c.ref(!1),vn=c.ref([]),Zp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),fB=()=>{const r=Fn(),e=async v=>{Ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Fr.getBranchList(E);_&&(vn.value=_,Yu=!0),Ju.value=!1},t=async v=>(vn.value.length||await e(v),vn.value);function n(v){if(!vn.value)throw new Error("Data not stored yet");const E=Si(vn.value,v,["name","description"]);return v!==""?E:vn.value}const i=v=>{Zp.value=v},s=v=>{gt.value=Ti.cloneDeep(v)},l=async v=>await Fr.getBranch(v),d=async()=>{if(gt.value!=null){const v=await Fr.createBranch(gt.value);return v!=null&&v.data.created_at&&(r.success("Branch created."),Yu&&vn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(gt.value&&gt.value.__id){const v=await Fr.updateBranch(gt.value);if(Yu&&v){const E=vn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(vn.value[E]=v.data,r.success("Branch updated.")):r.error("Unable to update item"),v}}else r.error("Unable to update item")},g=async()=>{if(gt.value&&gt.value.created_at){await Fr.deactivateBranch(gt.value.__id);const v=vn.value.findIndex(E=>{var _;return E.__id===((_=gt.value)==null?void 0:_.__id)});if(v!==-1)return vn.value.splice(v,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(v){ie.value=!0;try{if(gt.value&&gt.value.__id){const E={...v,branch:gt.value.__id};if(!await Zt.updateTeam(E)){r.error("Unable to link team");return}if(Yo.value.findIndex(R=>R.__id===v.__id)===-1)return r.success("Team added successfully."),Yo.value.push(E),E;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,gt.value&&gt.value.__id){const E={...v,branch:null};if(!await Zt.updateTeam(E))return;const A=Yo.value.findIndex(R=>R.__id===v.__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:vn,columns:Zp,item:gt,loading:Ju,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:w}};function gB(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Fn();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=gB();let Qu=!1;const Xu=c.ref(!1),yn=c.ref([]),ev=c.ref([]),mt=c.ref(null),Jo=c.ref([]),mB=()=>{const r=Fn(),e=async v=>{Xu.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await ti.getDivisionList(E);_&&(yn.value=_,Qu=!0),Xu.value=!1},t=async v=>(yn.value.length||await e(v),yn.value);function n(v){if(!yn.value)throw new Error("Data not stored yet");const E=Si(yn.value,v,["name","description"]);return v!==""?E:yn.value}const i=v=>{ev.value=v},s=v=>{mt.value=Ti.cloneDeep(v)},l=async v=>await ti.getDivision(v),d=async()=>{if(mt.value!=null){const v=await ti.createDivision(mt.value);return v!=null&&v.data.created_at&&(r.success("Division created."),Qu&&yn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const v=await ti.updateDivision(mt.value);if(Qu&&(v!=null&&v.data.__id)){const E=yn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(yn.value[E]=v.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,v}}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 v=yn.value.findIndex(E=>{var _;return E.__id===((_=mt.value)==null?void 0:_.__id)});if(v!==-1)return yn.value.splice(v,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(v){ie.value=!0;try{if(mt.value&&mt.value.__id){const E={...v,division:mt.value.__id};return await Vr.updateOrg(E)?(Jo.value.findIndex(R=>R.__id===v.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(E)):r.info("Organization already added."),E):void 0}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,mt.value&&mt.value.__id){const E={...v,division:null};if(!await Vr.updateOrg(E))return;const A=Jo.value.findIndex(R=>R.__id===v.__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:yn,columns:ev,item:mt,loading:Xu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:w}};function pB(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Fn();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=pB();let Zu=!1,ed=c.ref(!1);const Cn=c.ref([]),tv=c.ref([]),wn=c.ref(null),vB=c.ref(null),yB=c.ref([]),CB=()=>{const r=Fn(),e=async m=>{ed.value=!0;const w=m?`_active eq true and ${m}`:"_active eq true",v=await ni.getManageUserList(w);v&&(Cn.value=v,Zu=!0),ed.value=!1},t=async m=>(Cn.value.length||await e(m),Cn.value);function n(m){if(!Cn.value)throw new Error("Data not stored yet");const w=Si(Cn.value,m,["name","description"]);return m!==""?w:Cn.value}return{data:Cn,loading:ed,columns:tv,item:wn,filterData:n,__init__:e,getData:t,setColumns:m=>{tv.value=m},setItem:m=>{wn.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(wn.value!=null){const m=crypto.randomUUID(),w=await ni.createManageUser({...wn.value,__id:m});return w!=null&&w.data.created_at&&(r.success("User created."),Zu&&Cn.value.push(w.data)),w==null?void 0:w.data}},updateItem:async()=>{if(ie.value=!0,wn.value&&wn.value.created_at){const m=await ni.updateManageUser(wn.value);if(Zu&&(m!=null&&m.data)){const w=Cn.value.findIndex(v=>v.__id===(m==null?void 0:m.data.__id));if(w!==-1)Cn.value[w]=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(wn.value&&wn.value.created_at){try{await ni.deactivateManageUser(wn.value.__id)}catch{r.error("Unable to deactivate user");return}const m=Cn.value.findIndex(w=>{var v;return w.__id===((v=wn.value)==null?void 0:v.__id)});if(m!==-1)return Cn.value.splice(m,1),wn.value}},userOrg:vB,userTeams:yB}},wB=r=>{r.use(dB),r.use(s0,hB),Object.entries(uB).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Pk).forEach(([e,t])=>{r.provide(e,t)})},_B={install:wB};exports.ContextMenu=$v;exports.EmptyListImg=od;exports.EventBus=Ec;exports.FormHeadless=Cy;exports.HttpCore=rB;exports.SpinnerLoader=Lw;exports.TableCardsView=uy;exports.TableHeader=Jv;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=Kv;exports._sfc_main$1=Yv;exports._sfc_main$10=Hd;exports._sfc_main$11=Uv;exports._sfc_main$12=ov;exports._sfc_main$13=fy;exports._sfc_main$14=gy;exports._sfc_main$15=hy;exports._sfc_main$16=vy;exports._sfc_main$17=yy;exports._sfc_main$18=Ac;exports._sfc_main$19=Fv;exports._sfc_main$2=qd;exports._sfc_main$20=Hv;exports._sfc_main$21=wa;exports._sfc_main$22=Bw;exports._sfc_main$23=Dw;exports._sfc_main$24=Uw;exports._sfc_main$3=Gd;exports._sfc_main$4=kc;exports._sfc_main$5=Vv;exports._sfc_main$6=wc;exports._sfc_main$7=Bv;exports._sfc_main$8=Nc;exports._sfc_main$9=iv;exports.branchInstance=Fr;exports.coreClient=Vh;exports.createToastInterface=fa;exports.dateFormat=jv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=Fd;exports.index=_B;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Vr;exports.provideToast=a0;exports.scopedClient=Ei;exports.setupAuthGuard=XU;exports.teamInstance=Zt;exports.toastInjectionKey=Sc;exports.useAuth=xh;exports.useBranchStore=fB;exports.useCustomizer=uR;exports.useDialog=ya;exports.useDivisionStore=mB;exports.useManageUserStore=CB;exports.useOrganizationStore=Mw;exports.useSession=Jc;exports.useTeamStore=xw;exports.useToast=Fn;
92
+ }`;var he=mm(function(){return Ee(C,Y+"return "+L).apply(t,T)});if(he.source=L,cu(he))throw he;return he}function MI(o){return be(o).toLowerCase()}function xI(o){return be(o).toUpperCase()}function DI(o,a,u){if(o=be(o),o&&(u||a===t))return Sf(o);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=kn(a),C=Af(h,p),T=bf(h,p)+1;return Pr(h,C,T).join("")}function LI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,kf(o)+1);if(!o||!(a=Wt(a)))return o;var h=kn(o),p=bf(h,kn(a))+1;return Pr(h,0,p).join("")}function UI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(cl,"");if(!o||!(a=Wt(a)))return o;var h=kn(o),p=Af(h,kn(a));return Pr(h,p).join("")}function BI(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?Wt(a.omission):h}o=be(o);var C=o.length;if(bo(o)){var T=kn(o);C=T.length}if(u>=C)return o;var S=u-Io(h);if(S<1)return h;var I=T?Pr(T,0,S).join(""):o.slice(0,S);if(p===t)return I+h;if(T&&(S+=I.length-S),lu(p)){if(o.slice(S).search(p)){var x,D=I;for(p.global||(p=Al(p.source,be(Wh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?S:L)}}else if(o.indexOf(Wt(p),S)!=S){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function VI(o){return o=be(o),o&&Jw.test(o)?o.replace($h,gT):o}var FI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),hu=pg("toUpperCase");function gm(o,a,u){return o=be(o),a=u?t:a,a===t?lT(o)?vT(o):eT(o):o.match(a)||[]}var mm=fe(function(o,a){try{return Kt(o,t,a)}catch(u){return cu(u)?u:new ae(u)}}),HI=lr(function(o,a){return cn(a,function(u){u=Wn(u),sr(o,u,au(o[u],o))}),o});function $I(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new ln(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var C=o[p];if(Kt(C[0],this,h))return Kt(C[1],this,h)}})}function KI(o){return gE(dn(o,w))}function fu(o){return function(){return o}}function zI(o,a){return o==null||o!==o?a:o}var WI=yg(),qI=yg(!0);function Bt(o){return o}function gu(o){return jf(typeof o=="function"?o:dn(o,w))}function GI(o){return Jf(dn(o,w))}function jI(o,a){return Qf(o,dn(a,w))}var YI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),JI=fe(function(o,a){return function(u){return Hi(o,u,a)}});function mu(o,a,u){var h=st(a),p=ts(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=ts(a,st(a)));var C=!($e(u)&&"chain"in u)||!!u.chain,T=dr(o);return cn(p,function(S){var I=a[S];o[S]=I,T&&(o.prototype[S]=function(){var x=this.__chain__;if(C||x){var D=o(this.__wrapped__),L=D.__actions__=Dt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,br([this.value()],arguments))})}),o}function QI(){return ht._===this&&(ht._=ET),this}function pu(){}function XI(o){return o=de(o),fe(function(a){return Xf(a,o)})}var ZI=Gl(Ve),ek=Gl(Cf),tk=Gl(yl);function pm(o){return eu(o)?Cl(Wn(o)):OE(o)}function nk(o){return function(a){return o==null?t:Zr(o,a)}}var rk=wg(),ok=wg(!0);function vu(){return[]}function yu(){return!1}function ik(){return{}}function ak(){return""}function sk(){return!0}function ck(o,a){if(o=de(o),o<1||o>Qe)return[];var u=$t,h=_t(o,$t);a=X(a),o-=$t;for(var p=Tl(h,a);++u<o;)a(u);return p}function lk(o){return ce(o)?Ve(o,Wn):qt(o)?[o]:Dt(Lg(be(o)))}function uk(o){var a=++_T;return be(o)+a}var dk=ss(function(o,a){return o+a},0),hk=jl("ceil"),fk=ss(function(o,a){return o/a},1),gk=jl("floor");function mk(o){return o&&o.length?es(o,Bt,Ml):t}function pk(o,a){return o&&o.length?es(o,X(a,2),Ml):t}function vk(o){return Tf(o,Bt)}function yk(o,a){return Tf(o,X(a,2))}function Ck(o){return o&&o.length?es(o,Bt,Ul):t}function wk(o,a){return o&&o.length?es(o,X(a,2),Ul):t}var _k=ss(function(o,a){return o*a},1),Tk=jl("round"),Ek=ss(function(o,a){return o-a},0);function Sk(o){return o&&o.length?_l(o,Bt):0}function Ak(o,a){return o&&o.length?_l(o,X(a,2)):0}return y.after=GA,y.ary=Gg,y.assign=xb,y.assignIn=sm,y.assignInWith=ws,y.assignWith=Db,y.at=Lb,y.before=jg,y.bind=au,y.bindAll=HI,y.bindKey=Yg,y.castArray=ib,y.chain=zg,y.chunk=gS,y.compact=mS,y.concat=pS,y.cond=$I,y.conforms=KI,y.constant=fu,y.countBy=SA,y.create=Ub,y.curry=Jg,y.curryRight=Qg,y.debounce=Xg,y.defaults=Bb,y.defaultsDeep=Vb,y.defer=jA,y.delay=YA,y.difference=vS,y.differenceBy=yS,y.differenceWith=CS,y.drop=wS,y.dropRight=_S,y.dropRightWhile=TS,y.dropWhile=ES,y.fill=SS,y.filter=bA,y.flatMap=RA,y.flatMapDeep=NA,y.flatMapDepth=OA,y.flatten=Fg,y.flattenDeep=AS,y.flattenDepth=bS,y.flip=JA,y.flow=WI,y.flowRight=qI,y.fromPairs=IS,y.functions=qb,y.functionsIn=Gb,y.groupBy=PA,y.initial=RS,y.intersection=NS,y.intersectionBy=OS,y.intersectionWith=PS,y.invert=Yb,y.invertBy=Jb,y.invokeMap=xA,y.iteratee=gu,y.keyBy=DA,y.keys=st,y.keysIn=Ut,y.map=gs,y.mapKeys=Xb,y.mapValues=Zb,y.matches=GI,y.matchesProperty=jI,y.memoize=ps,y.merge=eI,y.mergeWith=cm,y.method=YI,y.methodOf=JI,y.mixin=mu,y.negate=vs,y.nthArg=XI,y.omit=tI,y.omitBy=nI,y.once=QA,y.orderBy=LA,y.over=ZI,y.overArgs=XA,y.overEvery=ek,y.overSome=tk,y.partial=su,y.partialRight=Zg,y.partition=UA,y.pick=rI,y.pickBy=lm,y.property=pm,y.propertyOf=nk,y.pull=LS,y.pullAll=$g,y.pullAllBy=US,y.pullAllWith=BS,y.pullAt=VS,y.range=rk,y.rangeRight=ok,y.rearg=ZA,y.reject=FA,y.remove=FS,y.rest=eb,y.reverse=ou,y.sampleSize=$A,y.set=iI,y.setWith=aI,y.shuffle=KA,y.slice=HS,y.sortBy=qA,y.sortedUniq=jS,y.sortedUniqBy=YS,y.split=RI,y.spread=tb,y.tail=JS,y.take=QS,y.takeRight=XS,y.takeRightWhile=ZS,y.takeWhile=eA,y.tap=mA,y.throttle=nb,y.thru=fs,y.toArray=om,y.toPairs=um,y.toPairsIn=dm,y.toPath=lk,y.toPlainObject=am,y.transform=sI,y.unary=rb,y.union=tA,y.unionBy=nA,y.unionWith=rA,y.uniq=oA,y.uniqBy=iA,y.uniqWith=aA,y.unset=cI,y.unzip=iu,y.unzipWith=Kg,y.update=lI,y.updateWith=uI,y.values=Uo,y.valuesIn=dI,y.without=sA,y.words=gm,y.wrap=ob,y.xor=cA,y.xorBy=lA,y.xorWith=uA,y.zip=dA,y.zipObject=hA,y.zipObjectDeep=fA,y.zipWith=gA,y.entries=um,y.entriesIn=dm,y.extend=sm,y.extendWith=ws,mu(y,y),y.add=dk,y.attempt=mm,y.camelCase=mI,y.capitalize=hm,y.ceil=hk,y.clamp=hI,y.clone=ab,y.cloneDeep=cb,y.cloneDeepWith=lb,y.cloneWith=sb,y.conformsTo=ub,y.deburr=fm,y.defaultTo=zI,y.divide=fk,y.endsWith=pI,y.eq=Nn,y.escape=vI,y.escapeRegExp=yI,y.every=AA,y.find=IA,y.findIndex=Bg,y.findKey=Fb,y.findLast=kA,y.findLastIndex=Vg,y.findLastKey=Hb,y.floor=gk,y.forEach=Wg,y.forEachRight=qg,y.forIn=$b,y.forInRight=Kb,y.forOwn=zb,y.forOwnRight=Wb,y.get=uu,y.gt=db,y.gte=hb,y.has=jb,y.hasIn=du,y.head=Hg,y.identity=Bt,y.includes=MA,y.indexOf=kS,y.inRange=fI,y.invoke=Qb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=fb,y.isArrayLike=Lt,y.isArrayLikeObject=je,y.isBoolean=gb,y.isBuffer=Mr,y.isDate=mb,y.isElement=pb,y.isEmpty=vb,y.isEqual=yb,y.isEqualWith=Cb,y.isError=cu,y.isFinite=wb,y.isFunction=dr,y.isInteger=em,y.isLength=ys,y.isMap=tm,y.isMatch=_b,y.isMatchWith=Tb,y.isNaN=Eb,y.isNative=Sb,y.isNil=bb,y.isNull=Ab,y.isNumber=nm,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=lu,y.isSafeInteger=Ib,y.isSet=rm,y.isString=Cs,y.isSymbol=qt,y.isTypedArray=Lo,y.isUndefined=kb,y.isWeakMap=Rb,y.isWeakSet=Nb,y.join=MS,y.kebabCase=CI,y.last=fn,y.lastIndexOf=xS,y.lowerCase=wI,y.lowerFirst=_I,y.lt=Ob,y.lte=Pb,y.max=mk,y.maxBy=pk,y.mean=vk,y.meanBy=yk,y.min=Ck,y.minBy=wk,y.stubArray=vu,y.stubFalse=yu,y.stubObject=ik,y.stubString=ak,y.stubTrue=sk,y.multiply=_k,y.nth=DS,y.noConflict=QI,y.noop=pu,y.now=ms,y.pad=TI,y.padEnd=EI,y.padStart=SI,y.parseInt=AI,y.random=gI,y.reduce=BA,y.reduceRight=VA,y.repeat=bI,y.replace=II,y.result=oI,y.round=Tk,y.runInContext=b,y.sample=HA,y.size=zA,y.snakeCase=kI,y.some=WA,y.sortedIndex=$S,y.sortedIndexBy=KS,y.sortedIndexOf=zS,y.sortedLastIndex=WS,y.sortedLastIndexBy=qS,y.sortedLastIndexOf=GS,y.startCase=NI,y.startsWith=OI,y.subtract=Ek,y.sum=Sk,y.sumBy=Ak,y.template=PI,y.times=ck,y.toFinite=hr,y.toInteger=de,y.toLength=im,y.toLower=MI,y.toNumber=gn,y.toSafeInteger=Mb,y.toString=be,y.toUpper=xI,y.trim=DI,y.trimEnd=LI,y.trimStart=UI,y.truncate=BI,y.unescape=VI,y.uniqueId=uk,y.upperCase=FI,y.upperFirst=hu,y.each=Wg,y.eachRight=qg,y.first=Hg,mu(y,function(){var o={};return Kn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),cn(["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,$t),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),cn(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==an;pe.prototype[o]=function(p){var C=this.clone();return C.__iteratees__.push({iteratee:X(p,3),type:u}),C.__filtered__=C.__filtered__||h,C}}),cn(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),cn(["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(vs(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($t)},Kn(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],C=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,S=h?[1]:arguments,I=T instanceof pe,x=S[0],D=I||ce(T),L=function(me){var ve=p.apply(y,br([me],S));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=C&&!K,he=I&&!Y;if(!C&&D){T=he?T:new pe(this);var ee=o.apply(T,S);return ee.__actions__.push({func:fs,args:[L],thisArg:t}),new un(ee,K)}return Z&&he?o.apply(this,S):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),cn(["pop","push","shift","sort","splice","unshift"],function(o){var a=Va[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 C=this.value();return a.apply(ce(C)?C:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),Kn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(Oo,h)||(Oo[h]=[]),Oo[h].push({name:a,func:u})}}),Oo[as(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=VT,pe.prototype.reverse=FT,pe.prototype.value=HT,y.prototype.at=pA,y.prototype.chain=vA,y.prototype.commit=yA,y.prototype.next=CA,y.prototype.plant=_A,y.prototype.reverse=TA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=EA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=wA),y},ko=yT();jr?((jr.exports=ko)._=ko,gl._=ko):ht._=ko}).call(qU)}(ea,ea.exports)),ea.exports}var Ti=GU();const Xs=WU(Ti),jU={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-oWS_RAsC.js")),meta:{requiresAuth:!1}},YU={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-BwJZ4NoO.js")),meta:{requiresAuth:!1}},{isAuthenticated:Yp,handleRedirect:JU}=xh(),QU=Jc();function XU(r,e){r.addRoute(jU),r.addRoute(YU),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!Yp.value){ie.value=!0;try{await JU(e,t.fullPath),await QU.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}if(Yp.value){if(localStorage.getItem("returnRoute")&&localStorage.getItem("returnRoute")!==null){const d=localStorage.getItem("returnRoute")??"/";console.log("trying to go to saved route:",d),i(d),localStorage.removeItem("returnRoute");return}i()}})}const{scope:Jp}=Jc();function ZU(){const r=Vh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Jp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Jp.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=ZU();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 eB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Fn();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 Vr=eB();function tB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Fn();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 Fr=tB();function nB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Fn();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 Zt=nB();async function rB({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=iB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>oB(s,i,t))}function oB(r,e,t){return t.some(n=>{const i=Xs.get(r,n);if(Xs.isNil(i))return!1;const s=Xs.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function iB(r){return Xs.trim(r).toLowerCase().replace(/\s+/g," ")}let Ds=!1;const Gu=c.ref(!1),mn=c.ref([]),Qp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Mw=()=>{const r=Fn(),e=async _=>{Gu.value=!0;const A=_?`_active eq true and ${_}`:"_active eq true",R=await Vr.getOrgList(A);R&&(mn.value=R,Ds=!0),Gu.value=!1},t=async _=>{var A;return(A=mn.value)!=null&&A.length||await e(_),mn.value};function n(_){if(!mn.value)throw new Error("Data not stored yet");const A=Si(mn.value,_,["name","description"]);return _!==""?A:mn.value}const i=_=>{Qp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Vr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Vr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),Ds&&mn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Vr.updateOrg(We.value);if(Ds&&(_!=null&&_.data.__id)){const A=mn.value.findIndex(R=>R.__id===_.data.__id);return A!==-1?(mn.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 Vr.deactivateOrg(We.value.__id),Ds){const _=mn.value.findIndex(A=>{var R;return A.__id===((R=We.value)==null?void 0:R.__id)});if(_!==-1)return mn.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 Fr.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 w(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Fr.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 v(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Zt.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 E(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Zt.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:mn,loading:Gu,columns:Qp,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:w,linkTeam:v,unlinkTeam:E}};let Ls=!1;const pn=c.ref([]),Xp=c.ref([]),ot=c.ref(null),ju=c.ref(!1),jo=c.ref([]),xw=()=>{const r=Fn(),e=async v=>{ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Zt.getTeamList(E);_&&(pn.value=_,Ls=!0),ju.value=!1},t=async v=>(pn.value.length||await e(v),pn.value);function n(v){if(!pn.value)throw new Error("Data not stored yet");const E=Si(pn.value,v,["name","description"]);return v!==""?E:pn.value}const i=v=>{Xp.value=v},s=v=>{ot.value=Ti.cloneDeep(v)},l=async v=>await Zt.getTeam(v),d=async()=>{if(ot.value!=null){const v=await Zt.createTeam(ot.value);return v!=null&&v.data.created_at&&(r.success("Team created."),Ls&&pn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const v=await Zt.updateTeam(ot.value);if(Ls&&(v!=null&&v.data.__id)){const E=pn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(pn.value[E]=v.data,r.success("Team updated.")):r.error("Unable to update item"),v.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await Zt.deactivateTeam(ot.value.__id),Ls)){const v=pn.value.findIndex(E=>{var _;return E.__id===((_=ot.value)==null?void 0:_.__id)});if(v!==-1)return pn.value.splice(v,1),ot.value;r.error("Unable to deactivate organization")}};async function m(v){var E;if(ie.value=!0,(E=ot.value)!=null&&E.__id)if(jo.value.findIndex(A=>A.__id===v.__id)===-1)try{const A=await Zt.linkManageUser(ot.value.__id,{team:ot.value.__id,user:v.__id,role:"string",joined_at:"string",comments:"string"}),R=await Zt.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 w(v){if(ie.value=!0,ot.value&&ot.value.__id){const E=jo.value.findIndex(_=>_.__id===v);if(E!==-1)return await Zt.unlinkManageUser(ot.value.__id,v),jo.value.splice(E,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:ju,columns:Xp,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:w}},Dw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var A,R,$;const{openDialog:e}=ya("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Jc(),{getData:l,data:d}=Mw(),{getData:f,data:g}=xw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const w=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 v(){var V,U,Q;w.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((U=n.value)==null?void 0:U.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const E=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return F1;case"org":return B1;case"team":return H1;default:return V1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(w.value)}return(V,U)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ue.VBtn,{onClick:v,icon:"",class:"text-secondary",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(E.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(Ae.VRow,null,{default:c.withCtx(()=>[c.createVNode(Ae.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[3]||(U[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(St.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(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[4]||(U[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(St.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(Ae.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(St.VListItem,null,{default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>U[5]||(U[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(St.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:w.value.scope_type,"onUpdate:modelValue":U[0]||(U[0]=Q=>w.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Ue.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>U[6]||(U[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Ue.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>U[7]||(U[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Ue.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>U[8]||(U[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Ue.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>U[9]||(U[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(()=>U[10]||(U[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:w.value.organization,"onUpdate:modelValue":U[1]||(U[1]=Q=>w.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[11]||(U[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:w.value.team,"onUpdate:modelValue":U[2]||(U[2]=Q=>w.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),aB={},sB={class:"double-ring-spinner-container"};function cB(r,e){return c.openBlock(),c.createElementBlock("div",sB,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 Lw=vi(aB,[["render",cB],["__scopeId","data-v-00d7a69f"]]),lB={key:0,class:"_jspinner-overlay_jj"},Uw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",lB,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)}}),Bw=c.defineComponent({__name:"SubMenu",props:{title:{}},setup(r,{expose:e}){return e({props:r}),(n,i)=>(c.openBlock(),c.createBlock(St.VListItem,{onClick:i[0]||(i[0]=()=>{}),density:"compact"},{append:c.withCtx(()=>[c.createVNode(c.unref($1))]),default:c.withCtx(()=>[c.createVNode(St.VListItemTitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title),1)]),_:1}),c.createVNode(Ud.VMenu,{activator:"parent","open-on-hover":"",submenu:"",density:"compact"},{default:c.withCtx(()=>[c.renderSlot(n.$slots,"default")]),_:3})]),_:3}))}}),uB=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Hv,ColumnSettingsDialog:qd,ConfirmDialog:Vv,ContextMenu:$v,CopyButton:wc,DeleteAllBtn:Hd,DotsMenu:Bv,EditButton:Uv,FormHeadless:Cy,FormMetadata:Nc,GlobalScopeFilter:Dw,GlobalSpinner:Uw,JAvatar:Fv,JBtn:iv,JDialog:wa,JForm:vy,JIconBtn:ov,JSelect:fy,JTextArea:gy,JTextField:hy,ParentCard:Ac,SearchFilter:kc,SpinnerLoader:Lw,SubMenu:Bw,TabFormHeader:yy,TableAdvanced:Yv,TableCard:Gd,TableCardsView:uy,TableHeader:Jv,UiTable:Kv},Symbol.toStringTag,{value:"Module"})),dB=iR(),hB={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let Yu=!1;const Ju=c.ref(!1),vn=c.ref([]),Zp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),fB=()=>{const r=Fn(),e=async v=>{Ju.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await Fr.getBranchList(E);_&&(vn.value=_,Yu=!0),Ju.value=!1},t=async v=>(vn.value.length||await e(v),vn.value);function n(v){if(!vn.value)throw new Error("Data not stored yet");const E=Si(vn.value,v,["name","description"]);return v!==""?E:vn.value}const i=v=>{Zp.value=v},s=v=>{gt.value=Ti.cloneDeep(v)},l=async v=>await Fr.getBranch(v),d=async()=>{if(gt.value!=null){const v=await Fr.createBranch(gt.value);return v!=null&&v.data.created_at&&(r.success("Branch created."),Yu&&vn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(gt.value&&gt.value.__id){const v=await Fr.updateBranch(gt.value);if(Yu&&v){const E=vn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(vn.value[E]=v.data,r.success("Branch updated.")):r.error("Unable to update item"),v}}else r.error("Unable to update item")},g=async()=>{if(gt.value&&gt.value.created_at){await Fr.deactivateBranch(gt.value.__id);const v=vn.value.findIndex(E=>{var _;return E.__id===((_=gt.value)==null?void 0:_.__id)});if(v!==-1)return vn.value.splice(v,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(v){ie.value=!0;try{if(gt.value&&gt.value.__id){const E={...v,branch:gt.value.__id};if(!await Zt.updateTeam(E)){r.error("Unable to link team");return}if(Yo.value.findIndex(R=>R.__id===v.__id)===-1)return r.success("Team added successfully."),Yo.value.push(E),E;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,gt.value&&gt.value.__id){const E={...v,branch:null};if(!await Zt.updateTeam(E))return;const A=Yo.value.findIndex(R=>R.__id===v.__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:vn,columns:Zp,item:gt,loading:Ju,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:w}};function gB(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Fn();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=gB();let Qu=!1;const Xu=c.ref(!1),yn=c.ref([]),ev=c.ref([]),mt=c.ref(null),Jo=c.ref([]),mB=()=>{const r=Fn(),e=async v=>{Xu.value=!0;const E=v?`_active eq true and ${v}`:"_active eq true",_=await ti.getDivisionList(E);_&&(yn.value=_,Qu=!0),Xu.value=!1},t=async v=>(yn.value.length||await e(v),yn.value);function n(v){if(!yn.value)throw new Error("Data not stored yet");const E=Si(yn.value,v,["name","description"]);return v!==""?E:yn.value}const i=v=>{ev.value=v},s=v=>{mt.value=Ti.cloneDeep(v)},l=async v=>await ti.getDivision(v),d=async()=>{if(mt.value!=null){const v=await ti.createDivision(mt.value);return v!=null&&v.data.created_at&&(r.success("Division created."),Qu&&yn.value.push(v.data)),v==null?void 0:v.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const v=await ti.updateDivision(mt.value);if(Qu&&(v!=null&&v.data.__id)){const E=yn.value.findIndex(_=>_.__id===v.data.__id);return E!==-1?(yn.value[E]=v.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,v}}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 v=yn.value.findIndex(E=>{var _;return E.__id===((_=mt.value)==null?void 0:_.__id)});if(v!==-1)return yn.value.splice(v,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(v){ie.value=!0;try{if(mt.value&&mt.value.__id){const E={...v,division:mt.value.__id};return await Vr.updateOrg(E)?(Jo.value.findIndex(R=>R.__id===v.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(E)):r.info("Organization already added."),E):void 0}else throw new Error("Item is not defined")}catch(E){console.error(E)}finally{ie.value=!1}}async function w(v){if(ie.value=!0,mt.value&&mt.value.__id){const E={...v,division:null};if(!await Vr.updateOrg(E))return;const A=Jo.value.findIndex(R=>R.__id===v.__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:yn,columns:ev,item:mt,loading:Xu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:w}};function pB(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Fn();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=pB();let Zu=!1,ed=c.ref(!1);const Cn=c.ref([]),tv=c.ref([]),wn=c.ref(null),vB=c.ref(null),yB=c.ref([]),CB=()=>{const r=Fn(),e=async m=>{ed.value=!0;const w=m?`_active eq true and ${m}`:"_active eq true",v=await ni.getManageUserList(w);v&&(Cn.value=v,Zu=!0),ed.value=!1},t=async m=>(Cn.value.length||await e(m),Cn.value);function n(m){if(!Cn.value)throw new Error("Data not stored yet");const w=Si(Cn.value,m,["name","description"]);return m!==""?w:Cn.value}return{data:Cn,loading:ed,columns:tv,item:wn,filterData:n,__init__:e,getData:t,setColumns:m=>{tv.value=m},setItem:m=>{wn.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(wn.value!=null){const m=crypto.randomUUID(),w=await ni.createManageUser({...wn.value,__id:m});return w!=null&&w.data.created_at&&(r.success("User created."),Zu&&Cn.value.push(w.data)),w==null?void 0:w.data}},updateItem:async()=>{if(ie.value=!0,wn.value&&wn.value.created_at){const m=await ni.updateManageUser(wn.value);if(Zu&&(m!=null&&m.data)){const w=Cn.value.findIndex(v=>v.__id===(m==null?void 0:m.data.__id));if(w!==-1)Cn.value[w]=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(wn.value&&wn.value.created_at){try{await ni.deactivateManageUser(wn.value.__id)}catch{r.error("Unable to deactivate user");return}const m=Cn.value.findIndex(w=>{var v;return w.__id===((v=wn.value)==null?void 0:v.__id)});if(m!==-1)return Cn.value.splice(m,1),wn.value}},userOrg:vB,userTeams:yB}},wB=r=>{r.use(dB),r.use(s0,hB),Object.entries(uB).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Pk).forEach(([e,t])=>{r.provide(e,t)})},_B={install:wB};exports.ContextMenu=$v;exports.EmptyListImg=od;exports.EventBus=Ec;exports.FormHeadless=Cy;exports.HttpCore=rB;exports.SpinnerLoader=Lw;exports.TableCardsView=uy;exports.TableHeader=Jv;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=Kv;exports._sfc_main$1=Yv;exports._sfc_main$10=Hd;exports._sfc_main$11=Uv;exports._sfc_main$12=ov;exports._sfc_main$13=fy;exports._sfc_main$14=gy;exports._sfc_main$15=hy;exports._sfc_main$16=vy;exports._sfc_main$17=yy;exports._sfc_main$18=Ac;exports._sfc_main$19=Fv;exports._sfc_main$2=qd;exports._sfc_main$20=Hv;exports._sfc_main$21=wa;exports._sfc_main$22=Bw;exports._sfc_main$23=Dw;exports._sfc_main$24=Uw;exports._sfc_main$3=Gd;exports._sfc_main$4=kc;exports._sfc_main$5=Vv;exports._sfc_main$6=wc;exports._sfc_main$7=Bv;exports._sfc_main$8=Nc;exports._sfc_main$9=iv;exports.branchInstance=Fr;exports.coreClient=Vh;exports.createToastInterface=fa;exports.dateFormat=jv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=Fd;exports.index=_B;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Vr;exports.provideToast=a0;exports.scopedClient=Ei;exports.setupAuthGuard=XU;exports.teamInstance=Zt;exports.toastInjectionKey=Sc;exports.useAuth=xh;exports.useBranchStore=fB;exports.useCustomizer=uR;exports.useDialog=ya;exports.useDivisionStore=mB;exports.useManageUserStore=CB;exports.useOrganizationStore=Mw;exports.useSession=Jc;exports.useTeamStore=xw;exports.useToast=Fn;
@@ -23662,11 +23662,11 @@ function print() { __p += __j.call(arguments, '') }
23662
23662
  var Bi = eH();
23663
23663
  const Rc = /* @__PURE__ */ X2(Bi), tH = {
23664
23664
  path: "/_/dashboard",
23665
- component: () => import("./AuthRoute-BdDlmbDz.mjs"),
23665
+ component: () => import("./AuthRoute-Eq-RSAEF.mjs"),
23666
23666
  meta: { requiresAuth: !1 }
23667
23667
  }, nH = {
23668
23668
  path: "/jplan-auth-fail",
23669
- component: () => import("./AuthFailRoute-mVMKoQvM.mjs"),
23669
+ component: () => import("./AuthFailRoute-MNlDzkTb.mjs"),
23670
23670
  meta: { requiresAuth: !1 }
23671
23671
  }, { isAuthenticated: Mv, handleRedirect: rH } = L_(), oH = wf();
23672
23672
  function XH(r, e) {
@@ -24552,7 +24552,6 @@ const vH = /* @__PURE__ */ ja(gH, [["render", pH], ["__scopeId", "data-v-00d7a69
24552
24552
  return e({
24553
24553
  props: r
24554
24554
  }), (n, i) => (U(), Z(Ca, {
24555
- class: "ms-2",
24556
24555
  onClick: i[0] || (i[0] = () => {
24557
24556
  }),
24558
24557
  density: "compact"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BHnafw0s.js");require("@vueuse/core");exports.AvatarPicture=e._sfc_main$20;exports.ColumnSettingsDialog=e._sfc_main$2;exports.ConfirmDialog=e._sfc_main$5;exports.ContextMenu=e.ContextMenu;exports.CopyButton=e._sfc_main$6;exports.DeleteAllBtn=e._sfc_main$10;exports.DotsMenu=e._sfc_main$7;exports.EditButton=e._sfc_main$11;exports.EmptyListImg=e.EmptyListImg;exports.EventBus=e.EventBus;exports.FormHeadless=e.FormHeadless;exports.FormMetadata=e._sfc_main$8;exports.GlobalScopeFilter=e._sfc_main$23;exports.GlobalSpinner=e._sfc_main$24;exports.HttpCore=e.HttpCore;exports.JAvatar=e._sfc_main$19;exports.JBtn=e._sfc_main$9;exports.JDialog=e._sfc_main$21;exports.JForm=e._sfc_main$16;exports.JIconBtn=e._sfc_main$12;exports.JSelect=e._sfc_main$13;exports.JTextArea=e._sfc_main$14;exports.JTextField=e._sfc_main$15;Object.defineProperty(exports,"POSITION",{enumerable:!0,get:()=>e.POSITION});exports.ParentCard=e._sfc_main$18;exports.SearchFilter=e._sfc_main$4;exports.SpinnerLoader=e.SpinnerLoader;exports.SubMenu=e._sfc_main$22;Object.defineProperty(exports,"TYPE",{enumerable:!0,get:()=>e.TYPE});exports.TabFormHeader=e._sfc_main$17;exports.TableAdvanced=e._sfc_main$1;exports.TableCard=e._sfc_main$3;exports.TableCardsView=e.TableCardsView;exports.TableHeader=e.TableHeader;exports.UiTable=e._sfc_main;exports.__spinner=e.__spinner;exports.branchInstance=e.branchInstance;exports.coreClient=e.coreClient;exports.createToastInterface=e.createToastInterface;exports.dateFormat=e.dateFormat;exports.default=e.index;exports.divisionInstance=e.divisionInstance;exports.filterQuery=e.filterQuery;exports.globalEventBus=e.globalEventBus;exports.manageUserInstance=e.manageUserInstance;exports.orgInstance=e.orgInstance;exports.provideToast=e.provideToast;exports.scopedClient=e.scopedClient;exports.setupAuthGuard=e.setupAuthGuard;exports.teamInstance=e.teamInstance;exports.toastInjectionKey=e.toastInjectionKey;exports.useAuth=e.useAuth;exports.useBranchStore=e.useBranchStore;exports.useCustomizer=e.useCustomizer;exports.useDialog=e.useDialog;exports.useDivisionStore=e.useDivisionStore;exports.useManageUserStore=e.useManageUserStore;exports.useOrganizationStore=e.useOrganizationStore;exports.useSession=e.useSession;exports.useTeamStore=e.useTeamStore;exports.useToast=e.useToast;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-C30WKG0I.js");require("@vueuse/core");exports.AvatarPicture=e._sfc_main$20;exports.ColumnSettingsDialog=e._sfc_main$2;exports.ConfirmDialog=e._sfc_main$5;exports.ContextMenu=e.ContextMenu;exports.CopyButton=e._sfc_main$6;exports.DeleteAllBtn=e._sfc_main$10;exports.DotsMenu=e._sfc_main$7;exports.EditButton=e._sfc_main$11;exports.EmptyListImg=e.EmptyListImg;exports.EventBus=e.EventBus;exports.FormHeadless=e.FormHeadless;exports.FormMetadata=e._sfc_main$8;exports.GlobalScopeFilter=e._sfc_main$23;exports.GlobalSpinner=e._sfc_main$24;exports.HttpCore=e.HttpCore;exports.JAvatar=e._sfc_main$19;exports.JBtn=e._sfc_main$9;exports.JDialog=e._sfc_main$21;exports.JForm=e._sfc_main$16;exports.JIconBtn=e._sfc_main$12;exports.JSelect=e._sfc_main$13;exports.JTextArea=e._sfc_main$14;exports.JTextField=e._sfc_main$15;Object.defineProperty(exports,"POSITION",{enumerable:!0,get:()=>e.POSITION});exports.ParentCard=e._sfc_main$18;exports.SearchFilter=e._sfc_main$4;exports.SpinnerLoader=e.SpinnerLoader;exports.SubMenu=e._sfc_main$22;Object.defineProperty(exports,"TYPE",{enumerable:!0,get:()=>e.TYPE});exports.TabFormHeader=e._sfc_main$17;exports.TableAdvanced=e._sfc_main$1;exports.TableCard=e._sfc_main$3;exports.TableCardsView=e.TableCardsView;exports.TableHeader=e.TableHeader;exports.UiTable=e._sfc_main;exports.__spinner=e.__spinner;exports.branchInstance=e.branchInstance;exports.coreClient=e.coreClient;exports.createToastInterface=e.createToastInterface;exports.dateFormat=e.dateFormat;exports.default=e.index;exports.divisionInstance=e.divisionInstance;exports.filterQuery=e.filterQuery;exports.globalEventBus=e.globalEventBus;exports.manageUserInstance=e.manageUserInstance;exports.orgInstance=e.orgInstance;exports.provideToast=e.provideToast;exports.scopedClient=e.scopedClient;exports.setupAuthGuard=e.setupAuthGuard;exports.teamInstance=e.teamInstance;exports.toastInjectionKey=e.toastInjectionKey;exports.useAuth=e.useAuth;exports.useBranchStore=e.useBranchStore;exports.useCustomizer=e.useCustomizer;exports.useDialog=e.useDialog;exports.useDivisionStore=e.useDivisionStore;exports.useManageUserStore=e.useManageUserStore;exports.useOrganizationStore=e.useOrganizationStore;exports.useSession=e.useSession;exports.useTeamStore=e.useTeamStore;exports.useToast=e.useToast;
@@ -1,4 +1,4 @@
1
- import { D as t, f as n, k as r, C as o, l as i, q as l, n as u, r as c, P as d, Q as m, F as S, o as T, H as p, I as b, M as g, B as C, p as I, E as v, y as B, t as F, v as J, w as A, x as D, R as f, A as h, j as E, S as M, G as x, U as y, z as H, e as P, g as G, h as O, T as U, d as z, a as L, a0 as j, c as w, V as K, O as N, i as Q, Z as V, N as Y, W as _, a2 as k, $ as q, X as R, a8 as W, s as X, a1 as Z, Y as $, b as aa, a5 as sa, J as ea, K as ta, a3 as na, a7 as ra, a4 as oa, u as ia, a6 as la, L as ua } from "./index-DAcbUV6I.mjs";
1
+ import { D as t, f as n, k as r, C as o, l as i, q as l, n as u, r as c, P as d, Q as m, F as S, o as T, H as p, I as b, M as g, B as C, p as I, E as v, y as B, t as F, v as J, w as A, x as D, R as f, A as h, j as E, S as M, G as x, U as y, z as H, e as P, g as G, h as O, T as U, d as z, a as L, a0 as j, c as w, V as K, O as N, i as Q, Z as V, N as Y, W as _, a2 as k, $ as q, X as R, a8 as W, s as X, a1 as Z, Y as $, b as aa, a5 as sa, J as ea, K as ta, a3 as na, a7 as ra, a4 as oa, u as ia, a6 as la, L as ua } from "./index-CSo3vK_R.mjs";
2
2
  import "@vueuse/core";
3
3
  export {
4
4
  t as AvatarPicture,
@@ -0,0 +1,65 @@
1
+ import { DefineComponent } from 'vue';
2
+ import { default as UiTable } from '../components/table/UiTable';
3
+ import { default as TableAdvanced } from '../components/table/advanced/TableAdvanced';
4
+ import { default as TableHeader } from '../components/table/advanced/TableHeader';
5
+ import { default as ColumnSettingsDialog } from '../components/table/advanced/ColumnSettingsDialog';
6
+ import { default as TableCard } from '../components/table/card/TableCard';
7
+ import { default as TableCardsView } from '../components/table/card/TableCardsView';
8
+ import { default as SearchFilter } from '../components/SearchFilter';
9
+ import { default as ConfirmDialog } from '../components/ConfirmDialog';
10
+ import { default as CopyButton } from '../components/CopyButton';
11
+ import { default as DotsMenu } from '../components/DotsMenu';
12
+ import { default as FormMetadata } from '../components/form/footer/FormMetadata';
13
+ import { default as JBtn } from '../components/JBtn';
14
+ import { default as DeleteAllBtn } from '../components/DeleteAllBtn';
15
+ import { default as EditButton } from '../components/EditButton';
16
+ import { default as JIconBtn } from '../components/JIconBtn';
17
+ import { default as JSelect } from '../components/form/JSelect';
18
+ import { default as JTextArea } from '../components/form/JTextArea';
19
+ import { default as JTextField } from '../components/form/JTextField';
20
+ import { default as JForm } from '../components/form/JForm';
21
+ import { default as TabFormHeader } from '../components/form/headless/TabFormHeader';
22
+ import { default as FormHeadless } from '../components/form/headless/FormHeadless';
23
+ import { default as ParentCard } from '../components/ParentCard';
24
+ import { default as SpinnerLoader } from '../components/spinner/SpinnerLoader';
25
+ import { default as ContextMenu } from '../components/ContextMenu';
26
+ import { default as JAvatar } from '../components/JAvatar';
27
+ import { default as AvatarPicture } from '../components/AvatarPicture';
28
+ import { default as JDialog } from '../components/JDialog';
29
+ import { default as SubMenu } from '../components/menu/SubMenu';
30
+ import { default as GlobalScopeFilter } from '../modules/scope/GlobalScopeFilter';
31
+ import { default as GlobalSpinner } from '../components/spinner/GlobalSpinner';
32
+ declare module 'vue' {
33
+ interface Components {
34
+ UiTable: DefineComponent<(typeof UiTable)['$props']>;
35
+ TableAdvanced: DefineComponent<(typeof TableAdvanced)['$props']>;
36
+ TableHeader: DefineComponent<(typeof TableHeader)['$props']>;
37
+ ColumnSettingsDialog: DefineComponent<(typeof ColumnSettingsDialog)['$props']>;
38
+ TableCard: DefineComponent<typeof TableCard>;
39
+ TableCardsView: DefineComponent<(typeof TableCardsView)['$props']>;
40
+ SearchFilter: DefineComponent<(typeof SearchFilter)['$props']>;
41
+ ConfirmDialog: DefineComponent<(typeof ConfirmDialog)['$props']>;
42
+ CopyButton: DefineComponent<(typeof CopyButton)['$props']>;
43
+ DotsMenu: DefineComponent<(typeof DotsMenu)['$props']>;
44
+ FormMetadata: DefineComponent<(typeof FormMetadata)['$props']>;
45
+ JBtn: DefineComponent<(typeof JBtn)['$props']>;
46
+ DeleteAllBtn: DefineComponent<(typeof DeleteAllBtn)['$props']>;
47
+ EditButton: DefineComponent<(typeof EditButton)['$props']>;
48
+ JIconBtn: DefineComponent<typeof JIconBtn>;
49
+ JSelect: DefineComponent<(typeof JSelect)['$props']>;
50
+ JTextArea: DefineComponent<(typeof JTextArea)['$props']>;
51
+ JTextField: DefineComponent<(typeof JTextField)['$props']>;
52
+ JForm: DefineComponent<(typeof JForm)['$props']>;
53
+ TabFormHeader: DefineComponent<(typeof TabFormHeader)['$props']>;
54
+ FormHeadless: DefineComponent<(typeof FormHeadless)['$props']>;
55
+ ParentCard: DefineComponent<(typeof ParentCard)['$props']>;
56
+ SpinnerLoader: DefineComponent<(typeof SpinnerLoader)['$props']>;
57
+ ContextMenu: DefineComponent<(typeof ContextMenu)['$props']>;
58
+ JAvatar: DefineComponent<(typeof JAvatar)['$props']>;
59
+ AvatarPicture: DefineComponent<(typeof AvatarPicture)['$props']>;
60
+ JDialog: DefineComponent<(typeof JDialog)['$props']>;
61
+ SubMenu: DefineComponent<(typeof SubMenu)['$props']>;
62
+ GlobalScopeFilter: DefineComponent<(typeof GlobalScopeFilter)['$props']>;
63
+ GlobalSpinner: DefineComponent<typeof GlobalSpinner>;
64
+ }
65
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jplan-pack",
3
- "version": "0.6.631",
3
+ "version": "0.6.632",
4
4
  "main": "./dist/jplan-pack.cjs.js",
5
5
  "module": "./dist/jplan-pack.es.js",
6
6
  "types": "dist/types/index.d.ts",